summaryrefslogtreecommitdiffstats
path: root/src/boost/tools
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/boost/tools/Jamfile.v255
-rw-r--r--src/boost/tools/auto_index/build/Jamfile.v235
-rw-r--r--src/boost/tools/auto_index/include/auto_index_helpers.qbk19
-rw-r--r--src/boost/tools/auto_index/index.html15
-rw-r--r--src/boost/tools/auto_index/src/auto_index.cpp783
-rw-r--r--src/boost/tools/auto_index/src/auto_index.hpp137
-rw-r--r--src/boost/tools/auto_index/src/file_scanning.cpp495
-rw-r--r--src/boost/tools/auto_index/src/index_generator.cpp327
-rw-r--r--src/boost/tools/auto_index/src/tiny_xml.cpp257
-rw-r--r--src/boost/tools/auto_index/src/tiny_xml.hpp83
-rw-r--r--src/boost/tools/auto_index/test/Jamfile.v262
-rw-r--r--src/boost/tools/auto_index/test/index.idx26
-rw-r--r--src/boost/tools/auto_index/test/test1.gold6671
-rw-r--r--src/boost/tools/auto_index/test/test2.gold6671
-rw-r--r--src/boost/tools/auto_index/test/test3.gold6671
-rw-r--r--src/boost/tools/auto_index/test/type_traits.docbook6673
-rw-r--r--src/boost/tools/bcp/Jamfile.v236
-rw-r--r--src/boost/tools/bcp/README.md24
-rw-r--r--src/boost/tools/bcp/add_dependent_lib.cpp230
-rw-r--r--src/boost/tools/bcp/add_path.cpp569
-rw-r--r--src/boost/tools/bcp/bcp.hpp47
-rw-r--r--src/boost/tools/bcp/bcp_imp.cpp300
-rw-r--r--src/boost/tools/bcp/bcp_imp.hpp121
-rw-r--r--src/boost/tools/bcp/copy_path.cpp248
-rw-r--r--src/boost/tools/bcp/file_types.cpp72
-rw-r--r--src/boost/tools/bcp/fileview.cpp143
-rw-r--r--src/boost/tools/bcp/fileview.hpp72
-rw-r--r--src/boost/tools/bcp/index.html17
-rw-r--r--src/boost/tools/bcp/licence_info.cpp721
-rw-r--r--src/boost/tools/bcp/licence_info.hpp39
-rw-r--r--src/boost/tools/bcp/main.cpp183
-rw-r--r--src/boost/tools/bcp/output_licence_info.cpp410
-rw-r--r--src/boost/tools/bcp/path_operations.cpp41
-rw-r--r--src/boost/tools/bcp/scan_cvs_path.cpp147
-rw-r--r--src/boost/tools/bcp/scan_licence.cpp275
-rw-r--r--src/boost/tools/bcp/test/Jamfile.v225
-rw-r--r--src/boost/tools/boost_install/BoostConfig.cmake282
-rw-r--r--src/boost/tools/boost_install/BoostDetectToolset.cmake156
-rw-r--r--src/boost/tools/boost_install/Jamfile10
-rw-r--r--src/boost/tools/boost_install/README.md8
-rw-r--r--src/boost/tools/boost_install/boost-install-dirs.jam104
-rw-r--r--src/boost/tools/boost_install/boost-install.jam1238
-rw-r--r--src/boost/tools/boost_install/test/BoostVersion.cmake1
-rw-r--r--src/boost/tools/boost_install/test/atomic/CMakeLists.txt37
-rw-r--r--src/boost/tools/boost_install/test/atomic/quick.cpp45
-rw-r--r--src/boost/tools/boost_install/test/chrono/CMakeLists.txt37
-rw-r--r--src/boost/tools/boost_install/test/chrono/quick.cpp16
-rw-r--r--src/boost/tools/boost_install/test/container/CMakeLists.txt37
-rw-r--r--src/boost/tools/boost_install/test/container/quick.cpp25
-rw-r--r--src/boost/tools/boost_install/test/filesystem/CMakeLists.txt41
-rw-r--r--src/boost/tools/boost_install/test/filesystem/quick.cpp24
-rw-r--r--src/boost/tools/boost_install/test/headers/CMakeLists.txt34
-rw-r--r--src/boost/tools/boost_install/test/headers/quick.cpp10
-rw-r--r--src/boost/tools/boost_install/test/iostreams/CMakeLists.txt51
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/CHANGES356
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/LICENSE42
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile217
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile-libbz2_so59
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README196
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.COMPILATION.PROBLEMS58
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.XML.STUFF45
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/blocksort.c1094
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-common.xsl39
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-fo.xsl276
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-html.xsl23
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff76
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff.147
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep85
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep.156
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip.css74
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1454
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1.preformatted399
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.c2036
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.txt391
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2recover.c516
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.c1572
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.h282
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib_private.h509
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore61
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore.1152
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/compress.c672
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/crctable.c104
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/decompress.c652
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.c175
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.dsp93
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/entities.xml10
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/format.pl68
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/huffman.c205
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.def27
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.dsp130
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/makefile.msc63
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.html2541
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.pdfbin0 -> 183803 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.ps216419
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.xml2964
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/mk251.c31
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/randtable.c84
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.bz2bin0 -> 32348 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.refbin0 -> 98696 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.bz2bin0 -> 73732 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.refbin0 -> 212340 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.bz2bin0 -> 235 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.ref30007
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/spewG.c54
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/unzcrash.c141
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words09
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words14
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words25
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words330
-rw-r--r--src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/xmlproc.sh114
-rw-r--r--src/boost/tools/boost_install/test/iostreams/test.txt.bz2bin0 -> 57 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/test.txt.gzbin0 -> 53 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/test_bzip2.cpp29
-rw-r--r--src/boost/tools/boost_install/test/iostreams/test_gzip.cpp29
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/CMakeLists.txt249
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/ChangeLog1515
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/FAQ368
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/INDEX68
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile5
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile.in410
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/README115
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/adler32.c186
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.pup69
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.sas68
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/compress.c86
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/configure921
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/README.contrib78
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/buffer_demo.adb106
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/mtest.adb156
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/read.adb156
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/readme.txt65
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/test.adb463
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.adb225
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.ads114
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.adb141
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.ads450
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.adb701
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.ads328
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.gpr20
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/amd64/amd64-match.S452
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/README.68651
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/match.S357
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/Makefile8
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/README4
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.c466
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.h83
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.pkbin0 -> 8 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.txt1
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLib.pas557
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLibConst.pas11
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/readme.txt76
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/zlibd32.mak99
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.build33
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.chmbin0 -> 72726 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.sln21
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/AssemblyInfo.cs58
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs202
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs83
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs198
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs106
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs288
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.csproj141
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs301
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs105
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/UnitTests.cs274
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/LICENSE_1_0.txt23
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/readme.txt58
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/gcc_gvmat64/gvmat64.S574
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/README1
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.c615
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.h37
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inffix9.h107
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inflate9.h47
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.c324
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.h61
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffas86.c1157
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffast.S1368
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/test.cpp24
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.cpp329
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.h128
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream.h307
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream_test.cpp25
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/README35
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/TODO17
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/test.cc50
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.cc479
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.h466
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/bld_ml64.bat2
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/gvmat64.asm553
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffas8664.c186
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffasx64.asm396
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/readme.txt31
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/bld_ml32.bat2
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/inffas32.asm1080
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/match686.asm479
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/readme.txt27
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile25
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile.am45
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_Changes.txt6
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_info.txt74
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/configure.ac32
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/crypt.h131
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.c247
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.h208
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.c462
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.h28
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/make_vms.com25
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunz.c660
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunzip.163
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.146
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.c520
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.pc.in12
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.c291
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.h37
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.c2125
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.h437
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.c2007
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.h362
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/example.pas599
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/readme.txt76
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibd32.mak99
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibpas.pas276
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/Makefile42
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/README63
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.c840
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.h35
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/pufftest.c165
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/zeros.rawbin0 -> 2517 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.c275
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.txt10
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile14
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile.msc17
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/untgz.c674
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/readme.txt78
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj310
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj.filters22
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj307
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj.filters22
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj420
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj.filters58
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj310
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj.filters22
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlib.rc32
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj473
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj.filters77
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.def153
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.sln135
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj657
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj.filters118
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/miniunz.vcxproj314
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/minizip.vcxproj311
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlib.vcxproj426
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlibdll.vcxproj314
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlib.rc32
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibstat.vcxproj464
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.def153
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.sln117
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.vcxproj688
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/miniunz.vcxproj316
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/minizip.vcxproj313
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlib.vcxproj430
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlibdll.vcxproj316
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlib.rc32
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibstat.vcxproj467
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.def153
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.sln119
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.vcxproj692
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/miniunz.vcxproj316
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/minizip.vcxproj313
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlib.vcxproj430
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlibdll.vcxproj316
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlib.rc32
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibstat.vcxproj467
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.def153
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.sln119
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.vcxproj692
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/miniunz.vcproj565
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/minizip.vcproj562
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlib.vcproj852
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlibdll.vcproj565
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlib.rc32
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibstat.vcproj835
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.def153
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.sln144
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.vcproj1156
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.c442
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.h441
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.c2163
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.h349
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/README.examples49
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/enough.c572
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/fitblk.c233
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gun.c702
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzappend.c504
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzjoin.c449
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.c1059
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.h91
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zlib_how.html545
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zpipe.c205
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zran.c409
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzclose.c25
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzguts.h218
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzlib.c637
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzread.c654
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzwrite.c665
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/infback.c640
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.c323
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.h11
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffixed.h94
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c1561
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.h125
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.c304
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.h62
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/make_vms.com867
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.bor115
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.dj2104
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.emx69
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.msc112
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.tc100
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/Makefile126
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/README5
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.emx69
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.riscos151
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/README3
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/descrip.mms48
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/Makefile.os2136
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/zlib.def51
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/visual-basic.txt160
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/README40048
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/bndsrc119
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/make.sh366
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/zlib.inc527
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/qnx/package.qpg141
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/example.c602
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/infcover.c671
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/minigzip.c651
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/treebuild.xml116
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.c1203
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.h128
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/uncompr.c93
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_f.mak43
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_l.mak43
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/DLL_FAQ.txt397
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.bor110
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.gcc182
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.msc163
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/README-WIN32.txt103
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/VisualC.txt3
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib.def94
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib1.rc40
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h534
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.cmakein536
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.in534
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3149
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3.pdfbin0 -> 19318 bytes
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.h1912
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.map94
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.cmakein13
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.in13
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib2ansi152
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.c325
-rw-r--r--src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.h271
-rw-r--r--src/boost/tools/boost_install/test/log/CMakeLists.txt41
-rw-r--r--src/boost/tools/boost_install/test/log/quick.cpp15
-rw-r--r--src/boost/tools/boost_install/test/mpi/CMakeLists.txt37
-rw-r--r--src/boost/tools/boost_install/test/mpi/quick.cpp20
-rw-r--r--src/boost/tools/boost_install/test/program_options/CMakeLists.txt37
-rw-r--r--src/boost/tools/boost_install/test/program_options/quick.cpp49
-rw-r--r--src/boost/tools/boost_install/test/python/CMakeLists.txt53
-rw-r--r--src/boost/tools/boost_install/test/python/quick.cpp27
-rw-r--r--src/boost/tools/boost_install/test/random/CMakeLists.txt40
-rw-r--r--src/boost/tools/boost_install/test/random/lib.cpp18
-rw-r--r--src/boost/tools/boost_install/test/random/main.cpp17
-rw-r--r--src/boost/tools/boost_install/test/regex/CMakeLists.txt50
-rw-r--r--src/boost/tools/boost_install/test/regex/quick.cpp21
-rw-r--r--src/boost/tools/boost_install/test/serialization/CMakeLists.txt42
-rw-r--r--src/boost/tools/boost_install/test/serialization/quick.cpp36
-rw-r--r--src/boost/tools/boost_install/test/serialization/wquick.cpp36
-rw-r--r--src/boost/tools/boost_install/test/system/CMakeLists.txt37
-rw-r--r--src/boost/tools/boost_install/test/system/quick.cpp36
-rw-r--r--src/boost/tools/boost_install/test/test/CMakeLists.txt42
-rw-r--r--src/boost/tools/boost_install/test/test/test_mon.cpp14
-rw-r--r--src/boost/tools/boost_install/test/test/test_utf.cpp16
-rw-r--r--src/boost/tools/boost_install/test/thread/CMakeLists.txt27
-rw-r--r--src/boost/tools/boost_install/test/thread/quick.cpp27
-rw-r--r--src/boost/tools/boost_install/test/wave/CMakeLists.txt37
-rw-r--r--src/boost/tools/boost_install/test/wave/quick.cpp49
-rw-r--r--src/boost/tools/boostbook/dtd/1.1/boost-no-inspect4
-rw-r--r--src/boost/tools/boostbook/dtd/1.1/boostbook.dtd435
-rw-r--r--src/boost/tools/boostbook/dtd/boostbook.dtd439
-rw-r--r--src/boost/tools/boostbook/index.html21
-rw-r--r--src/boost/tools/boostbook/setup_boostbook.py300
-rwxr-xr-xsrc/boost/tools/boostbook/setup_boostbook.sh181
-rw-r--r--src/boost/tools/boostbook/test/Jamfile.v213
-rw-r--r--src/boost/tools/boostbook/test/alt.xml47
-rw-r--r--src/boost/tools/boostbook/test/doxygen/Jamfile.v241
-rw-r--r--src/boost/tools/boostbook/test/doxygen/autodoc.gold113
-rw-r--r--src/boost/tools/boostbook/test/doxygen/boost/example.hpp233
-rw-r--r--src/boost/tools/boostbook/test/doxygen/example.xml13
-rw-r--r--src/boost/tools/boostbook/xsl/admon.xsl36
-rw-r--r--src/boost/tools/boostbook/xsl/annotation.xsl453
-rw-r--r--src/boost/tools/boostbook/xsl/callout.xsl71
-rw-r--r--src/boost/tools/boostbook/xsl/caramel/LICENSE58
-rw-r--r--src/boost/tools/boostbook/xsl/caramel/concept2docbook.xsl812
-rw-r--r--src/boost/tools/boostbook/xsl/caramel/cpp-operators.xml288
-rw-r--r--src/boost/tools/boostbook/xsl/caramel/unparser.xsl497
-rw-r--r--src/boost/tools/boostbook/xsl/chunk-common.xsl126
-rw-r--r--src/boost/tools/boostbook/xsl/docbook-layout.xsl262
-rw-r--r--src/boost/tools/boostbook/xsl/docbook.xsl538
-rw-r--r--src/boost/tools/boostbook/xsl/doxygen/collect.xsl58
-rw-r--r--src/boost/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl1846
-rw-r--r--src/boost/tools/boostbook/xsl/dtd/dtd2boostbook.xsl217
-rw-r--r--src/boost/tools/boostbook/xsl/error.xsl19
-rw-r--r--src/boost/tools/boostbook/xsl/fo.xsl520
-rw-r--r--src/boost/tools/boostbook/xsl/function.xsl1217
-rw-r--r--src/boost/tools/boostbook/xsl/global.xsl80
-rw-r--r--src/boost/tools/boostbook/xsl/html-base.xsl428
-rw-r--r--src/boost/tools/boostbook/xsl/html-help.xsl49
-rw-r--r--src/boost/tools/boostbook/xsl/html-single.xsl38
-rw-r--r--src/boost/tools/boostbook/xsl/html.xsl37
-rw-r--r--src/boost/tools/boostbook/xsl/index.xsl18
-rw-r--r--src/boost/tools/boostbook/xsl/library.xsl129
-rw-r--r--src/boost/tools/boostbook/xsl/lookup.xsl457
-rw-r--r--src/boost/tools/boostbook/xsl/macro.xsl128
-rw-r--r--src/boost/tools/boostbook/xsl/manpages.xsl195
-rw-r--r--src/boost/tools/boostbook/xsl/navbar.xsl425
-rw-r--r--src/boost/tools/boostbook/xsl/reference.xsl198
-rw-r--r--src/boost/tools/boostbook/xsl/relative-href.xsl98
-rw-r--r--src/boost/tools/boostbook/xsl/source-highlight.xsl578
-rw-r--r--src/boost/tools/boostbook/xsl/template.xsl601
-rw-r--r--src/boost/tools/boostbook/xsl/testing/Jamfile.xsl243
-rw-r--r--src/boost/tools/boostbook/xsl/testing/testsuite.xsl118
-rw-r--r--src/boost/tools/boostbook/xsl/type.xsl1693
-rw-r--r--src/boost/tools/boostbook/xsl/utility.xsl52
-rw-r--r--src/boost/tools/boostbook/xsl/xhtml.xsl37
-rw-r--r--src/boost/tools/boostbook/xsl/xref.xsl77
-rw-r--r--src/boost/tools/boostdep/CMakeLists.txt15
-rw-r--r--src/boost/tools/boostdep/README.md4
-rw-r--r--src/boost/tools/boostdep/build/Jamfile11
-rw-r--r--src/boost/tools/boostdep/depinst/depinst.py282
-rw-r--r--src/boost/tools/boostdep/depinst/exceptions.txt396
-rw-r--r--src/boost/tools/boostdep/examples/report.bat39
-rw-r--r--src/boost/tools/boostdep/examples/report.css24
-rw-r--r--src/boost/tools/boostdep/src/boostdep.cpp3005
-rw-r--r--src/boost/tools/boostdep/test/Jamfile12
-rw-r--r--src/boost/tools/boostdep/test/assert-primary.txt9
-rw-r--r--src/boost/tools/boostdep/test/bind-secondary.txt5
-rw-r--r--src/boost/tools/boostdep/test/utf8-test.zipbin0 -> 495 bytes
-rw-r--r--src/boost/tools/build/CONTRIBUTING.adoc179
-rw-r--r--src/boost/tools/build/Jamroot.jam271
-rw-r--r--src/boost/tools/build/LICENSE.txt23
-rw-r--r--src/boost/tools/build/README.adoc31
-rw-r--r--src/boost/tools/build/azure-pipelines.yml727
-rw-r--r--src/boost/tools/build/boost-build.jam8
-rw-r--r--src/boost/tools/build/bootstrap.bat39
-rwxr-xr-xsrc/boost/tools/build/bootstrap.sh28
-rw-r--r--src/boost/tools/build/bootstrap_vms.com48
-rw-r--r--src/boost/tools/build/example/asciidoctor/example.adoc3
-rw-r--r--src/boost/tools/build/example/asciidoctor/example_manpage.adoc38
-rw-r--r--src/boost/tools/build/example/asciidoctor/jamroot.jam11
-rw-r--r--src/boost/tools/build/example/boost-build.jam6
-rw-r--r--src/boost/tools/build/example/built_tool/Jamroot.jam8
-rw-r--r--src/boost/tools/build/example/built_tool/core/Jamfile.jam39
-rw-r--r--src/boost/tools/build/example/built_tool/core/a.td0
-rw-r--r--src/boost/tools/build/example/built_tool/core/core.cpp5
-rw-r--r--src/boost/tools/build/example/built_tool/readme.txt5
-rw-r--r--src/boost/tools/build/example/built_tool/tblgen/Jamfile.jam4
-rw-r--r--src/boost/tools/build/example/built_tool/tblgen/tblgen.cpp9
-rw-r--r--src/boost/tools/build/example/complex-testing/compile-fail.cpp17
-rw-r--r--src/boost/tools/build/example/complex-testing/fail.cpp17
-rw-r--r--src/boost/tools/build/example/complex-testing/jamroot.jam15
-rw-r--r--src/boost/tools/build/example/complex-testing/post.cpp17
-rw-r--r--src/boost/tools/build/example/complex-testing/success.cpp17
-rw-r--r--src/boost/tools/build/example/customization/class.verbatim7
-rw-r--r--src/boost/tools/build/example/customization/codegen.cpp36
-rw-r--r--src/boost/tools/build/example/customization/inline_file.py44
-rw-r--r--src/boost/tools/build/example/customization/jamroot.jam9
-rw-r--r--src/boost/tools/build/example/customization/readme.txt11
-rw-r--r--src/boost/tools/build/example/customization/t1.verbatim2
-rw-r--r--src/boost/tools/build/example/customization/t2.verbatim0
-rw-r--r--src/boost/tools/build/example/customization/usage.verbatim5
-rw-r--r--src/boost/tools/build/example/customization/verbatim.jam61
-rw-r--r--src/boost/tools/build/example/customization/verbatim.py47
-rw-r--r--src/boost/tools/build/example/generate/README.txt11
-rw-r--r--src/boost/tools/build/example/generate/a.cpp10
-rw-r--r--src/boost/tools/build/example/generate/gen.jam26
-rw-r--r--src/boost/tools/build/example/generate/gen.py16
-rw-r--r--src/boost/tools/build/example/generate/jamroot.jam9
-rw-r--r--src/boost/tools/build/example/generator/README.txt6
-rw-r--r--src/boost/tools/build/example/generator/foo.gci10
-rw-r--r--src/boost/tools/build/example/generator/jamroot.jam6
-rw-r--r--src/boost/tools/build/example/generator/soap.jam86
-rw-r--r--src/boost/tools/build/example/gettext/jamfile.jam26
-rw-r--r--src/boost/tools/build/example/gettext/jamroot.jam6
-rw-r--r--src/boost/tools/build/example/gettext/main.cpp28
-rw-r--r--src/boost/tools/build/example/gettext/readme.txt24
-rw-r--r--src/boost/tools/build/example/gettext/russian.po21
-rw-r--r--src/boost/tools/build/example/hello/hello.cpp18
-rw-r--r--src/boost/tools/build/example/hello/jamroot.jam1
-rw-r--r--src/boost/tools/build/example/hello/readme.adoc46
-rw-r--r--src/boost/tools/build/example/libraries/app/app.cpp15
-rw-r--r--src/boost/tools/build/example/libraries/app/jamfile.jam9
-rw-r--r--src/boost/tools/build/example/libraries/jamroot.jam4
-rw-r--r--src/boost/tools/build/example/libraries/util/foo/bar.cpp13
-rw-r--r--src/boost/tools/build/example/libraries/util/foo/include/lib1.h10
-rw-r--r--src/boost/tools/build/example/libraries/util/foo/jamfile.jam9
-rw-r--r--src/boost/tools/build/example/make/foo.py2
-rw-r--r--src/boost/tools/build/example/make/jamroot.jam22
-rw-r--r--src/boost/tools/build/example/make/main_cpp.pro1
-rw-r--r--src/boost/tools/build/example/make/readme.txt7
-rw-r--r--src/boost/tools/build/example/pch-multi/include/extra/meta.hpp17
-rw-r--r--src/boost/tools/build/example/pch-multi/include/pch.hpp19
-rw-r--r--src/boost/tools/build/example/pch-multi/include/std.hpp16
-rw-r--r--src/boost/tools/build/example/pch-multi/jamroot.jam30
-rw-r--r--src/boost/tools/build/example/pch-multi/source/hello_world.cpp17
-rw-r--r--src/boost/tools/build/example/pch/include/pch.hpp19
-rw-r--r--src/boost/tools/build/example/pch/jamroot.jam29
-rw-r--r--src/boost/tools/build/example/pch/source/hello_world.cpp15
-rw-r--r--src/boost/tools/build/example/pkg-config/debug-packages/debugged.pc4
-rw-r--r--src/boost/tools/build/example/pkg-config/jamroot.jam104
-rw-r--r--src/boost/tools/build/example/pkg-config/packages/debugged.pc4
-rw-r--r--src/boost/tools/build/example/pkg-config/packages/foobar.pc4
-rw-r--r--src/boost/tools/build/example/pkg-config/packages/mangled-mt.pc4
-rw-r--r--src/boost/tools/build/example/pkg-config/packages/mangled.pc4
-rw-r--r--src/boost/tools/build/example/pkg-config/packages/versioned.pc3
-rw-r--r--src/boost/tools/build/example/pkg-config/packages/with-var.pc4
-rw-r--r--src/boost/tools/build/example/pkg-config/test1.cpp11
-rw-r--r--src/boost/tools/build/example/pkg-config/test2.cpp12
-rw-r--r--src/boost/tools/build/example/pkg-config/test3.cpp12
-rw-r--r--src/boost/tools/build/example/pkg-config/test4.cpp11
-rw-r--r--src/boost/tools/build/example/pkg-config/test5.cpp12
-rw-r--r--src/boost/tools/build/example/python_modules/jamroot.jam8
-rw-r--r--src/boost/tools/build/example/python_modules/python_helpers.jam15
-rw-r--r--src/boost/tools/build/example/python_modules/python_helpers.py18
-rw-r--r--src/boost/tools/build/example/python_modules/readme.txt16
-rw-r--r--src/boost/tools/build/example/qt/README.txt20
-rw-r--r--src/boost/tools/build/example/qt/qt3/hello/canvas.cpp73
-rw-r--r--src/boost/tools/build/example/qt/qt3/hello/canvas.h35
-rw-r--r--src/boost/tools/build/example/qt/qt3/hello/jamroot.jam13
-rw-r--r--src/boost/tools/build/example/qt/qt3/hello/main.cpp36
-rw-r--r--src/boost/tools/build/example/qt/qt3/moccable-cpp/jamroot.jam11
-rw-r--r--src/boost/tools/build/example/qt/qt3/moccable-cpp/main.cpp41
-rw-r--r--src/boost/tools/build/example/qt/qt3/uic/hello_world_widget.ui58
-rw-r--r--src/boost/tools/build/example/qt/qt3/uic/jamroot.jam15
-rw-r--r--src/boost/tools/build/example/qt/qt3/uic/main.cpp18
-rw-r--r--src/boost/tools/build/example/qt/qt4/hello/arrow.cpp158
-rw-r--r--src/boost/tools/build/example/qt/qt4/hello/arrow.h30
-rw-r--r--src/boost/tools/build/example/qt/qt4/hello/jamroot.jam14
-rw-r--r--src/boost/tools/build/example/qt/qt4/hello/main.cpp27
-rw-r--r--src/boost/tools/build/example/qt/qt4/moccable-cpp/jamroot.jam18
-rw-r--r--src/boost/tools/build/example/qt/qt4/moccable-cpp/main.cpp39
-rw-r--r--src/boost/tools/build/example/qt/qt4/uic/hello_world_widget.ui55
-rw-r--r--src/boost/tools/build/example/qt/qt4/uic/jamroot.jam18
-rw-r--r--src/boost/tools/build/example/qt/qt4/uic/main.cpp23
-rw-r--r--src/boost/tools/build/example/sanitizers/jamroot.jam1
-rw-r--r--src/boost/tools/build/example/sanitizers/main.cpp9
-rw-r--r--src/boost/tools/build/example/sanitizers/readme.adoc64
-rw-r--r--src/boost/tools/build/example/sass/importing.scss3
-rw-r--r--src/boost/tools/build/example/sass/include/foobar.scss3
-rw-r--r--src/boost/tools/build/example/sass/jamroot.jam15
-rw-r--r--src/boost/tools/build/example/sass/singleton.sass12
-rw-r--r--src/boost/tools/build/example/sass/singleton.scss11
-rw-r--r--src/boost/tools/build/example/site-config.jam4
-rw-r--r--src/boost/tools/build/example/testing/compile-fail.cpp17
-rw-r--r--src/boost/tools/build/example/testing/fail.cpp17
-rw-r--r--src/boost/tools/build/example/testing/jamroot.jam10
-rw-r--r--src/boost/tools/build/example/testing/success.cpp17
-rw-r--r--src/boost/tools/build/example/time/hello.cpp16
-rw-r--r--src/boost/tools/build/example/time/jamroot.jam16
-rw-r--r--src/boost/tools/build/example/time/readme.qbk47
-rw-r--r--src/boost/tools/build/example/try_compile/Jamroot.jam29
-rw-r--r--src/boost/tools/build/example/try_compile/foo.cpp6
-rw-r--r--src/boost/tools/build/example/try_compile/main.cpp8
-rw-r--r--src/boost/tools/build/example/user-config.jam92
-rw-r--r--src/boost/tools/build/example/variant/a.cpp7
-rw-r--r--src/boost/tools/build/example/variant/jamfile.jam11
-rw-r--r--src/boost/tools/build/example/variant/jamroot.jam12
-rw-r--r--src/boost/tools/build/example/variant/libs/jamfile.jam8
-rw-r--r--src/boost/tools/build/example/variant/libs/l.cpp9
-rw-r--r--src/boost/tools/build/example/variant/readme.qbk94
-rw-r--r--src/boost/tools/build/notes/README.txt8
-rw-r--r--src/boost/tools/build/notes/build_dir_option.txt77
-rw-r--r--src/boost/tools/build/notes/changes.txt317
-rw-r--r--src/boost/tools/build/notes/relative_source_paths.txt76
-rw-r--r--src/boost/tools/build/notes/release_procedure.txt83
-rw-r--r--src/boost/tools/build/src/__init__.py0
-rw-r--r--src/boost/tools/build/src/bootstrap.jam18
-rw-r--r--src/boost/tools/build/src/build-system.jam1079
-rw-r--r--src/boost/tools/build/src/build/__init__.py0
-rw-r--r--src/boost/tools/build/src/build/ac.jam324
-rw-r--r--src/boost/tools/build/src/build/alias.jam78
-rwxr-xr-xsrc/boost/tools/build/src/build/alias.py75
-rw-r--r--src/boost/tools/build/src/build/build-request.jam400
-rw-r--r--src/boost/tools/build/src/build/build_request.py222
-rw-r--r--src/boost/tools/build/src/build/config-cache.jam78
-rw-r--r--src/boost/tools/build/src/build/configure.jam620
-rw-r--r--src/boost/tools/build/src/build/configure.py176
-rw-r--r--src/boost/tools/build/src/build/engine.py246
-rw-r--r--src/boost/tools/build/src/build/errors.py135
-rw-r--r--src/boost/tools/build/src/build/feature.jam1442
-rw-r--r--src/boost/tools/build/src/build/feature.py914
-rw-r--r--src/boost/tools/build/src/build/generators.jam1447
-rw-r--r--src/boost/tools/build/src/build/generators.py1209
-rw-r--r--src/boost/tools/build/src/build/project.jam1357
-rw-r--r--src/boost/tools/build/src/build/project.py1285
-rw-r--r--src/boost/tools/build/src/build/property-set.jam591
-rw-r--r--src/boost/tools/build/src/build/property.jam977
-rw-r--r--src/boost/tools/build/src/build/property.py750
-rw-r--r--src/boost/tools/build/src/build/property_set.py498
-rw-r--r--src/boost/tools/build/src/build/readme.txt11
-rw-r--r--src/boost/tools/build/src/build/scanner.jam163
-rw-r--r--src/boost/tools/build/src/build/scanner.py167
-rw-r--r--src/boost/tools/build/src/build/targets.jam1792
-rw-r--r--src/boost/tools/build/src/build/targets.py1523
-rw-r--r--src/boost/tools/build/src/build/toolset.jam703
-rw-r--r--src/boost/tools/build/src/build/toolset.py417
-rw-r--r--src/boost/tools/build/src/build/type.jam404
-rw-r--r--src/boost/tools/build/src/build/type.py381
-rw-r--r--src/boost/tools/build/src/build/version.jam166
-rw-r--r--src/boost/tools/build/src/build/version.py38
-rw-r--r--src/boost/tools/build/src/build/virtual-target.jam1394
-rw-r--r--src/boost/tools/build/src/build/virtual_target.py1175
-rw-r--r--src/boost/tools/build/src/build_system.py682
-rw-r--r--src/boost/tools/build/src/contrib/__init__.py0
-rw-r--r--src/boost/tools/build/src/contrib/boost.jam308
-rw-r--r--src/boost/tools/build/src/contrib/boost.py280
-rw-r--r--src/boost/tools/build/src/contrib/modular.jam288
-rw-r--r--src/boost/tools/build/src/contrib/tntnet.jam208
-rw-r--r--src/boost/tools/build/src/contrib/wxFormBuilder.jam195
-rw-r--r--src/boost/tools/build/src/engine/Jambase189
-rw-r--r--src/boost/tools/build/src/engine/boost-jam.spec64
-rw-r--r--src/boost/tools/build/src/engine/boost-no-inspect1
-rw-r--r--src/boost/tools/build/src/engine/build.bat194
-rwxr-xr-xsrc/boost/tools/build/src/engine/build.sh496
-rw-r--r--src/boost/tools/build/src/engine/build_vms.com153
-rw-r--r--src/boost/tools/build/src/engine/builtins.cpp2728
-rw-r--r--src/boost/tools/build/src/engine/builtins.h74
-rw-r--r--src/boost/tools/build/src/engine/bump_version.py98
-rw-r--r--src/boost/tools/build/src/engine/check_cxx11.cpp21
-rw-r--r--src/boost/tools/build/src/engine/class.cpp191
-rw-r--r--src/boost/tools/build/src/engine/class.h15
-rw-r--r--src/boost/tools/build/src/engine/command.cpp121
-rw-r--r--src/boost/tools/build/src/engine/command.h101
-rw-r--r--src/boost/tools/build/src/engine/compile.cpp233
-rw-r--r--src/boost/tools/build/src/engine/compile.h60
-rw-r--r--src/boost/tools/build/src/engine/config.h34
-rw-r--r--src/boost/tools/build/src/engine/config_toolset.bat209
-rw-r--r--src/boost/tools/build/src/engine/constants.cpp192
-rw-r--r--src/boost/tools/build/src/engine/constants.h76
-rw-r--r--src/boost/tools/build/src/engine/cwd.cpp88
-rw-r--r--src/boost/tools/build/src/engine/cwd.h36
-rw-r--r--src/boost/tools/build/src/engine/debian/changelog72
-rw-r--r--src/boost/tools/build/src/engine/debian/control16
-rw-r--r--src/boost/tools/build/src/engine/debian/copyright25
-rw-r--r--src/boost/tools/build/src/engine/debian/jam.man.sgml236
-rwxr-xr-xsrc/boost/tools/build/src/engine/debian/rules73
-rw-r--r--src/boost/tools/build/src/engine/debug.cpp158
-rw-r--r--src/boost/tools/build/src/engine/debug.h63
-rw-r--r--src/boost/tools/build/src/engine/debugger.cpp2738
-rw-r--r--src/boost/tools/build/src/engine/debugger.h64
-rw-r--r--src/boost/tools/build/src/engine/execcmd.cpp122
-rw-r--r--src/boost/tools/build/src/engine/execcmd.h115
-rw-r--r--src/boost/tools/build/src/engine/execnt.cpp1370
-rw-r--r--src/boost/tools/build/src/engine/execunix.cpp606
-rw-r--r--src/boost/tools/build/src/engine/execvms.cpp419
-rw-r--r--src/boost/tools/build/src/engine/filent.cpp517
-rw-r--r--src/boost/tools/build/src/engine/filesys.cpp711
-rw-r--r--src/boost/tools/build/src/engine/filesys.h111
-rw-r--r--src/boost/tools/build/src/engine/fileunix.cpp527
-rw-r--r--src/boost/tools/build/src/engine/filevms.cpp440
-rw-r--r--src/boost/tools/build/src/engine/frames.cpp29
-rw-r--r--src/boost/tools/build/src/engine/frames.h46
-rw-r--r--src/boost/tools/build/src/engine/function.cpp5341
-rw-r--r--src/boost/tools/build/src/engine/function.h49
-rw-r--r--src/boost/tools/build/src/engine/glob.cpp152
-rw-r--r--src/boost/tools/build/src/engine/guess_toolset.bat115
-rw-r--r--src/boost/tools/build/src/engine/hash.cpp388
-rw-r--r--src/boost/tools/build/src/engine/hash.h80
-rw-r--r--src/boost/tools/build/src/engine/hcache.cpp522
-rw-r--r--src/boost/tools/build/src/engine/hcache.h20
-rw-r--r--src/boost/tools/build/src/engine/hdrmacro.cpp140
-rw-r--r--src/boost/tools/build/src/engine/hdrmacro.h22
-rw-r--r--src/boost/tools/build/src/engine/headers.cpp198
-rw-r--r--src/boost/tools/build/src/engine/headers.h26
-rw-r--r--src/boost/tools/build/src/engine/jam.cpp794
-rw-r--r--src/boost/tools/build/src/engine/jam.h524
-rw-r--r--src/boost/tools/build/src/engine/jam_strings.cpp240
-rw-r--r--src/boost/tools/build/src/engine/jam_strings.h38
-rw-r--r--src/boost/tools/build/src/engine/jambase.cpp112
-rw-r--r--src/boost/tools/build/src/engine/jambase.h15
-rw-r--r--src/boost/tools/build/src/engine/jamgram.cpp2548
-rw-r--r--src/boost/tools/build/src/engine/jamgram.hpp164
-rw-r--r--src/boost/tools/build/src/engine/jamgram.y386
-rw-r--r--src/boost/tools/build/src/engine/jamgram.yy340
-rw-r--r--src/boost/tools/build/src/engine/jamgramtab.h46
-rw-r--r--src/boost/tools/build/src/engine/lists.cpp474
-rw-r--r--src/boost/tools/build/src/engine/lists.h114
-rw-r--r--src/boost/tools/build/src/engine/make.cpp941
-rw-r--r--src/boost/tools/build/src/engine/make.h45
-rw-r--r--src/boost/tools/build/src/engine/make1.cpp1515
-rw-r--r--src/boost/tools/build/src/engine/md5.cpp381
-rw-r--r--src/boost/tools/build/src/engine/md5.h91
-rw-r--r--src/boost/tools/build/src/engine/mem.cpp8
-rw-r--r--src/boost/tools/build/src/engine/mem.h78
-rw-r--r--src/boost/tools/build/src/engine/mkjambase.cpp123
-rw-r--r--src/boost/tools/build/src/engine/modules.cpp431
-rw-r--r--src/boost/tools/build/src/engine/modules.h53
-rw-r--r--src/boost/tools/build/src/engine/modules/order.cpp159
-rw-r--r--src/boost/tools/build/src/engine/modules/path.cpp25
-rw-r--r--src/boost/tools/build/src/engine/modules/property-set.cpp330
-rw-r--r--src/boost/tools/build/src/engine/modules/readme.txt3
-rw-r--r--src/boost/tools/build/src/engine/modules/regex.cpp233
-rw-r--r--src/boost/tools/build/src/engine/modules/sequence.cpp96
-rw-r--r--src/boost/tools/build/src/engine/modules/set.cpp43
-rw-r--r--src/boost/tools/build/src/engine/native.cpp34
-rw-r--r--src/boost/tools/build/src/engine/native.h35
-rw-r--r--src/boost/tools/build/src/engine/object.cpp397
-rw-r--r--src/boost/tools/build/src/engine/object.h46
-rw-r--r--src/boost/tools/build/src/engine/option.cpp94
-rw-r--r--src/boost/tools/build/src/engine/option.h25
-rw-r--r--src/boost/tools/build/src/engine/output.cpp159
-rw-r--r--src/boost/tools/build/src/engine/output.h42
-rw-r--r--src/boost/tools/build/src/engine/parse.cpp148
-rw-r--r--src/boost/tools/build/src/engine/parse.h81
-rw-r--r--src/boost/tools/build/src/engine/patchlevel.h16
-rw-r--r--src/boost/tools/build/src/engine/pathnt.cpp409
-rw-r--r--src/boost/tools/build/src/engine/pathsys.cpp302
-rw-r--r--src/boost/tools/build/src/engine/pathsys.h87
-rw-r--r--src/boost/tools/build/src/engine/pathunix.cpp86
-rw-r--r--src/boost/tools/build/src/engine/pathvms.cpp254
-rw-r--r--src/boost/tools/build/src/engine/regexp.cpp1330
-rw-r--r--src/boost/tools/build/src/engine/regexp.h36
-rw-r--r--src/boost/tools/build/src/engine/rules.cpp739
-rw-r--r--src/boost/tools/build/src/engine/rules.h274
-rw-r--r--src/boost/tools/build/src/engine/scan.cpp743
-rw-r--r--src/boost/tools/build/src/engine/scan.h71
-rw-r--r--src/boost/tools/build/src/engine/search.cpp275
-rw-r--r--src/boost/tools/build/src/engine/search.h23
-rw-r--r--src/boost/tools/build/src/engine/subst.cpp116
-rw-r--r--src/boost/tools/build/src/engine/subst.h15
-rw-r--r--src/boost/tools/build/src/engine/sysinfo.cpp137
-rw-r--r--src/boost/tools/build/src/engine/sysinfo.h46
-rw-r--r--src/boost/tools/build/src/engine/timestamp.cpp230
-rw-r--r--src/boost/tools/build/src/engine/timestamp.h48
-rw-r--r--src/boost/tools/build/src/engine/variable.cpp393
-rw-r--r--src/boost/tools/build/src/engine/variable.h35
-rw-r--r--src/boost/tools/build/src/engine/vswhere_usability_wrapper.cmd59
-rw-r--r--src/boost/tools/build/src/engine/w32_getreg.cpp201
-rw-r--r--src/boost/tools/build/src/engine/yyacc.cpp268
-rw-r--r--src/boost/tools/build/src/exceptions.py55
-rw-r--r--src/boost/tools/build/src/kernel/boost-build.jam5
-rw-r--r--src/boost/tools/build/src/kernel/bootstrap.jam265
-rw-r--r--src/boost/tools/build/src/kernel/bootstrap.py25
-rw-r--r--src/boost/tools/build/src/kernel/class.jam420
-rw-r--r--src/boost/tools/build/src/kernel/errors.jam287
-rw-r--r--src/boost/tools/build/src/kernel/modules.jam365
-rw-r--r--src/boost/tools/build/src/manager.py110
-rw-r--r--src/boost/tools/build/src/options/help.jam222
-rw-r--r--src/boost/tools/build/src/tools/__init__.py0
-rw-r--r--src/boost/tools/build/src/tools/acc.jam160
-rw-r--r--src/boost/tools/build/src/tools/asciidoctor.jam212
-rw-r--r--src/boost/tools/build/src/tools/auto-index.jam204
-rw-r--r--src/boost/tools/build/src/tools/bison.jam26
-rw-r--r--src/boost/tools/build/src/tools/boostbook-config.jam13
-rw-r--r--src/boost/tools/build/src/tools/boostbook.jam740
-rw-r--r--src/boost/tools/build/src/tools/borland.jam270
-rw-r--r--src/boost/tools/build/src/tools/builtin.jam96
-rw-r--r--src/boost/tools/build/src/tools/builtin.py805
-rw-r--r--src/boost/tools/build/src/tools/bzip2.jam279
-rw-r--r--src/boost/tools/build/src/tools/cast.jam91
-rw-r--r--src/boost/tools/build/src/tools/cast.py76
-rw-r--r--src/boost/tools/build/src/tools/clang-darwin.jam189
-rw-r--r--src/boost/tools/build/src/tools/clang-linux.jam223
-rw-r--r--src/boost/tools/build/src/tools/clang-vxworks.jam128
-rw-r--r--src/boost/tools/build/src/tools/clang-win.jam183
-rw-r--r--src/boost/tools/build/src/tools/clang.jam65
-rw-r--r--src/boost/tools/build/src/tools/common.jam1095
-rw-r--r--src/boost/tools/build/src/tools/common.py860
-rw-r--r--src/boost/tools/build/src/tools/como-linux.jam103
-rw-r--r--src/boost/tools/build/src/tools/como-win.jam117
-rw-r--r--src/boost/tools/build/src/tools/como.jam75
-rw-r--r--src/boost/tools/build/src/tools/convert.jam62
-rw-r--r--src/boost/tools/build/src/tools/cray.jam1169
-rw-r--r--src/boost/tools/build/src/tools/cw-config.jam34
-rw-r--r--src/boost/tools/build/src/tools/cw.jam302
-rw-r--r--src/boost/tools/build/src/tools/cygwin.jam12
-rw-r--r--src/boost/tools/build/src/tools/darwin.jam620
-rw-r--r--src/boost/tools/build/src/tools/darwin.py57
-rw-r--r--src/boost/tools/build/src/tools/diab.jam131
-rw-r--r--src/boost/tools/build/src/tools/dmc.jam174
-rw-r--r--src/boost/tools/build/src/tools/docutils.jam125
-rw-r--r--src/boost/tools/build/src/tools/doxproc.py859
-rw-r--r--src/boost/tools/build/src/tools/doxygen-config.jam11
-rw-r--r--src/boost/tools/build/src/tools/doxygen.jam782
-rw-r--r--src/boost/tools/build/src/tools/doxygen/windows-paths-check.doxyfile3
-rw-r--r--src/boost/tools/build/src/tools/doxygen/windows-paths-check.hpp0
-rw-r--r--src/boost/tools/build/src/tools/emscripten.jam113
-rw-r--r--src/boost/tools/build/src/tools/features/__init_features__.jam23
-rw-r--r--src/boost/tools/build/src/tools/features/address-model-feature.jam22
-rw-r--r--src/boost/tools/build/src/tools/features/allow-feature.jam19
-rw-r--r--src/boost/tools/build/src/tools/features/architecture-feature.jam55
-rw-r--r--src/boost/tools/build/src/tools/features/archiveflags-feature.jam18
-rw-r--r--src/boost/tools/build/src/tools/features/asmflags-feature.jam17
-rw-r--r--src/boost/tools/build/src/tools/features/build-feature.jam22
-rw-r--r--src/boost/tools/build/src/tools/features/cflags-feature.jam21
-rw-r--r--src/boost/tools/build/src/tools/features/conditional-feature.jam31
-rw-r--r--src/boost/tools/build/src/tools/features/coverage-feature.jam22
-rw-r--r--src/boost/tools/build/src/tools/features/cxx-template-depth-feature.jam39
-rw-r--r--src/boost/tools/build/src/tools/features/cxxabi-feature.jam18
-rw-r--r--src/boost/tools/build/src/tools/features/cxxflags-feature.jam17
-rw-r--r--src/boost/tools/build/src/tools/features/cxxstd-feature.jam50
-rw-r--r--src/boost/tools/build/src/tools/features/debug-feature.jam34
-rw-r--r--src/boost/tools/build/src/tools/features/define-feature.jam30
-rw-r--r--src/boost/tools/build/src/tools/features/dependency-feature.jam62
-rw-r--r--src/boost/tools/build/src/tools/features/dll-feature.jam73
-rw-r--r--src/boost/tools/build/src/tools/features/exception-feature.jam47
-rw-r--r--src/boost/tools/build/src/tools/features/fflags-feature.jam18
-rw-r--r--src/boost/tools/build/src/tools/features/file-feature.jam18
-rw-r--r--src/boost/tools/build/src/tools/features/find-lib-feature.jam42
-rw-r--r--src/boost/tools/build/src/tools/features/flags-feature.jam19
-rw-r--r--src/boost/tools/build/src/tools/features/include-feature.jam19
-rw-r--r--src/boost/tools/build/src/tools/features/instruction-set-feature.jam64
-rw-r--r--src/boost/tools/build/src/tools/features/internal-feature.jam19
-rw-r--r--src/boost/tools/build/src/tools/features/library-feature.jam22
-rw-r--r--src/boost/tools/build/src/tools/features/link-feature.jam19
-rw-r--r--src/boost/tools/build/src/tools/features/linkflags-feature.jam17
-rw-r--r--src/boost/tools/build/src/tools/features/local-visibility-feature.jam27
-rw-r--r--src/boost/tools/build/src/tools/features/location-feature.jam18
-rw-r--r--src/boost/tools/build/src/tools/features/location-prefix-feature.jam18
-rw-r--r--src/boost/tools/build/src/tools/features/lto-feature.jam46
-rw-r--r--src/boost/tools/build/src/tools/features/name-feature.jam22
-rw-r--r--src/boost/tools/build/src/tools/features/objcflags-feature.jam32
-rw-r--r--src/boost/tools/build/src/tools/features/optimization-feature.jam46
-rw-r--r--src/boost/tools/build/src/tools/features/os-feature.jam95
-rw-r--r--src/boost/tools/build/src/tools/features/relevant-feature.jam48
-rw-r--r--src/boost/tools/build/src/tools/features/rtti-feature.jam19
-rw-r--r--src/boost/tools/build/src/tools/features/runtime-feature.jam40
-rw-r--r--src/boost/tools/build/src/tools/features/sanitizers-feature.jam63
-rw-r--r--src/boost/tools/build/src/tools/features/search-feature.jam20
-rw-r--r--src/boost/tools/build/src/tools/features/source-feature.jam22
-rw-r--r--src/boost/tools/build/src/tools/features/stdlib-feature.jam29
-rw-r--r--src/boost/tools/build/src/tools/features/strip-feature.jam25
-rw-r--r--src/boost/tools/build/src/tools/features/tag-feature.jam39
-rw-r--r--src/boost/tools/build/src/tools/features/threadapi-feature.jam39
-rw-r--r--src/boost/tools/build/src/tools/features/threading-feature.jam24
-rw-r--r--src/boost/tools/build/src/tools/features/toolset-feature.jam20
-rw-r--r--src/boost/tools/build/src/tools/features/user-interface-feature.jam28
-rw-r--r--src/boost/tools/build/src/tools/features/variant-feature.jam114
-rw-r--r--src/boost/tools/build/src/tools/features/version-feature.jam19
-rw-r--r--src/boost/tools/build/src/tools/features/visibility-feature.jam46
-rw-r--r--src/boost/tools/build/src/tools/features/warnings-feature.jam41
-rw-r--r--src/boost/tools/build/src/tools/flags.jam152
-rw-r--r--src/boost/tools/build/src/tools/fop.jam69
-rw-r--r--src/boost/tools/build/src/tools/fortran.jam55
-rw-r--r--src/boost/tools/build/src/tools/gcc.jam1330
-rw-r--r--src/boost/tools/build/src/tools/gcc.py871
-rw-r--r--src/boost/tools/build/src/tools/generate.jam111
-rw-r--r--src/boost/tools/build/src/tools/generators/__init_generators__.jam23
-rw-r--r--src/boost/tools/build/src/tools/generators/archive-generator.jam74
-rw-r--r--src/boost/tools/build/src/tools/generators/c-compiling-generator.jam70
-rw-r--r--src/boost/tools/build/src/tools/generators/dummy-generator.jam20
-rw-r--r--src/boost/tools/build/src/tools/generators/lib-generator.jam121
-rw-r--r--src/boost/tools/build/src/tools/generators/linking-generator.jam179
-rw-r--r--src/boost/tools/build/src/tools/generators/prebuilt-lib-generator.jam30
-rw-r--r--src/boost/tools/build/src/tools/generators/searched-lib-generator.jam97
-rw-r--r--src/boost/tools/build/src/tools/gettext.jam230
-rw-r--r--src/boost/tools/build/src/tools/gfortran.jam39
-rw-r--r--src/boost/tools/build/src/tools/hp_cxx.jam222
-rw-r--r--src/boost/tools/build/src/tools/hpfortran.jam35
-rw-r--r--src/boost/tools/build/src/tools/ifort.jam44
-rw-r--r--src/boost/tools/build/src/tools/intel-darwin.jam233
-rw-r--r--src/boost/tools/build/src/tools/intel-linux.jam232
-rw-r--r--src/boost/tools/build/src/tools/intel-vxworks.jam183
-rw-r--r--src/boost/tools/build/src/tools/intel-win.jam514
-rw-r--r--src/boost/tools/build/src/tools/intel.jam84
-rw-r--r--src/boost/tools/build/src/tools/lex.jam25
-rw-r--r--src/boost/tools/build/src/tools/libjpeg.jam234
-rw-r--r--src/boost/tools/build/src/tools/libpng.jam229
-rw-r--r--src/boost/tools/build/src/tools/libtiff.jam227
-rw-r--r--src/boost/tools/build/src/tools/link.jam547
-rw-r--r--src/boost/tools/build/src/tools/lzma.jam134
-rw-r--r--src/boost/tools/build/src/tools/make.jam69
-rw-r--r--src/boost/tools/build/src/tools/make.py59
-rw-r--r--src/boost/tools/build/src/tools/mc.jam44
-rw-r--r--src/boost/tools/build/src/tools/mc.py46
-rw-r--r--src/boost/tools/build/src/tools/message.jam62
-rw-r--r--src/boost/tools/build/src/tools/message.py54
-rw-r--r--src/boost/tools/build/src/tools/midl.jam142
-rw-r--r--src/boost/tools/build/src/tools/midl.py134
-rw-r--r--src/boost/tools/build/src/tools/mipspro.jam145
-rw-r--r--src/boost/tools/build/src/tools/mpi.jam638
-rw-r--r--src/boost/tools/build/src/tools/msvc-config.jam12
-rw-r--r--src/boost/tools/build/src/tools/msvc.jam2092
-rw-r--r--src/boost/tools/build/src/tools/msvc.py1313
-rw-r--r--src/boost/tools/build/src/tools/notfile.jam65
-rw-r--r--src/boost/tools/build/src/tools/notfile.py51
-rw-r--r--src/boost/tools/build/src/tools/openssl.jam140
-rw-r--r--src/boost/tools/build/src/tools/package.jam274
-rw-r--r--src/boost/tools/build/src/tools/package.py168
-rw-r--r--src/boost/tools/build/src/tools/pathscale.jam178
-rw-r--r--src/boost/tools/build/src/tools/pch.jam95
-rw-r--r--src/boost/tools/build/src/tools/pch.py83
-rw-r--r--src/boost/tools/build/src/tools/pgi.jam138
-rw-r--r--src/boost/tools/build/src/tools/pkg-config.jam485
-rw-r--r--src/boost/tools/build/src/tools/python-config.jam27
-rw-r--r--src/boost/tools/build/src/tools/python.jam1333
-rw-r--r--src/boost/tools/build/src/tools/qcc.jam242
-rw-r--r--src/boost/tools/build/src/tools/qt.jam17
-rw-r--r--src/boost/tools/build/src/tools/qt3.jam209
-rw-r--r--src/boost/tools/build/src/tools/qt4.jam755
-rw-r--r--src/boost/tools/build/src/tools/qt5.jam800
-rw-r--r--src/boost/tools/build/src/tools/quickbook-config.jam44
-rw-r--r--src/boost/tools/build/src/tools/quickbook.jam363
-rw-r--r--src/boost/tools/build/src/tools/rc.jam155
-rw-r--r--src/boost/tools/build/src/tools/rc.py197
-rw-r--r--src/boost/tools/build/src/tools/sass.jam193
-rw-r--r--src/boost/tools/build/src/tools/saxonhe.jam53
-rw-r--r--src/boost/tools/build/src/tools/stage.jam519
-rw-r--r--src/boost/tools/build/src/tools/stage.py350
-rw-r--r--src/boost/tools/build/src/tools/stlport.jam312
-rw-r--r--src/boost/tools/build/src/tools/sun.jam224
-rw-r--r--src/boost/tools/build/src/tools/symlink.jam140
-rw-r--r--src/boost/tools/build/src/tools/symlink.py112
-rw-r--r--src/boost/tools/build/src/tools/testing-aux.jam344
-rw-r--r--src/boost/tools/build/src/tools/testing.jam847
-rw-r--r--src/boost/tools/build/src/tools/testing.py359
-rw-r--r--src/boost/tools/build/src/tools/types/__init__.py19
-rw-r--r--src/boost/tools/build/src/tools/types/adoc.jam26
-rw-r--r--src/boost/tools/build/src/tools/types/asm.jam4
-rw-r--r--src/boost/tools/build/src/tools/types/asm.py33
-rw-r--r--src/boost/tools/build/src/tools/types/cpp.jam90
-rw-r--r--src/boost/tools/build/src/tools/types/cpp.py10
-rw-r--r--src/boost/tools/build/src/tools/types/css.jam10
-rw-r--r--src/boost/tools/build/src/tools/types/docbook.jam8
-rw-r--r--src/boost/tools/build/src/tools/types/exe.jam9
-rw-r--r--src/boost/tools/build/src/tools/types/exe.py11
-rw-r--r--src/boost/tools/build/src/tools/types/html.jam4
-rw-r--r--src/boost/tools/build/src/tools/types/html.py10
-rw-r--r--src/boost/tools/build/src/tools/types/lib.jam74
-rw-r--r--src/boost/tools/build/src/tools/types/lib.py77
-rw-r--r--src/boost/tools/build/src/tools/types/man.jam8
-rw-r--r--src/boost/tools/build/src/tools/types/markdown.jam4
-rw-r--r--src/boost/tools/build/src/tools/types/markdown.py10
-rw-r--r--src/boost/tools/build/src/tools/types/obj.jam9
-rw-r--r--src/boost/tools/build/src/tools/types/obj.py11
-rw-r--r--src/boost/tools/build/src/tools/types/objc.jam26
-rw-r--r--src/boost/tools/build/src/tools/types/pdf.jam8
-rw-r--r--src/boost/tools/build/src/tools/types/preprocessed.jam9
-rw-r--r--src/boost/tools/build/src/tools/types/preprocessed.py11
-rw-r--r--src/boost/tools/build/src/tools/types/qt.jam12
-rw-r--r--src/boost/tools/build/src/tools/types/register.jam39
-rw-r--r--src/boost/tools/build/src/tools/types/rsp.jam4
-rw-r--r--src/boost/tools/build/src/tools/types/rsp.py10
-rw-r--r--src/boost/tools/build/src/tools/types/sass-type.jam49
-rw-r--r--src/boost/tools/build/src/tools/types/xml.jam49
-rw-r--r--src/boost/tools/build/src/tools/unix.jam224
-rw-r--r--src/boost/tools/build/src/tools/unix.py155
-rw-r--r--src/boost/tools/build/src/tools/vacpp.jam173
-rw-r--r--src/boost/tools/build/src/tools/vmsdecc.jam578
-rw-r--r--src/boost/tools/build/src/tools/whale.jam116
-rw-r--r--src/boost/tools/build/src/tools/xlcpp.jam164
-rw-r--r--src/boost/tools/build/src/tools/xlf.jam39
-rw-r--r--src/boost/tools/build/src/tools/xsltproc-config.jam36
-rw-r--r--src/boost/tools/build/src/tools/xsltproc.jam232
-rw-r--r--src/boost/tools/build/src/tools/xsltproc/included.xsl11
-rw-r--r--src/boost/tools/build/src/tools/xsltproc/test.xml2
-rw-r--r--src/boost/tools/build/src/tools/xsltproc/test.xsl12
-rw-r--r--src/boost/tools/build/src/tools/zlib.jam235
-rw-r--r--src/boost/tools/build/src/tools/zstd.jam100
-rw-r--r--src/boost/tools/build/src/util/__init__.py321
-rw-r--r--src/boost/tools/build/src/util/assert.jam346
-rw-r--r--src/boost/tools/build/src/util/container.jam339
-rw-r--r--src/boost/tools/build/src/util/doc.jam1076
-rw-r--r--src/boost/tools/build/src/util/indirect.jam124
-rw-r--r--src/boost/tools/build/src/util/indirect.py15
-rw-r--r--src/boost/tools/build/src/util/logger.py46
-rw-r--r--src/boost/tools/build/src/util/numbers.jam218
-rw-r--r--src/boost/tools/build/src/util/option.jam109
-rw-r--r--src/boost/tools/build/src/util/option.py35
-rw-r--r--src/boost/tools/build/src/util/order.jam173
-rw-r--r--src/boost/tools/build/src/util/order.py121
-rw-r--r--src/boost/tools/build/src/util/os.jam208
-rw-r--r--src/boost/tools/build/src/util/os_j.py24
-rw-r--r--src/boost/tools/build/src/util/param.jam54
-rw-r--r--src/boost/tools/build/src/util/path.jam1015
-rw-r--r--src/boost/tools/build/src/util/path.py937
-rw-r--r--src/boost/tools/build/src/util/print.jam508
-rw-r--r--src/boost/tools/build/src/util/regex.jam208
-rw-r--r--src/boost/tools/build/src/util/regex.py63
-rw-r--r--src/boost/tools/build/src/util/sequence.jam378
-rw-r--r--src/boost/tools/build/src/util/sequence.py58
-rw-r--r--src/boost/tools/build/src/util/set.jam93
-rw-r--r--src/boost/tools/build/src/util/set.py48
-rw-r--r--src/boost/tools/build/src/util/string.jam189
-rw-r--r--src/boost/tools/build/src/util/utility.jam235
-rw-r--r--src/boost/tools/build/src/util/utility.py176
-rw-r--r--src/boost/tools/build/test/BoostBuild.py1353
-rw-r--r--src/boost/tools/build/test/Jamfile.jam29
-rwxr-xr-xsrc/boost/tools/build/test/MockToolset.py267
-rw-r--r--src/boost/tools/build/test/TestCmd.py609
-rw-r--r--src/boost/tools/build/test/TestToolset.py121
-rw-r--r--src/boost/tools/build/test/abs_workdir.py26
-rw-r--r--src/boost/tools/build/test/absolute_sources.py73
-rw-r--r--src/boost/tools/build/test/alias.py107
-rw-r--r--src/boost/tools/build/test/alternatives.py129
-rw-r--r--src/boost/tools/build/test/always.py30
-rw-r--r--src/boost/tools/build/test/bad_dirname.py22
-rw-r--r--src/boost/tools/build/test/boost-build.jam14
-rw-r--r--src/boost/tools/build/test/boostbook.py23
-rw-r--r--src/boost/tools/build/test/boostbook/a.hpp16
-rw-r--r--src/boost/tools/build/test/boostbook/docs.xml36
-rw-r--r--src/boost/tools/build/test/boostbook/jamroot.jam3
-rw-r--r--src/boost/tools/build/test/build_dir.py107
-rw-r--r--src/boost/tools/build/test/build_file.py170
-rw-r--r--src/boost/tools/build/test/build_hooks.py39
-rw-r--r--src/boost/tools/build/test/build_no.py23
-rwxr-xr-xsrc/boost/tools/build/test/builtin_echo.py30
-rwxr-xr-xsrc/boost/tools/build/test/builtin_exit.py42
-rwxr-xr-xsrc/boost/tools/build/test/builtin_glob.py87
-rw-r--r--src/boost/tools/build/test/builtin_glob_archive.py217
-rwxr-xr-xsrc/boost/tools/build/test/builtin_readlink.py24
-rwxr-xr-xsrc/boost/tools/build/test/builtin_split_by_characters.py57
-rwxr-xr-xsrc/boost/tools/build/test/bzip2.py119
-rw-r--r--src/boost/tools/build/test/c_file.py36
-rw-r--r--src/boost/tools/build/test/chain.py56
-rw-r--r--src/boost/tools/build/test/clean.py104
-rw-r--r--src/boost/tools/build/test/cli_property_expansion.py41
-rwxr-xr-xsrc/boost/tools/build/test/collect_debug_info.py341
-rw-r--r--src/boost/tools/build/test/command_line_properties.py166
-rw-r--r--src/boost/tools/build/test/composite.py25
-rw-r--r--src/boost/tools/build/test/conditionals.py48
-rw-r--r--src/boost/tools/build/test/conditionals2.py43
-rw-r--r--src/boost/tools/build/test/conditionals3.py30
-rwxr-xr-xsrc/boost/tools/build/test/conditionals_multiple.py312
-rwxr-xr-xsrc/boost/tools/build/test/configuration.py397
-rw-r--r--src/boost/tools/build/test/configure.py267
-rwxr-xr-xsrc/boost/tools/build/test/copy_time.py69
-rw-r--r--src/boost/tools/build/test/core-language/test.jam1563
-rwxr-xr-xsrc/boost/tools/build/test/core_action_output.py62
-rwxr-xr-xsrc/boost/tools/build/test/core_action_status.py27
-rwxr-xr-xsrc/boost/tools/build/test/core_actions_quietly.py61
-rwxr-xr-xsrc/boost/tools/build/test/core_arguments.py103
-rwxr-xr-xsrc/boost/tools/build/test/core_at_file.py63
-rwxr-xr-xsrc/boost/tools/build/test/core_bindrule.py45
-rw-r--r--src/boost/tools/build/test/core_d12.py32
-rw-r--r--src/boost/tools/build/test/core_delete_module.py51
-rw-r--r--src/boost/tools/build/test/core_dependencies.py157
-rw-r--r--src/boost/tools/build/test/core_fail_expected.py139
-rw-r--r--src/boost/tools/build/test/core_import_module.py82
-rw-r--r--src/boost/tools/build/test/core_jamshell.py55
-rwxr-xr-xsrc/boost/tools/build/test/core_language.py12
-rw-r--r--src/boost/tools/build/test/core_modifiers.py51
-rwxr-xr-xsrc/boost/tools/build/test/core_multifile_actions.py202
-rwxr-xr-xsrc/boost/tools/build/test/core_nt_cmd_line.py266
-rwxr-xr-xsrc/boost/tools/build/test/core_option_d2.py55
-rwxr-xr-xsrc/boost/tools/build/test/core_option_l.py44
-rwxr-xr-xsrc/boost/tools/build/test/core_option_n.py51
-rwxr-xr-xsrc/boost/tools/build/test/core_parallel_actions.py103
-rwxr-xr-xsrc/boost/tools/build/test/core_parallel_multifile_actions_1.py78
-rwxr-xr-xsrc/boost/tools/build/test/core_parallel_multifile_actions_2.py71
-rw-r--r--src/boost/tools/build/test/core_scanner.py36
-rwxr-xr-xsrc/boost/tools/build/test/core_source_line_tracking.py74
-rw-r--r--src/boost/tools/build/test/core_syntax_error_exit_status.py23
-rw-r--r--src/boost/tools/build/test/core_typecheck.py47
-rwxr-xr-xsrc/boost/tools/build/test/core_update_now.py377
-rwxr-xr-xsrc/boost/tools/build/test/core_variables_in_actions.py39
-rw-r--r--src/boost/tools/build/test/core_varnames.py38
-rw-r--r--src/boost/tools/build/test/custom_generator.py66
-rw-r--r--src/boost/tools/build/test/debugger-mi.py326
-rw-r--r--src/boost/tools/build/test/debugger.py674
-rw-r--r--src/boost/tools/build/test/default_build.py80
-rw-r--r--src/boost/tools/build/test/default_features.py50
-rwxr-xr-xsrc/boost/tools/build/test/default_toolset.py215
-rw-r--r--src/boost/tools/build/test/dependency_property.py38
-rw-r--r--src/boost/tools/build/test/dependency_test.py239
-rw-r--r--src/boost/tools/build/test/disambiguation.py32
-rw-r--r--src/boost/tools/build/test/dll_path.py163
-rw-r--r--src/boost/tools/build/test/double_loading.py31
-rw-r--r--src/boost/tools/build/test/duplicate.py38
-rw-r--r--src/boost/tools/build/test/example_customization.py21
-rw-r--r--src/boost/tools/build/test/example_gettext.py30
-rw-r--r--src/boost/tools/build/test/example_libraries.py21
-rw-r--r--src/boost/tools/build/test/example_make.py17
-rw-r--r--src/boost/tools/build/test/example_qt4.py26
-rwxr-xr-xsrc/boost/tools/build/test/exit_status.py26
-rw-r--r--src/boost/tools/build/test/expansion.py140
-rw-r--r--src/boost/tools/build/test/explicit.py58
-rwxr-xr-xsrc/boost/tools/build/test/feature_cxxflags.py37
-rw-r--r--src/boost/tools/build/test/feature_implicit_dependency.py113
-rw-r--r--src/boost/tools/build/test/feature_relevant.py142
-rw-r--r--src/boost/tools/build/test/feature_suppress_import_lib.py33
-rw-r--r--src/boost/tools/build/test/file_types.py44
-rw-r--r--src/boost/tools/build/test/flags.py74
-rw-r--r--src/boost/tools/build/test/gcc_runtime.py27
-rwxr-xr-xsrc/boost/tools/build/test/generator_selection.py158
-rw-r--r--src/boost/tools/build/test/generators_test.py433
-rw-r--r--src/boost/tools/build/test/implicit_dependency.py81
-rw-r--r--src/boost/tools/build/test/indirect_conditional.py148
-rw-r--r--src/boost/tools/build/test/inherit_toolset.py100
-rwxr-xr-xsrc/boost/tools/build/test/inherited_dependency.py237
-rw-r--r--src/boost/tools/build/test/inline.py62
-rw-r--r--src/boost/tools/build/test/lib_source_property.py45
-rwxr-xr-xsrc/boost/tools/build/test/lib_zlib.py184
-rwxr-xr-xsrc/boost/tools/build/test/libjpeg.py119
-rwxr-xr-xsrc/boost/tools/build/test/liblzma.py118
-rwxr-xr-xsrc/boost/tools/build/test/libpng.py119
-rw-r--r--src/boost/tools/build/test/library_chain.py152
-rw-r--r--src/boost/tools/build/test/library_order.py94
-rw-r--r--src/boost/tools/build/test/library_property.py56
-rwxr-xr-xsrc/boost/tools/build/test/libtiff.py119
-rwxr-xr-xsrc/boost/tools/build/test/libzstd.py118
-rwxr-xr-xsrc/boost/tools/build/test/link.py350
-rw-r--r--src/boost/tools/build/test/load_dir.py84
-rw-r--r--src/boost/tools/build/test/load_order.py71
-rw-r--r--src/boost/tools/build/test/loop.py24
-rw-r--r--src/boost/tools/build/test/make_rule.py54
-rwxr-xr-xsrc/boost/tools/build/test/message.py38
-rw-r--r--src/boost/tools/build/test/module_actions.py105
-rw-r--r--src/boost/tools/build/test/ndebug.py33
-rw-r--r--src/boost/tools/build/test/no_type.py19
-rw-r--r--src/boost/tools/build/test/notfile.py36
-rw-r--r--src/boost/tools/build/test/ordered_include.py251
-rw-r--r--src/boost/tools/build/test/ordered_properties.py33
-rw-r--r--src/boost/tools/build/test/out_of_tree.py29
-rw-r--r--src/boost/tools/build/test/package.py231
-rw-r--r--src/boost/tools/build/test/param.py61
-rw-r--r--src/boost/tools/build/test/path_features.py163
-rw-r--r--src/boost/tools/build/test/pch.py58
-rw-r--r--src/boost/tools/build/test/prebuilt.py43
-rw-r--r--src/boost/tools/build/test/prebuilt/ext/a.cpp17
-rw-r--r--src/boost/tools/build/test/prebuilt/ext/debug/a.h13
-rw-r--r--src/boost/tools/build/test/prebuilt/ext/jamfile.jam13
-rw-r--r--src/boost/tools/build/test/prebuilt/ext/jamfile2.jam41
-rw-r--r--src/boost/tools/build/test/prebuilt/ext/jamfile3.jam48
-rw-r--r--src/boost/tools/build/test/prebuilt/ext/jamroot.jam5
-rw-r--r--src/boost/tools/build/test/prebuilt/ext/release/a.h13
-rw-r--r--src/boost/tools/build/test/prebuilt/hello.cpp20
-rw-r--r--src/boost/tools/build/test/prebuilt/jamfile.jam13
-rw-r--r--src/boost/tools/build/test/prebuilt/jamroot.jam4
-rwxr-xr-xsrc/boost/tools/build/test/preprocessor.py53
-rw-r--r--src/boost/tools/build/test/print.py48
-rw-r--r--src/boost/tools/build/test/project-test3/a.cpp8
-rw-r--r--src/boost/tools/build/test/project-test3/jamfile.jam13
-rw-r--r--src/boost/tools/build/test/project-test3/jamroot.jam67
-rw-r--r--src/boost/tools/build/test/project-test3/lib/b.cpp8
-rw-r--r--src/boost/tools/build/test/project-test3/lib/jamfile.jam9
-rw-r--r--src/boost/tools/build/test/project-test3/lib2/c.cpp8
-rw-r--r--src/boost/tools/build/test/project-test3/lib2/d.cpp8
-rw-r--r--src/boost/tools/build/test/project-test3/lib2/helper/e.cpp8
-rw-r--r--src/boost/tools/build/test/project-test3/lib2/helper/jamfile.jam9
-rw-r--r--src/boost/tools/build/test/project-test3/lib2/jamfile.jam11
-rw-r--r--src/boost/tools/build/test/project-test3/lib3/f.cpp8
-rw-r--r--src/boost/tools/build/test/project-test3/lib3/jamfile.jam47
-rw-r--r--src/boost/tools/build/test/project-test3/lib3/jamroot.jam5
-rw-r--r--src/boost/tools/build/test/project-test3/readme.txt7
-rw-r--r--src/boost/tools/build/test/project-test4/a.cpp8
-rw-r--r--src/boost/tools/build/test/project-test4/a_gcc.cpp8
-rw-r--r--src/boost/tools/build/test/project-test4/jamfile.jam11
-rw-r--r--src/boost/tools/build/test/project-test4/jamfile3.jam5
-rw-r--r--src/boost/tools/build/test/project-test4/jamfile4.jam4
-rw-r--r--src/boost/tools/build/test/project-test4/jamfile5.jam6
-rw-r--r--src/boost/tools/build/test/project-test4/jamroot.jam68
-rw-r--r--src/boost/tools/build/test/project-test4/lib/b.cpp8
-rw-r--r--src/boost/tools/build/test/project-test4/lib/jamfile.jam6
-rw-r--r--src/boost/tools/build/test/project-test4/lib/jamfile1.jam2
-rw-r--r--src/boost/tools/build/test/project-test4/lib/jamfile2.jam4
-rw-r--r--src/boost/tools/build/test/project-test4/lib/jamfile3.jam2
-rw-r--r--src/boost/tools/build/test/project-test4/lib2/jamfile.jam8
-rw-r--r--src/boost/tools/build/test/project-test4/lib2/jamfile2.jam4
-rw-r--r--src/boost/tools/build/test/project-test4/readme.txt6
-rw-r--r--src/boost/tools/build/test/project_dependencies.py51
-rw-r--r--src/boost/tools/build/test/project_glob.py212
-rwxr-xr-xsrc/boost/tools/build/test/project_id.py414
-rw-r--r--src/boost/tools/build/test/project_root_constants.py62
-rw-r--r--src/boost/tools/build/test/project_root_rule.py34
-rw-r--r--src/boost/tools/build/test/project_test3.py135
-rw-r--r--src/boost/tools/build/test/project_test4.py65
-rw-r--r--src/boost/tools/build/test/property_expansion.py28
-rwxr-xr-xsrc/boost/tools/build/test/qt4.py19
-rw-r--r--src/boost/tools/build/test/qt4/jamroot.jam82
-rw-r--r--src/boost/tools/build/test/qt4/mock.cpp26
-rw-r--r--src/boost/tools/build/test/qt4/mock.h21
-rw-r--r--src/boost/tools/build/test/qt4/phonon.cpp23
-rw-r--r--src/boost/tools/build/test/qt4/qt3support.cpp29
-rw-r--r--src/boost/tools/build/test/qt4/qtassistant.cpp21
-rw-r--r--src/boost/tools/build/test/qt4/qtcore.cpp22
-rw-r--r--src/boost/tools/build/test/qt4/qtcorefail.cpp23
-rw-r--r--src/boost/tools/build/test/qt4/qtdeclarative.cpp27
-rw-r--r--src/boost/tools/build/test/qt4/qtgui.cpp42
-rw-r--r--src/boost/tools/build/test/qt4/qthelp.cpp22
-rw-r--r--src/boost/tools/build/test/qt4/qtmultimedia.cpp25
-rw-r--r--src/boost/tools/build/test/qt4/qtnetwork.cpp33
-rw-r--r--src/boost/tools/build/test/qt4/qtscript.cpp37
-rw-r--r--src/boost/tools/build/test/qt4/qtscripttools.cpp47
-rw-r--r--src/boost/tools/build/test/qt4/qtsql.cpp37
-rw-r--r--src/boost/tools/build/test/qt4/qtsvg.cpp21
-rw-r--r--src/boost/tools/build/test/qt4/qttest.cpp30
-rw-r--r--src/boost/tools/build/test/qt4/qtwebkit.cpp24
-rw-r--r--src/boost/tools/build/test/qt4/qtxml.cpp29
-rw-r--r--src/boost/tools/build/test/qt4/qtxmlpatterns.cpp76
-rw-r--r--src/boost/tools/build/test/qt4/rcc.cpp20
-rw-r--r--src/boost/tools/build/test/qt4/rcc.qrc5
-rwxr-xr-xsrc/boost/tools/build/test/qt5.py19
-rw-r--r--src/boost/tools/build/test/qt5/jamroot.jam104
-rw-r--r--src/boost/tools/build/test/qt5/mock.cpp26
-rw-r--r--src/boost/tools/build/test/qt5/mock.h21
-rw-r--r--src/boost/tools/build/test/qt5/qt3dcore.cpp21
-rw-r--r--src/boost/tools/build/test/qt5/qt3dinput.cpp24
-rw-r--r--src/boost/tools/build/test/qt5/qt3dlogic.cpp20
-rw-r--r--src/boost/tools/build/test/qt5/qt3drender.cpp21
-rw-r--r--src/boost/tools/build/test/qt5/qtassistant.cpp21
-rw-r--r--src/boost/tools/build/test/qt5/qtbluetooth.cpp34
-rw-r--r--src/boost/tools/build/test/qt5/qtcharts.cpp15
-rw-r--r--src/boost/tools/build/test/qt5/qtcore.cpp22
-rw-r--r--src/boost/tools/build/test/qt5/qtcorefail.cpp23
-rw-r--r--src/boost/tools/build/test/qt5/qtdatavisualization.cpp31
-rw-r--r--src/boost/tools/build/test/qt5/qtdeclarative.cpp26
-rw-r--r--src/boost/tools/build/test/qt5/qtgamepad.cpp29
-rw-r--r--src/boost/tools/build/test/qt5/qthelp.cpp22
-rw-r--r--src/boost/tools/build/test/qt5/qtlocation.cpp30
-rw-r--r--src/boost/tools/build/test/qt5/qtmultimedia.cpp25
-rw-r--r--src/boost/tools/build/test/qt5/qtnetwork.cpp33
-rw-r--r--src/boost/tools/build/test/qt5/qtnfc.cpp28
-rw-r--r--src/boost/tools/build/test/qt5/qtpositioning.cpp23
-rw-r--r--src/boost/tools/build/test/qt5/qtpurchasing.cpp44
-rw-r--r--src/boost/tools/build/test/qt5/qtquick.cpp43
-rw-r--r--src/boost/tools/build/test/qt5/qtquick.qml20
-rw-r--r--src/boost/tools/build/test/qt5/qtscript.cpp37
-rw-r--r--src/boost/tools/build/test/qt5/qtscripttools.cpp47
-rw-r--r--src/boost/tools/build/test/qt5/qtscxml.cpp33
-rw-r--r--src/boost/tools/build/test/qt5/qtserialbus.cpp25
-rw-r--r--src/boost/tools/build/test/qt5/qtserialport.cpp22
-rw-r--r--src/boost/tools/build/test/qt5/qtsql.cpp37
-rw-r--r--src/boost/tools/build/test/qt5/qtsvg.cpp21
-rw-r--r--src/boost/tools/build/test/qt5/qttest.cpp30
-rw-r--r--src/boost/tools/build/test/qt5/qtwebchannel.cpp29
-rw-r--r--src/boost/tools/build/test/qt5/qtwebengine.cpp30
-rw-r--r--src/boost/tools/build/test/qt5/qtwebenginewidgets.cpp40
-rw-r--r--src/boost/tools/build/test/qt5/qtwebkit.cpp22
-rw-r--r--src/boost/tools/build/test/qt5/qtwebkitwidgets.cpp23
-rw-r--r--src/boost/tools/build/test/qt5/qtwebsocket.cpp26
-rw-r--r--src/boost/tools/build/test/qt5/qtwebsockets.cpp24
-rw-r--r--src/boost/tools/build/test/qt5/qtwebview.cpp31
-rw-r--r--src/boost/tools/build/test/qt5/qtwidgets.cpp43
-rw-r--r--src/boost/tools/build/test/qt5/qtxml.cpp29
-rw-r--r--src/boost/tools/build/test/qt5/qtxmlpatterns.cpp76
-rw-r--r--src/boost/tools/build/test/qt5/rcc.cpp20
-rw-r--r--src/boost/tools/build/test/qt5/rcc.qrc5
-rw-r--r--src/boost/tools/build/test/railsys.py14
-rw-r--r--src/boost/tools/build/test/railsys/libx/include/test_libx.h25
-rw-r--r--src/boost/tools/build/test/railsys/libx/jamroot.jam13
-rw-r--r--src/boost/tools/build/test/railsys/libx/src/jamfile.jam19
-rw-r--r--src/boost/tools/build/test/railsys/libx/src/test_libx.cpp15
-rw-r--r--src/boost/tools/build/test/railsys/program/include/test_a.h22
-rw-r--r--src/boost/tools/build/test/railsys/program/jamfile.jam45
-rw-r--r--src/boost/tools/build/test/railsys/program/jamroot.jam14
-rw-r--r--src/boost/tools/build/test/railsys/program/liba/jamfile.jam14
-rw-r--r--src/boost/tools/build/test/railsys/program/liba/test_a.cpp17
-rw-r--r--src/boost/tools/build/test/railsys/program/main/jamfile.jam12
-rw-r--r--src/boost/tools/build/test/railsys/program/main/main.cpp19
-rw-r--r--src/boost/tools/build/test/readme.txt6
-rw-r--r--src/boost/tools/build/test/rebuilds.py68
-rw-r--r--src/boost/tools/build/test/relative_sources.py38
-rw-r--r--src/boost/tools/build/test/remove_requirement.py91
-rwxr-xr-xsrc/boost/tools/build/test/rescan_header.py265
-rw-r--r--src/boost/tools/build/test/resolution.py35
-rw-r--r--src/boost/tools/build/test/results-python.txt132
-rw-r--r--src/boost/tools/build/test/rootless.py36
-rw-r--r--src/boost/tools/build/test/rootless/test1/sub_root/a.cpp6
-rw-r--r--src/boost/tools/build/test/rootless/test1/sub_root/jamfile.jam10
-rw-r--r--src/boost/tools/build/test/rootless/test2/sub_root/a.cpp6
-rw-r--r--src/boost/tools/build/test/rootless/test2/sub_root/jamfile.jam13
-rw-r--r--src/boost/tools/build/test/rootless/test3/jamfile.jam6
-rw-r--r--src/boost/tools/build/test/rootless/test3/sub/inner/a.cpp6
-rw-r--r--src/boost/tools/build/test/rootless/test3/sub/inner/jamfile.jam11
-rwxr-xr-xsrc/boost/tools/build/test/scanner_causing_rebuilds.py132
-rw-r--r--src/boost/tools/build/test/searched_lib.py186
-rw-r--r--src/boost/tools/build/test/skipping.py27
-rwxr-xr-xsrc/boost/tools/build/test/sort_rule.py98
-rw-r--r--src/boost/tools/build/test/source_locations.py42
-rwxr-xr-xsrc/boost/tools/build/test/source_order.py84
-rwxr-xr-xsrc/boost/tools/build/test/space_in_path.py51
-rw-r--r--src/boost/tools/build/test/stage.py207
-rw-r--r--src/boost/tools/build/test/standalone.py53
-rw-r--r--src/boost/tools/build/test/startup/boost-root/boost-build.jam7
-rw-r--r--src/boost/tools/build/test/startup/boost-root/build/boost-build.jam6
-rw-r--r--src/boost/tools/build/test/startup/boost-root/build/bootstrap.jam7
-rw-r--r--src/boost/tools/build/test/startup/bootstrap-env/boost-build.jam5
-rw-r--r--src/boost/tools/build/test/startup/bootstrap-explicit/boost-build.jam6
-rw-r--r--src/boost/tools/build/test/startup/bootstrap-implicit/readme.txt5
-rw-r--r--src/boost/tools/build/test/startup/no-bootstrap1/boost-build.jam6
-rw-r--r--src/boost/tools/build/test/startup/no-bootstrap1/subdir/readme.txt5
-rw-r--r--src/boost/tools/build/test/startup/no-bootstrap2/boost-build.jam6
-rw-r--r--src/boost/tools/build/test/startup/no-bootstrap3/boost-build.jam5
-rw-r--r--src/boost/tools/build/test/startup_v2.py94
-rwxr-xr-xsrc/boost/tools/build/test/static_and_shared_library.py36
-rw-r--r--src/boost/tools/build/test/suffix.py78
-rw-r--r--src/boost/tools/build/test/symlink.py43
-rw-r--r--src/boost/tools/build/test/tag.py122
-rw-r--r--src/boost/tools/build/test/template.py42
-rw-r--r--src/boost/tools/build/test/test-config-example.jam19
-rw-r--r--src/boost/tools/build/test/test.jam39
-rw-r--r--src/boost/tools/build/test/test1.py18
-rw-r--r--src/boost/tools/build/test/test2.py25
-rw-r--r--src/boost/tools/build/test/test2/foo.cpp10
-rw-r--r--src/boost/tools/build/test/test2/jamroot.jam5
-rw-r--r--src/boost/tools/build/test/test_all.py347
-rwxr-xr-xsrc/boost/tools/build/test/test_rc.py148
-rw-r--r--src/boost/tools/build/test/test_system.html623
-rwxr-xr-xsrc/boost/tools/build/test/testing.py535
-rw-r--r--src/boost/tools/build/test/timedata.py178
-rw-r--r--src/boost/tools/build/test/toolset-mock/Jamroot.jam8
-rw-r--r--src/boost/tools/build/test/toolset-mock/lib.cpp7
-rw-r--r--src/boost/tools/build/test/toolset-mock/main.cpp7
-rw-r--r--src/boost/tools/build/test/toolset-mock/project-config.jam43
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/Jamroot.jam61
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/MockProgram.py262
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/ar.py24
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/clang-3.9.0-darwin.py49
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/clang-linux-3.9.0.py48
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/clang-vxworks-4.0.1.py42
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/darwin-4.2.1.py38
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/gcc-4.2.1-darwin.py37
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/gcc-4.8.3-linux.py50
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/intel-darwin-10.2.py43
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/ld.py33
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/libtool.py14
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/mock-program.cpp42
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/project-config.jam5
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/ranlib.py22
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/strip.py13
-rw-r--r--src/boost/tools/build/test/toolset-mock/src/verify.py9
-rw-r--r--src/boost/tools/build/test/toolset_clang_darwin.py20
-rw-r--r--src/boost/tools/build/test/toolset_clang_linux.py19
-rw-r--r--src/boost/tools/build/test/toolset_clang_vxworks.py20
-rw-r--r--src/boost/tools/build/test/toolset_darwin.py21
-rw-r--r--src/boost/tools/build/test/toolset_defaults.py60
-rw-r--r--src/boost/tools/build/test/toolset_gcc.py26
-rw-r--r--src/boost/tools/build/test/toolset_intel_darwin.py19
-rw-r--r--src/boost/tools/build/test/toolset_requirements.py44
-rw-r--r--src/boost/tools/build/test/tree.py245
-rw-r--r--src/boost/tools/build/test/unit_test.py36
-rw-r--r--src/boost/tools/build/test/unit_tests.py11
-rw-r--r--src/boost/tools/build/test/unused.py81
-rw-r--r--src/boost/tools/build/test/use_requirements.py283
-rw-r--r--src/boost/tools/build/test/using.py32
-rw-r--r--src/boost/tools/build/test/wrapper.py38
-rw-r--r--src/boost/tools/build/test/wrong_project.py39
-rw-r--r--src/boost/tools/check_build/README.md3
-rw-r--r--src/boost/tools/check_build/test/Jamfile91
-rw-r--r--src/boost/tools/check_build/test/main.cpp3
-rw-r--r--src/boost/tools/cmake/README.md5
-rw-r--r--src/boost/tools/cmake/include/BoostFetch.cmake97
-rw-r--r--src/boost/tools/cmake/include/BoostInstall.cmake345
-rw-r--r--src/boost/tools/cmake/include/BoostMessage.cmake45
-rw-r--r--src/boost/tools/cmake/include/BoostRoot.cmake220
-rw-r--r--src/boost/tools/cmake/include/BoostTest.cmake206
-rw-r--r--src/boost/tools/cmake/include/BoostTestJamfile.cmake80
-rw-r--r--src/boost/tools/cmake/test/assert/CMakeLists.txt17
-rw-r--r--src/boost/tools/cmake/test/assert/main.cpp11
-rw-r--r--src/boost/tools/cmake/test/atomic/CMakeLists.txt21
-rw-r--r--src/boost/tools/cmake/test/atomic/main.cpp16
-rw-r--r--src/boost/tools/cmake/test/boost_fetch/CMakeLists.txt25
-rw-r--r--src/boost/tools/cmake/test/boost_fetch/main.cpp14
-rw-r--r--src/boost/tools/cmake/test/boost_test/CMakeLists.txt56
-rw-r--r--src/boost/tools/cmake/test/boost_test/Jamfile20
-rw-r--r--src/boost/tools/cmake/test/boost_test/arguments.cpp18
-rw-r--r--src/boost/tools/cmake/test/boost_test/compile.cpp8
-rw-r--r--src/boost/tools/cmake/test/boost_test/compile_fail.cpp8
-rw-r--r--src/boost/tools/cmake/test/boost_test/emits_warning.cpp9
-rw-r--r--src/boost/tools/cmake/test/boost_test/link.cpp13
-rw-r--r--src/boost/tools/cmake/test/boost_test/link_fail.cpp10
-rw-r--r--src/boost/tools/cmake/test/boost_test/requires_no_exceptions.cpp18
-rw-r--r--src/boost/tools/cmake/test/boost_test/requires_no_rtti.cpp18
-rw-r--r--src/boost/tools/cmake/test/boost_test/requires_variadic_templates.cpp13
-rw-r--r--src/boost/tools/cmake/test/boost_test/return_exit_code.cpp8
-rw-r--r--src/boost/tools/cmake/test/boost_test/run.cpp7
-rw-r--r--src/boost/tools/cmake/test/boost_test/run_fail.cpp8
-rw-r--r--src/boost/tools/cmake/test/mp11/CMakeLists.txt17
-rw-r--r--src/boost/tools/cmake/test/mp11/main.cpp12
-rw-r--r--src/boost/tools/cmake/test/timer/CMakeLists.txt21
-rw-r--r--src/boost/tools/cmake/test/timer/main.cpp11
-rw-r--r--src/boost/tools/docca/CHANGELOG.md1
-rw-r--r--src/boost/tools/docca/LICENSE_1_0.txt23
-rw-r--r--src/boost/tools/docca/README.md20
-rw-r--r--src/boost/tools/docca/example/Jamfile65
-rw-r--r--src/boost/tools/docca/example/boostbook.dtd439
-rw-r--r--src/boost/tools/docca/example/include/docca/example.hpp857
-rw-r--r--src/boost/tools/docca/example/index.xml14
-rw-r--r--src/boost/tools/docca/example/main.qbk28
-rw-r--r--src/boost/tools/docca/example/makeqbk.sh13
-rw-r--r--src/boost/tools/docca/example/reference.xsl14
-rw-r--r--src/boost/tools/docca/example/source.dox333
-rw-r--r--src/boost/tools/docca/include/docca/assemble-quickbook.xsl20
-rw-r--r--src/boost/tools/docca/include/docca/base-extract-xml-pages.xsl427
-rw-r--r--src/boost/tools/docca/include/docca/base-stage1.xsl590
-rw-r--r--src/boost/tools/docca/include/docca/common.xsl107
-rw-r--r--src/boost/tools/docca/include/docca/config.xsl47
-rw-r--r--src/boost/tools/docca/include/docca/debug-friendly-quickbook.xsl23
-rw-r--r--src/boost/tools/docca/include/docca/emphasized-types.xsl43
-rw-r--r--src/boost/tools/docca/include/docca/extract-xml-pages.xsl12
-rw-r--r--src/boost/tools/docca/include/docca/stage1.xsl11
-rw-r--r--src/boost/tools/docca/include/docca/stage2.xsl228
-rw-r--r--src/boost/tools/index.html105
-rw-r--r--src/boost/tools/inspect/apple_macro_check.cpp105
-rw-r--r--src/boost/tools/inspect/apple_macro_check.hpp39
-rw-r--r--src/boost/tools/inspect/ascii_check.cpp102
-rw-r--r--src/boost/tools/inspect/ascii_check.hpp38
-rw-r--r--src/boost/tools/inspect/assert_macro_check.cpp110
-rw-r--r--src/boost/tools/inspect/assert_macro_check.hpp40
-rw-r--r--src/boost/tools/inspect/build/Jamfile.v256
-rw-r--r--src/boost/tools/inspect/build/msvc/boost_inspect.sln20
-rw-r--r--src/boost/tools/inspect/build/msvc/boost_inspect.vcxproj117
-rw-r--r--src/boost/tools/inspect/build/msvc/readme.txt8
-rw-r--r--src/boost/tools/inspect/copyright_check.cpp35
-rw-r--r--src/boost/tools/inspect/copyright_check.hpp39
-rw-r--r--src/boost/tools/inspect/crlf_check.cpp97
-rw-r--r--src/boost/tools/inspect/crlf_check.hpp40
-rw-r--r--src/boost/tools/inspect/deprecated_macro_check.cpp146
-rw-r--r--src/boost/tools/inspect/deprecated_macro_check.hpp40
-rw-r--r--src/boost/tools/inspect/end_check.cpp58
-rw-r--r--src/boost/tools/inspect/end_check.hpp40
-rw-r--r--src/boost/tools/inspect/index.html55
-rw-r--r--src/boost/tools/inspect/inspect.cpp1041
-rw-r--r--src/boost/tools/inspect/inspector.hpp108
-rw-r--r--src/boost/tools/inspect/license_check.cpp48
-rw-r--r--src/boost/tools/inspect/license_check.hpp40
-rw-r--r--src/boost/tools/inspect/link_check.cpp487
-rw-r--r--src/boost/tools/inspect/link_check.hpp72
-rw-r--r--src/boost/tools/inspect/link_check_test.html24
-rw-r--r--src/boost/tools/inspect/minmax_check.cpp102
-rw-r--r--src/boost/tools/inspect/minmax_check.hpp45
-rw-r--r--src/boost/tools/inspect/path_name_check.cpp110
-rw-r--r--src/boost/tools/inspect/path_name_check.hpp48
-rw-r--r--src/boost/tools/inspect/tab_check.cpp44
-rw-r--r--src/boost/tools/inspect/tab_check.hpp37
-rw-r--r--src/boost/tools/inspect/time_string.hpp55
-rw-r--r--src/boost/tools/inspect/unnamed_namespace_check.cpp62
-rw-r--r--src/boost/tools/inspect/unnamed_namespace_check.hpp39
-rw-r--r--src/boost/tools/inspect/wrong_line_ends_test.cpp1
-rw-r--r--src/boost/tools/litre/cplusplus.py810
-rw-r--r--src/boost/tools/litre/litre.py61
-rw-r--r--src/boost/tools/litre/tool.py67
-rw-r--r--src/boost/tools/make-cputime-page.pl54
-rw-r--r--src/boost/tools/quickbook/Jamfile.v257
-rw-r--r--src/boost/tools/quickbook/_clang-format57
-rw-r--r--src/boost/tools/quickbook/build/Jamfile.v29
-rwxr-xr-xsrc/boost/tools/quickbook/build/publish-docs65
-rwxr-xr-xsrc/boost/tools/quickbook/build/warning-check29
-rw-r--r--src/boost/tools/quickbook/examples/simple-boostbook/Jamfile.v210
-rw-r--r--src/boost/tools/quickbook/examples/simple-boostbook/simple.xml13
-rw-r--r--src/boost/tools/quickbook/examples/simple-quickbook/Jamfile.v213
-rw-r--r--src/boost/tools/quickbook/examples/simple-quickbook/simple.qbk13
-rw-r--r--src/boost/tools/quickbook/examples/standalone-quickbook/Jamfile.v221
-rw-r--r--src/boost/tools/quickbook/examples/standalone-quickbook/Jamroot.jam45
-rw-r--r--src/boost/tools/quickbook/examples/standalone-quickbook/simple.qbk13
-rw-r--r--src/boost/tools/quickbook/extra/katepart/install.sh24
-rw-r--r--src/boost/tools/quickbook/extra/katepart/katepart.qbk125
-rw-r--r--src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_boost.xml3020
-rw-r--r--src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_cpp.xml471
-rw-r--r--src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_quickbook.xml736
-rw-r--r--src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_std.xml620
-rw-r--r--src/boost/tools/quickbook/index.html15
-rw-r--r--src/boost/tools/quickbook/meta/explicit-failures-markup.xml37
-rw-r--r--src/boost/tools/quickbook/src/Jamfile.v262
-rw-r--r--src/boost/tools/quickbook/src/actions.cpp1973
-rw-r--r--src/boost/tools/quickbook/src/actions.hpp379
-rw-r--r--src/boost/tools/quickbook/src/bb2html.cpp1626
-rw-r--r--src/boost/tools/quickbook/src/bb2html.hpp36
-rw-r--r--src/boost/tools/quickbook/src/block_element_grammar.cpp335
-rw-r--r--src/boost/tools/quickbook/src/block_tags.hpp43
-rw-r--r--src/boost/tools/quickbook/src/boostbook_chunker.cpp158
-rw-r--r--src/boost/tools/quickbook/src/boostbook_chunker.hpp41
-rw-r--r--src/boost/tools/quickbook/src/cleanup.hpp107
-rw-r--r--src/boost/tools/quickbook/src/code_snippet.cpp530
-rw-r--r--src/boost/tools/quickbook/src/collector.cpp59
-rw-r--r--src/boost/tools/quickbook/src/collector.hpp97
-rw-r--r--src/boost/tools/quickbook/src/dependency_tracker.cpp134
-rw-r--r--src/boost/tools/quickbook/src/dependency_tracker.hpp53
-rw-r--r--src/boost/tools/quickbook/src/doc_info_actions.cpp608
-rw-r--r--src/boost/tools/quickbook/src/doc_info_grammar.cpp323
-rw-r--r--src/boost/tools/quickbook/src/doc_info_tags.hpp53
-rw-r--r--src/boost/tools/quickbook/src/document_state.cpp500
-rw-r--r--src/boost/tools/quickbook/src/document_state.hpp94
-rw-r--r--src/boost/tools/quickbook/src/document_state_impl.hpp156
-rw-r--r--src/boost/tools/quickbook/src/files.cpp600
-rw-r--r--src/boost/tools/quickbook/src/files.hpp160
-rw-r--r--src/boost/tools/quickbook/src/for.hpp25
-rw-r--r--src/boost/tools/quickbook/src/fwd.hpp31
-rw-r--r--src/boost/tools/quickbook/src/glob.cpp349
-rw-r--r--src/boost/tools/quickbook/src/glob.hpp34
-rw-r--r--src/boost/tools/quickbook/src/grammar.cpp37
-rw-r--r--src/boost/tools/quickbook/src/grammar.hpp79
-rw-r--r--src/boost/tools/quickbook/src/grammar_impl.hpp168
-rw-r--r--src/boost/tools/quickbook/src/html_printer.cpp51
-rw-r--r--src/boost/tools/quickbook/src/html_printer.hpp38
-rw-r--r--src/boost/tools/quickbook/src/id_generation.cpp376
-rw-r--r--src/boost/tools/quickbook/src/id_xml.cpp183
-rw-r--r--src/boost/tools/quickbook/src/include_paths.cpp327
-rw-r--r--src/boost/tools/quickbook/src/include_paths.hpp82
-rw-r--r--src/boost/tools/quickbook/src/iterator.hpp67
-rw-r--r--src/boost/tools/quickbook/src/main_grammar.cpp1320
-rw-r--r--src/boost/tools/quickbook/src/markups.cpp83
-rw-r--r--src/boost/tools/quickbook/src/markups.hpp32
-rw-r--r--src/boost/tools/quickbook/src/native_text.cpp67
-rw-r--r--src/boost/tools/quickbook/src/native_text.hpp66
-rw-r--r--src/boost/tools/quickbook/src/parsers.hpp305
-rw-r--r--src/boost/tools/quickbook/src/path.cpp450
-rw-r--r--src/boost/tools/quickbook/src/path.hpp116
-rw-r--r--src/boost/tools/quickbook/src/phrase_element_grammar.cpp211
-rw-r--r--src/boost/tools/quickbook/src/phrase_tags.hpp46
-rw-r--r--src/boost/tools/quickbook/src/post_process.cpp452
-rw-r--r--src/boost/tools/quickbook/src/post_process.hpp33
-rw-r--r--src/boost/tools/quickbook/src/quickbook.cpp782
-rw-r--r--src/boost/tools/quickbook/src/quickbook.hpp47
-rw-r--r--src/boost/tools/quickbook/src/scoped.hpp32
-rw-r--r--src/boost/tools/quickbook/src/simple_parse.hpp63
-rw-r--r--src/boost/tools/quickbook/src/state.cpp187
-rw-r--r--src/boost/tools/quickbook/src/state.hpp122
-rw-r--r--src/boost/tools/quickbook/src/state_save.hpp55
-rw-r--r--src/boost/tools/quickbook/src/stream.cpp214
-rw-r--r--src/boost/tools/quickbook/src/stream.hpp85
-rw-r--r--src/boost/tools/quickbook/src/string_view.hpp47
-rw-r--r--src/boost/tools/quickbook/src/symbols.hpp202
-rw-r--r--src/boost/tools/quickbook/src/syntax_highlight.cpp633
-rw-r--r--src/boost/tools/quickbook/src/syntax_highlight.hpp62
-rw-r--r--src/boost/tools/quickbook/src/template_stack.cpp117
-rw-r--r--src/boost/tools/quickbook/src/template_stack.hpp126
-rw-r--r--src/boost/tools/quickbook/src/template_tags.hpp31
-rw-r--r--src/boost/tools/quickbook/src/tree.cpp205
-rw-r--r--src/boost/tools/quickbook/src/tree.hpp167
-rw-r--r--src/boost/tools/quickbook/src/utils.cpp221
-rw-r--r--src/boost/tools/quickbook/src/utils.hpp39
-rw-r--r--src/boost/tools/quickbook/src/value_tags.hpp90
-rw-r--r--src/boost/tools/quickbook/src/values.cpp829
-rw-r--r--src/boost/tools/quickbook/src/values.hpp444
-rw-r--r--src/boost/tools/quickbook/src/values_parse.hpp137
-rw-r--r--src/boost/tools/quickbook/src/xml_parse.cpp302
-rw-r--r--src/boost/tools/quickbook/src/xml_parse.hpp134
-rw-r--r--src/boost/tools/quickbook/test/Jamfile.v2173
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_1.gold145
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_1.gold-html205
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_1.quickbook80
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_6.gold151
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_6.gold-html216
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_6.quickbook88
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_7.gold151
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_7.gold-html217
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_7.quickbook97
-rw-r--r--src/boost/tools/quickbook/test/blocks-1_5.gold111
-rw-r--r--src/boost/tools/quickbook/test/blocks-1_5.gold-html119
-rw-r--r--src/boost/tools/quickbook/test/blocks-1_5.quickbook46
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_5.gold241
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_5.gold-html276
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_5.quickbook51
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_7.gold249
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_7.gold-html302
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_7.quickbook73
-rw-r--r--src/boost/tools/quickbook/test/callouts.cpp52
-rw-r--r--src/boost/tools/quickbook/test/code-1_1.gold52
-rw-r--r--src/boost/tools/quickbook/test/code-1_1.gold-html91
-rw-r--r--src/boost/tools/quickbook/test/code-1_1.quickbook51
-rw-r--r--src/boost/tools/quickbook/test/code-1_5.gold37
-rw-r--r--src/boost/tools/quickbook/test/code-1_5.gold-html39
-rw-r--r--src/boost/tools/quickbook/test/code-1_5.quickbook29
-rw-r--r--src/boost/tools/quickbook/test/code_cpp-1_5.gold40
-rw-r--r--src/boost/tools/quickbook/test/code_cpp-1_5.gold-html43
-rw-r--r--src/boost/tools/quickbook/test/code_cpp-1_5.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/code_python-1_5.gold10
-rw-r--r--src/boost/tools/quickbook/test/code_python-1_5.gold-html13
-rw-r--r--src/boost/tools/quickbook/test/code_python-1_5.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/code_snippet-1_1.gold22
-rw-r--r--src/boost/tools/quickbook/test/code_snippet-1_1.gold-html39
-rw-r--r--src/boost/tools/quickbook/test/code_snippet-1_1.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/code_teletype-1_5.gold12
-rw-r--r--src/boost/tools/quickbook/test/code_teletype-1_5.gold-html29
-rw-r--r--src/boost/tools/quickbook/test/code_teletype-1_5.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/command-line/Jamfile.v228
-rw-r--r--src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/command-line/error-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/command-line/error1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/command-line/error2.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/command_line_macro-1_1.gold12
-rw-r--r--src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_5.gold15
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html18
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_7.gold21
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html24
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/Jamfile.v238
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author1.gold13
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author1.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author1.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author2.gold19
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author2.gold-html20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author2.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright1.gold17
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright1.gold-html18
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright1.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold35
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html31
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook23
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold32
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html28
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook27
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty-attributes.gold19
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html19
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold10
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold10
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html6
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/doc-info/encode-1.5.gold26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escape-1.6.gold24
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold16
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html17
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold12
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-1.5.gold27
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html86
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook2
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold11
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold8
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html24
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold33
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html31
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook17
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold38
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html37
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold42
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html60
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold9
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/elements-1_5.gold18
-rw-r--r--src/boost/tools/quickbook/test/elements-1_5.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/elements-1_6.gold40
-rw-r--r--src/boost/tools/quickbook/test/elements-1_6.gold-html44
-rw-r--r--src/boost/tools/quickbook/test/elements-1_6.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/empty-inc.quickbook0
-rw-r--r--src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/escape-1_1.gold32
-rw-r--r--src/boost/tools/quickbook/test/escape-1_1.gold-html48
-rw-r--r--src/boost/tools/quickbook/test/escape-1_1.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/escape-1_6.gold32
-rw-r--r--src/boost/tools/quickbook/test/escape-1_6.gold-html48
-rw-r--r--src/boost/tools/quickbook/test/escape-1_6.quickbook35
-rw-r--r--src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/footnotes-1_7.gold31
-rw-r--r--src/boost/tools/quickbook/test/footnotes-1_7.gold-html80
-rw-r--r--src/boost/tools/quickbook/test/footnotes-1_7.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/heading-1_1.gold76
-rw-r--r--src/boost/tools/quickbook/test/heading-1_1.gold-html100
-rw-r--r--src/boost/tools/quickbook/test/heading-1_1.quickbook55
-rw-r--r--src/boost/tools/quickbook/test/heading-1_3.gold24
-rw-r--r--src/boost/tools/quickbook/test/heading-1_3.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/heading-1_3.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/heading-1_5.gold87
-rw-r--r--src/boost/tools/quickbook/test/heading-1_5.gold-html100
-rw-r--r--src/boost/tools/quickbook/test/heading-1_5.quickbook57
-rw-r--r--src/boost/tools/quickbook/test/heading-1_6.gold109
-rw-r--r--src/boost/tools/quickbook/test/heading-1_6.gold-html139
-rw-r--r--src/boost/tools/quickbook/test/heading-1_6.quickbook80
-rw-r--r--src/boost/tools/quickbook/test/heading-1_7.gold113
-rw-r--r--src/boost/tools/quickbook/test/heading-1_7.gold-html142
-rw-r--r--src/boost/tools/quickbook/test/heading-1_7.quickbook83
-rw-r--r--src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/hr-1_5.gold34
-rw-r--r--src/boost/tools/quickbook/test/hr-1_5.gold-html45
-rw-r--r--src/boost/tools/quickbook/test/hr-1_5.quickbook27
-rw-r--r--src/boost/tools/quickbook/test/hr-1_6.gold39
-rw-r--r--src/boost/tools/quickbook/test/hr-1_6.gold-html49
-rw-r--r--src/boost/tools/quickbook/test/hr-1_6.quickbook26
-rw-r--r--src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg143
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_5.gold610
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_5.gold-html421
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_5.quickbook148
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_6.gold609
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_6.gold-html421
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_6.quickbook148
-rw-r--r--src/boost/tools/quickbook/test/image-1_5.gold64
-rw-r--r--src/boost/tools/quickbook/test/image-1_5.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/image-1_5.quickbook19
-rw-r--r--src/boost/tools/quickbook/test/image-1_6.gold51
-rw-r--r--src/boost/tools/quickbook/test/image-1_6.gold-html32
-rw-r--r--src/boost/tools/quickbook/test/image-1_6.quickbook23
-rw-r--r--src/boost/tools/quickbook/test/import-1_1-fail.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include-1_1-fail.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include-1_5.gold30
-rw-r--r--src/boost/tools/quickbook/test/include-1_5.gold-html61
-rw-r--r--src/boost/tools/quickbook/test/include-1_5.quickbook17
-rw-r--r--src/boost/tools/quickbook/test/include-1_6.gold30
-rw-r--r--src/boost/tools/quickbook/test/include-1_6.gold-html61
-rw-r--r--src/boost/tools/quickbook/test/include-1_6.quickbook15
-rw-r--r--src/boost/tools/quickbook/test/include-1_7.gold36
-rw-r--r--src/boost/tools/quickbook/test/include-1_7.gold-html74
-rw-r--r--src/boost/tools/quickbook/test/include-1_7.quickbook18
-rw-r--r--src/boost/tools/quickbook/test/include-inc-1_5.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include-inc.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/include/Jamfile.v248
-rw-r--r--src/boost/tools/quickbook/test/include/code-import.gold138
-rw-r--r--src/boost/tools/quickbook/test/include/code-import.gold-html148
-rw-r--r--src/boost/tools/quickbook/test/include/code-import.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/include/code-include.gold50
-rw-r--r--src/boost/tools/quickbook/test/include/code-include.gold-html55
-rw-r--r--src/boost/tools/quickbook/test/include/code-include.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_1.gold362
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html424
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook18
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_5.gold362
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html424
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook18
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_6.gold362
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html424
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook17
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc.quickbook31
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-1.5.gold27
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook27
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold26
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/include/filename-1_7.gold46
-rw-r--r--src/boost/tools/quickbook/test/include/filename-1_7.gold-html45
-rw-r--r--src/boost/tools/quickbook/test/include/filename-1_7.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/include/filename-path.gold18
-rw-r--r--src/boost/tools/quickbook/test/include/filename-path.gold-html21
-rw-r--r--src/boost/tools/quickbook/test/include/filename-path.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/include/filename.gold18
-rw-r--r--src/boost/tools/quickbook/test/include/filename.gold-html21
-rw-r--r--src/boost/tools/quickbook/test/include/filename.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/include/filename_include2.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/filename_path-1_7.gold18
-rw-r--r--src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html21
-rw-r--r--src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/include/glob-1_7.gold41
-rw-r--r--src/boost/tools/quickbook/test/include/glob-1_7.gold-html94
-rw-r--r--src/boost/tools/quickbook/test/include/glob-1_7.quickbook39
-rw-r--r--src/boost/tools/quickbook/test/include/glob1/a.qbk1
-rw-r--r--src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk1
-rw-r--r--src/boost/tools/quickbook/test/include/glob2/a.qbk3
-rw-r--r--src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk1
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-1.6.gold11
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_5.gold88
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_5.gold-html120
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_5.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_6.gold108
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_6.gold-html238
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_6.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-inc1.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-inc2.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.5.gold26
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.5.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.5.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.6.gold36
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.6.gold-html66
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.6.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-inc1.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-inc2.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-inc3.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold59
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html89
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook19
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.5.gold39
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.5.gold-html42
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.5.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.6.gold66
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.6.gold-html69
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.6.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/include/macros-inc1.quickbook15
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold48
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html76
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold48
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html76
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/section-fail1.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include/section-fail2.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/section-inc1.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/section-inc2.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/section-unclosed.gold10
-rw-r--r--src/boost/tools/quickbook/test/include/section-unclosed.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/include/section-unclosed.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/section.gold10
-rw-r--r--src/boost/tools/quickbook/test/include/section.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/include/section.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_5.gold9
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_6.gold13
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/template_include-1_7.gold12
-rw-r--r--src/boost/tools/quickbook/test/include/template_include-1_7.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/include/template_include-1_7.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.5.gold12
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.5.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.5.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.6.gold15
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.6.gold-html18
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.6.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/include/templates-inc1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include2-1_6.gold22
-rw-r--r--src/boost/tools/quickbook/test/include2-1_6.gold-html50
-rw-r--r--src/boost/tools/quickbook/test/include2-1_6.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/link-1_1.gold45
-rw-r--r--src/boost/tools/quickbook/test/link-1_1.gold-html68
-rw-r--r--src/boost/tools/quickbook/test/link-1_1.quickbook48
-rw-r--r--src/boost/tools/quickbook/test/link-1_6.gold49
-rw-r--r--src/boost/tools/quickbook/test/link-1_6.gold-html71
-rw-r--r--src/boost/tools/quickbook/test/link-1_6.quickbook52
-rw-r--r--src/boost/tools/quickbook/test/link-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/link-1_7-fail2.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/link-1_7.gold56
-rw-r--r--src/boost/tools/quickbook/test/link-1_7.gold-html84
-rw-r--r--src/boost/tools/quickbook/test/link-1_7.quickbook61
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_5.gold402
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_5.gold-html432
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_5.quickbook108
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook46
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6.gold450
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6.gold-html480
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6.quickbook120
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7.gold479
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7.gold-html507
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7.quickbook134
-rw-r--r--src/boost/tools/quickbook/test/macro-1_5.gold26
-rw-r--r--src/boost/tools/quickbook/test/macro-1_5.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/macro-1_5.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/macro-1_6.gold26
-rw-r--r--src/boost/tools/quickbook/test/macro-1_6.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/macro-1_6.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold12
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold12
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html29
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/newline-1_1.gold24
-rw-r--r--src/boost/tools/quickbook/test/newline-1_1.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/newline-1_1.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/para_test-1_5.gold75
-rw-r--r--src/boost/tools/quickbook/test/para_test-1_5.gold-html97
-rw-r--r--src/boost/tools/quickbook/test/para_test-1_5.quickbook81
-rw-r--r--src/boost/tools/quickbook/test/post_process-fail.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_1.gold40
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_1.gold-html58
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_1.quickbook32
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_6.gold40
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_6.gold-html58
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_6.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/python/include_glob.qbk11
-rw-r--r--src/boost/tools/quickbook/test/python/include_glob_deps.txt6
-rw-r--r--src/boost/tools/quickbook/test/python/include_glob_locs.txt9
-rw-r--r--src/boost/tools/quickbook/test/python/include_path.qbk12
-rw-r--r--src/boost/tools/quickbook/test/python/include_path_deps.txt6
-rw-r--r--src/boost/tools/quickbook/test/python/include_path_locs.txt9
-rw-r--r--src/boost/tools/quickbook/test/python/missing_relative.qbk14
-rw-r--r--src/boost/tools/quickbook/test/python/missing_relative_deps.txt4
-rw-r--r--src/boost/tools/quickbook/test/python/missing_relative_locs.txt7
-rw-r--r--src/boost/tools/quickbook/test/python/run_tests.py191
-rw-r--r--src/boost/tools/quickbook/test/python/simple.qbk23
-rw-r--r--src/boost/tools/quickbook/test/python/simple.xml36
-rw-r--r--src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml42
-rw-r--r--src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml36
-rw-r--r--src/boost/tools/quickbook/test/python/simple_no_self_linked.xml36
-rw-r--r--src/boost/tools/quickbook/test/python/sub1/a.qbk9
-rw-r--r--src/boost/tools/quickbook/test/python/sub2/b.qbk9
-rw-r--r--src/boost/tools/quickbook/test/python/svg_missing.qbk11
-rw-r--r--src/boost/tools/quickbook/test/python/svg_missing_deps.txt4
-rw-r--r--src/boost/tools/quickbook/test/python/svg_missing_locs.txt5
-rw-r--r--src/boost/tools/quickbook/test/quickbook-testing.jam185
-rw-r--r--src/boost/tools/quickbook/test/quickbook_manual-1_4.gold3945
-rw-r--r--src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html4177
-rw-r--r--src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook1981
-rw-r--r--src/boost/tools/quickbook/test/regen-gold.sh47
-rw-r--r--src/boost/tools/quickbook/test/role-1_6.gold9
-rw-r--r--src/boost/tools/quickbook/test/role-1_6.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/role-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/role-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/role-1_7.gold13
-rw-r--r--src/boost/tools/quickbook/test/role-1_7.gold-html16
-rw-r--r--src/boost/tools/quickbook/test/role-1_7.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/section-1_4.gold20
-rw-r--r--src/boost/tools/quickbook/test/section-1_4.gold-html58
-rw-r--r--src/boost/tools/quickbook/test/section-1_4.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/section-1_5-unclosed.gold10
-rw-r--r--src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/section-1_5.gold19
-rw-r--r--src/boost/tools/quickbook/test/section-1_5.gold-html57
-rw-r--r--src/boost/tools/quickbook/test/section-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/section-1_7.gold32
-rw-r--r--src/boost/tools/quickbook/test/section-1_7.gold-html100
-rw-r--r--src/boost/tools/quickbook/test/section-1_7.quickbook23
-rw-r--r--src/boost/tools/quickbook/test/simple_markup-1_5.gold58
-rw-r--r--src/boost/tools/quickbook/test/simple_markup-1_5.gold-html75
-rw-r--r--src/boost/tools/quickbook/test/simple_markup-1_5.quickbook42
-rw-r--r--src/boost/tools/quickbook/test/snippets/Jamfile.v218
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.cpp33
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.gold35
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.gold-html38
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.py13
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold10
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html13
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp11
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp9
-rw-r--r--src/boost/tools/quickbook/test/source_mode-1_7.gold63
-rw-r--r--src/boost/tools/quickbook/test/source_mode-1_7.gold-html80
-rw-r--r--src/boost/tools/quickbook/test/source_mode-1_7.quickbook24
-rw-r--r--src/boost/tools/quickbook/test/src/text_diff.cpp96
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/stub.c32
-rw-r--r--src/boost/tools/quickbook/test/stub.cpp86
-rw-r--r--src/boost/tools/quickbook/test/stub.py27
-rw-r--r--src/boost/tools/quickbook/test/svg-1_1.gold18
-rw-r--r--src/boost/tools/quickbook/test/svg-1_1.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/svg-1_1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/table-1_3.gold351
-rw-r--r--src/boost/tools/quickbook/test/table-1_3.gold-html368
-rw-r--r--src/boost/tools/quickbook/test/table-1_3.quickbook113
-rw-r--r--src/boost/tools/quickbook/test/table-1_5.gold442
-rw-r--r--src/boost/tools/quickbook/test/table-1_5.gold-html459
-rw-r--r--src/boost/tools/quickbook/test/table-1_5.quickbook133
-rw-r--r--src/boost/tools/quickbook/test/table-1_6.gold478
-rw-r--r--src/boost/tools/quickbook/test/table-1_6.gold-html496
-rw-r--r--src/boost/tools/quickbook/test/table-1_6.quickbook134
-rw-r--r--src/boost/tools/quickbook/test/table-1_7.gold520
-rw-r--r--src/boost/tools/quickbook/test/table-1_7.gold-html538
-rw-r--r--src/boost/tools/quickbook/test/table-1_7.quickbook151
-rw-r--r--src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/template_section-1_5.gold22
-rw-r--r--src/boost/tools/quickbook/test/template_section-1_5.gold-html38
-rw-r--r--src/boost/tools/quickbook/test/template_section-1_5.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/templates-1_3.gold192
-rw-r--r--src/boost/tools/quickbook/test/templates-1_3.gold-html240
-rw-r--r--src/boost/tools/quickbook/test/templates-1_3.quickbook216
-rw-r--r--src/boost/tools/quickbook/test/templates-1_4.gold28
-rw-r--r--src/boost/tools/quickbook/test/templates-1_4.gold-html45
-rw-r--r--src/boost/tools/quickbook/test/templates-1_4.quickbook53
-rw-r--r--src/boost/tools/quickbook/test/templates-1_5.gold239
-rw-r--r--src/boost/tools/quickbook/test/templates-1_5.gold-html308
-rw-r--r--src/boost/tools/quickbook/test/templates-1_5.quickbook297
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6.gold257
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6.gold-html332
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6.quickbook313
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7.gold302
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7.gold-html377
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7.quickbook322
-rw-r--r--src/boost/tools/quickbook/test/unicode_escape-1_5.gold156
-rw-r--r--src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html159
-rw-r--r--src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook37
-rw-r--r--src/boost/tools/quickbook/test/unit/Jamfile.v231
-rw-r--r--src/boost/tools/quickbook/test/unit/cleanup_test.cpp80
-rw-r--r--src/boost/tools/quickbook/test/unit/glob_test.cpp163
-rw-r--r--src/boost/tools/quickbook/test/unit/path_test.cpp189
-rw-r--r--src/boost/tools/quickbook/test/unit/post_process_test.cpp27
-rw-r--r--src/boost/tools/quickbook/test/unit/source_map_test.cpp444
-rw-r--r--src/boost/tools/quickbook/test/unit/symbols_find_null.cpp36
-rw-r--r--src/boost/tools/quickbook/test/unit/symbols_tests.cpp374
-rw-r--r--src/boost/tools/quickbook/test/unit/utils_test.cpp67
-rw-r--r--src/boost/tools/quickbook/test/unit/values_test.cpp128
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_5.gold12
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_6.gold12
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbookbin0 -> 664 bytes
-rw-r--r--src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbookbin0 -> 664 bytes
-rw-r--r--src/boost/tools/quickbook/test/utf8-1_5.gold130
-rw-r--r--src/boost/tools/quickbook/test/utf8-1_5.gold-html134
-rw-r--r--src/boost/tools/quickbook/test/utf8-1_5.quickbook30
-rw-r--r--src/boost/tools/quickbook/test/utf8_bom-1_5.gold130
-rw-r--r--src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html134
-rw-r--r--src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook30
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5.gold107
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5.gold-html103
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5.quickbook30
-rw-r--r--src/boost/tools/quickbook/test/version-0_1-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/version-1_8-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/version-2_0-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/versions/Jamfile.v219
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold36
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html39
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook15
-rw-r--r--src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook19
-rw-r--r--src/boost/tools/quickbook/test/versions/versions-1_6.gold114
-rw-r--r--src/boost/tools/quickbook/test/versions/versions-1_6.gold-html239
-rw-r--r--src/boost/tools/quickbook/test/versions/versions-1_6.quickbook26
-rw-r--r--src/boost/tools/quickbook/test/xinclude/Jamfile.v231
-rw-r--r--src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect2
-rw-r--r--src/boost/tools/quickbook/test/xinclude/sub/stub.xml0
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_2.gold42
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_2.gold-html54
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_2.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_5.gold43
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_5.gold-html54
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_5.quickbook14
2105 files changed, 606819 insertions, 0 deletions
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
+ <link>static
+ <implicit-dependency>/boost//headers
+ :
+ usage-requirements <implicit-dependency>/boost//headers
+ ;
+
+TOOLS =
+ bcp//bcp
+ inspect/build//inspect
+ quickbook//quickbook
+ /boost/libs/wave/tool//wave
+ ;
+
+install dist-bin
+ :
+ $(TOOLS)
+ :
+ <install-type>EXE
+ <location>../dist/bin
+ :
+ release
+ ;
+
+install dist-lib
+ :
+ $(TOOLS)
+ :
+ <install-type>LIB
+ <location>../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) ]
+ :
+ <location>../dist/share
+ <install-source-root>.
+ ;
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
+: <define>BOOST_ALL_NO_LIB=1 <link>static release ;
+
+install aii : auto_index : <location>. ;
+explicit aii ;
+
+install i : auto_index : <location>$(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[]
+'''<index/>'''
+]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[template AutoIndex [Args] '''<?BoostAutoIndex ''' [Args]'''?>''']
+
+[template indexterm1 [primary] '''<indexterm><primary>'''[primary]'''</primary></indexterm>''']
+[template indexterm2 [primary secondary] '''<indexterm><primary>'''[primary]'''</primary><secondary>'''[secondary]'''</secondary></indexterm>''']
+[template indexterm3 [primary secondary tertiary] '''<indexterm><primary>'''[primary]'''</primary><secondary>'''[secondary]'''</secondary><tertiary>'''[tertiary]'''</tertiary></indexterm>''']
+
+[template typed_indexterm1 [type primary] '''<indexterm type="'''[type]'''"><primary>'''[primary]'''</primary></indexterm>''']
+[template typed_indexterm2 [type primary secondary] '''<indexterm type="'''[type]'''"><primary>'''[primary]'''</primary><secondary>'''[secondary]'''</secondary></indexterm>''']
+[template typed_indexterm3 [type primary secondary tertiary] '''<indexterm type="'''[type]'''"><primary>'''[primary]'''</primary><secondary>'''[secondary]'''</secondary><tertiary>'''[tertiary]'''</tertiary></indexterm>''']
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 @@
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; URL=doc/html/index.html">
+ </head>
+ <body>
+ <P>
+ Automatic redirection failed, please go to <a href="doc/html/index.html">doc/html/index.html</a>.
+ </P>
+ <P>Copyright&nbsp;John Maddock 2001</P>
+ <P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt">
+ LICENSE_1_0.txt</A> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>).</P>
+ </body>
+</html>
+
+
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 <set>
+#include <cstring>
+#include <boost/array.hpp>
+#include <boost/exception/all.hpp>
+#include <boost/program_options.hpp>
+#include "auto_index.hpp"
+
+std::string infile, outfile, prefix, last_primary, last_secondary, last_tertiary;
+std::set<index_info> index_terms;
+std::set<std::pair<std::string, std::string> > 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_rule> 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 <? and <! elements:
+ //
+ std::string result;
+ is >> 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<id_rewrite_rule>::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 <title> 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("&amp;");
+ break;
+ case '<':
+ result.append("&lt;");
+ break;
+ case '>':
+ result.append("&gt;");
+ break;
+ case '"':
+ result.append("&quot;");
+ 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</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro"><indexterm type="test_index_1"><primary>type-traits</primary><secondary>Introduction</secondary></indexterm><indexterm><primary>Introduction</primary><secondary>type-traits</secondary></indexterm><indexterm type="test_index_1"><primary>type-traits</primary><secondary>Introduction</secondary></indexterm><indexterm><primary>Introduction</primary><secondary>type-traits</secondary></indexterm><indexterm type="test_index_1"><primary>type-traits</primary><secondary>Introduction</secondary></indexterm><indexterm><primary>Introduction</primary><secondary>type-traits</secondary></indexterm>
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background"><indexterm type="test_index_2"><primary>type-traits</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>type-traits</secondary></indexterm><indexterm type="test_index_2"><primary>type-traits</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>type-traits</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>is_pointer</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_pointer</secondary></indexterm><indexterm type="class_name"><primary>is_void</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_void</secondary></indexterm><indexterm type="test_index_2"><primary>type-traits</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>type-traits</secondary></indexterm><indexterm type="test_index_2"><primary>type-traits</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>type-traits</secondary></indexterm><indexterm type="test_index_2"><primary>type-traits</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>type-traits</secondary></indexterm>
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special">&lt;&gt;::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void">is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">*&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ 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 &lt;...&gt; 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]&gt;</phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="underline">copy that
+ uses `memcpy`: this time the iterators are required to actually be pointers
+ to the same type, and the final parameter must be a `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_has_trivial_assign&lt;value_type&gt;()`
+ as the final parameter: this will dispatch to the optimized version where appropriate,
+ otherwise it will call the "slow but safe version".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ 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<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy&lt;const
+ T*, T*&gt;` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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 <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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 <link linkend="background.references">[7]</link>. 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:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference">add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp; [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"/> <anchor id="boost_typetraits.background.references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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".
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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 &amp;"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank">rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent">extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array">is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex">is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum">is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound">is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object">is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar">is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of">alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract">is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const">is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty">is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed">is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile">is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent">extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of">is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform"><indexterm type="macro_name"><primary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</secondary></indexterm>
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const">add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv">add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer">add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile">add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay">decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed">make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote">promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const">remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv">remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference">remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits">function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function">is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits">function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined"><indexterm type="class_name"><primary>is_union</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_union</secondary></indexterm><indexterm type="class_name"><primary>is_class</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_class</secondary></indexterm>
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics"><indexterm type="macro_name"><primary>BOOST_IS_UNION</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_UNION</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_POLYMORPHIC</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_POLYMORPHIC</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_POD</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_POD</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_ENUM</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_ENUM</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_EMPTY</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_EMPTY</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_CONVERTIBLE</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_CONVERTIBLE</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_CLASS</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_CLASS</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_BASE_OF</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_BASE_OF</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_IS_ABSTRACT</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_IS_ABSTRACT</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_VIRTUAL_DESTRUCTOR</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_VIRTUAL_DESTRUCTOR</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_DESTRUCTOR</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_DESTRUCTOR</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_COPY</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_COPY</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_CONSTRUCTOR</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_CONSTRUCTOR</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_ASSIGN</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_ASSIGN</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_NOTHROW_COPY</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_NOTHROW_COPY</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_NOTHROW_CONSTRUCTOR</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_NOTHROW_CONSTRUCTOR</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_HAS_NOTHROW_ASSIGN</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_HAS_NOTHROW_ASSIGN</secondary></indexterm><indexterm type="macro_name"><primary>BOOST_ALIGNMENT_OF</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>BOOST_ALIGNMENT_OF</secondary></indexterm>
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union">is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod">is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty">is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class">is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy"><indexterm type="typedef_name"><primary>value_type</primary><secondary>An Optimized Version of std::copy</secondary></indexterm><indexterm><primary>Optimized Version of std::copy</primary><secondary>value_type</secondary></indexterm>
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">value_type</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&amp;&amp;</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">-&gt;~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const"><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>Constrained Index Term</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>Constrained Index Term</secondary></indexterm><indexterm type="class_name"><primary>add_const</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>Constrained Index Term</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>Constrained Index Term</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.add_const"> add_const</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv"><indexterm type="class_name"><primary>add_cv</primary><secondary>add_cv</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.add_cv"> add_cv</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ <tertiary>three</tertiary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer"><indexterm type="class_name"><primary>add_pointer</primary><secondary>add_pointer</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&amp;</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference"><indexterm type="class_name"><primary>add_reference</primary><secondary>add_reference</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.add_reference"> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile"><indexterm type="class_name"><primary>add_volatile</primary><secondary>add_volatile</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage"><indexterm type="class_name"><primary>aligned_storage</primary><secondary>aligned_storage</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of"><indexterm type="class_name"><primary>integral_constant</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>integral_constant</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant&lt;std::size_t,
+ ALIGNOF(T)&gt;<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay"><indexterm type="class_name"><primary>decay</primary><secondary>decay</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.decay"> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent"><indexterm type="class_name"><primary>integral_constant</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>integral_constant</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.extent"> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">&gt;</phrase>
+ <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion">
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits"><indexterm type="typedef_name"><primary>result_type</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>result_type</secondary></indexterm><indexterm type="class_name"><primary>function_traits</primary><secondary>function_traits</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.function_traits"> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign"><indexterm type="class_name"><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor"><indexterm type="class_name"><primary>has_nothrow_default_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>has_nothrow_default_constructor</secondary></indexterm><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor">
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy"><indexterm type="class_name"><primary>has_nothrow_copy_constructor</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy_constructor</secondary></indexterm><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor"><indexterm type="class_name"><primary>has_trivial_default_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_default_constructor</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor">
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy"><indexterm type="class_name"><primary>has_trivial_copy_constructor</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy_constructor</secondary></indexterm><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor"><indexterm type="class_name"><primary>has_virtual_destructor</primary><secondary>has_virtual_destructor</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>value_type</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>value_type</secondary></indexterm><indexterm type="typedef_name"><primary>true_type</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>true_type</secondary></indexterm><indexterm type="class_name"><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm><indexterm type="typedef_name"><primary>false_type</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>false_type</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>;
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral">is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_array"> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">&gt;</phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_class"> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union">is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex"><indexterm type="class_name"><primary>is_complex</primary><secondary>is_complex</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_complex"> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_compound"> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_const"> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_empty"> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_enum"> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_function"> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference">is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&amp;)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&amp;</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">&lt;</phrase><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral">is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void">is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_integral"> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer">
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer">
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_object"> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ 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-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput>
+ 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.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_same"> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_signed"> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_reference"> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_union"> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_void"> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed"><indexterm type="class_name"><primary>make_signed</primary><secondary>make_signed</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.make_signed"> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned"><indexterm type="class_name"><primary>make_unsigned</primary><secondary>make_unsigned</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote"><indexterm type="class_name"><primary>promote</primary><secondary>promote</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.promote"> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank"><indexterm type="class_name"><primary>integral_constant</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>integral_constant</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.rank"> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[]&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const"><indexterm type="class_name"><primary>remove_const</primary><secondary>remove_const</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.remove_const"> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv"><indexterm type="class_name"><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent"><indexterm type="class_name"><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference"><indexterm type="class_name"><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment"><indexterm type="class_name"><primary>type_with_alignment</primary><secondary>type_with_alignment</secondary></indexterm>
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic&lt;Programming&gt;:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost@lists.boost.org (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+
+ <section id="boost_typetraits.ignored_section">
+ <title>This section must not be indexed.</title>
+ <?BoostAutoIndex IgnoreSection?>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+ <section id="boost_typetraits.ignored_block"><indexterm type="class_name"><primary>add_volatile</primary><secondary>This section contains one block that must not be indexed and one that should be.</secondary></indexterm><indexterm><primary>This section contains one block that must not be indexed and one that should be.</primary><secondary>add_volatile</secondary></indexterm>
+ <title>This section contains one block that must not be indexed and one that should be.</title>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ <?BoostAutoIndex IgnoreBlock?>
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+
+ <index type="class_name">
+ <title>Class Index</title>
+ </index>
+ <index type="typedef_name">
+ <title>Typedef Index</title>
+ </index>
+ <index type="macro_name">
+ <title>Macro Index</title>
+ </index>
+ <index type="test_index_1">
+ <title>Index Test 1</title>
+ </index>
+ <index type="test_index_2">
+ <title>Index Test 2</title>
+ </index>
+ <index/>
+
+</chapter> \ 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 @@
+<?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</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro">
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background">
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special">&lt;&gt;::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void">is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">*&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ 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 &lt;...&gt; 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]&gt;</phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="underline">copy that
+ uses `memcpy`: this time the iterators are required to actually be pointers
+ to the same type, and the final parameter must be a `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_has_trivial_assign&lt;value_type&gt;()`
+ as the final parameter: this will dispatch to the optimized version where appropriate,
+ otherwise it will call the "slow but safe version".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ 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<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy&lt;const
+ T*, T*&gt;` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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 <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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 <link linkend="background.references">[7]</link>. 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:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference">add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp; [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"/> <anchor id="boost_typetraits.background.references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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".
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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 &amp;"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank">rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent">extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array">is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex">is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum">is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound">is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object">is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar">is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of">alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract">is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const">is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty">is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed">is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile">is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent">extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of">is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform">
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const">add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv">add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer">add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile">add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay">decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed">make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote">promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const">remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv">remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference">remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits">function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function">is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits">function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined">
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics">
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union">is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod">is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty">is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class">is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy">
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">value_type</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&amp;&amp;</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">-&gt;~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const">
+ <title><link linkend="boost_typetraits.reference.add_const"> add_const</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv">
+ <title><link linkend="boost_typetraits.reference.add_cv"> add_cv</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ <tertiary>three</tertiary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer">
+ <title><link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&amp;</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference">
+ <title><link linkend="boost_typetraits.reference.add_reference"> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile">
+ <title><link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage">
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of">
+ <title><link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant&lt;std::size_t,
+ ALIGNOF(T)&gt;<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay">
+ <title><link linkend="boost_typetraits.reference.decay"> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent">
+ <title><link linkend="boost_typetraits.reference.extent"> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">&gt;</phrase>
+ <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion">
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion">
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits">
+ <title><link linkend="boost_typetraits.reference.function_traits"> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor">
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign">
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor">
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy">
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor">
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant">
+ <title><link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion">
+ <title><link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract">
+ <title><link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>;
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic">
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral">is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array">
+ <title><link linkend="boost_typetraits.reference.is_array"> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of">
+ <title><link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">&gt;</phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class">
+ <title><link linkend="boost_typetraits.reference.is_class"> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union">is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex">
+ <title><link linkend="boost_typetraits.reference.is_complex"> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound">
+ <title><link linkend="boost_typetraits.reference.is_compound"> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const">
+ <title><link linkend="boost_typetraits.reference.is_const"> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible">
+ <title><link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty">
+ <title><link linkend="boost_typetraits.reference.is_empty"> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum">
+ <title><link linkend="boost_typetraits.reference.is_enum"> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point">
+ <title><link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function">
+ <title><link linkend="boost_typetraits.reference.is_function"> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference">is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&amp;)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&amp;</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">&lt;</phrase><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental">
+ <title><link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral">is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void">is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral">
+ <title><link linkend="boost_typetraits.reference.is_integral"> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer">
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer">
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object">
+ <title><link linkend="boost_typetraits.reference.is_object"> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ 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-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer">
+ <title><link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput>
+ 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.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic">
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same">
+ <title><link linkend="boost_typetraits.reference.is_same"> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar">
+ <title><link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed">
+ <title><link linkend="boost_typetraits.reference.is_signed"> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference">
+ <title><link linkend="boost_typetraits.reference.is_reference"> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union">
+ <title><link linkend="boost_typetraits.reference.is_union"> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned">
+ <title><link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void">
+ <title><link linkend="boost_typetraits.reference.is_void"> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile">
+ <title><link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed">
+ <title><link linkend="boost_typetraits.reference.make_signed"> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned">
+ <title><link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote">
+ <title><link linkend="boost_typetraits.reference.promote"> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank">
+ <title><link linkend="boost_typetraits.reference.rank"> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[]&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents">
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const">
+ <title><link linkend="boost_typetraits.reference.remove_const"> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv">
+ <title><link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent">
+ <title><link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer">
+ <title><link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference">
+ <title><link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile">
+ <title><link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment">
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic&lt;Programming&gt;:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost@lists.boost.org (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+
+ <section id="boost_typetraits.ignored_section">
+ <title>This section must not be indexed.</title>
+ <?BoostAutoIndex IgnoreSection?>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+ <section id="boost_typetraits.ignored_block">
+ <title>This section contains one block that must not be indexed and one that should be.</title>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ <?BoostAutoIndex IgnoreBlock?>
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+
+ <section>
+ <title>Class Index</title>
+ <para><link linkend="idx_id_0">A</link> <link linkend="idx_id_2">C</link> <link linkend="idx_id_3">D</link> <link linkend="idx_id_4">E</link> <link linkend="idx_id_5">F</link> <link linkend="idx_id_6">H</link> <link linkend="idx_id_7">I</link> <link linkend="idx_id_8">M</link> <link linkend="idx_id_9">O</link> <link linkend="idx_id_10">P</link> <link linkend="idx_id_11">R</link> <link linkend="idx_id_13">T</link></para><variablelist><varlistentry id="idx_id_0"><term>A</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-0">add_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-0">add_cv</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_pointer"><phrase role="index-entry-level-0">add_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_reference"><phrase role="index-entry-level-0">add_reference</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">add_volatile</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.ignored_block"><phrase role="index-entry-level-1">This section contains one block that must not be indexed and one that should be.</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.aligned_storage"><phrase role="index-entry-level-0">aligned_storage</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-0">alignment_of</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_2"><term>C</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Constrained Index Term</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">add_const</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_3"><term>D</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.decay"><phrase role="index-entry-level-0">decay</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_4"><term>E</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-0">extent</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_5"><term>F</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.floating_point_promotion"><phrase role="index-entry-level-0">floating_point_promotion</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-0">function_traits</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_6"><term>H</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_assign"><phrase role="index-entry-level-0">has_nothrow_assign</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-0">has_nothrow_constructor</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-0">has_nothrow_copy</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_assign"><phrase role="index-entry-level-0">has_trivial_assign</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-0">has_trivial_copy</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_constructor"><phrase role="index-entry-level-1">has_trivial_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_destructor"><phrase role="index-entry-level-0">has_trivial_destructor</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_virtual_destructor"><phrase role="index-entry-level-0">has_virtual_destructor</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_7"><term>I</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">integral_constant</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">alignment_of</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">extent</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.rank"><phrase role="index-entry-level-1">rank</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_promotion"><phrase role="index-entry-level-0">integral_promotion</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_abstract"><phrase role="index-entry-level-0">is_abstract</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_arithmetic"><phrase role="index-entry-level-0">is_arithmetic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_array"><phrase role="index-entry-level-0">is_array</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_base_of"><phrase role="index-entry-level-0">is_base_of</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_class</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_class"><phrase role="index-entry-level-1">is_class</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_complex"><phrase role="index-entry-level-0">is_complex</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_compound"><phrase role="index-entry-level-0">is_compound</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_const"><phrase role="index-entry-level-0">is_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_convertible"><phrase role="index-entry-level-0">is_convertible</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_empty"><phrase role="index-entry-level-0">is_empty</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_enum"><phrase role="index-entry-level-0">is_enum</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_floating_point"><phrase role="index-entry-level-0">is_floating_point</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_function"><phrase role="index-entry-level-0">is_function</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_fundamental"><phrase role="index-entry-level-0">is_fundamental</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_integral"><phrase role="index-entry-level-0">is_integral</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_function_pointer"><phrase role="index-entry-level-0">is_member_function_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_object_pointer"><phrase role="index-entry-level-0">is_member_object_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_pointer"><phrase role="index-entry-level-0">is_member_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_object"><phrase role="index-entry-level-0">is_object</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_pointer</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_pointer"><phrase role="index-entry-level-1">is_pointer</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_polymorphic"><phrase role="index-entry-level-0">is_polymorphic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_reference"><phrase role="index-entry-level-0">is_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_same"><phrase role="index-entry-level-0">is_same</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_scalar"><phrase role="index-entry-level-0">is_scalar</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_signed"><phrase role="index-entry-level-0">is_signed</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_union</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_union"><phrase role="index-entry-level-1">is_union</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_unsigned"><phrase role="index-entry-level-0">is_unsigned</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_void</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_void"><phrase role="index-entry-level-1">is_void</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_volatile"><phrase role="index-entry-level-0">is_volatile</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_8"><term>M</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.make_signed"><phrase role="index-entry-level-0">make_signed</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.make_unsigned"><phrase role="index-entry-level-0">make_unsigned</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_9"><term>O</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">one</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-1">two</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-2">add_const</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-2">three</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-3">add_cv</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_10"><term>P</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.promote"><phrase role="index-entry-level-0">promote</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_11"><term>R</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.remove_all_extents"><phrase role="index-entry-level-0">remove_all_extents</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_const"><phrase role="index-entry-level-0">remove_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_cv"><phrase role="index-entry-level-0">remove_cv</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">remove_extent</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.remove_extent"><phrase role="index-entry-level-1">remove_extent</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_pointer"><phrase role="index-entry-level-0">remove_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_reference"><phrase role="index-entry-level-0">remove_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_volatile"><phrase role="index-entry-level-0">remove_volatile</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_13"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.type_with_alignment"><phrase role="index-entry-level-0">type_with_alignment</phrase></link></para></listitem></itemizedlist></listitem></varlistentry></variablelist></section>
+ <section>
+ <title>Typedef Index</title>
+ <para><link linkend="idx_id_21">F</link> <link linkend="idx_id_27">R</link> <link linkend="idx_id_29">T</link> <link linkend="idx_id_31">V</link></para><variablelist><varlistentry id="idx_id_21"><term>F</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">false_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_27"><term>R</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">result_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">function_traits</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_29"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">true_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_31"><term>V</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">value_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.examples.copy"><phrase role="index-entry-level-1">An Optimized Version of std::copy</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></section>
+ <section>
+ <title>Macro Index</title>
+ <para><link linkend="idx_id_33">B</link></para><variablelist><varlistentry id="idx_id_33"><term>B</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">BOOST_ALIGNMENT_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.transform"><phrase role="index-entry-level-1">Type Traits that Transform One Type to Another</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_VIRTUAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ABSTRACT</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_BASE_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CLASS</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CONVERTIBLE</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_EMPTY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ENUM</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POD</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POLYMORPHIC</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_UNION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></section>
+ <section>
+ <title>Index Test 1</title>
+ <para><link linkend="idx_id_61">T</link></para><variablelist><varlistentry id="idx_id_61"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">type-traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intro"><phrase role="index-entry-level-1">Introduction</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></section>
+ <section>
+ <title>Index Test 2</title>
+ <para><link linkend="idx_id_77">T</link></para><variablelist><varlistentry id="idx_id_77"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">type-traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></section>
+ <section><title>Index</title><para><link linkend="idx_id_80">A</link> <link linkend="idx_id_81">B</link> <link linkend="idx_id_82">C</link> <link linkend="idx_id_83">D</link> <link linkend="idx_id_84">E</link> <link linkend="idx_id_85">F</link> <link linkend="idx_id_86">H</link> <link linkend="idx_id_87">I</link> <link linkend="idx_id_88">M</link> <link linkend="idx_id_89">O</link> <link linkend="idx_id_90">P</link> <link linkend="idx_id_91">R</link> <link linkend="idx_id_92">S</link> <link linkend="idx_id_93">T</link> <link linkend="idx_id_94">U</link> <link linkend="idx_id_95">V</link></para><variablelist><varlistentry id="idx_id_80"><term>A</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">add_const</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">add_const</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">Constrained Index Term</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-0">add_cv</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_pointer"><phrase role="index-entry-level-0">add_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_reference"><phrase role="index-entry-level-0">add_reference</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">add_volatile</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.ignored_block"><phrase role="index-entry-level-1">This section contains one block that must not be indexed and one that should be.</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.aligned_storage"><phrase role="index-entry-level-0">aligned_storage</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">alignment_of</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">alignment_of</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_81"><term>B</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Background and Tutorial</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">is_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">is_void</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">remove_extent</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">type-traits</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_ALIGNMENT_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.transform"><phrase role="index-entry-level-1">Type Traits that Transform One Type to Another</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_VIRTUAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ABSTRACT</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_BASE_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CLASS</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CONVERTIBLE</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_EMPTY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ENUM</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POD</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POLYMORPHIC</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_UNION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_82"><term>C</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Constrained Index Term</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">add_const</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_83"><term>D</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.decay"><phrase role="index-entry-level-0">decay</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_84"><term>E</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">extent</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">extent</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_85"><term>F</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">false_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.floating_point_promotion"><phrase role="index-entry-level-0">floating_point_promotion</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">Foo1</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">Foo2</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-1">Bar2</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.value_traits"><phrase role="index-entry-level-2">Type Traits that Describe the Properties of a Type</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">function_traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">function_traits</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">result_type</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_86"><term>H</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_assign"><phrase role="index-entry-level-0">has_nothrow_assign</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_constructor</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_default_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_copy</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_assign"><phrase role="index-entry-level-0">has_trivial_assign</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_constructor"><phrase role="index-entry-level-1">has_trivial_default_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_copy</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_constructor"><phrase role="index-entry-level-1">has_trivial_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_destructor"><phrase role="index-entry-level-0">has_trivial_destructor</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_virtual_destructor"><phrase role="index-entry-level-0">has_virtual_destructor</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_87"><term>I</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">integral_constant</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">alignment_of</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">extent</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">false_type</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.rank"><phrase role="index-entry-level-1">rank</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">true_type</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">value_type</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_promotion"><phrase role="index-entry-level-0">integral_promotion</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">Introduction</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intro"><phrase role="index-entry-level-1">type-traits</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_abstract"><phrase role="index-entry-level-0">is_abstract</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_arithmetic"><phrase role="index-entry-level-0">is_arithmetic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_array"><phrase role="index-entry-level-0">is_array</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_base_of"><phrase role="index-entry-level-0">is_base_of</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_class</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_class"><phrase role="index-entry-level-1">is_class</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_complex"><phrase role="index-entry-level-0">is_complex</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_compound"><phrase role="index-entry-level-0">is_compound</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_const"><phrase role="index-entry-level-0">is_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_convertible"><phrase role="index-entry-level-0">is_convertible</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_empty"><phrase role="index-entry-level-0">is_empty</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_enum"><phrase role="index-entry-level-0">is_enum</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_floating_point"><phrase role="index-entry-level-0">is_floating_point</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_function"><phrase role="index-entry-level-0">is_function</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_fundamental"><phrase role="index-entry-level-0">is_fundamental</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_integral"><phrase role="index-entry-level-0">is_integral</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_function_pointer"><phrase role="index-entry-level-0">is_member_function_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_object_pointer"><phrase role="index-entry-level-0">is_member_object_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_pointer"><phrase role="index-entry-level-0">is_member_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_object"><phrase role="index-entry-level-0">is_object</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_pointer</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_pointer"><phrase role="index-entry-level-1">is_pointer</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_polymorphic"><phrase role="index-entry-level-0">is_polymorphic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_reference"><phrase role="index-entry-level-0">is_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_same"><phrase role="index-entry-level-0">is_same</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_scalar"><phrase role="index-entry-level-0">is_scalar</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_signed"><phrase role="index-entry-level-0">is_signed</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_union</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_union"><phrase role="index-entry-level-1">is_union</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_unsigned"><phrase role="index-entry-level-0">is_unsigned</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_void</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_void"><phrase role="index-entry-level-1">is_void</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_volatile"><phrase role="index-entry-level-0">is_volatile</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_88"><term>M</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.make_signed"><phrase role="index-entry-level-0">make_signed</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.make_unsigned"><phrase role="index-entry-level-0">make_unsigned</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_89"><term>O</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">one</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-1">two</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-2">add_const</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-2">three</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-3">add_cv</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">Optimized Version of std::copy</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.examples.copy"><phrase role="index-entry-level-1">value_type</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_90"><term>P</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.promote"><phrase role="index-entry-level-0">promote</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_91"><term>R</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">rank</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.rank"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_all_extents"><phrase role="index-entry-level-0">remove_all_extents</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_const"><phrase role="index-entry-level-0">remove_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_cv"><phrase role="index-entry-level-0">remove_cv</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">remove_extent</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.remove_extent"><phrase role="index-entry-level-1">remove_extent</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_pointer"><phrase role="index-entry-level-0">remove_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_reference"><phrase role="index-entry-level-0">remove_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_volatile"><phrase role="index-entry-level-0">remove_volatile</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">result_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">function_traits</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_92"><term>S</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Support for Compiler Intrinsics</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_ALIGNMENT_OF</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_NOTHROW_ASSIGN</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_NOTHROW_CONSTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_NOTHROW_COPY</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_ASSIGN</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_CONSTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_COPY</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_DESTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_VIRTUAL_DESTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_ABSTRACT</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_BASE_OF</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_CLASS</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_CONVERTIBLE</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_EMPTY</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_ENUM</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_POD</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_POLYMORPHIC</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_UNION</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_93"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">This section contains one block that must not be indexed and one that should be.</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.ignored_block"><phrase role="index-entry-level-1">add_volatile</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">true_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">Type Traits that Transform One Type to Another</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.transform"><phrase role="index-entry-level-1">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">type-traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intro"><phrase role="index-entry-level-1">Introduction</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.type_with_alignment"><phrase role="index-entry-level-0">type_with_alignment</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_94"><term>U</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">User Defined Specializations</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">is_class</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">is_union</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_95"><term>V</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">value_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.examples.copy"><phrase role="index-entry-level-1">An Optimized Version of std::copy</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></section>
+
+</chapter> \ 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 @@
+<?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</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro">
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background">
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special">&lt;&gt;::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void">is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">*&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ 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 &lt;...&gt; 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]&gt;</phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="underline">copy that
+ uses `memcpy`: this time the iterators are required to actually be pointers
+ to the same type, and the final parameter must be a `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_has_trivial_assign&lt;value_type&gt;()`
+ as the final parameter: this will dispatch to the optimized version where appropriate,
+ otherwise it will call the "slow but safe version".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ 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<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy&lt;const
+ T*, T*&gt;` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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 <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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 <link linkend="background.references">[7]</link>. 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:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference">add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp; [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"/> <anchor id="boost_typetraits.background.references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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".
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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 &amp;"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank">rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent">extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array">is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex">is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum">is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound">is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object">is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar">is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of">alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract">is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const">is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty">is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed">is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile">is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent">extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of">is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform">
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const">add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv">add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer">add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile">add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay">decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed">make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote">promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const">remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv">remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference">remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits">function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function">is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits">function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined">
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics">
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union">is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod">is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty">is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class">is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy">
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">value_type</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&amp;&amp;</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">-&gt;~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const">
+ <title><link linkend="boost_typetraits.reference.add_const"> add_const</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv">
+ <title><link linkend="boost_typetraits.reference.add_cv"> add_cv</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ <tertiary>three</tertiary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer">
+ <title><link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&amp;</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference">
+ <title><link linkend="boost_typetraits.reference.add_reference"> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile">
+ <title><link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage">
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of">
+ <title><link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant&lt;std::size_t,
+ ALIGNOF(T)&gt;<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay">
+ <title><link linkend="boost_typetraits.reference.decay"> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent">
+ <title><link linkend="boost_typetraits.reference.extent"> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">&gt;</phrase>
+ <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion">
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion">
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits">
+ <title><link linkend="boost_typetraits.reference.function_traits"> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor">
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign">
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor">
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy">
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor">
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant">
+ <title><link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion">
+ <title><link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract">
+ <title><link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>;
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic">
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral">is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array">
+ <title><link linkend="boost_typetraits.reference.is_array"> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of">
+ <title><link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">&gt;</phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class">
+ <title><link linkend="boost_typetraits.reference.is_class"> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union">is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex">
+ <title><link linkend="boost_typetraits.reference.is_complex"> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound">
+ <title><link linkend="boost_typetraits.reference.is_compound"> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const">
+ <title><link linkend="boost_typetraits.reference.is_const"> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible">
+ <title><link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty">
+ <title><link linkend="boost_typetraits.reference.is_empty"> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum">
+ <title><link linkend="boost_typetraits.reference.is_enum"> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point">
+ <title><link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function">
+ <title><link linkend="boost_typetraits.reference.is_function"> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference">is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&amp;)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&amp;</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">&lt;</phrase><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental">
+ <title><link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral">is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void">is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral">
+ <title><link linkend="boost_typetraits.reference.is_integral"> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer">
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer">
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object">
+ <title><link linkend="boost_typetraits.reference.is_object"> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ 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-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer">
+ <title><link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput>
+ 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.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic">
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same">
+ <title><link linkend="boost_typetraits.reference.is_same"> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar">
+ <title><link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed">
+ <title><link linkend="boost_typetraits.reference.is_signed"> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference">
+ <title><link linkend="boost_typetraits.reference.is_reference"> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union">
+ <title><link linkend="boost_typetraits.reference.is_union"> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned">
+ <title><link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void">
+ <title><link linkend="boost_typetraits.reference.is_void"> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile">
+ <title><link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed">
+ <title><link linkend="boost_typetraits.reference.make_signed"> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned">
+ <title><link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote">
+ <title><link linkend="boost_typetraits.reference.promote"> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank">
+ <title><link linkend="boost_typetraits.reference.rank"> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[]&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents">
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const">
+ <title><link linkend="boost_typetraits.reference.remove_const"> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv">
+ <title><link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent">
+ <title><link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer">
+ <title><link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference">
+ <title><link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile">
+ <title><link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment">
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic&lt;Programming&gt;:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost@lists.boost.org (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+
+ <section id="boost_typetraits.ignored_section">
+ <title>This section must not be indexed.</title>
+ <?BoostAutoIndex IgnoreSection?>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+ <section id="boost_typetraits.ignored_block">
+ <title>This section contains one block that must not be indexed and one that should be.</title>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ <?BoostAutoIndex IgnoreBlock?>
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+
+ <index>
+ <title>Class Index</title>
+ <para><link linkend="idx_id_0">A</link> <link linkend="idx_id_2">C</link> <link linkend="idx_id_3">D</link> <link linkend="idx_id_4">E</link> <link linkend="idx_id_5">F</link> <link linkend="idx_id_6">H</link> <link linkend="idx_id_7">I</link> <link linkend="idx_id_8">M</link> <link linkend="idx_id_9">O</link> <link linkend="idx_id_10">P</link> <link linkend="idx_id_11">R</link> <link linkend="idx_id_13">T</link></para><variablelist><varlistentry id="idx_id_0"><term>A</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-0">add_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-0">add_cv</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_pointer"><phrase role="index-entry-level-0">add_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_reference"><phrase role="index-entry-level-0">add_reference</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">add_volatile</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.ignored_block"><phrase role="index-entry-level-1">This section contains one block that must not be indexed and one that should be.</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.aligned_storage"><phrase role="index-entry-level-0">aligned_storage</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-0">alignment_of</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_2"><term>C</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Constrained Index Term</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">add_const</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_3"><term>D</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.decay"><phrase role="index-entry-level-0">decay</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_4"><term>E</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-0">extent</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_5"><term>F</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.floating_point_promotion"><phrase role="index-entry-level-0">floating_point_promotion</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-0">function_traits</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_6"><term>H</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_assign"><phrase role="index-entry-level-0">has_nothrow_assign</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-0">has_nothrow_constructor</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-0">has_nothrow_copy</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_assign"><phrase role="index-entry-level-0">has_trivial_assign</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-0">has_trivial_copy</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_constructor"><phrase role="index-entry-level-1">has_trivial_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_destructor"><phrase role="index-entry-level-0">has_trivial_destructor</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_virtual_destructor"><phrase role="index-entry-level-0">has_virtual_destructor</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_7"><term>I</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">integral_constant</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">alignment_of</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">extent</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.rank"><phrase role="index-entry-level-1">rank</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_promotion"><phrase role="index-entry-level-0">integral_promotion</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_abstract"><phrase role="index-entry-level-0">is_abstract</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_arithmetic"><phrase role="index-entry-level-0">is_arithmetic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_array"><phrase role="index-entry-level-0">is_array</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_base_of"><phrase role="index-entry-level-0">is_base_of</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_class</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_class"><phrase role="index-entry-level-1">is_class</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_complex"><phrase role="index-entry-level-0">is_complex</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_compound"><phrase role="index-entry-level-0">is_compound</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_const"><phrase role="index-entry-level-0">is_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_convertible"><phrase role="index-entry-level-0">is_convertible</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_empty"><phrase role="index-entry-level-0">is_empty</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_enum"><phrase role="index-entry-level-0">is_enum</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_floating_point"><phrase role="index-entry-level-0">is_floating_point</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_function"><phrase role="index-entry-level-0">is_function</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_fundamental"><phrase role="index-entry-level-0">is_fundamental</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_integral"><phrase role="index-entry-level-0">is_integral</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_function_pointer"><phrase role="index-entry-level-0">is_member_function_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_object_pointer"><phrase role="index-entry-level-0">is_member_object_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_pointer"><phrase role="index-entry-level-0">is_member_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_object"><phrase role="index-entry-level-0">is_object</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_pointer</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_pointer"><phrase role="index-entry-level-1">is_pointer</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_polymorphic"><phrase role="index-entry-level-0">is_polymorphic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_reference"><phrase role="index-entry-level-0">is_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_same"><phrase role="index-entry-level-0">is_same</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_scalar"><phrase role="index-entry-level-0">is_scalar</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_signed"><phrase role="index-entry-level-0">is_signed</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_union</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_union"><phrase role="index-entry-level-1">is_union</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_unsigned"><phrase role="index-entry-level-0">is_unsigned</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_void</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_void"><phrase role="index-entry-level-1">is_void</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_volatile"><phrase role="index-entry-level-0">is_volatile</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_8"><term>M</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.make_signed"><phrase role="index-entry-level-0">make_signed</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.make_unsigned"><phrase role="index-entry-level-0">make_unsigned</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_9"><term>O</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">one</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-1">two</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-2">add_const</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-2">three</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-3">add_cv</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_10"><term>P</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.promote"><phrase role="index-entry-level-0">promote</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_11"><term>R</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.remove_all_extents"><phrase role="index-entry-level-0">remove_all_extents</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_const"><phrase role="index-entry-level-0">remove_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_cv"><phrase role="index-entry-level-0">remove_cv</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">remove_extent</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.remove_extent"><phrase role="index-entry-level-1">remove_extent</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_pointer"><phrase role="index-entry-level-0">remove_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_reference"><phrase role="index-entry-level-0">remove_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_volatile"><phrase role="index-entry-level-0">remove_volatile</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_13"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.type_with_alignment"><phrase role="index-entry-level-0">type_with_alignment</phrase></link></para></listitem></itemizedlist></listitem></varlistentry></variablelist></index>
+ <index>
+ <title>Typedef Index</title>
+ <para><link linkend="idx_id_21">F</link> <link linkend="idx_id_27">R</link> <link linkend="idx_id_29">T</link> <link linkend="idx_id_31">V</link></para><variablelist><varlistentry id="idx_id_21"><term>F</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">false_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_27"><term>R</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">result_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">function_traits</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_29"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">true_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_31"><term>V</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">value_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.examples.copy"><phrase role="index-entry-level-1">An Optimized Version of std::copy</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></index>
+ <index>
+ <title>Macro Index</title>
+ <para><link linkend="idx_id_33">B</link></para><variablelist><varlistentry id="idx_id_33"><term>B</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">BOOST_ALIGNMENT_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.transform"><phrase role="index-entry-level-1">Type Traits that Transform One Type to Another</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_VIRTUAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ABSTRACT</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_BASE_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CLASS</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CONVERTIBLE</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_EMPTY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ENUM</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POD</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POLYMORPHIC</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_UNION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></index>
+ <index>
+ <title>Index Test 1</title>
+ <para><link linkend="idx_id_61">T</link></para><variablelist><varlistentry id="idx_id_61"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">type-traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intro"><phrase role="index-entry-level-1">Introduction</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></index>
+ <index>
+ <title>Index Test 2</title>
+ <para><link linkend="idx_id_77">T</link></para><variablelist><varlistentry id="idx_id_77"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">type-traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></index>
+ <index><title>Index</title><para><link linkend="idx_id_80">A</link> <link linkend="idx_id_81">B</link> <link linkend="idx_id_82">C</link> <link linkend="idx_id_83">D</link> <link linkend="idx_id_84">E</link> <link linkend="idx_id_85">F</link> <link linkend="idx_id_86">H</link> <link linkend="idx_id_87">I</link> <link linkend="idx_id_88">M</link> <link linkend="idx_id_89">O</link> <link linkend="idx_id_90">P</link> <link linkend="idx_id_91">R</link> <link linkend="idx_id_92">S</link> <link linkend="idx_id_93">T</link> <link linkend="idx_id_94">U</link> <link linkend="idx_id_95">V</link></para><variablelist><varlistentry id="idx_id_80"><term>A</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">add_const</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">add_const</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">Constrained Index Term</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-0">add_cv</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_pointer"><phrase role="index-entry-level-0">add_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.add_reference"><phrase role="index-entry-level-0">add_reference</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">add_volatile</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.ignored_block"><phrase role="index-entry-level-1">This section contains one block that must not be indexed and one that should be.</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.aligned_storage"><phrase role="index-entry-level-0">aligned_storage</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">alignment_of</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">alignment_of</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_81"><term>B</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Background and Tutorial</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">is_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">is_void</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">remove_extent</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">type-traits</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_ALIGNMENT_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.transform"><phrase role="index-entry-level-1">Type Traits that Transform One Type to Another</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_NOTHROW_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_ASSIGN</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_CONSTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_COPY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_TRIVIAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_HAS_VIRTUAL_DESTRUCTOR</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ABSTRACT</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_BASE_OF</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CLASS</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_CONVERTIBLE</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_EMPTY</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_ENUM</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POD</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_POLYMORPHIC</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">BOOST_IS_UNION</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">Support for Compiler Intrinsics</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_82"><term>C</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Constrained Index Term</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-1">add_const</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_83"><term>D</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.decay"><phrase role="index-entry-level-0">decay</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_84"><term>E</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">extent</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">extent</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_85"><term>F</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">false_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.floating_point_promotion"><phrase role="index-entry-level-0">floating_point_promotion</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">Foo1</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">Foo2</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-1">Bar2</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.value_traits"><phrase role="index-entry-level-2">Type Traits that Describe the Properties of a Type</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">function_traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">function_traits</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">result_type</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_86"><term>H</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_assign"><phrase role="index-entry-level-0">has_nothrow_assign</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_constructor</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_default_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_copy</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_copy"><phrase role="index-entry-level-1">has_nothrow_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_nothrow_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_nothrow_constructor"><phrase role="index-entry-level-1">has_nothrow_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_assign"><phrase role="index-entry-level-0">has_trivial_assign</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_constructor"><phrase role="index-entry-level-1">has_trivial_default_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_copy</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_copy_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_copy"><phrase role="index-entry-level-1">has_trivial_copy</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">has_trivial_default_constructor</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.has_trivial_constructor"><phrase role="index-entry-level-1">has_trivial_constructor</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.has_trivial_destructor"><phrase role="index-entry-level-0">has_trivial_destructor</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.has_virtual_destructor"><phrase role="index-entry-level-0">has_virtual_destructor</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_87"><term>I</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">integral_constant</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.alignment_of"><phrase role="index-entry-level-1">alignment_of</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.extent"><phrase role="index-entry-level-1">extent</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">false_type</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.reference.rank"><phrase role="index-entry-level-1">rank</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">true_type</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">value_type</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_promotion"><phrase role="index-entry-level-0">integral_promotion</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">Introduction</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intro"><phrase role="index-entry-level-1">type-traits</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_abstract"><phrase role="index-entry-level-0">is_abstract</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_arithmetic"><phrase role="index-entry-level-0">is_arithmetic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_array"><phrase role="index-entry-level-0">is_array</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_base_of"><phrase role="index-entry-level-0">is_base_of</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_class</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_class"><phrase role="index-entry-level-1">is_class</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_complex"><phrase role="index-entry-level-0">is_complex</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_compound"><phrase role="index-entry-level-0">is_compound</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_const"><phrase role="index-entry-level-0">is_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_convertible"><phrase role="index-entry-level-0">is_convertible</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_empty"><phrase role="index-entry-level-0">is_empty</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_enum"><phrase role="index-entry-level-0">is_enum</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_floating_point"><phrase role="index-entry-level-0">is_floating_point</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_function"><phrase role="index-entry-level-0">is_function</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_fundamental"><phrase role="index-entry-level-0">is_fundamental</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_integral"><phrase role="index-entry-level-0">is_integral</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_function_pointer"><phrase role="index-entry-level-0">is_member_function_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_object_pointer"><phrase role="index-entry-level-0">is_member_object_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_member_pointer"><phrase role="index-entry-level-0">is_member_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_object"><phrase role="index-entry-level-0">is_object</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_pointer</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_pointer"><phrase role="index-entry-level-1">is_pointer</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_polymorphic"><phrase role="index-entry-level-0">is_polymorphic</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_reference"><phrase role="index-entry-level-0">is_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_same"><phrase role="index-entry-level-0">is_same</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_scalar"><phrase role="index-entry-level-0">is_scalar</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.is_signed"><phrase role="index-entry-level-0">is_signed</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_union</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_union"><phrase role="index-entry-level-1">is_union</phrase></link></emphasis></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">User Defined Specializations</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_unsigned"><phrase role="index-entry-level-0">is_unsigned</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">is_void</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.is_void"><phrase role="index-entry-level-1">is_void</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.is_volatile"><phrase role="index-entry-level-0">is_volatile</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_88"><term>M</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.make_signed"><phrase role="index-entry-level-0">make_signed</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.make_unsigned"><phrase role="index-entry-level-0">make_unsigned</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_89"><term>O</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">one</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_volatile"><phrase role="index-entry-level-1">add_volatile</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-1">two</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_const"><phrase role="index-entry-level-2">add_const</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-2">three</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.add_cv"><phrase role="index-entry-level-3">add_cv</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">Optimized Version of std::copy</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.examples.copy"><phrase role="index-entry-level-1">value_type</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_90"><term>P</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.promote"><phrase role="index-entry-level-0">promote</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_91"><term>R</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">rank</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.rank"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_all_extents"><phrase role="index-entry-level-0">remove_all_extents</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_const"><phrase role="index-entry-level-0">remove_const</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_cv"><phrase role="index-entry-level-0">remove_cv</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">remove_extent</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><emphasis role="bold"><link linkend="boost_typetraits.reference.remove_extent"><phrase role="index-entry-level-1">remove_extent</phrase></link></emphasis></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_pointer"><phrase role="index-entry-level-0">remove_pointer</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_reference"><phrase role="index-entry-level-0">remove_reference</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.remove_volatile"><phrase role="index-entry-level-0">remove_volatile</phrase></link></para></listitem><listitem><para><phrase role="index-entry-level-0">result_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.function_traits"><phrase role="index-entry-level-1">function_traits</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_92"><term>S</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">Support for Compiler Intrinsics</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_ALIGNMENT_OF</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_NOTHROW_ASSIGN</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_NOTHROW_CONSTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_NOTHROW_COPY</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_ASSIGN</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_CONSTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_COPY</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_TRIVIAL_DESTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_HAS_VIRTUAL_DESTRUCTOR</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_ABSTRACT</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_BASE_OF</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_CLASS</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_CONVERTIBLE</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_EMPTY</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_ENUM</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_POD</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_POLYMORPHIC</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intrinsics"><phrase role="index-entry-level-1">BOOST_IS_UNION</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_93"><term>T</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">This section contains one block that must not be indexed and one that should be.</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.ignored_block"><phrase role="index-entry-level-1">add_volatile</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">true_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">Type Traits that Transform One Type to Another</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.category.transform"><phrase role="index-entry-level-1">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><phrase role="index-entry-level-0">type-traits</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.background"><phrase role="index-entry-level-1">Background and Tutorial</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.intro"><phrase role="index-entry-level-1">Introduction</phrase></link></para></listitem></itemizedlist></listitem><listitem><para><link linkend="boost_typetraits.reference.type_with_alignment"><phrase role="index-entry-level-0">type_with_alignment</phrase></link></para></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_94"><term>U</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">User Defined Specializations</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">is_class</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.user_defined"><phrase role="index-entry-level-1">is_union</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry><varlistentry id="idx_id_95"><term>V</term><listitem><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><phrase role="index-entry-level-0">value_type</phrase></para><itemizedlist mark="none" spacing="compact" role="index"><listitem><para><link linkend="boost_typetraits.examples.copy"><phrase role="index-entry-level-1">An Optimized Version of std::copy</phrase></link></para></listitem><listitem><para><link linkend="boost_typetraits.reference.integral_constant"><phrase role="index-entry-level-1">integral_constant</phrase></link></para></listitem></itemizedlist></listitem></itemizedlist></listitem></varlistentry></variablelist></index>
+
+</chapter> \ 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 @@
+<?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</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro">
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background">
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special">&lt;&gt;::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void">is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">*&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ 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 &lt;...&gt; 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]&gt;</phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="underline">copy that
+ uses `memcpy`: this time the iterators are required to actually be pointers
+ to the same type, and the final parameter must be a `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_has_trivial_assign&lt;value_type&gt;()`
+ as the final parameter: this will dispatch to the optimized version where appropriate,
+ otherwise it will call the "slow but safe version".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ 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<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy&lt;const
+ T*, T*&gt;` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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 <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ 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 <link linkend="background.references">[7]</link>. 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:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference">add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ T &amp; [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &amp;
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry><entry>
+ <para>
+ const T &amp;
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"/> <anchor id="boost_typetraits.background.references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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".
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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 &amp;"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank">rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent">extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array">is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex">is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum">is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ 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.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound">is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object">is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar">is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of">alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract">is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const">is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty">is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed">is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile">is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent">extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of">is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform">
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const">add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv">add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer">add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile">add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay">decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed">make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote">promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const">remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv">remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference">remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits">function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function">is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits">function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined">
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special">&lt;&gt;</phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">&lt;</phrase><phrase role="identifier">my_union</phrase><phrase role="special">&gt;</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics">
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union">is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod">is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty">is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class">is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">&gt;</phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy">
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">value_type</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">&gt;&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&amp;&amp;</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">-&gt;~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&amp;)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">I2</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">&lt;</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">&lt;</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const">
+ <title><link linkend="boost_typetraits.reference.add_const"> add_const</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv">
+ <title><link linkend="boost_typetraits.reference.add_cv"> add_cv</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ <secondary>two</secondary>
+ <tertiary>three</tertiary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer">
+ <title><link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&amp;</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference">
+ <title><link linkend="boost_typetraits.reference.add_reference"> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&amp;</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile">
+ <title><link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link></title>
+ <indexterm type="class_name">
+ <primary>one</primary>
+ </indexterm>
+
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage">
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of">
+ <title><link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant&lt;std::size_t,
+ ALIGNOF(T)&gt;<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay">
+ <title><link linkend="boost_typetraits.reference.decay"> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent">
+ <title><link linkend="boost_typetraits.reference.extent"> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">&gt;</phrase>
+ <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion">
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion">
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits">
+ <title><link linkend="boost_typetraits.reference.function_traits"> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">F</phrase><phrase role="special">&gt;::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special">&lt;=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)&gt;::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor">
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign">
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor">
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy">
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor">
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant">
+ <title><link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion">
+ <title><link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract">
+ <title><link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>;
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic">
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral">is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array">
+ <title><link linkend="boost_typetraits.reference.is_array"> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of">
+ <title><link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">&gt;</phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class">
+ <title><link linkend="boost_typetraits.reference.is_class"> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union">is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex">
+ <title><link linkend="boost_typetraits.reference.is_complex"> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound">
+ <title><link linkend="boost_typetraits.reference.is_compound"> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const">
+ <title><link linkend="boost_typetraits.reference.is_const"> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible">
+ <title><link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty">
+ <title><link linkend="boost_typetraits.reference.is_empty"> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum">
+ <title><link linkend="boost_typetraits.reference.is_enum"> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point">
+ <title><link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function">
+ <title><link linkend="boost_typetraits.reference.is_function"> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference">is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&amp;)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&amp;</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">&lt;</phrase><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&amp;&amp;</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental">
+ <title><link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral">is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void">is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral">
+ <title><link linkend="boost_typetraits.reference.is_integral"> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer">
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer">
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object">
+ <title><link linkend="boost_typetraits.reference.is_object"> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ 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-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer">
+ <title><link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput>
+ 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.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic">
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">poly</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same">
+ <title><link linkend="boost_typetraits.reference.is_same"> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;,</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar">
+ <title><link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed">
+ <title><link linkend="boost_typetraits.reference.is_signed"> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_class</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&amp;&amp;</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference">
+ <title><link linkend="boost_typetraits.reference.is_reference"> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&amp;)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union">
+ <title><link linkend="boost_typetraits.reference.is_union"> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned">
+ <title><link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">myclass</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">char</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void">
+ <title><link linkend="boost_typetraits.reference.is_void"> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">void</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile">
+ <title><link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">&gt;</phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed">
+ <title><link linkend="boost_typetraits.reference.make_signed"> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned">
+ <title><link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote">
+ <title><link linkend="boost_typetraits.reference.promote"> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">short</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank">
+ <title><link linkend="boost_typetraits.reference.rank"> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)&gt;</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[]&gt;</phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">&gt;</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">T</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents">
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const">
+ <title><link linkend="boost_typetraits.reference.remove_const"> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv">
+ <title><link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent">
+ <title><link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer">
+ <title><link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference">
+ <title><link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">*&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile">
+ <title><link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&amp;&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special">&lt;</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*&gt;::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment">
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic&lt;Programming&gt;:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost@lists.boost.org (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+
+ <section id="boost_typetraits.ignored_section">
+ <title>This section must not be indexed.</title>
+ <?BoostAutoIndex IgnoreSection?>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+ <section id="boost_typetraits.ignored_block">
+ <title>This section contains one block that must not be indexed and one that should be.</title>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ <?BoostAutoIndex IgnoreBlock?>
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">
+ template</phrase> <phrase role="special">&lt;</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">&gt;</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </section>
+
+ <para>
+ <index type="class_name">
+ <title>Class Index</title>
+ </index>
+ <index type="typedef_name">
+ <title>Typedef Index</title>
+ </index>
+ <index type="macro_name">
+ <title>Macro Index</title>
+ </index>
+ <index type="test_index_1">
+ <title>Index Test 1</title>
+ </index>
+ <index type="test_index_2">
+ <title>Index Test 2</title>
+ </index>
+ <index/>
+ </para>
+</chapter>
+
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
+ :
+ <install-type>EXE
+ <location>../../dist/bin
+ :
+ release
+ ;
+
+install dist-lib
+ :
+ bcp
+ :
+ <install-type>LIB
+ <location>../../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 <boost/regex.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/exception.hpp>
+#include <iostream>
+
+//
+// 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<std::string, boost::regex> scanner;
+
+static std::map<std::string, std::set<std::string> > free_function_names;
+static std::map<std::string, std::set<std::string> > class_names;
+static std::map<std::string, std::set<std::string> > 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<const char*> a(view.begin(), view.end(), function_scanner);
+ boost::regex_iterator<const char*> 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<std::string>::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 <boost/regex.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/exception.hpp>
+#include <iostream>
+
+
+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(
+ "\\<lib\\s+(boost\\w+)\\s+[:;]"
+ );
+
+ fileview view(m_boost_path / p);
+ boost::regex_token_iterator<const char*> i(view.begin(), view.end(), e, 1);
+ boost::regex_token_iterator<const char*> j;
+ while(i != j)
+ {
+ m_lib_names.insert(*i);
+ ++i;
+ }
+ static const std::pair<fs::path, std::string> specials_library_names[] = {
+ std::pair<fs::path, std::string>("libs/python/build/Jamfile.v2", "boost_python"),
+ std::pair<fs::path, std::string>("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<const char*> i(view.begin(), view.end(), e, 1);
+ boost::regex_token_iterator<const char*> 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<fs::path, fs::path>
+ specials[] = {
+ std::pair<fs::path, fs::path>("tools/build/src/kernel/modules.jam", "libs/predef/check"),
+ std::pair<fs::path, fs::path>("tools/build/src/kernel/modules.jam", "libs/predef/tools"),
+ std::pair<fs::path, fs::path>("tools/build/src/kernel/modules.jam", "tools/boost_install/boost-install.jam"),
+ std::pair<fs::path, fs::path>("tools/build/src/kernel/modules.jam", "tools/boost_install/boost-install-dirs.jam"),
+ std::pair<fs::path, fs::path>("tools/build/src/kernel/modules.jam", "tools/boost_install/Jamfile"),
+ std::pair<fs::path, fs::path>("tools/build/src/kernel/modules.jam", "libs/headers"),
+ std::pair<fs::path, fs::path>("libs/test/build/Jamfile.v2", "libs/timer/src"),
+ std::pair<fs::path, fs::path>("libs/test/build/Jamfile.v2", "libs/timer/build"),
+ std::pair<fs::path, fs::path>("boost/atomic/capabilities.hpp", "boost/atomic/detail"),
+ std::pair<fs::path, fs::path>("boost/chrono/chrono.hpp", "libs/chrono/src"),
+ std::pair<fs::path, fs::path>("boost/chrono/chrono.hpp", "libs/chrono/build"),
+ std::pair<fs::path, fs::path>("boost/context/execution_context.hpp", "libs/context/src"),
+ std::pair<fs::path, fs::path>("boost/context/execution_context.hpp", "libs/context/build"),
+ std::pair<fs::path, fs::path>("boost/context/fcontext.hpp", "libs/context/src"),
+ std::pair<fs::path, fs::path>("boost/context/fcontext.hpp", "libs/context/build"),
+ std::pair<fs::path, fs::path>("boost/context/fixedsize_stack.hpp", "libs/context/src"),
+ std::pair<fs::path, fs::path>("boost/context/fixedsize_stack.hpp", "libs/context/build"),
+ std::pair<fs::path, fs::path>("boost/context/protected_fixedsize_stack.hpp", "libs/context/src"),
+ std::pair<fs::path, fs::path>("boost/context/protected_fixedsize_stack.hpp", "libs/context/build"),
+ std::pair<fs::path, fs::path>("boost/context/segmented_stack.hpp", "libs/context/src"),
+ std::pair<fs::path, fs::path>("boost/context/segmented_stack.hpp", "libs/context/build"),
+ std::pair<fs::path, fs::path>("boost/context/stack_context.hpp", "libs/context/src"),
+ std::pair<fs::path, fs::path>("boost/context/stack_context.hpp", "libs/context/build"),
+ std::pair<fs::path, fs::path>("boost/context/stack_traits.hpp", "libs/context/src"),
+ std::pair<fs::path, fs::path>("boost/context/stack_traits.hpp", "libs/context/build"),
+ std::pair<fs::path, fs::path>("boost/cerrno.hpp", "libs/system/build"),
+ std::pair<fs::path, fs::path>("boost/cerrno.hpp", "libs/system/src"),
+ std::pair<fs::path, fs::path>("libs/thread/build", "boost/system"),
+ std::pair<fs::path, fs::path>("libs/thread/build", "boost/cerrno.hpp"),
+ std::pair<fs::path, fs::path>("libs/thread/build", "boost/chrono"),
+ std::pair<fs::path, fs::path>("boost/filesystem/convenience.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/exception.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/fstream.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/operations.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/path.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/build"),
+ std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/v2"),
+ std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/v3"),
+ std::pair<fs::path, fs::path>("boost/config.hpp", "boost/config"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "libs/config/checks"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "libs/config/test"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "libs/headers/build"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "tools/boost_install/BoostConfig.cmake"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "tools/boost_install/BoostDetectToolset.cmake"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "tools/boost_install/boost-install.jam"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "tools/boost_install/boost-install-dirs.jam"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "boost-build.jam"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "boostcpp.jam"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "bootstrap.bat"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "bootstrap.sh"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "Jamroot"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "INSTALL"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "LICENSE_1_0.txt"),
+ std::pair<fs::path, fs::path>("boost/preprocessor/iterate.hpp", "boost/preprocessor/iteration"),
+ std::pair<fs::path, fs::path>("boost/preprocessor/slot/slot.hpp", "boost/preprocessor/slot/detail"),
+ std::pair<fs::path, fs::path>("boost/function.hpp", "boost/function/detail"),
+ std::pair<fs::path, fs::path>("boost/regex/config.hpp", "boost/regex/user.hpp"),
+ std::pair<fs::path, fs::path>("boost/signals/signal_template.hpp", "boost/function"),
+ std::pair<fs::path, fs::path>("boost/mpl/list.hpp", "boost/mpl/list"),
+ std::pair<fs::path, fs::path>("boost/mpl/list_c.hpp", "boost/mpl/list"),
+ std::pair<fs::path, fs::path>("boost/mpl/vector.hpp", "boost/mpl/vector"),
+ std::pair<fs::path, fs::path>("boost/mpl/deque.hpp", "boost/mpl/vector"),
+ std::pair<fs::path, fs::path>("boost/mpl/vector_c.hpp", "boost/mpl/vector"),
+ std::pair<fs::path, fs::path>("boost/mpl/map.hpp", "boost/mpl/map"),
+ std::pair<fs::path, fs::path>("boost/mpl/set.hpp", "boost/mpl/set"),
+ std::pair<fs::path, fs::path>("boost/mpl/set_c.hpp", "boost/mpl/set"),
+ std::pair<fs::path, fs::path>("boost/mpl/aux_/include_preprocessed.hpp", "boost/mpl/aux_/preprocessed"),
+ std::pair<fs::path, fs::path>("boost/mpl/vector/aux_/include_preprocessed.hpp", "boost/mpl/vector/aux_/preprocessed"),
+ std::pair<fs::path, fs::path>("boost/mpl/set/aux_/include_preprocessed.hpp", "boost/mpl/set/aux_/preprocessed"),
+ std::pair<fs::path, fs::path>("boost/mpl/map/aux_/include_preprocessed.hpp", "boost/mpl/map/aux_/preprocessed"),
+ std::pair<fs::path, fs::path>("boost/mpl/list/aux_/include_preprocessed.hpp", "boost/mpl/list/aux_/preprocessed"),
+ std::pair<fs::path, fs::path>("libs/graph/src/python/visitor.hpp", "libs/graph/src/python"),
+ std::pair<fs::path, fs::path>("boost/test/detail/config.hpp", "libs/test/src"),
+ std::pair<fs::path, fs::path>("boost/test/detail/config.hpp", "libs/test/build"),
+ std::pair<fs::path, fs::path>("boost/test/detail/config.hpp", "libs/predef/build.jam"),
+ std::pair<fs::path, fs::path>("boost/test/detail/config.hpp", "libs/predef/check"),
+ std::pair<fs::path, fs::path>("boost/typeof.hpp", "boost/typeof/incr_registration_group.hpp"),
+ std::pair<fs::path, fs::path>("boost/function_types/detail/pp_loop.hpp", "boost/function_types/detail/pp_cc_loop"),
+ std::pair<fs::path, fs::path>("boost/function_types/components.hpp", "boost/function_types/detail/components_impl"),
+ std::pair<fs::path, fs::path>("boost/function_types/detail/pp_loop.hpp", "boost/function_types/detail"),
+ std::pair<fs::path, fs::path>("boost/math/tools/rational.hpp", "boost/math/tools/detail"),
+ std::pair<fs::path, fs::path>("boost/proto/repeat.hpp", "boost/proto/detail/local.hpp"),
+ std::pair<fs::path, fs::path>("boost/signals/signal_template.hpp", "boost/function"),
+ std::pair<fs::path, fs::path>("boost/preprocessor/slot/counter.hpp", "boost/preprocessor/slot/detail/counter.hpp"),
+ std::pair<fs::path, fs::path>("boost/graph/distributed/detail/tag_allocator.hpp", "libs/graph_parallel"),
+ std::pair<fs::path, fs::path>("boost/graph/distributed/mpi_process_group.hpp", "libs/graph_parallel"),
+ std::pair<fs::path, fs::path>("libs/coroutine/build/Jamfile.v2", "libs/context/src"),
+ std::pair<fs::path, fs::path>("libs/coroutine/build/Jamfile.v2", "libs/context/build"),
+ std::pair<fs::path, fs::path>("libs/fiber/build/Jamfile.v2", "libs/context/src"),
+ std::pair<fs::path, fs::path>("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<const char*> i(view.begin(), view.end(), e, subs);
+ boost::regex_token_iterator<const char*> 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<const char*>(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<const char*>(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(
+ "^(?<!\\\\\\n)[[:blank:]]*+namespace\\s++(\\w++)\\s++(\\{[^{}]*(?:(?2)[^{}]*)*\\})"
+ );
+ i = boost::regex_token_iterator<const char*>(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 <boost/shared_ptr.hpp>
+
+#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<bcp_application> 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 <boost/filesystem/operations.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <iostream>
+#include <stdexcept>
+#include <boost/regex.hpp>
+#include <string>
+
+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<std::string>::const_iterator i = m_module_list.begin();
+ std::list<std::string>::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<std::string, fs::path>::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<fs::path, path_less>::iterator m, n;
+ std::set<fs::path, path_less> 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<bcp_application*>(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 <string>
+#include <cstring>
+#include <list>
+#include <set>
+#include <map>
+#include <queue>
+#include <boost/filesystem/path.hpp>
+
+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<fs::path, path_less> files;
+ std::set<std::string> 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<std::string> 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<fs::path, bool, path_less> m_cvs_paths; // valid files under cvs control
+ std::set<fs::path, path_less> m_copy_paths; // list of files to copy
+ std::map<int, license_data> m_license_data; // licenses in use
+ std::set<fs::path, path_less> m_unknown_licenses; // files with no known license
+ std::set<fs::path, path_less> m_unknown_authors; // files with no known copyright/author
+ std::set<fs::path, path_less> m_can_migrate_to_bsl; // files that can migrate to the BSL
+ std::set<fs::path, path_less> m_cannot_migrate_to_bsl; // files that cannot migrate to the BSL
+ std::set<std::string> m_bsl_authors; // authors giving blanket permission to use the BSL
+ std::set<std::string> m_authors_for_bsl_migration; // authors we need for BSL migration
+ std::map<fs::path, std::pair<std::string, std::string>, path_less>
+ m_converted_to_bsl;
+ std::map<std::string, std::set<fs::path, path_less> > m_author_data; // all the authors
+ std::map<fs::path, fs::path, path_less> m_dependencies; // dependency information
+ std::string m_namespace_name; // namespace rename.
+ std::set<std::string> m_lib_names; // List of library binary names
+ std::map<std::string, fs::path> m_top_namespaces; // List of top level namespace names
+ std::queue<fs::path, std::list<fs::path> > 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 <boost/filesystem/operations.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/regex.hpp>
+#include <boost/assert.hpp>
+#include <fstream>
+#include <iterator>
+#include <algorithm>
+#include <iostream>
+
+struct get_new_library_name
+{
+ get_new_library_name(const std::string& n) : m_new_name(n) {}
+ template <class I>
+ std::string operator()(const boost::match_results<I>& 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<char> v1, v2;
+ v1.clear();
+ v2.clear();
+ boost::filesystem::ifstream is((m_boost_path / p));
+ std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), 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<char> v1, v2;
+ v1.clear();
+ v2.clear();
+ boost::filesystem::ifstream is((m_boost_path / p));
+ std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1));
+
+ static boost::regex libname_matcher;
+ if(libname_matcher.empty())
+ {
+ std::string re = "\\<";
+ re += *m_lib_names.begin();
+ for(std::set<std::string>::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<char> v1, v2;
+ v1.clear();
+ v2.clear();
+ boost::filesystem::ifstream is((m_boost_path / p));
+ std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1));
+
+ static const boost::regex namespace_matcher(
+ "(?|"
+ "(namespace\\s+)boost(_\\w+)?(?:(\\s*::\\s*)phoenix)?"
+ "|"
+ "(namespace\\s+(?:detail::)?)(adstl|phoenix|rapidxml)\\>"
+ "|"
+ "()\\<boost((?:_(?!intrusive_tags)\\w+)?\\s*(?:::))(?:(\\s*)phoenix)?"
+ "|"
+ "()\\<((?:adstl|phoenix|rapidxml)\\s*(?:::))"
+ "|"
+ "(namespace\\s+\\w+\\s*=\\s*(?:::\\s*)?)boost(_\\w+)?(?:(\\s*::\\s*)phoenix)?"
+ "|"
+ "(namespace\\s+\\w+\\s*=\\s*(?:::\\s*)?(?:\\w+\\s*::\\s*)?)(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<char> isi(is);
+ std::istreambuf_iterator<char> end;
+
+ boost::filesystem::ofstream os((m_dest_path / p), std::ios_base::binary | std::ios_base::out);
+ std::ostreambuf_iterator<char> 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 <boost/regex.hpp>
+
+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<fs::path, bool, path_less>::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 <boost/filesystem/fstream.hpp>
+#include <vector>
+#include <algorithm>
+#include <string>
+#include <fstream>
+#include <istream>
+#include <stdexcept>
+
+struct fileview::implementation
+{
+ std::vector<char> 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<char> in(is);
+ std::istreambuf_iterator<char> 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 <boost/shared_ptr.hpp>
+#include <boost/filesystem/path.hpp>
+
+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<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_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<implementation> 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 @@
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; URL=doc/html/index.html">
+ </head>
+ <body>
+ <p>
+ Automatic redirection failed, please go to <a href="doc/html/index.html">doc/html/index.html</a>.
+ </p>
+ <p>Copyright&nbsp;John Maddock 2007</p>
+ <p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <a href="../../LICENSE_1_0.txt">
+ LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>).</p>
+ </body>
+</html>
+
+
+
+
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<const license_info*, int> get_licenses()
+{
+ static const char* generic_author_sig =
+ "(?:"
+ "(?:"
+ "Copyright|\\(c\\)|\xA9"
+ ")[[:blank:]]+"
+ "){1,2}"
+ "(?:"
+ "\\d[^[:alpha:]]+"
+ "([[:alpha:]]"
+ "(?:"
+ "(?!Use\\b|Permission\\b|All\\b|<P|(?:-\\s*)\\w+(?:://|@)|\\\\"
+ ")[^\\n\\d]"
+ ")+"
+ ")"
+ "|"
+ "([[:alpha:]][^\\n\\d]+"
+ "(?:\\n[^\\n\\d]+"
+ ")??"
+ ")(?:19|20)\\d{2}"
+ ")"
+ "|"
+ "Authors:[[:blank:]]+"
+ "([[:alpha:]][^\\n\\d]+"
+ "|"
+ "((?:The|This) code is considered to be in the public domain)"
+ ")";
+
+ static const char* generic_author_format =
+ "(?1$1)(?2$2)(?3$3)(?4Public Domain)";
+
+ static const license_info licenses[] =
+ {
+ license_info( boost::regex("distributed\\W+under"
+ "(\\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"
+ ,
+ "<P>Copyright (c) <I>Date</I> <I>Author</I></P>"
+ "<P>Distributed under the "
+ "Boost Software License, Version 1.0. (See accompanying file "
+ "LICENSE_1_0.txt or copy at <a href=\"http://www.boost.org/LICENSE_1_0.txt\">http://www.boost.org/LICENSE_1_0.txt)</a></P>"
+ )
+ ,
+ 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)"
+ ,
+ "<P>Copyright (c) <I>Date</I> <I>Author</I></P>"
+ "<P>Use, modification and distribution is subject to the "
+ "Boost Software License, Version 1.0. (See accompanying file "
+ "LICENSE_1_0.txt or copy at <a href=\"http://www.boost.org/LICENSE_1_0.txt\">http://www.boost.org/LICENSE_1_0.txt)</a></P>"
+ )
+ ,
+ 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)"
+ ,
+ "<P>Copyright (c) <I>Date</I> <I>Author</I></P>"
+ "<P>Subject to the "
+ "Boost Software License, Version 1.0. (See accompanying file "
+ "LICENSE_1_0.txt or copy at <a href=\"http://www.boost.org/LICENSE_1_0.txt\">http://www.boost.org/LICENSE_1_0.txt)</a></P>"
+ )
+ ,
+ 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"
+ ,
+ "<p>Copyright (c) 2001, 2002 Python Software Foundation;</p>"
+ "<P>All Rights Reserved</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright (c) <I>Date</I><BR>"
+ "<I>Author</I><BR>"
+ "<BR>"
+ "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. <I>Author</I> makes no representations "
+ "about the suitability of this software for any purpose. "
+ "It is provided \"as is\" without express or implied warranty.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright (c) <I>Date</I><BR>"
+ "<I>Author</I><BR>"
+ "<BR>"
+ "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. <I>Author</I> makes no representations "
+ "about the suitability of this software for any purpose. "
+ "It is provided \"as is\" without express or implied warranty.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright (c) <I>Date</I> <I>Author</I>.<BR><BR>\n"
+ "Permission to copy, use, modify, sell and distribute this software<BR>\n"
+ "is granted provided this copyright notice appears in all copies.<BR>\n"
+ "This software is provided \"as is\" without express or implied<BR>\n"
+ "warranty, and with no claim as to its suitability for any purpose.</P>\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"
+ ,
+ "<P>(C) Copyright <I>Author</I> <I>Date</I>. 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.</p>\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"
+ ,
+ "<P>Copyright (C) <I>Date Author</I><BR>"
+ "<BR>"
+ "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.</P>\n"
+ "<P>This software is provided \"as is\" without express or implied warranty,\n"
+ "and with no claim as to its suitability for any purpose.</P>"
+ )
+ ,
+ 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)"
+ ,
+ "<P>Copyright <I>Date</I> University of Notre Dame.<BR>"
+ "Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek</P>"
+ "<P>This file is part of the Boost Graph Library</P>"
+ "<P>You should have received a copy of the <A href=\"http://www.boost.org/libs/graph/LICENCE\">License Agreement</a> for the "
+ "Boost Graph Library along with the software; see the file <A href=\"http://www.boost.org/libs/graph/LICENCE\">LICENSE</a>. "
+ "If not, contact Office of Research, University of Notre Dame, Notre "
+ "Dame, IN 46556.</P>"
+ "<P>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 <A href=\"http://www.boost.org/libs/graph/LICENCE\">LICENSE</a> file, and that the <A href=\"http://www.boost.org/libs/graph/LICENCE\">LICENSE</a> "
+ "file is distributed with the modified code.</P>"
+ "<P>LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.<BR> "
+ "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.</P>"
+ )
+ ,
+ 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)"
+ ,
+ "<P>Copyright <I>Date</I> Indiana University.<BR>"
+ "Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek</P>"
+ "<P>This file is part of the Boost Graph Library</P>"
+ "<P>You should have received a copy of the <A href=\"http://www.boost.org/libs/graph/LICENCE\">License Agreement</a> for the "
+ "Boost Graph Library along with the software; see the file <A href=\"http://www.boost.org/libs/graph/LICENCE\">LICENSE</a>. "
+ "If not, contact Office of Research, Indiana University, Bloomington,"
+ "IN 47404.</P>"
+ "<P>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 <A href=\"http://www.boost.org/libs/graph/LICENCE\">LICENSE</a> file, and that the <A href=\"http://www.boost.org/libs/graph/LICENCE\">LICENSE</a> "
+ "file is distributed with the modified code.</P>"
+ "<P>LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.<BR> "
+ "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.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright (C) <I>Date Author</I></P>"
+ "<p>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.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>This file can be redistributed and/or modified under the terms found "
+ "in <a href=\"http://www.boost.org/libs/pool/doc/copyright.html\">copyright.html</a></P>\n"
+ "<P>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</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright <I>Author Data</I></P>"
+ "<P>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, "
+ "<I>Author</I> makes no representations about the suitability of this "
+ "software for any purpose. It is provided \"as is\" without express or "
+ "implied warranty.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright <I>Author Date</I>. 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"
+ ,
+ "<P>Phoenix V0.9<BR>Copyright (c) <I>Date</I> Joel de Guzman</P>"
+ "<P>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.</P>"
+ "<P>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:</P>"
+ "<P>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.</P>"
+ "2. Altered source versions must be plainly marked as such, and must "
+ "not be misrepresented as being the original software. </P>"
+ "<P>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"
+ ,
+ "<P>Copyright <I> Author Date</I><BR>"
+ "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, <BR>"
+ "None of the above authors nor <I>Author's Organisation</I> 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"
+ ,
+ "<P>Copyright <I>Author Date</I>. All rights reserved.</P>"
+ "<P>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.</P>"
+ "<P>This software is provided \"as is\" without express or implied warranty.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>This material is provided \"as is\", with absolutely no warranty expressed "
+ "or implied. Any use is at your own risk.</P>"
+ "<P>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.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright (C) <I>Date Author</I></P><P>Permission to copy, use, and distribute this software is granted, provided "
+ "that this copyright notice appears in all copies.<BR>"
+ "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.</P>"
+ "<P>This software is provided \"as is\" without express or implied warranty, and "
+ "with no claim as to its suitability for any purpose.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright (C) <I>Date Author</I></P>"
+ "<P>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.</P>"
+ "<P>This software is provided \"as is\" without express or implied warranty, "
+ "and with no claim as to its suitability for any purpose.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright The Author, The Date. All rights reserved.</P>"
+ "<P>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.</P>"
+ "<P>This software is provided \"as is\" without express or implied warranty.</P>"
+ )
+ ,
+ 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)"
+ ,
+ "<P>Copyright (c) <I>Date</I><BR>"
+ "<I>Author</I><BR>"
+ "<BR>"
+ "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. <I>Author</I> makes no representations "
+ "about the suitability of this software for any purpose. "
+ "It is provided \"as is\" without express or implied warranty.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.</P>"
+ "<P>This file is part of jam.</P>"
+ "<P>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.</P>"
+ "<P>ALL WARRANTIES ARE HEREBY DISCLAIMED</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Copyright (c) 1986 by University of Toronto.</P>"
+ "<P>Written by Henry Spencer. Not derived from licensed software.</P>"
+ "<P>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:</P>"
+ "<P>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.</P>"
+ "<p>The origin of this software must not be misrepresented, either"
+ "by explicit claim or by omission.</p>"
+ "<p>Altered versions must be plainly marked as such, and must not"
+ "be misrepresented as being the original software.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>Skeleton parser for Yacc-like parsing with Bison,<BR>"
+ "Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.</P>"
+ "<P>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.</P>"
+ "<P>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.</P>"
+ "<P>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.</P>"
+ "<P>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.</P>"
+ )
+ ,
+ 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"
+ ,
+ "<P>The code has no license terms, it has been explicity placed in the\n"
+ "public domain by it's author(s).</P>"
+ )
+ ,
+ };
+ return std::pair<const license_info*, int>(licenses, static_cast<int>(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("(^)?[^-(<a-zA-Z-]+(([(<].*)?$)?");
+ static const char* formatter = "(?1:(?2: ))";
+
+ return boost::regex_replace(name, e, formatter, boost::match_default | boost::format_all);
+}
+
diff --git a/src/boost/tools/bcp/licence_info.hpp b/src/boost/tools/bcp/licence_info.hpp
new file mode 100644
index 000000000..e4ced2572
--- /dev/null
+++ b/src/boost/tools/bcp/licence_info.hpp
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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 <boost/regex.hpp>
+#include <utility>
+
+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<const license_info*, int> 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 <iostream>
+#include <cstring>
+#include <string>
+#include <list>
+#include "bcp.hpp"
+#include <boost/filesystem/path.hpp>
+#include <boost/version.hpp>
+#include <boost/detail/lightweight_main.hpp>
+
+#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<const char*> 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 char*>::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 <fstream>
+#include <iomanip>
+#include <cstring>
+#include <stdexcept>
+#include <boost/lexical_cast.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/throw_exception.hpp>
+
+//
+// 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 << "<a href=\"" << (p.root / p.file).string() << "\">" << p.file.string() << "</a>";
+ return os;
+}
+
+std::string make_link_target(const std::string& s)
+{
+ // convert an arbitrary string into something suitable
+ // for an <a> name:
+ std::string result;
+ for(unsigned i = 0; i < s.size(); ++i)
+ {
+ result.append(1, static_cast<std::string::value_type>(std::isalnum(s[i]) ? s[i] : '_'));
+ }
+ return result;
+}
+
+
+void bcp_implementation::output_license_info()
+{
+ std::pair<const license_info*, int> licenses = get_licenses();
+
+ std::map<int, license_data>::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 <<
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
+ "<html>\n"
+ "<head>\n"
+ "<title>Boost Licence Dependency Information";
+ if(m_module_list.size() == 1)
+ {
+ os << " for " << *(m_module_list.begin());
+ }
+ os <<
+ "</title>\n"
+ "</head>\n"
+ "<body>\n"
+ "<H1>Boost Licence Dependency Information";
+ if(m_module_list.size() == 1)
+ {
+ os << " for " << *(m_module_list.begin());
+ }
+ os <<
+ "</H1>\n"
+ "<H2>Contents</h2>\n"
+ "<pre><a href=\"#input\">Input Information</a>\n";
+ if(!m_bsl_summary_mode)
+ os << "<a href=\"#summary\">Licence Summary</a>\n";
+ os << "<a href=\"#details\">Licence Details</a>\n";
+
+ while(i != j)
+ {
+ // title:
+ os << " <A href=\"#" << make_link_target(licenses.first[i->first].license_name)
+ << "\">" << licenses.first[i->first].license_name << "</a>\n";
+ ++i;
+ }
+
+ os << "<a href=\"#files\">Files with no recognised license</a>\n"
+ "<a href=\"#authors\">Files with no recognised copyright holder</a>\n";
+ if(!m_bsl_summary_mode)
+ {
+ os <<
+ "Moving to the Boost Software License...\n"
+ " <a href=\"#bsl-converted\">Files that can be automatically converted to the Boost Software License</a>\n"
+ " <a href=\"#to-bsl\">Files that can be manually converted to the Boost Software License</a>\n"
+ " <a href=\"#not-to-bsl\">Files that can <b>NOT</b> be moved to the Boost Software License</a>\n"
+ " <a href=\"#need-bsl-authors\">Authors we need to move to the Boost Software License</a>\n"
+ "<a href=\"#copyright\">Copyright Holder Information</a>\n";
+ }
+ os <<
+ "<a href=\"#depend\">File Dependency Information</a>\n"
+ "</pre>";
+
+ //
+ // input Information:
+ //
+ os << "<a name=\"input\"></a><h2>Input Information</h2>\n";
+ if(m_scan_mode)
+ os << "<P>The following files were scanned for boost dependencies:<BR>";
+ else
+ os << "<P>The following Boost modules were checked:<BR>";
+
+ std::list<std::string>::const_iterator si = m_module_list.begin();
+ std::list<std::string>::const_iterator sj = m_module_list.end();
+ while(si != sj)
+ {
+ os << *si << "<BR>";
+ ++si;
+ }
+ os << "</p><p>The Boost path was: <code>" << m_boost_path.string() << "</code></P>";
+ //
+ // 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<int>(what.str(1));
+ os << "<p>The Boost version is: " << version / 100000 << "." << version / 100 % 1000 << "." << version % 100 << "</P>\n";
+ }
+
+ //
+ // output each license:
+ //
+ i = m_license_data.begin();
+ j = m_license_data.end();
+ if(!m_bsl_summary_mode)
+ {
+ //
+ // start with the summary:
+ //
+ os << "<a name=\"summary\"></a><h2>Licence Summary</h2>\n";
+ while(i != j)
+ {
+ // title:
+ os <<
+ "<H3>" << licenses.first[i->first].license_name << "</H3>\n";
+ // license text:
+ os << "<BLOCKQUOTE>" << licenses.first[i->first].license_text << "</BLOCKQUOTE>";
+ // Copyright holders:
+ os << "<P>This license is used by " << i->second.authors.size()
+ << " authors and " << i->second.files.size()
+ << " files <a href=\"#" << make_link_target(licenses.first[i->first].license_name) << "\">(see details)</a>";
+ os << "</P></BLOCKQUOTE>\n";
+ ++i;
+ }
+ }
+ //
+ // and now the details:
+ //
+ i = m_license_data.begin();
+ j = m_license_data.end();
+ int license_index = 0;
+ os << "<a name=\"details\"></a><h2>Licence Details</h2>\n";
+ while(i != j)
+ {
+ // title:
+ os <<
+ "<H3><A name=\"" << make_link_target(licenses.first[i->first].license_name)
+ << "\"></a>" << licenses.first[i->first].license_name << "</H3>\n";
+ // license text:
+ os << "<BLOCKQUOTE>" << licenses.first[i->first].license_text << "</BLOCKQUOTE>";
+ if(!m_bsl_summary_mode || (license_index >= 3))
+ {
+ // Copyright holders:
+ os << "<P>This license is used by the following " << i->second.authors.size() << " copyright holders:</P>\n<BLOCKQUOTE><P>";
+ std::set<std::string>::const_iterator x, y;
+ x = i->second.authors.begin();
+ y = i->second.authors.end();
+ while(x != y)
+ {
+ os << *x << "<BR>\n";
+ ++x;
+ }
+ os << "</P></BLOCKQUOTE>\n";
+ // Files using this license:
+ os << "<P>This license applies to the following " << i->second.files.size() << " files:</P>\n<BLOCKQUOTE><P>";
+ std::set<fs::path, path_less>::const_iterator m, n;
+ m = i->second.files.begin();
+ n = i->second.files.end();
+ while(m != n)
+ {
+ os << split_path(m_boost_path, *m) << "<br>\n";
+ ++m;
+ }
+ os << "</P></BLOCKQUOTE>\n";
+ }
+ else
+ {
+ os << "<P>This license is used by " << i->second.authors.size() << " authors (list omitted for brevity).</P>\n";
+ os << "<P>This license applies to " << i->second.files.size() << " files (list omitted for brevity).</P>\n";
+ }
+ ++license_index;
+ ++i;
+ }
+ //
+ // Output list of files not found to be under license control:
+ //
+ os << "<h2><a name=\"files\"></a>Files With No Recognisable Licence</h2>\n"
+ "<P>The following " << m_unknown_licenses.size() << " files had no recognisable license information:</P><BLOCKQUOTE><P>\n";
+ std::set<fs::path, path_less>::const_iterator i2, j2;
+ i2 = m_unknown_licenses.begin();
+ j2 = m_unknown_licenses.end();
+ while(i2 != j2)
+ {
+ os << split_path(m_boost_path, *i2) << "<br>\n";
+ ++i2;
+ }
+ os << "</p></BLOCKQUOTE>";
+ //
+ // Output list of files with no found copyright holder:
+ //
+ os << "<h2><a name=\"authors\"></a>Files With No Recognisable Copyright Holder</h2>\n"
+ "<P>The following " << m_unknown_authors.size() << " files had no recognisable copyright holder:</P>\n<BLOCKQUOTE><P>";
+ i2 = m_unknown_authors.begin();
+ j2 = m_unknown_authors.end();
+ while(i2 != j2)
+ {
+ os << split_path(m_boost_path, *i2) << "<br>\n";
+ ++i2;
+ }
+ os << "</p></BLOCKQUOTE>";
+ 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 << "<h2><a name=\"bsl-converted\"></a>Files that can be automatically converted to the Boost Software License</h2>\n"
+ << "<P>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:</P>\n";
+ if (!m_converted_to_bsl.empty())
+ {
+ typedef std::map<fs::path, std::pair<std::string, std::string>, 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 << "<P>[" << file_num << "] File: <tt>" << split_path(m_boost_path, i->first)
+ << "</tt><br>\n<table border=\"1\">\n <tr>\n <td><pre>"
+ << i->second.first << "</pre></td>\n <td><pre>"
+ << i->second.second << "</pre></td>\n </tr>\n</table>\n";
+ ++i;
+ ++file_num;
+ }
+ }
+ //
+ // Output list of files that could be moved over to the Boost Software License
+ //
+ os << "<h2><a name=\"to-bsl\"></a>Files that could be converted to the Boost Software License</h2>\n"
+ "<P>The following " << m_can_migrate_to_bsl.size() << " files could be manually converted to the Boost Software License, but have not yet been:</P>\n<BLOCKQUOTE><P>";
+ i2 = m_can_migrate_to_bsl.begin();
+ j2 = m_can_migrate_to_bsl.end();
+ while(i2 != j2)
+ {
+ os << split_path(m_boost_path, *i2) << "<br>\n";
+ ++i2;
+ }
+ os << "</p></BLOCKQUOTE>";
+ //
+ // Output list of files that can not be moved over to the Boost Software License
+ //
+ os << "<h2><a name=\"not-to-bsl\"></a>Files that can NOT be converted to the Boost Software License</h2>\n"
+ "<P>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:</P>\n<BLOCKQUOTE><P>";
+ i2 = m_cannot_migrate_to_bsl.begin();
+ j2 = m_cannot_migrate_to_bsl.end();
+ while(i2 != j2)
+ {
+ os << split_path(m_boost_path, *i2) << "<br>\n";
+ ++i2;
+ }
+ os << "</p></BLOCKQUOTE>";
+ //
+ // Output list of authors that we need permission for to move to the BSL
+ //
+ os << "<h2><a name=\"need-bsl-authors\"></a>Authors we need for the BSL</h2>\n"
+ "<P>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 <code>more/blanket-permission.txt</code>.</P>\n<BLOCKQUOTE><P>";
+ std::copy(m_authors_for_bsl_migration.begin(), m_authors_for_bsl_migration.end(),
+ std::ostream_iterator<std::string>(os, "<br>\n"));
+ os << "</p></BLOCKQUOTE>";
+ //
+ // output a table of copyright information:
+ //
+ os << "<H2><a name=\"copyright\"></a>Copyright Holder Information</H2><table border=\"1\">\n";
+ std::map<std::string, std::set<fs::path, path_less> >::const_iterator ad, ead;
+ ad = m_author_data.begin();
+ ead = m_author_data.end();
+ while(ad != ead)
+ {
+ os << "<tr><td>" << ad->first << "</td><td>";
+ std::set<fs::path, path_less>::const_iterator fi, efi;
+ fi = ad->second.begin();
+ efi = ad->second.end();
+ while(fi != efi)
+ {
+ os << split_path(m_boost_path, *fi) << " ";
+ ++fi;
+ }
+ os << "</td></tr>\n";
+ ++ad;
+ }
+ os << "</table>\n";
+ }
+
+ //
+ // output file dependency information:
+ //
+ os << "<H2><a name=\"depend\"></a>File Dependency Information</H2><BLOCKQUOTE><pre>\n";
+ std::map<fs::path, fs::path, path_less>::const_iterator dep, last_dep;
+ std::set<fs::path, path_less>::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<fs::path, path_less> 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<fs::path, std::pair<std::string, std::string>, 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 << "<P>For brevity, only files not under the BSL are shown</P>\n";
+ }
+ while(fi != efi)
+ {
+ os << split_path(m_boost_path, *fi);
+ dep = m_dependencies.find(*fi);
+ last_dep = m_dependencies.end();
+ std::set<fs::path, path_less> 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 << " <I>(Circular dependency!)</I>";
+ 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 << "</pre></BLOCKQUOTE>\n";
+
+ os << "</body></html>\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 <cctype>
+
+#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 <boost/regex.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/detail/workaround.hpp>
+#include <iostream>
+
+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<const char*> i(view.begin(), view.end(), dir_expression, 1);
+ boost::regex_token_iterator<const char*> 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<int> v(file_subs, file_subs + 2);
+ i = boost::regex_token_iterator<const char*>(view.begin(), view.end(), file_expression, v);
+ #else
+ i = boost::regex_token_iterator<const char*>(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 <fstream>
+#include <iostream>
+
+
+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 += "&lt;"; break;
+ case '>': result += "&gt;"; break;
+ case '&': result += "&amp;"; 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<const license_info*, int> 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<fileview::const_iterator> 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<const char*> cpy(v.begin(), v.end(), licenses.first[i].copyright_signature);
+ boost::regex_iterator<const char*> 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<std::string::const_iterator> atr(author_list.begin(), author_list.end(), author_separator, -1);
+ boost::regex_token_iterator<std::string::const_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 += "<b>";
+ before_conversion += html_escape(start_of_license, end_of_license);
+ before_conversion += "</b>";
+ 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 += "<b>";
+ for (int i = 0; i < boost_license_lines; ++i) {
+ if (i > 0) after_conversion += '\n';
+ after_conversion += prefix + boost_license_text[i];
+ }
+ after_conversion += "</b>";
+ 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..734498bae
--- /dev/null
+++ b/src/boost/tools/boost_install/BoostConfig.cmake
@@ -0,0 +1,282 @@
+# 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 req)
+
+ set(_BOOST_QUIET)
+ if(Boost_FIND_QUIETLY)
+ set(_BOOST_QUIET QUIET)
+ endif()
+
+ set(_BOOST_REQUIRED)
+ if(${req} AND Boost_FIND_REQUIRED)
+ set(_BOOST_REQUIRED REQUIRED)
+ endif()
+
+ if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-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 <package>_<component>_FOUND
+ set(Boost_${comp}_FOUND ${__boost_comp_found})
+
+ # FindBoost sets Boost_<COMPONENT>_FOUND
+ string(TOUPPER ${comp} _BOOST_COMP)
+ set(Boost_${_BOOST_COMP}_FOUND ${__boost_comp_found})
+
+ # FindBoost compatibility variables: Boost_LIBRARIES, Boost_<C>_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)
+
+ # 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)
+
+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 "")
+
+# 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}})
+
+ 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)
+
+ # All Boost:: targets already disable autolink
+ add_library(Boost::diagnostic_definitions INTERFACE IMPORTED)
+ add_library(Boost::disable_autolinking INTERFACE IMPORTED)
+ add_library(Boost::dynamic_linking INTERFACE IMPORTED)
+
+endif()
+
+# Compatibility variable when using meta-component "ALL"
+
+if("ALL" IN_LIST Boost_FIND_COMPONENTS)
+ set(Boost_ALL_FOUND ${boost_headers_FOUND})
+endif()
diff --git a/src/boost/tools/boost_install/BoostDetectToolset.cmake b/src/boost/tools/boost_install/BoostDetectToolset.cmake
new file mode 100644
index 000000000..11c1f77f8
--- /dev/null
+++ b/src/boost/tools/boost_install/BoostDetectToolset.cmake
@@ -0,0 +1,156 @@
+# 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")
+
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+
+ if(MSVC)
+ 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 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 : : <generating-rule>@boost-install%generate-cmake-config-version <name>Boost <version>$(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..2a3dee9b3
--- /dev/null
+++ b/src/boost/tools/boost_install/boost-install.jam
@@ -0,0 +1,1238 @@
+# 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 ;
+
+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-
+
+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 <version> ] ;
+ .info " version=" $(version) ;
+
+ local name = [ $(ps).get <name> ] ;
+ .info " name=" $(name) ;
+
+ local variant = [ $(ps).get <variant> ] ;
+ .info " variant=" $(variant) ;
+
+ local link = [ $(ps).get <link> ] ;
+ .info " link= " $(link) ;
+
+ local runtime-link = [ $(ps).get <runtime-link> ] ;
+ .info " runtime-link=" $(runtime-link) ;
+
+ local runtime-debugging = [ $(ps).get <runtime-debugging> ] ;
+ .info " runtime-debugging=" $(runtime-debugging) ;
+
+ local threading = [ $(ps).get <threading> ] ;
+ .info " threading=" $(threading) ;
+
+ local address-model = [ $(ps).get <address-model> ] ;
+ .info " address-model=" $(address-model) ;
+
+ local toolset = [ MATCH ^-(.*) : [ common.format-name <toolset> : "" : "" : $(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> ] ;
+ relevant = [ feature.expand-relevant $(relevant) ] ;
+
+ if python in $(relevant)
+ {
+ python = [ $(ps).get <python> ] ;
+ }
+
+ 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_ALL_NO_LIB\""
+ " )"
+ "endif()"
+ ""
+ : true ;
+
+ print.text "# Target file name: $(fname)" "" : true ;
+
+ local lib-target-type = [ $(ps).get <boost-install.lib-target-type> ] ;
+ .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) ;
+
+ 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 $(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 <boost-install.dependency> ] ] headers ;
+ .info " deps=" $(deps) ;
+
+ if $(deps)
+ {
+ print.text
+
+ "list(APPEND _BOOST_$(lname:U)_DEPS $(deps:S=:J= ))"
+ ""
+ : true ;
+ }
+}
+
+actions generate-cmake-variant-
+{
+}
+
+# tag
+
+local rule tag ( name : type ? : property-set )
+{
+ .debug tag $(name) ;
+
+ local link = [ $(property-set).get <link> ] ;
+ .debug " link=" $(link) ;
+
+ local python = ;
+
+ local relevant = [ $(property-set).get <relevant> ] ;
+ relevant = [ feature.expand-relevant $(relevant) ] ;
+
+ if python in $(relevant)
+ {
+ python = [ $(property-set).get <python> ] ;
+ .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) ;
+}
+
+# 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 other-names = [ get-dependency-names $(sources) ] ;
+ property-set = [ $(property-set).add-raw <boost-install.dependency>$(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) ;
+
+ local tag = [ tag $(name) : : $(property-set) ] ;
+
+ property-set = [ $(property-set).add-raw <boost-install.lib-target-type>$(lib-target-type) ] ;
+
+ 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 <version> ] ;
+ .info " version=" $(version) ;
+
+ local name = [ $(ps).get <name> ] ;
+ .info " name=" $(name) ;
+
+ local library-type = [ $(ps).get <library-type> ] ;
+ .info " library-type=" $(library-type) ;
+
+ local cmakedir = [ $(ps).get <boost-install.cmakedir> ] ;
+ .info " cmakedir=" $(cmakedir) ;
+
+ local includedir = [ $(ps).get <boost-install.includedir> ] ;
+ .info " includedir=" $(includedir) ;
+
+ local libdir = [ $(ps).get <boost-install.libdir> ] ;
+ .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()"
+ ""
+ "# 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}\""
+ " INTERFACE_COMPILE_DEFINITIONS \"BOOST_ALL_NO_LIB\""
+ ")"
+ ""
+ "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 ;
+ }
+ }
+
+ print.text
+
+ "mark_as_advanced($(name)_DIR)"
+ ""
+ : 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 <name> ] ;
+ local version = [ $(property-set).get <version> ] ;
+ local location = [ $(property-set).get <location> ] ;
+ local library-type = [ $(property-set).get <library-type> ] ;
+ local cmakedir = [ $(property-set).get <boost-install.cmakedir> ] ;
+ local includedir = [ $(property-set).get <boost-install.includedir> ] ;
+ local libdir = [ $(property-set).get <boost-install.libdir> ] ;
+
+ local ps = [ property-set.create
+ <name>$(pname) <version>$(version) <location>$(location)
+ <library-type>$(library-type)
+ <boost-install.cmakedir>$(cmakedir)
+ <boost-install.includedir>$(includedir)
+ <boost-install.libdir>$(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 <version> ] ;
+ .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 <name> ] ;
+ local version = [ $(property-set).get <version> ] ;
+ local location = [ $(property-set).get <location> ] ;
+
+ local ps = [ property-set.create <name>$(pname) <version>$(version) <location>$(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>$(name) <version>$(version) <library-type>$(library-type) <boost-install.cmakedir>$(location) <boost-install.includedir>$(includedir) <boost-install.libdir>$(libdir) ;
+
+ r += [ generate $(install-or-stage)/$(name)-config.cmake : $(name) : <generating-rule>@boost-install%generate-cmake-config $(reqs) ] ;
+ r += [ install $(install-or-stage)-$(name)-config.cmake : $(install-or-stage)/$(name)-config.cmake : <location>$(loc) ] ;
+
+ r += [ generate $(install-or-stage)/$(name)-config-version.cmake : $(name) : <generating-rule>@boost-install%generate-cmake-config-version $(reqs) ] ;
+ r += [ install $(install-or-stage)-$(name)-config-version.cmake : $(install-or-stage)/$(name)-config-version.cmake : <location>$(loc) ] ;
+
+ if $(library-type) != INTERFACE
+ {
+ local v = [ generate $(install-or-stage)/$(name)-variant.cmake : $(name) : <generating-rule>@boost-install%generate-cmake-variant $(reqs) ] ;
+ r += $(v) ;
+ r += [ install $(install-or-stage)-$(name)-config-variant.cmake : $(v) : <location>$(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 : <location>$(cmakedir) <name>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 : <location>$(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 : <location>$(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) != <use>
+ {
+ 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 <name> ] ;
+ 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 <python> ] ;
+
+ 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 <location>$(libdir)/$(r) ;
+}
+
+rule install-subdir ( properties * )
+{
+ local r = [ install-stage-subdir $(properties) ] ;
+
+ local libdir = [ boost-install-dirs.libdir ] ;
+
+ return <location>$(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 ] ;
+
+ package.install install-libraries Boost
+ : # No requirements
+ : # No binaries
+ : $(libraries)
+ : # No headers
+ ;
+
+ $(p).mark-target-as-explicit install-libraries ;
+
+ install install-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-install%install-subdir ;
+ $(p).mark-target-as-explicit install-unprefixed-static ;
+
+ install install-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB <conditional>@boost-install%install-subdir ;
+ $(p).mark-target-as-explicit install-unprefixed-shared ;
+
+ install-cmake-config $(libraries) ;
+
+ generate install-dependencies : $(libraries) : <generating-rule>@boost-install%generate-dependencies <name>install ;
+ $(p).mark-target-as-explicit install-dependencies ;
+
+ alias install : install-libraries 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) : <location>$(stage-libdir) <install-dependencies>on <install-type>STATIC_LIB ;
+ $(p).mark-target-as-explicit stage-libraries-static ;
+
+ install stage-libraries-shared : $(libraries) : <location>$(stage-libdir) <install-dependencies>on <install-type>SHARED_LIB ;
+ $(p).mark-target-as-explicit stage-libraries-shared ;
+
+ install stage-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-install%stage-subdir ;
+ $(p).mark-target-as-explicit stage-unprefixed-static ;
+
+ install stage-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB <conditional>@boost-install%stage-subdir ;
+ $(p).mark-target-as-explicit stage-unprefixed-shared ;
+
+ generate stage-dependencies : $(libraries) : <generating-rule>@boost-install%generate-dependencies <name>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..b24cdcad0
--- /dev/null
+++ b/src/boost/tools/boost_install/test/BoostVersion.cmake
@@ -0,0 +1 @@
+set(BOOST_VERSION 1.73.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 $<CONFIG>)
+
+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 <boost/atomic.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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<X> 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 $<CONFIG>)
+
+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 <boost/chrono.hpp>
+#include <iostream>
+
+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 $<CONFIG>)
+
+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 <boost/container/pmr/vector.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+int main()
+{
+ boost::container::pmr::vector_of<int>::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..743756f33
--- /dev/null
+++ b/src/boost/tools/boost_install/test/filesystem/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(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_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 $<CONFIG>)
+
+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 <boost/filesystem.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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..e88654997
--- /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.5)
+
+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 $<CONFIG>)
+
+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 <boost/core/lightweight_test.hpp>
+
+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..aa7c1ce3f
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 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)
+
+if(NOT WIN32)
+
+ find_package(ZLIB)
+ target_link_libraries(test_gzip ZLIB::ZLIB)
+
+ find_package(BZip2)
+ target_link_libraries(test_bzip2 BZip2::BZip2)
+
+endif()
+
+enable_testing()
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
+
+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 <jseward@acm.org>
+
+ 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 <jseward@acm.org>
+#
+# 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 <jseward@acm.org>
+#
+# 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 <jseward@acm.org>
+
+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 <jseward@acm.org>
+
+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 <jseward@acm.org>
+
+ 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 <pre> blocks nicely,
+ and add CDATA tags so writers do not have to use eg. &lt;
+
+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 <jseward@acm.org>
+
+ 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 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- we like '1.2 Title' -->
+<xsl:param name="section.autolabel" select="'1'"/>
+<xsl:param name="section.label.includes.component.label" select="'1'"/>
+
+<!-- Do not put 'Chapter' at the start of eg 'Chapter 1. Doing This' -->
+<xsl:param name="local.l10n.xml" select="document('')"/>
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+ <l:l10n language="en">
+ <l:context name="title-numbered">
+ <l:template name="chapter" text="%n.&#160;%t"/>
+ </l:context>
+ </l:l10n>
+</l:i18n>
+
+<!-- don't generate sub-tocs for qanda sets -->
+<xsl:param name="generate.toc">
+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
+</xsl:param>
+
+</xsl:stylesheet>
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 @@
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- sgml -*- -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+<xsl:import href="bz-common.xsl"/>
+
+<!-- set indent = yes while debugging, then change to NO -->
+<xsl:output method="xml" indent="yes"/>
+
+<!-- ensure only passivetex extensions are on -->
+<xsl:param name="stylesheet.result.type" select="'fo'"/>
+<!-- fo extensions: PDF bookmarks and index terms -->
+<xsl:param name="use.extensions" select="'1'"/>
+<xsl:param name="xep.extensions" select="0"/>
+<xsl:param name="fop.extensions" select="0"/>
+<xsl:param name="saxon.extensions" select="0"/>
+<xsl:param name="passivetex.extensions" select="1"/>
+<xsl:param name="tablecolumns.extension" select="'1'"/>
+
+<!-- ensure we are using single sided -->
+<xsl:param name="double.sided" select="'0'"/>
+
+<!-- insert cross references to page numbers -->
+<xsl:param name="insert.xref.page.number" select="1"/>
+
+<!-- <?custom-pagebreak?> inserts a page break at this point -->
+<xsl:template match="processing-instruction('custom-pagebreak')">
+ <fo:block break-before='page'/>
+</xsl:template>
+
+<!-- show links in color -->
+<xsl:attribute-set name="xref.properties">
+ <xsl:attribute name="color">blue</xsl:attribute>
+</xsl:attribute-set>
+
+<!-- make pre listings indented a bit + a bg colour -->
+<xsl:template match="programlisting | screen">
+ <fo:block start-indent="0.25in" wrap-option="no-wrap"
+ white-space-collapse="false" text-align="start"
+ font-family="monospace" background-color="#f2f2f9"
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="normal.para.spacing">
+ <xsl:apply-templates/>
+ </fo:block>
+</xsl:template>
+<!-- make verbatim output prettier -->
+<xsl:template match="literallayout">
+ <fo:block start-indent="0.25in" wrap-option="no-wrap"
+ white-space-collapse="false" text-align="start"
+ font-family="monospace" background-color="#edf7f4"
+ linefeed-treatment="preserve"
+ space-before="0em" space-after="0em">
+ <xsl:apply-templates/>
+ </fo:block>
+</xsl:template>
+
+<!-- workaround bug in passivetex fo output for itemizedlist -->
+<xsl:template match="itemizedlist/listitem">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:variable name="itemsymbol">
+ <xsl:call-template name="list.itemsymbol">
+ <xsl:with-param name="node" select="parent::itemizedlist"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="item.contents">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>
+ <xsl:choose>
+ <xsl:when test="$itemsymbol='disc'">&#x2022;</xsl:when>
+ <xsl:when test="$itemsymbol='bullet'">&#x2022;</xsl:when>
+ <xsl:otherwise>&#x2022;</xsl:otherwise>
+ </xsl:choose>
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <xsl:apply-templates/> <!-- removed extra block wrapper -->
+ </fo:list-item-body>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="parent::*/@spacing = 'compact'">
+ <fo:list-item id="{$id}"
+ xsl:use-attribute-sets="compact.list.item.spacing">
+ <xsl:copy-of select="$item.contents"/>
+ </fo:list-item>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+ <xsl:copy-of select="$item.contents"/>
+ </fo:list-item>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- workaround bug in passivetex fo output for orderedlist -->
+<xsl:template match="orderedlist/listitem">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:variable name="item.contents">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>
+ <xsl:apply-templates select="." mode="item-number"/>
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <xsl:apply-templates/> <!-- removed extra block wrapper -->
+ </fo:list-item-body>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="parent::*/@spacing = 'compact'">
+ <fo:list-item id="{$id}"
+ xsl:use-attribute-sets="compact.list.item.spacing">
+ <xsl:copy-of select="$item.contents"/>
+ </fo:list-item>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+ <xsl:copy-of select="$item.contents"/>
+ </fo:list-item>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- workaround bug in passivetex fo output for variablelist -->
+<xsl:param name="variablelist.as.blocks" select="1"/>
+<xsl:template match="varlistentry" mode="vl.as.blocks">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/></xsl:variable>
+ <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
+ keep-together.within-column="always"
+ keep-with-next.within-column="always">
+ <xsl:apply-templates select="term"/>
+ </fo:block>
+ <fo:block start-indent="0.5in" end-indent="0in"
+ space-after.minimum="0.2em"
+ space-after.optimum="0.4em"
+ space-after.maximum="0.6em">
+ <fo:block>
+ <xsl:apply-templates select="listitem"/>
+ </fo:block>
+ </fo:block>
+</xsl:template>
+
+
+<!-- workaround bug in footers: force right-align w/two 80|30 cols -->
+<xsl:template name="footer.table">
+ <xsl:param name="pageclass" select="''"/>
+ <xsl:param name="sequence" select="''"/>
+ <xsl:param name="gentext-key" select="''"/>
+ <xsl:choose>
+ <xsl:when test="$pageclass = 'index'">
+ <xsl:attribute name="margin-left">0pt</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:variable name="candidate">
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-number="1" column-width="80%"/>
+ <fo:table-column column-number="2" column-width="20%"/>
+ <fo:table-body>
+ <fo:table-row height="14pt">
+ <fo:table-cell text-align="left" display-align="after">
+ <xsl:attribute name="relative-align">baseline</xsl:attribute>
+ <fo:block>
+ <fo:block> </fo:block><!-- empty cell -->
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell text-align="center" display-align="after">
+ <xsl:attribute name="relative-align">baseline</xsl:attribute>
+ <fo:block>
+ <xsl:call-template name="footer.content">
+ <xsl:with-param name="pageclass" select="$pageclass"/>
+ <xsl:with-param name="sequence" select="$sequence"/>
+ <xsl:with-param name="position" select="'center'"/>
+ <xsl:with-param name="gentext-key" select="$gentext-key"/>
+ </xsl:call-template>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </xsl:variable>
+ <!-- Really output a footer? -->
+ <xsl:choose>
+ <xsl:when test="$pageclass='titlepage' and $gentext-key='book'
+ and $sequence='first'">
+ <!-- no, book titlepages have no footers at all -->
+ </xsl:when>
+ <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0">
+ <!-- no output -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$candidate"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- fix bug in headers: force right-align w/two 40|60 cols -->
+<xsl:template name="header.table">
+ <xsl:param name="pageclass" select="''"/>
+ <xsl:param name="sequence" select="''"/>
+ <xsl:param name="gentext-key" select="''"/>
+ <xsl:choose>
+ <xsl:when test="$pageclass = 'index'">
+ <xsl:attribute name="margin-left">0pt</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:variable name="candidate">
+ <fo:table table-layout="fixed" width="100%">
+ <xsl:call-template name="head.sep.rule">
+ <xsl:with-param name="pageclass" select="$pageclass"/>
+ <xsl:with-param name="sequence" select="$sequence"/>
+ <xsl:with-param name="gentext-key" select="$gentext-key"/>
+ </xsl:call-template>
+ <fo:table-column column-number="1" column-width="40%"/>
+ <fo:table-column column-number="2" column-width="60%"/>
+ <fo:table-body>
+ <fo:table-row height="14pt">
+ <fo:table-cell text-align="left" display-align="before">
+ <xsl:attribute name="relative-align">baseline</xsl:attribute>
+ <fo:block>
+ <fo:block> </fo:block><!-- empty cell -->
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell text-align="center" display-align="before">
+ <xsl:attribute name="relative-align">baseline</xsl:attribute>
+ <fo:block>
+ <xsl:call-template name="header.content">
+ <xsl:with-param name="pageclass" select="$pageclass"/>
+ <xsl:with-param name="sequence" select="$sequence"/>
+ <xsl:with-param name="position" select="'center'"/>
+ <xsl:with-param name="gentext-key" select="$gentext-key"/>
+ </xsl:call-template>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </xsl:variable>
+ <!-- Really output a header? -->
+ <xsl:choose>
+ <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book'
+ and $sequence='first'">
+ <!-- no, book titlepages have no headers at all -->
+ </xsl:when>
+ <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0">
+ <!-- no output -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$candidate"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- Bug-fix for Suse 10 PassiveTex version -->
+<!-- Precompute attribute values 'cos PassiveTex is too stupid: -->
+<xsl:attribute-set name="component.title.properties">
+ <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+ <xsl:attribute name="space-before.optimum">
+ <xsl:value-of select="concat($body.font.master, 'pt')"/>
+ </xsl:attribute>
+ <xsl:attribute name="space-before.minimum">
+ <xsl:value-of select="$body.font.master * 0.8"/>
+ <xsl:text>pt</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="space-before.maximum">
+ <xsl:value-of select="$body.font.master * 1.2"/>
+ <xsl:text>pt</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="hyphenate">false</xsl:attribute>
+</xsl:attribute-set>
+
+
+</xsl:stylesheet>
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 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE xsl:stylesheet [ <!ENTITY bz-css SYSTEM "./bzip.css"> ]>
+
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+<xsl:import href="bz-common.xsl"/>
+
+<!-- use UTF-8 encoding -->
+<xsl:output method="html" encoding="UTF-8" indent="yes"/>
+
+<!-- we include the css as link and directly when generating one large file -->
+<xsl:template name="user.head.content">
+ <xsl:text disable-output-escaping="yes">
+<![CDATA[<]]>link rel="stylesheet" type="text/css" href="bzip.css" />
+ </xsl:text>
+ <style type="text/css" media="screen">
+ <xsl:text>&bz-css;</xsl:text>
+ </style>
+</xsl:template>
+
+</xsl:stylesheet>
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 <phil@fifi.org> 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 <phil@fifi.org>
+\"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 <phil@fifi.org> 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 <charles@comm.polymtl.ca>
+
+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 <phil@fifi.org>
+\"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 <phil@fifi.org> 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 <jseward@acm.org>
+
+ 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+#include <math.h>
+#include <errno.h>
+#include <ctype.h>
+#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 <fcntl.h>
+# include <sys/types.h>
+# include <utime.h>
+# include <unistd.h>
+# include <sys/stat.h>
+# include <sys/times.h>
+
+# 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 <io.h>
+# include <fcntl.h>
+# 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 <io.h>
+# include <fcntl.h>
+# 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 <io.h>
+# include <fcntl.h>
+# include <sys/stat.h>
+
+# 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 <jseward@acm.org>
+
+ 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 <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+/* 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 <jseward@acm.org>
+
+ 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 <fcntl.h>
+# include <io.h>
+# 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 <jseward@acm.org>
+
+ 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 <stdio.h>
+#endif
+
+#ifdef _WIN32
+# include <windows.h>
+# 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 <jseward@acm.org>
+
+ 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 <stdlib.h>
+
+#ifndef BZ_NO_STDIO
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#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 <phil@fifi.org> 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 <phil@fifi.org>
+.\"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<space>
+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 <jseward@acm.org>
+
+ 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 <jseward@acm.org>
+
+ 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 <jseward@acm.org>
+
+ 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 <stdio.h>
+#include <stdlib.h>
+#include "bzlib.h"
+#ifdef _WIN32
+#include <io.h>
+#endif
+
+
+#ifdef _WIN32
+
+#define BZ2_LIBNAME "libbz2-1.0.2.DLL"
+
+#include <windows.h>
+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 @@
+<!-- misc. strings -->
+<!ENTITY bz-url "https://sourceware.org/bzip2/">
+<!ENTITY bz-author "jseward@acm.org">
+<!ENTITY bz-email "bzip2-devel@sourceware.org">
+<!ENTITY bz-lifespan "1996-2019">
+
+<!ENTITY bz-version "1.0.8">
+<!ENTITY bz-date "13 July 2019">
+
+<!ENTITY manual-title "bzip2 Manual">
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 <jseward@acm.org>
+#
+# 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 ( <INFILE> ) {
+
+ print OUTFILE $prev;
+ $prev = $curr;
+ $curr = $_;
+ $str = '';
+
+ if ( $prev =~ /<programlisting>$|<screen>$/ ) {
+ chomp $prev;
+ $curr = join( '', $prev, "<![CDATA[", $curr );
+ $prev = '';
+ next;
+ }
+ elsif ( $curr =~ /<\/programlisting>|<\/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 <jseward@acm.org>
+
+ 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 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>bzip2 and libbzip2, version 1.0.8</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="stylesheet" type="text/css" href="bzip.css" />
+ <style type="text/css" media="screen">/* 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;
+}
+</style>
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book">
+<div class="titlepage">
+<div>
+<div><h1 class="title">
+<a name="userman"></a>bzip2 and libbzip2, version 1.0.8</h1></div>
+<div><h2 class="subtitle">A program and library for data compression</h2></div>
+<div><div class="authorgroup"><div class="author">
+<h3 class="author">
+<span class="firstname">Julian</span> <span class="surname">Seward</span>
+</h3>
+<div class="affiliation"><span class="orgname">https://sourceware.org/bzip2/<br></span></div>
+</div></div></div>
+<div><p class="releaseinfo">Version 1.0.8 of 13 July 2019</p></div>
+<div><p class="copyright">Copyright © 1996-2019 Julian Seward</p></div>
+<div><div class="legalnotice">
+<a name="legal"></a><p>This program, <code class="computeroutput">bzip2</code>, the
+ associated library <code class="computeroutput">libbzip2</code>, and
+ all documentation, are copyright © 1996-2019 Julian Seward.
+ All rights reserved.</p>
+<p>Redistribution and use in source and binary forms, with
+ or without modification, are permitted provided that the
+ following conditions are met:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p>Redistributions of source code must retain the
+ above copyright notice, this list of conditions and the
+ following disclaimer.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>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.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>Altered source versions must be plainly marked
+ as such, and must not be misrepresented as being the original
+ software.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>The name of the author may not be used to
+ endorse or promote products derived from this software without
+ specific prior written permission.</p></li>
+</ul></div>
+<p>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.</p>
+<p>PATENTS: To the best of my knowledge,
+ <code class="computeroutput">bzip2</code> and
+ <code class="computeroutput">libbzip2</code> 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.
+ </p>
+</div></div>
+</div>
+<hr>
+</div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl class="toc">
+<dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt>
+<dt><span class="chapter"><a href="#using">2. How to use bzip2</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt>
+<dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt>
+<dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt>
+<dt><span class="sect1"><a href="#options">2.4. OPTIONS</a></span></dt>
+<dt><span class="sect1"><a href="#memory-management">2.5. MEMORY MANAGEMENT</a></span></dt>
+<dt><span class="sect1"><a href="#recovering">2.6. RECOVERING DATA FROM DAMAGED FILES</a></span></dt>
+<dt><span class="sect1"><a href="#performance">2.7. PERFORMANCE NOTES</a></span></dt>
+<dt><span class="sect1"><a href="#caveats">2.8. CAVEATS</a></span></dt>
+<dt><span class="sect1"><a href="#author">2.9. AUTHOR</a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#libprog">3.
+Programming with <code class="computeroutput">libbzip2</code>
+</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt>
+<dt><span class="sect2"><a href="#hl-summary">3.1.2. High-level summary</a></span></dt>
+<dt><span class="sect2"><a href="#util-fns-summary">3.1.3. Utility functions summary</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#err-handling">3.2. Error handling</a></span></dt>
+<dt><span class="sect1"><a href="#low-level">3.3. Low-level interface</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#bzcompress-init">3.3.1. BZ2_bzCompressInit</a></span></dt>
+<dt><span class="sect2"><a href="#bzCompress">3.3.2. BZ2_bzCompress</a></span></dt>
+<dt><span class="sect2"><a href="#bzCompress-end">3.3.3. BZ2_bzCompressEnd</a></span></dt>
+<dt><span class="sect2"><a href="#bzDecompress-init">3.3.4. BZ2_bzDecompressInit</a></span></dt>
+<dt><span class="sect2"><a href="#bzDecompress">3.3.5. BZ2_bzDecompress</a></span></dt>
+<dt><span class="sect2"><a href="#bzDecompress-end">3.3.6. BZ2_bzDecompressEnd</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#hl-interface">3.4. High-level interface</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#bzreadopen">3.4.1. BZ2_bzReadOpen</a></span></dt>
+<dt><span class="sect2"><a href="#bzread">3.4.2. BZ2_bzRead</a></span></dt>
+<dt><span class="sect2"><a href="#bzreadgetunused">3.4.3. BZ2_bzReadGetUnused</a></span></dt>
+<dt><span class="sect2"><a href="#bzreadclose">3.4.4. BZ2_bzReadClose</a></span></dt>
+<dt><span class="sect2"><a href="#bzwriteopen">3.4.5. BZ2_bzWriteOpen</a></span></dt>
+<dt><span class="sect2"><a href="#bzwrite">3.4.6. BZ2_bzWrite</a></span></dt>
+<dt><span class="sect2"><a href="#bzwriteclose">3.4.7. BZ2_bzWriteClose</a></span></dt>
+<dt><span class="sect2"><a href="#embed">3.4.8. Handling embedded compressed data streams</a></span></dt>
+<dt><span class="sect2"><a href="#std-rdwr">3.4.9. Standard file-reading/writing code</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#util-fns">3.5. Utility functions</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#bzbufftobuffcompress">3.5.1. BZ2_bzBuffToBuffCompress</a></span></dt>
+<dt><span class="sect2"><a href="#bzbufftobuffdecompress">3.5.2. BZ2_bzBuffToBuffDecompress</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#zlib-compat">3.6. zlib compatibility functions</a></span></dt>
+<dt><span class="sect1"><a href="#stdio-free">3.7. Using the library in a stdio-free environment</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#stdio-bye">3.7.1. Getting rid of stdio</a></span></dt>
+<dt><span class="sect2"><a href="#critical-error">3.7.2. Critical error handling</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#win-dll">3.8. Making a Windows DLL</a></span></dt>
+</dl></dd>
+<dt><span class="chapter"><a href="#misc">4. Miscellanea</a></span></dt>
+<dd><dl>
+<dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt>
+<dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt>
+<dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt>
+<dt><span class="sect1"><a href="#package">4.4. Did you get the right package?</a></span></dt>
+<dt><span class="sect1"><a href="#reading">4.5. Further Reading</a></span></dt>
+</dl></dd>
+</dl>
+</div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="intro"></a>1. Introduction</h1></div></div></div>
+<p><code class="computeroutput">bzip2</code> 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.</p>
+<p><code class="computeroutput">bzip2</code> is built on top of
+<code class="computeroutput">libbzip2</code>, a flexible library for
+handling compressed data in the
+<code class="computeroutput">bzip2</code> 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.</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a> describes how to use
+ <code class="computeroutput">bzip2</code>; this is the only part
+ you need to read if you just want to know how to operate the
+ program.</p></li>
+<li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#libprog" title="3.  Programming with libbzip2">Programming with libbzip2</a> describes the
+ programming interfaces in detail, and</p></li>
+<li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#misc" title="4. Miscellanea">Miscellanea</a> records some
+ miscellaneous notes which I thought ought to be recorded
+ somewhere.</p></li>
+</ul></div>
+</div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="using"></a>2. How to use bzip2</h1></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl class="toc">
+<dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt>
+<dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt>
+<dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt>
+<dt><span class="sect1"><a href="#options">2.4. OPTIONS</a></span></dt>
+<dt><span class="sect1"><a href="#memory-management">2.5. MEMORY MANAGEMENT</a></span></dt>
+<dt><span class="sect1"><a href="#recovering">2.6. RECOVERING DATA FROM DAMAGED FILES</a></span></dt>
+<dt><span class="sect1"><a href="#performance">2.7. PERFORMANCE NOTES</a></span></dt>
+<dt><span class="sect1"><a href="#caveats">2.8. CAVEATS</a></span></dt>
+<dt><span class="sect1"><a href="#author">2.9. AUTHOR</a></span></dt>
+</dl>
+</div>
+<p>This chapter contains a copy of the
+<code class="computeroutput">bzip2</code> man page, and nothing
+else.</p>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="name"></a>2.1. NAME</h2></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code>,
+ <code class="computeroutput">bunzip2</code> - a block-sorting file
+ compressor, v1.0.8</p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> -
+ decompresses files to stdout</p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code> -
+ recovers data from damaged bzip2 files</p></li>
+</ul></div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="synopsis"></a>2.2. SYNOPSIS</h2></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code> [
+ -cdfkqstvzVL123456789 ] [ filenames ... ]</p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bunzip2</code> [
+ -fkvsVL ] [ filenames ... ]</p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> [ -s ] [
+ filenames ... ]</p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code>
+ filename</p></li>
+</ul></div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="description"></a>2.3. DESCRIPTION</h2></div></div></div>
+<p><code class="computeroutput">bzip2</code> 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.</p>
+<p>The command-line options are deliberately very similar to
+those of GNU <code class="computeroutput">gzip</code>, but they are
+not identical.</p>
+<p><code class="computeroutput">bzip2</code> 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
+<code class="computeroutput">original_name.bz2</code>. 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.</p>
+<p><code class="computeroutput">bzip2</code> and
+<code class="computeroutput">bunzip2</code> will by default not
+overwrite existing files. If you want this to happen, specify
+the <code class="computeroutput">-f</code> flag.</p>
+<p>If no file names are specified,
+<code class="computeroutput">bzip2</code> compresses from standard
+input to standard output. In this case,
+<code class="computeroutput">bzip2</code> will decline to write
+compressed output to a terminal, as this would be entirely
+incomprehensible and therefore pointless.</p>
+<p><code class="computeroutput">bunzip2</code> (or
+<code class="computeroutput">bzip2 -d</code>) decompresses all
+specified files. Files which were not created by
+<code class="computeroutput">bzip2</code> will be detected and
+ignored, and a warning issued.
+<code class="computeroutput">bzip2</code> attempts to guess the
+filename for the decompressed file from that of the compressed
+file as follows:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.bz2 </code>
+ becomes
+ <code class="computeroutput">filename</code></p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.bz </code>
+ becomes
+ <code class="computeroutput">filename</code></p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.tbz2</code>
+ becomes
+ <code class="computeroutput">filename.tar</code></p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.tbz </code>
+ becomes
+ <code class="computeroutput">filename.tar</code></p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">anyothername </code>
+ becomes
+ <code class="computeroutput">anyothername.out</code></p></li>
+</ul></div>
+<p>If the file does not end in one of the recognised endings,
+<code class="computeroutput">.bz2</code>,
+<code class="computeroutput">.bz</code>,
+<code class="computeroutput">.tbz2</code> or
+<code class="computeroutput">.tbz</code>,
+<code class="computeroutput">bzip2</code> complains that it cannot
+guess the name of the original file, and uses the original name
+with <code class="computeroutput">.out</code> appended.</p>
+<p>As with compression, supplying no filenames causes
+decompression from standard input to standard output.</p>
+<p><code class="computeroutput">bunzip2</code> 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
+(<code class="computeroutput">-t</code>) of concatenated compressed
+files is also supported.</p>
+<p>You can also compress or decompress files to the standard
+output by giving the <code class="computeroutput">-c</code> 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
+<code class="computeroutput">bzip2</code> version 0.9.0 or later.
+Earlier versions of <code class="computeroutput">bzip2</code> will
+stop after decompressing the first file in the stream.</p>
+<p><code class="computeroutput">bzcat</code> (or
+<code class="computeroutput">bzip2 -dc</code>) decompresses all
+specified files to the standard output.</p>
+<p><code class="computeroutput">bzip2</code> will read arguments
+from the environment variables
+<code class="computeroutput">BZIP2</code> and
+<code class="computeroutput">BZIP</code>, in that order, and will
+process them before any arguments read from the command line.
+This gives a convenient way to supply default arguments.</p>
+<p>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%.</p>
+<p>As a self-check for your protection,
+<code class="computeroutput">bzip2</code> 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
+<code class="computeroutput">bzip2</code> (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
+<code class="computeroutput">bzip2recover</code> to try to recover
+data from damaged files.</p>
+<p>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
+<code class="computeroutput">bzip2</code> to panic.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="options"></a>2.4. OPTIONS</h2></div></div></div>
+<div class="variablelist"><dl class="variablelist">
+<dt><span class="term"><code class="computeroutput">-c --stdout</code></span></dt>
+<dd><p>Compress or decompress to standard
+ output.</p></dd>
+<dt><span class="term"><code class="computeroutput">-d --decompress</code></span></dt>
+<dd><p>Force decompression.
+ <code class="computeroutput">bzip2</code>,
+ <code class="computeroutput">bunzip2</code> and
+ <code class="computeroutput">bzcat</code> 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.</p></dd>
+<dt><span class="term"><code class="computeroutput">-z --compress</code></span></dt>
+<dd><p>The complement to
+ <code class="computeroutput">-d</code>: forces compression,
+ regardless of the invokation name.</p></dd>
+<dt><span class="term"><code class="computeroutput">-t --test</code></span></dt>
+<dd><p>Check integrity of the specified file(s), but
+ don't decompress them. This really performs a trial
+ decompression and throws away the result.</p></dd>
+<dt><span class="term"><code class="computeroutput">-f --force</code></span></dt>
+<dd>
+<p>Force overwrite of output files. Normally,
+ <code class="computeroutput">bzip2</code> will not overwrite
+ existing output files. Also forces
+ <code class="computeroutput">bzip2</code> to break hard links to
+ files, which it otherwise wouldn't do.</p>
+<p><code class="computeroutput">bzip2</code> normally declines
+ to decompress files which don't have the correct magic header
+ bytes. If forced (<code class="computeroutput">-f</code>),
+ however, it will pass such files through unmodified. This is
+ how GNU <code class="computeroutput">gzip</code> behaves.</p>
+</dd>
+<dt><span class="term"><code class="computeroutput">-k --keep</code></span></dt>
+<dd><p>Keep (don't delete) input files during
+ compression or decompression.</p></dd>
+<dt><span class="term"><code class="computeroutput">-s --small</code></span></dt>
+<dd>
+<p>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.</p>
+<p>During compression, <code class="computeroutput">-s</code>
+ 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 <code class="computeroutput">-s</code> for everything. See
+ <a class="xref" href="#memory-management" title="2.5. MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below.</p>
+</dd>
+<dt><span class="term"><code class="computeroutput">-q --quiet</code></span></dt>
+<dd><p>Suppress non-essential warning messages.
+ Messages pertaining to I/O errors and other critical events
+ will not be suppressed.</p></dd>
+<dt><span class="term"><code class="computeroutput">-v --verbose</code></span></dt>
+<dd><p>Verbose mode -- show the compression ratio for
+ each file processed. Further
+ <code class="computeroutput">-v</code>'s increase the verbosity
+ level, spewing out lots of information which is primarily of
+ interest for diagnostic purposes.</p></dd>
+<dt><span class="term"><code class="computeroutput">-L --license -V --version</code></span></dt>
+<dd><p>Display the software version, license terms and
+ conditions.</p></dd>
+<dt><span class="term"><code class="computeroutput">-1</code> (or
+ <code class="computeroutput">--fast</code>) to
+ <code class="computeroutput">-9</code> (or
+ <code class="computeroutput">-best</code>)</span></dt>
+<dd><p>Set the block size to 100 k, 200 k ... 900 k
+ when compressing. Has no effect when decompressing. See <a class="xref" href="#memory-management" title="2.5. MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below. The
+ <code class="computeroutput">--fast</code> and
+ <code class="computeroutput">--best</code> aliases are primarily
+ for GNU <code class="computeroutput">gzip</code> compatibility.
+ In particular, <code class="computeroutput">--fast</code> doesn't
+ make things significantly faster. And
+ <code class="computeroutput">--best</code> merely selects the
+ default behaviour.</p></dd>
+<dt><span class="term"><code class="computeroutput">--</code></span></dt>
+<dd><p>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:
+ <code class="computeroutput">bzip2 --
+ -myfilename</code>.</p></dd>
+<dt>
+<span class="term"><code class="computeroutput">--repetitive-fast</code>, </span><span class="term"><code class="computeroutput">--repetitive-best</code></span>
+</dt>
+<dd><p>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.</p></dd>
+</dl></div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="memory-management"></a>2.5. MEMORY MANAGEMENT</h2></div></div></div>
+<p><code class="computeroutput">bzip2</code> 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 <code class="computeroutput">-1</code>
+through <code class="computeroutput">-9</code> 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
+<code class="computeroutput">bunzip2</code> then allocates itself
+just enough memory to decompress the file. Since block sizes are
+stored in compressed files, it follows that the flags
+<code class="computeroutput">-1</code> to
+<code class="computeroutput">-9</code> are irrelevant to and so
+ignored during decompression.</p>
+<p>Compression and decompression requirements, in bytes, can be
+estimated as:</p>
+<pre class="programlisting">Compression: 400k + ( 8 x block size )
+
+Decompression: 100k + ( 4 x block size ), or
+ 100k + ( 2.5 x block size )</pre>
+<p>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 <code class="computeroutput">bzip2</code> 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.</p>
+<p>For files compressed with the default 900k block size,
+<code class="computeroutput">bunzip2</code> will require about 3700
+kbytes to decompress. To support decompression of any file on a
+4 megabyte machine, <code class="computeroutput">bunzip2</code> 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 <code class="computeroutput">-s</code>.</p>
+<p>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.</p>
+<p>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 <code class="computeroutput">-9</code> 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.</p>
+<p>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.</p>
+<pre class="programlisting"> 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</pre>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="recovering"></a>2.6. RECOVERING DATA FROM DAMAGED FILES</h2></div></div></div>
+<p><code class="computeroutput">bzip2</code> compresses files in
+blocks, usually 900kbytes long. Each block is handled
+independently. If a media or transmission error causes a
+multi-block <code class="computeroutput">.bz2</code> file to become
+damaged, it may be possible to recover data from the undamaged
+blocks in the file.</p>
+<p>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.</p>
+<p><code class="computeroutput">bzip2recover</code> is a simple
+program whose purpose is to search for blocks in
+<code class="computeroutput">.bz2</code> files, and write each block
+out into its own <code class="computeroutput">.bz2</code> file. You
+can then use <code class="computeroutput">bzip2 -t</code> to test
+the integrity of the resulting files, and decompress those which
+are undamaged.</p>
+<p><code class="computeroutput">bzip2recover</code> takes a
+single argument, the name of the damaged file, and writes a
+number of files <code class="computeroutput">rec0001file.bz2</code>,
+<code class="computeroutput">rec0002file.bz2</code>, etc, containing
+the extracted blocks. The output filenames are designed so that
+the use of wildcards in subsequent processing -- for example,
+<code class="computeroutput">bzip2 -dc rec*file.bz2 &gt;
+recovered_data</code> -- lists the files in the correct
+order.</p>
+<p><code class="computeroutput">bzip2recover</code> should be of
+most use dealing with large <code class="computeroutput">.bz2</code>
+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.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="performance"></a>2.7. PERFORMANCE NOTES</h2></div></div></div>
+<p>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
+<code class="computeroutput">-vvvv</code> option to monitor progress
+in great detail, if you want.</p>
+<p>Decompression speed is unaffected by these
+phenomena.</p>
+<p><code class="computeroutput">bzip2</code> 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
+<code class="computeroutput">bzip2</code> will perform best on
+machines with very large caches.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="caveats"></a>2.8. CAVEATS</h2></div></div></div>
+<p>I/O error messages are not as helpful as they could be.
+<code class="computeroutput">bzip2</code> tries hard to detect I/O
+errors and exit cleanly, but the details of what the problem is
+sometimes seem rather misleading.</p>
+<p>This manual page pertains to version 1.0.8 of
+<code class="computeroutput">bzip2</code>. 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.</p>
+<p><code class="computeroutput">bzip2recover</code> 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
+<code class="computeroutput">bzip2recover</code> 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
+<code class="computeroutput">MaybeUInt64</code> set to be an
+unsigned 64-bit integer.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="author"></a>2.9. AUTHOR</h2></div></div></div>
+<p>Julian Seward,
+<code class="computeroutput">jseward@acm.org</code></p>
+<p>The ideas embodied in
+<code class="computeroutput">bzip2</code> 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 <code class="computeroutput">bzip</code>, and many
+refinements), and Alistair Moffat, Radford Neal and Ian Witten
+(for the arithmetic coder in the original
+<code class="computeroutput">bzip</code>). 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.</p>
+</div>
+</div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="libprog"></a>3. 
+Programming with <code class="computeroutput">libbzip2</code>
+</h1></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl class="toc">
+<dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt>
+<dt><span class="sect2"><a href="#hl-summary">3.1.2. High-level summary</a></span></dt>
+<dt><span class="sect2"><a href="#util-fns-summary">3.1.3. Utility functions summary</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#err-handling">3.2. Error handling</a></span></dt>
+<dt><span class="sect1"><a href="#low-level">3.3. Low-level interface</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#bzcompress-init">3.3.1. BZ2_bzCompressInit</a></span></dt>
+<dt><span class="sect2"><a href="#bzCompress">3.3.2. BZ2_bzCompress</a></span></dt>
+<dt><span class="sect2"><a href="#bzCompress-end">3.3.3. BZ2_bzCompressEnd</a></span></dt>
+<dt><span class="sect2"><a href="#bzDecompress-init">3.3.4. BZ2_bzDecompressInit</a></span></dt>
+<dt><span class="sect2"><a href="#bzDecompress">3.3.5. BZ2_bzDecompress</a></span></dt>
+<dt><span class="sect2"><a href="#bzDecompress-end">3.3.6. BZ2_bzDecompressEnd</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#hl-interface">3.4. High-level interface</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#bzreadopen">3.4.1. BZ2_bzReadOpen</a></span></dt>
+<dt><span class="sect2"><a href="#bzread">3.4.2. BZ2_bzRead</a></span></dt>
+<dt><span class="sect2"><a href="#bzreadgetunused">3.4.3. BZ2_bzReadGetUnused</a></span></dt>
+<dt><span class="sect2"><a href="#bzreadclose">3.4.4. BZ2_bzReadClose</a></span></dt>
+<dt><span class="sect2"><a href="#bzwriteopen">3.4.5. BZ2_bzWriteOpen</a></span></dt>
+<dt><span class="sect2"><a href="#bzwrite">3.4.6. BZ2_bzWrite</a></span></dt>
+<dt><span class="sect2"><a href="#bzwriteclose">3.4.7. BZ2_bzWriteClose</a></span></dt>
+<dt><span class="sect2"><a href="#embed">3.4.8. Handling embedded compressed data streams</a></span></dt>
+<dt><span class="sect2"><a href="#std-rdwr">3.4.9. Standard file-reading/writing code</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#util-fns">3.5. Utility functions</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#bzbufftobuffcompress">3.5.1. BZ2_bzBuffToBuffCompress</a></span></dt>
+<dt><span class="sect2"><a href="#bzbufftobuffdecompress">3.5.2. BZ2_bzBuffToBuffDecompress</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#zlib-compat">3.6. zlib compatibility functions</a></span></dt>
+<dt><span class="sect1"><a href="#stdio-free">3.7. Using the library in a stdio-free environment</a></span></dt>
+<dd><dl>
+<dt><span class="sect2"><a href="#stdio-bye">3.7.1. Getting rid of stdio</a></span></dt>
+<dt><span class="sect2"><a href="#critical-error">3.7.2. Critical error handling</a></span></dt>
+</dl></dd>
+<dt><span class="sect1"><a href="#win-dll">3.8. Making a Windows DLL</a></span></dt>
+</dl>
+</div>
+<p>This chapter describes the programming interface to
+<code class="computeroutput">libbzip2</code>.</p>
+<p>For general background information, particularly about
+memory use and performance aspects, you'd be well advised to read
+<a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a> as well.</p>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="top-level"></a>3.1. Top-level structure</h2></div></div></div>
+<p><code class="computeroutput">libbzip2</code> is a flexible
+library for compressing and decompressing data in the
+<code class="computeroutput">bzip2</code> 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.</p>
+<p>The structure of
+<code class="computeroutput">libbzip2</code>'s interfaces is similar
+to that of Jean-loup Gailly's and Mark Adler's excellent
+<code class="computeroutput">zlib</code> library.</p>
+<p>All externally visible symbols have names beginning
+<code class="computeroutput">BZ2_</code>. This is new in version
+1.0. The intention is to minimise pollution of the namespaces of
+library clients.</p>
+<p>To use any part of the library, you need to
+<code class="computeroutput">#include &lt;bzlib.h&gt;</code>
+into your sources.</p>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="ll-summary"></a>3.1.1. Low-level summary</h3></div></div></div>
+<p>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
+<code class="computeroutput">stdio.h</code>, which may be helpful
+for embedded applications.</p>
+<p>The low-level part of the library has no global variables
+and is therefore thread-safe.</p>
+<p>Six routines make up the low level interface:
+<code class="computeroutput">BZ2_bzCompressInit</code>,
+<code class="computeroutput">BZ2_bzCompress</code>, and
+<code class="computeroutput">BZ2_bzCompressEnd</code> for
+compression, and a corresponding trio
+<code class="computeroutput">BZ2_bzDecompressInit</code>,
+<code class="computeroutput">BZ2_bzDecompress</code> and
+<code class="computeroutput">BZ2_bzDecompressEnd</code> for
+decompression. The <code class="computeroutput">*Init</code>
+functions allocate memory for compression/decompression and do
+other initialisations, whilst the
+<code class="computeroutput">*End</code> functions close down
+operations and release memory.</p>
+<p>The real work is done by
+<code class="computeroutput">BZ2_bzCompress</code> and
+<code class="computeroutput">BZ2_bzDecompress</code>. 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.</p>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="hl-summary"></a>3.1.2. High-level summary</h3></div></div></div>
+<p>This interface provides some handy wrappers around the
+low-level interface to facilitate reading and writing
+<code class="computeroutput">bzip2</code> format files
+(<code class="computeroutput">.bz2</code> files). The routines
+provide hooks to facilitate reading files in which the
+<code class="computeroutput">bzip2</code> data stream is embedded
+within some larger-scale file structure, or where there are
+multiple <code class="computeroutput">bzip2</code> data streams
+concatenated end-to-end.</p>
+<p>For reading files,
+<code class="computeroutput">BZ2_bzReadOpen</code>,
+<code class="computeroutput">BZ2_bzRead</code>,
+<code class="computeroutput">BZ2_bzReadClose</code> and
+<code class="computeroutput">BZ2_bzReadGetUnused</code> are
+supplied. For writing files,
+<code class="computeroutput">BZ2_bzWriteOpen</code>,
+<code class="computeroutput">BZ2_bzWrite</code> and
+<code class="computeroutput">BZ2_bzWriteFinish</code> are
+available.</p>
+<p>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 <code class="computeroutput">errno</code> to
+determine the cause of the error. In that case, you'd need a C
+library which correctly supports
+<code class="computeroutput">errno</code> in a multithreaded
+environment.</p>
+<p>To make the library a little simpler and more portable,
+<code class="computeroutput">BZ2_bzReadOpen</code> and
+<code class="computeroutput">BZ2_bzWriteOpen</code> require you to
+pass them file handles (<code class="computeroutput">FILE*</code>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.</p>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="util-fns-summary"></a>3.1.3. Utility functions summary</h3></div></div></div>
+<p>For very simple needs,
+<code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and
+<code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> 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.</p>
+<p>Yoshioka Tsuneo
+(<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>) has
+contributed some functions to give better
+<code class="computeroutput">zlib</code> compatibility. These
+functions are <code class="computeroutput">BZ2_bzopen</code>,
+<code class="computeroutput">BZ2_bzread</code>,
+<code class="computeroutput">BZ2_bzwrite</code>,
+<code class="computeroutput">BZ2_bzflush</code>,
+<code class="computeroutput">BZ2_bzclose</code>,
+<code class="computeroutput">BZ2_bzerror</code> and
+<code class="computeroutput">BZ2_bzlibVersion</code>. 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.</p>
+<p>Yoshioka also contributed modifications to allow the
+library to be built as a Windows DLL.</p>
+</div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="err-handling"></a>3.2. Error handling</h2></div></div></div>
+<p>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.</p>
+<p>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.</p>
+<p>The file <code class="computeroutput">bzlib.h</code> contains
+all definitions needed to use the library. In particular, you
+should definitely not include
+<code class="computeroutput">bzlib_private.h</code>.</p>
+<p>In <code class="computeroutput">bzlib.h</code>, 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.</p>
+<div class="variablelist"><dl class="variablelist">
+<dt><span class="term"><code class="computeroutput">BZ_OK</code></span></dt>
+<dd><p>The requested action was completed
+ successfully.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_RUN_OK, BZ_FLUSH_OK,
+ BZ_FINISH_OK</code></span></dt>
+<dd><p>In
+ <code class="computeroutput">BZ2_bzCompress</code>, the requested
+ flush/finish/nothing-special action was completed
+ successfully.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_STREAM_END</code></span></dt>
+<dd><p>Compression of data was completed, or the
+ logical stream end was detected during
+ decompression.</p></dd>
+</dl></div>
+<p>The following return values indicate an error of some
+kind.</p>
+<div class="variablelist"><dl class="variablelist">
+<dt><span class="term"><code class="computeroutput">BZ_CONFIG_ERROR</code></span></dt>
+<dd><p>Indicates that the library has been improperly
+ compiled on your platform -- a major configuration error.
+ Specifically, it means that
+ <code class="computeroutput">sizeof(char)</code>,
+ <code class="computeroutput">sizeof(short)</code> and
+ <code class="computeroutput">sizeof(int)</code> 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
+ <code class="computeroutput">sizeof(long)</code> and
+ <code class="computeroutput">sizeof(void*)</code> are 8. Under
+ LP64, <code class="computeroutput">sizeof(int)</code> is still 4,
+ so <code class="computeroutput">libbzip2</code>, which doesn't
+ use the <code class="computeroutput">long</code> type, is
+ OK.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_SEQUENCE_ERROR</code></span></dt>
+<dd><p>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.
+ <code class="computeroutput">libbzip2</code> checks as much as it
+ can to ensure this is happening, and returns
+ <code class="computeroutput">BZ_SEQUENCE_ERROR</code> 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.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_PARAM_ERROR</code></span></dt>
+<dd><p>Returned when a parameter to a function call is
+ out of range or otherwise manifestly incorrect. As with
+ <code class="computeroutput">BZ_SEQUENCE_ERROR</code>, this
+ denotes a bug in the client code. The distinction between
+ <code class="computeroutput">BZ_PARAM_ERROR</code> and
+ <code class="computeroutput">BZ_SEQUENCE_ERROR</code> is a bit
+ hazy, but still worth making.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_MEM_ERROR</code></span></dt>
+<dd><p>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
+ <code class="computeroutput">BZ2_bzDecompress</code> and
+ <code class="computeroutput">BZ2_bzRead</code> may return
+ <code class="computeroutput">BZ_MEM_ERROR</code> even though some
+ of the compressed data has been read. The same is not true
+ for compression; once
+ <code class="computeroutput">BZ2_bzCompressInit</code> or
+ <code class="computeroutput">BZ2_bzWriteOpen</code> have
+ successfully completed,
+ <code class="computeroutput">BZ_MEM_ERROR</code> cannot
+ occur.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_DATA_ERROR</code></span></dt>
+<dd><p>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.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_DATA_ERROR_MAGIC</code></span></dt>
+<dd><p>As a special case of
+ <code class="computeroutput">BZ_DATA_ERROR</code>, it is
+ sometimes useful to know when the compressed stream does not
+ start with the correct magic bytes (<code class="computeroutput">'B' 'Z'
+ 'h'</code>).</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_IO_ERROR</code></span></dt>
+<dd><p>Returned by
+ <code class="computeroutput">BZ2_bzRead</code> and
+ <code class="computeroutput">BZ2_bzWrite</code> when there is an
+ error reading or writing in the compressed file, and by
+ <code class="computeroutput">BZ2_bzReadOpen</code> and
+ <code class="computeroutput">BZ2_bzWriteOpen</code> for attempts
+ to use a file for which the error indicator (viz,
+ <code class="computeroutput">ferror(f)</code>) is set. On
+ receipt of <code class="computeroutput">BZ_IO_ERROR</code>, the
+ caller should consult <code class="computeroutput">errno</code>
+ and/or <code class="computeroutput">perror</code> to acquire
+ operating-system specific information about the
+ problem.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_UNEXPECTED_EOF</code></span></dt>
+<dd><p>Returned by
+ <code class="computeroutput">BZ2_bzRead</code> when the
+ compressed file finishes before the logical end of stream is
+ detected.</p></dd>
+<dt><span class="term"><code class="computeroutput">BZ_OUTBUFF_FULL</code></span></dt>
+<dd><p>Returned by
+ <code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and
+ <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> to
+ indicate that the output data will not fit into the output
+ buffer provided.</p></dd>
+</dl></div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="low-level"></a>3.3. Low-level interface</h2></div></div></div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzcompress-init"></a>3.3.1. BZ2_bzCompressInit</h3></div></div></div>
+<pre class="programlisting">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 );</pre>
+<p>Prepares for compression. The
+<code class="computeroutput">bz_stream</code> structure holds all
+data pertaining to the compression activity. A
+<code class="computeroutput">bz_stream</code> structure should be
+allocated and initialised prior to the call. The fields of
+<code class="computeroutput">bz_stream</code> comprise the entirety
+of the user-visible data. <code class="computeroutput">state</code>
+is a pointer to the private data structures required for
+compression.</p>
+<p>Custom memory allocators are supported, via fields
+<code class="computeroutput">bzalloc</code>,
+<code class="computeroutput">bzfree</code>, and
+<code class="computeroutput">opaque</code>. The value
+<code class="computeroutput">opaque</code> is passed to as the first
+argument to all calls to <code class="computeroutput">bzalloc</code>
+and <code class="computeroutput">bzfree</code>, but is otherwise
+ignored by the library. The call <code class="computeroutput">bzalloc (
+opaque, n, m )</code> is expected to return a pointer
+<code class="computeroutput">p</code> to <code class="computeroutput">n *
+m</code> bytes of memory, and <code class="computeroutput">bzfree (
+opaque, p )</code> should free that memory.</p>
+<p>If you don't want to use a custom memory allocator, set
+<code class="computeroutput">bzalloc</code>,
+<code class="computeroutput">bzfree</code> and
+<code class="computeroutput">opaque</code> to
+<code class="computeroutput">NULL</code>, and the library will then
+use the standard <code class="computeroutput">malloc</code> /
+<code class="computeroutput">free</code> routines.</p>
+<p>Before calling
+<code class="computeroutput">BZ2_bzCompressInit</code>, fields
+<code class="computeroutput">bzalloc</code>,
+<code class="computeroutput">bzfree</code> and
+<code class="computeroutput">opaque</code> should be filled
+appropriately, as just described. Upon return, the internal
+state will have been allocated and initialised, and
+<code class="computeroutput">total_in_lo32</code>,
+<code class="computeroutput">total_in_hi32</code>,
+<code class="computeroutput">total_out_lo32</code> and
+<code class="computeroutput">total_out_hi32</code> 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 <code class="computeroutput">_hi32</code>
+fields to store the upper 32 bits of the count. So, for example,
+the total amount of data in is <code class="computeroutput">(total_in_hi32
+&lt;&lt; 32) + total_in_lo32</code>.</p>
+<p>Parameter <code class="computeroutput">blockSize100k</code>
+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.</p>
+<p>Parameter <code class="computeroutput">verbosity</code> 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
+<code class="computeroutput">-DBZ_NO_STDIO</code>, no such output
+will appear for any verbosity setting.</p>
+<p>Parameter <code class="computeroutput">workFactor</code>
+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.</p>
+<p>Lower values of <code class="computeroutput">workFactor</code>
+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.</p>
+<p>Allowable values range from 0 to 250 inclusive. 0 is a
+special case, equivalent to using the default value of 30.</p>
+<p>Note that the compressed output generated is the same
+regardless of whether or not the fallback algorithm is
+used.</p>
+<p>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.</p>
+<p>Possible return values:</p>
+<pre class="programlisting">BZ_CONFIG_ERROR
+ if the library has been mis-compiled
+BZ_PARAM_ERROR
+ if strm is NULL
+ or blockSize &lt; 1 or blockSize &gt; 9
+ or verbosity &lt; 0 or verbosity &gt; 4
+ or workFactor &lt; 0 or workFactor &gt; 250
+BZ_MEM_ERROR
+ if not enough memory is available
+BZ_OK
+ otherwise</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">BZ2_bzCompress
+ if BZ_OK is returned
+ no specific action needed in case of error</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzCompress"></a>3.3.2. BZ2_bzCompress</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzCompress ( bz_stream *strm, int action );</pre>
+<p>Provides more input and/or output buffer space for the
+library. The caller maintains input and output buffers, and
+calls <code class="computeroutput">BZ2_bzCompress</code> to transfer
+data between them.</p>
+<p>Before each call to
+<code class="computeroutput">BZ2_bzCompress</code>,
+<code class="computeroutput">next_in</code> should point at the data
+to be compressed, and <code class="computeroutput">avail_in</code>
+should indicate how many bytes the library may read.
+<code class="computeroutput">BZ2_bzCompress</code> updates
+<code class="computeroutput">next_in</code>,
+<code class="computeroutput">avail_in</code> and
+<code class="computeroutput">total_in</code> to reflect the number
+of bytes it has read.</p>
+<p>Similarly, <code class="computeroutput">next_out</code> should
+point to a buffer in which the compressed data is to be placed,
+with <code class="computeroutput">avail_out</code> indicating how
+much output space is available.
+<code class="computeroutput">BZ2_bzCompress</code> updates
+<code class="computeroutput">next_out</code>,
+<code class="computeroutput">avail_out</code> and
+<code class="computeroutput">total_out</code> to reflect the number
+of bytes output.</p>
+<p>You may provide and remove as little or as much data as you
+like on each call of
+<code class="computeroutput">BZ2_bzCompress</code>. 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.</p>
+<p>A second purpose of
+<code class="computeroutput">BZ2_bzCompress</code> is to request a
+change of mode of the compressed stream.</p>
+<p>Conceptually, a compressed stream can be in one of four
+states: IDLE, RUNNING, FLUSHING and FINISHING. Before
+initialisation
+(<code class="computeroutput">BZ2_bzCompressInit</code>) and after
+termination (<code class="computeroutput">BZ2_bzCompressEnd</code>),
+a stream is regarded as IDLE.</p>
+<p>Upon initialisation
+(<code class="computeroutput">BZ2_bzCompressInit</code>), the stream
+is placed in the RUNNING state. Subsequent calls to
+<code class="computeroutput">BZ2_bzCompress</code> should pass
+<code class="computeroutput">BZ_RUN</code> as the requested action;
+other actions are illegal and will result in
+<code class="computeroutput">BZ_SEQUENCE_ERROR</code>.</p>
+<p>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,
+<code class="computeroutput">BZ2_bzCompress</code> will no longer
+attempt to read data from
+<code class="computeroutput">next_in</code>, but it will want to
+write data to <code class="computeroutput">next_out</code>. 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
+<code class="computeroutput">BZ2_bzCompress</code>.</p>
+<p>Instead, the calling program passes
+<code class="computeroutput">BZ_FINISH</code> as an action to
+<code class="computeroutput">BZ2_bzCompress</code>. This changes
+the stream's state to FINISHING. Any remaining input (ie,
+<code class="computeroutput">next_in[0 .. avail_in-1]</code>) is
+compressed and transferred to the output buffer. To do this,
+<code class="computeroutput">BZ2_bzCompress</code> must be called
+repeatedly until all the output has been consumed. At that
+point, <code class="computeroutput">BZ2_bzCompress</code> returns
+<code class="computeroutput">BZ_STREAM_END</code>, and the stream's
+state is set back to IDLE.
+<code class="computeroutput">BZ2_bzCompressEnd</code> should then be
+called.</p>
+<p>Just to make sure the calling program does not cheat, the
+library makes a note of <code class="computeroutput">avail_in</code>
+at the time of the first call to
+<code class="computeroutput">BZ2_bzCompress</code> which has
+<code class="computeroutput">BZ_FINISH</code> 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
+<code class="computeroutput">avail_in</code> over subsequent calls
+to <code class="computeroutput">BZ2_bzCompress</code>, the library
+can detect any attempts to slip in more data to compress. Any
+calls for which this is detected will return
+<code class="computeroutput">BZ_SEQUENCE_ERROR</code>. This
+indicates a programming mistake which should be corrected.</p>
+<p>Instead of asking to finish, the calling program may ask
+<code class="computeroutput">BZ2_bzCompress</code> 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 <code class="computeroutput">BZ2_bzCompress</code>
+with an action of <code class="computeroutput">BZ_FLUSH</code>,
+remove output data, and persist with the
+<code class="computeroutput">BZ_FLUSH</code> action until the value
+<code class="computeroutput">BZ_RUN</code> is returned. As with
+finishing, <code class="computeroutput">BZ2_bzCompress</code>
+detects any attempt to provide more input data once the flush has
+begun.</p>
+<p>Once the flush is complete, the stream returns to the
+normal RUNNING state.</p>
+<p>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
+<code class="computeroutput">BZ2_bzCompress</code>.</p>
+<pre class="programlisting">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</pre>
+<p>That still looks complicated? Well, fair enough. The
+usual sequence of calls for compressing a load of data is:</p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem"><p>Get started with
+ <code class="computeroutput">BZ2_bzCompressInit</code>.</p></li>
+<li class="listitem"><p>Shovel data in and shlurp out its compressed form
+ using zero or more calls of
+ <code class="computeroutput">BZ2_bzCompress</code> with action =
+ <code class="computeroutput">BZ_RUN</code>.</p></li>
+<li class="listitem"><p>Finish up. Repeatedly call
+ <code class="computeroutput">BZ2_bzCompress</code> with action =
+ <code class="computeroutput">BZ_FINISH</code>, copying out the
+ compressed output, until
+ <code class="computeroutput">BZ_STREAM_END</code> is
+ returned.</p></li>
+<li class="listitem"><p>Close up and go home. Call
+ <code class="computeroutput">BZ2_bzCompressEnd</code>.</p></li>
+</ol></div>
+<p>If the data you want to compress fits into your input
+buffer all at once, you can skip the calls of
+<code class="computeroutput">BZ2_bzCompress ( ..., BZ_RUN )</code>
+and just do the <code class="computeroutput">BZ2_bzCompress ( ..., BZ_FINISH
+)</code> calls.</p>
+<p>All required memory is allocated by
+<code class="computeroutput">BZ2_bzCompressInit</code>. The
+compression library can accept any data at all (obviously). So
+you shouldn't get any error return values from the
+<code class="computeroutput">BZ2_bzCompress</code> calls. If you
+do, they will be
+<code class="computeroutput">BZ_SEQUENCE_ERROR</code>, and indicate
+a bug in your programming.</p>
+<p>Trivial other possible return values:</p>
+<pre class="programlisting">BZ_PARAM_ERROR
+ if strm is NULL, or strm-&gt;s is NULL</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzCompress-end"></a>3.3.3. BZ2_bzCompressEnd</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzCompressEnd ( bz_stream *strm );</pre>
+<p>Releases all memory associated with a compression
+stream.</p>
+<p>Possible return values:</p>
+<pre class="programlisting">BZ_PARAM_ERROR if strm is NULL or strm-&gt;s is NULL
+BZ_OK otherwise</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzDecompress-init"></a>3.3.4. BZ2_bzDecompressInit</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );</pre>
+<p>Prepares for decompression. As with
+<code class="computeroutput">BZ2_bzCompressInit</code>, a
+<code class="computeroutput">bz_stream</code> record should be
+allocated and initialised before the call. Fields
+<code class="computeroutput">bzalloc</code>,
+<code class="computeroutput">bzfree</code> and
+<code class="computeroutput">opaque</code> should be set if a custom
+memory allocator is required, or made
+<code class="computeroutput">NULL</code> for the normal
+<code class="computeroutput">malloc</code> /
+<code class="computeroutput">free</code> routines. Upon return, the
+internal state will have been initialised, and
+<code class="computeroutput">total_in</code> and
+<code class="computeroutput">total_out</code> will be zero.</p>
+<p>For the meaning of parameter
+<code class="computeroutput">verbosity</code>, see
+<code class="computeroutput">BZ2_bzCompressInit</code>.</p>
+<p>If <code class="computeroutput">small</code> 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 <a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a>
+for more information on memory management.</p>
+<p>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
+<code class="computeroutput">BZ2_bzDecompressInit</code> succeeds, a
+subsequent <code class="computeroutput">BZ2_bzDecompress</code>
+could fail with
+<code class="computeroutput">BZ_MEM_ERROR</code>.</p>
+<p>Possible return values:</p>
+<pre class="programlisting">BZ_CONFIG_ERROR
+ if the library has been mis-compiled
+BZ_PARAM_ERROR
+ if ( small != 0 &amp;&amp; small != 1 )
+ or (verbosity &lt;; 0 || verbosity &gt; 4)
+BZ_MEM_ERROR
+ if insufficient memory is available</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">BZ2_bzDecompress
+ if BZ_OK was returned
+ no specific action required in case of error</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzDecompress"></a>3.3.5. BZ2_bzDecompress</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzDecompress ( bz_stream *strm );</pre>
+<p>Provides more input and/out output buffer space for the
+library. The caller maintains input and output buffers, and uses
+<code class="computeroutput">BZ2_bzDecompress</code> to transfer
+data between them.</p>
+<p>Before each call to
+<code class="computeroutput">BZ2_bzDecompress</code>,
+<code class="computeroutput">next_in</code> should point at the
+compressed data, and <code class="computeroutput">avail_in</code>
+should indicate how many bytes the library may read.
+<code class="computeroutput">BZ2_bzDecompress</code> updates
+<code class="computeroutput">next_in</code>,
+<code class="computeroutput">avail_in</code> and
+<code class="computeroutput">total_in</code> to reflect the number
+of bytes it has read.</p>
+<p>Similarly, <code class="computeroutput">next_out</code> should
+point to a buffer in which the uncompressed output is to be
+placed, with <code class="computeroutput">avail_out</code>
+indicating how much output space is available.
+<code class="computeroutput">BZ2_bzCompress</code> updates
+<code class="computeroutput">next_out</code>,
+<code class="computeroutput">avail_out</code> and
+<code class="computeroutput">total_out</code> to reflect the number
+of bytes output.</p>
+<p>You may provide and remove as little or as much data as you
+like on each call of
+<code class="computeroutput">BZ2_bzDecompress</code>. 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.</p>
+<p>Use of <code class="computeroutput">BZ2_bzDecompress</code> is
+simpler than
+<code class="computeroutput">BZ2_bzCompress</code>.</p>
+<p>You should provide input and remove output as described
+above, and repeatedly call
+<code class="computeroutput">BZ2_bzDecompress</code> until
+<code class="computeroutput">BZ_STREAM_END</code> is returned.
+Appearance of <code class="computeroutput">BZ_STREAM_END</code>
+denotes that <code class="computeroutput">BZ2_bzDecompress</code>
+has detected the logical end of the compressed stream.
+<code class="computeroutput">BZ2_bzDecompress</code> will not
+produce <code class="computeroutput">BZ_STREAM_END</code> until all
+output data has been placed into the output buffer, so once
+<code class="computeroutput">BZ_STREAM_END</code> appears, you are
+guaranteed to have available all the decompressed output, and
+<code class="computeroutput">BZ2_bzDecompressEnd</code> can safely
+be called.</p>
+<p>If case of an error return value, you should call
+<code class="computeroutput">BZ2_bzDecompressEnd</code> to clean up
+and release memory.</p>
+<p>Possible return values:</p>
+<pre class="programlisting">BZ_PARAM_ERROR
+ if strm is NULL or strm-&gt;s is NULL
+ or strm-&gt;avail_out &lt; 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--&gt;avail_out &gt; 0
+BZ_OK
+ otherwise</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">BZ2_bzDecompress
+ if BZ_OK was returned
+BZ2_bzDecompressEnd
+ otherwise</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzDecompress-end"></a>3.3.6. BZ2_bzDecompressEnd</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzDecompressEnd ( bz_stream *strm );</pre>
+<p>Releases all memory associated with a decompression
+stream.</p>
+<p>Possible return values:</p>
+<pre class="programlisting">BZ_PARAM_ERROR
+ if strm is NULL or strm-&gt;s is NULL
+BZ_OK
+ otherwise</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting"> None.</pre>
+</div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="hl-interface"></a>3.4. High-level interface</h2></div></div></div>
+<p>This interface provides functions for reading and writing
+<code class="computeroutput">bzip2</code> format files. First, some
+general points.</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p>All of the functions take an
+ <code class="computeroutput">int*</code> first argument,
+ <code class="computeroutput">bzerror</code>. After each call,
+ <code class="computeroutput">bzerror</code> should be consulted
+ first to determine the outcome of the call. If
+ <code class="computeroutput">bzerror</code> is
+ <code class="computeroutput">BZ_OK</code>, the call completed
+ successfully, and only then should the return value of the
+ function (if any) be consulted. If
+ <code class="computeroutput">bzerror</code> is
+ <code class="computeroutput">BZ_IO_ERROR</code>, there was an
+ error reading/writing the underlying compressed file, and you
+ should then consult <code class="computeroutput">errno</code> /
+ <code class="computeroutput">perror</code> to determine the cause
+ of the difficulty. <code class="computeroutput">bzerror</code>
+ may also be set to various other values; precise details are
+ given on a per-function basis below.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>If <code class="computeroutput">bzerror</code> indicates
+ an error (ie, anything except
+ <code class="computeroutput">BZ_OK</code> and
+ <code class="computeroutput">BZ_STREAM_END</code>), you should
+ immediately call
+ <code class="computeroutput">BZ2_bzReadClose</code> (or
+ <code class="computeroutput">BZ2_bzWriteClose</code>, 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
+ <code class="computeroutput">BZ2_bzReadClose</code>
+ (<code class="computeroutput">BZ2_bzWriteClose</code>) is
+ undefined. The implication is that (1)
+ <code class="computeroutput">bzerror</code> should be checked
+ after each call, and (2) if
+ <code class="computeroutput">bzerror</code> indicates an error,
+ <code class="computeroutput">BZ2_bzReadClose</code>
+ (<code class="computeroutput">BZ2_bzWriteClose</code>) should then
+ be called to clean up.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>The <code class="computeroutput">FILE*</code> arguments
+ passed to <code class="computeroutput">BZ2_bzReadOpen</code> /
+ <code class="computeroutput">BZ2_bzWriteOpen</code> 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.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>Memory allocation requests are handled by
+ <code class="computeroutput">malloc</code> /
+ <code class="computeroutput">free</code>. At present there is no
+ facility for user-defined memory allocators in the file I/O
+ functions (could easily be added, though).</p></li>
+</ul></div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzreadopen"></a>3.4.1. BZ2_bzReadOpen</h3></div></div></div>
+<pre class="programlisting">typedef void BZFILE;
+
+BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f,
+ int verbosity, int small,
+ void *unused, int nUnused );</pre>
+<p>Prepare to read compressed data from file handle
+<code class="computeroutput">f</code>.
+<code class="computeroutput">f</code> should refer to a file which
+has been opened for reading, and for which the error indicator
+(<code class="computeroutput">ferror(f)</code>)is not set. If
+<code class="computeroutput">small</code> is 1, the library will try
+to decompress using less memory, at the expense of speed.</p>
+<p>For reasons explained below,
+<code class="computeroutput">BZ2_bzRead</code> will decompress the
+<code class="computeroutput">nUnused</code> bytes starting at
+<code class="computeroutput">unused</code>, before starting to read
+from the file <code class="computeroutput">f</code>. At most
+<code class="computeroutput">BZ_MAX_UNUSED</code> bytes may be
+supplied like this. If this facility is not required, you should
+pass <code class="computeroutput">NULL</code> and
+<code class="computeroutput">0</code> for
+<code class="computeroutput">unused</code> and
+n<code class="computeroutput">Unused</code> respectively.</p>
+<p>For the meaning of parameters
+<code class="computeroutput">small</code> and
+<code class="computeroutput">verbosity</code>, see
+<code class="computeroutput">BZ2_bzDecompressInit</code>.</p>
+<p>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 <code class="computeroutput">BZ2_bzReadOpen</code>
+returns <code class="computeroutput">BZ_OK</code> but a subsequent
+call of <code class="computeroutput">BZ2_bzRead</code> will return
+<code class="computeroutput">BZ_MEM_ERROR</code>.</p>
+<p>Possible assignments to
+<code class="computeroutput">bzerror</code>:</p>
+<pre class="programlisting">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 &amp;&amp; nUnused != 0 )
+ or ( unused != NULL &amp;&amp; !(0 &lt;= nUnused &lt;= BZ_MAX_UNUSED) )
+BZ_IO_ERROR
+ if ferror(f) is nonzero
+BZ_MEM_ERROR
+ if insufficient memory is available
+BZ_OK
+ otherwise.</pre>
+<p>Possible return values:</p>
+<pre class="programlisting">Pointer to an abstract BZFILE
+ if bzerror is BZ_OK
+NULL
+ otherwise</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">BZ2_bzRead
+ if bzerror is BZ_OK
+BZ2_bzClose
+ otherwise</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzread"></a>3.4.2. BZ2_bzRead</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
+<p>Reads up to <code class="computeroutput">len</code>
+(uncompressed) bytes from the compressed file
+<code class="computeroutput">b</code> into the buffer
+<code class="computeroutput">buf</code>. If the read was
+successful, <code class="computeroutput">bzerror</code> is set to
+<code class="computeroutput">BZ_OK</code> and the number of bytes
+read is returned. If the logical end-of-stream was detected,
+<code class="computeroutput">bzerror</code> will be set to
+<code class="computeroutput">BZ_STREAM_END</code>, and the number of
+bytes read is returned. All other
+<code class="computeroutput">bzerror</code> values denote an
+error.</p>
+<p><code class="computeroutput">BZ2_bzRead</code> will supply
+<code class="computeroutput">len</code> 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 <code class="computeroutput">bzerror</code> after every call
+and watch out for
+<code class="computeroutput">BZ_STREAM_END</code>.</p>
+<p>Internally, <code class="computeroutput">BZ2_bzRead</code>
+copies data from the compressed file in chunks of size
+<code class="computeroutput">BZ_MAX_UNUSED</code> bytes before
+decompressing it. If the file contains more bytes than strictly
+needed to reach the logical end-of-stream,
+<code class="computeroutput">BZ2_bzRead</code> will almost certainly
+read some of the trailing data before signalling
+<code class="computeroutput">BZ_SEQUENCE_END</code>. To collect the
+read but unused data once
+<code class="computeroutput">BZ_SEQUENCE_END</code> has appeared,
+call <code class="computeroutput">BZ2_bzReadGetUnused</code>
+immediately before
+<code class="computeroutput">BZ2_bzReadClose</code>.</p>
+<p>Possible assignments to
+<code class="computeroutput">bzerror</code>:</p>
+<pre class="programlisting">BZ_PARAM_ERROR
+ if b is NULL or buf is NULL or len &lt; 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.</pre>
+<p>Possible return values:</p>
+<pre class="programlisting">number of bytes read
+ if bzerror is BZ_OK or BZ_STREAM_END
+undefined
+ otherwise</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">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</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzreadgetunused"></a>3.4.3. BZ2_bzReadGetUnused</h3></div></div></div>
+<pre class="programlisting">void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b,
+ void** unused, int* nUnused );</pre>
+<p>Returns data which was read from the compressed file but
+was not needed to get to the logical end-of-stream.
+<code class="computeroutput">*unused</code> is set to the address of
+the data, and <code class="computeroutput">*nUnused</code> to the
+number of bytes. <code class="computeroutput">*nUnused</code> will
+be set to a value between <code class="computeroutput">0</code> and
+<code class="computeroutput">BZ_MAX_UNUSED</code> inclusive.</p>
+<p>This function may only be called once
+<code class="computeroutput">BZ2_bzRead</code> has signalled
+<code class="computeroutput">BZ_STREAM_END</code> but before
+<code class="computeroutput">BZ2_bzReadClose</code>.</p>
+<p>Possible assignments to
+<code class="computeroutput">bzerror</code>:</p>
+<pre class="programlisting">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</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">BZ2_bzReadClose</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzreadclose"></a>3.4.4. BZ2_bzReadClose</h3></div></div></div>
+<pre class="programlisting">void BZ2_bzReadClose ( int *bzerror, BZFILE *b );</pre>
+<p>Releases all memory pertaining to the compressed file
+<code class="computeroutput">b</code>.
+<code class="computeroutput">BZ2_bzReadClose</code> does not call
+<code class="computeroutput">fclose</code> on the underlying file
+handle, so you should do that yourself if appropriate.
+<code class="computeroutput">BZ2_bzReadClose</code> should be called
+to clean up after all error situations.</p>
+<p>Possible assignments to
+<code class="computeroutput">bzerror</code>:</p>
+<pre class="programlisting">BZ_SEQUENCE_ERROR
+ if b was opened with BZ2_bzOpenWrite
+BZ_OK
+ otherwise</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">none</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzwriteopen"></a>3.4.5. BZ2_bzWriteOpen</h3></div></div></div>
+<pre class="programlisting">BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f,
+ int blockSize100k, int verbosity,
+ int workFactor );</pre>
+<p>Prepare to write compressed data to file handle
+<code class="computeroutput">f</code>.
+<code class="computeroutput">f</code> should refer to a file which
+has been opened for writing, and for which the error indicator
+(<code class="computeroutput">ferror(f)</code>)is not set.</p>
+<p>For the meaning of parameters
+<code class="computeroutput">blockSize100k</code>,
+<code class="computeroutput">verbosity</code> and
+<code class="computeroutput">workFactor</code>, see
+<code class="computeroutput">BZ2_bzCompressInit</code>.</p>
+<p>All required memory is allocated at this stage, so if the
+call completes successfully,
+<code class="computeroutput">BZ_MEM_ERROR</code> cannot be signalled
+by a subsequent call to
+<code class="computeroutput">BZ2_bzWrite</code>.</p>
+<p>Possible assignments to
+<code class="computeroutput">bzerror</code>:</p>
+<pre class="programlisting">BZ_CONFIG_ERROR
+ if the library has been mis-compiled
+BZ_PARAM_ERROR
+ if f is NULL
+ or blockSize100k &lt; 1 or blockSize100k &gt; 9
+BZ_IO_ERROR
+ if ferror(f) is nonzero
+BZ_MEM_ERROR
+ if insufficient memory is available
+BZ_OK
+ otherwise</pre>
+<p>Possible return values:</p>
+<pre class="programlisting">Pointer to an abstract BZFILE
+ if bzerror is BZ_OK
+NULL
+ otherwise</pre>
+<p>Allowable next actions:</p>
+<pre class="programlisting">BZ2_bzWrite
+ if bzerror is BZ_OK
+ (you could go directly to BZ2_bzWriteClose, but this would be pretty pointless)
+BZ2_bzWriteClose
+ otherwise</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzwrite"></a>3.4.6. BZ2_bzWrite</h3></div></div></div>
+<pre class="programlisting">void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
+<p>Absorbs <code class="computeroutput">len</code> bytes from the
+buffer <code class="computeroutput">buf</code>, eventually to be
+compressed and written to the file.</p>
+<p>Possible assignments to
+<code class="computeroutput">bzerror</code>:</p>
+<pre class="programlisting">BZ_PARAM_ERROR
+ if b is NULL or buf is NULL or len &lt; 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</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzwriteclose"></a>3.4.7. BZ2_bzWriteClose</h3></div></div></div>
+<pre class="programlisting">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 );</pre>
+<p>Compresses and flushes to the compressed file all data so
+far supplied by <code class="computeroutput">BZ2_bzWrite</code>.
+The logical end-of-stream markers are also written, so subsequent
+calls to <code class="computeroutput">BZ2_bzWrite</code> are
+illegal. All memory associated with the compressed file
+<code class="computeroutput">b</code> is released.
+<code class="computeroutput">fflush</code> is called on the
+compressed file, but it is not
+<code class="computeroutput">fclose</code>'d.</p>
+<p>If <code class="computeroutput">BZ2_bzWriteClose</code> 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
+<code class="computeroutput">fflush</code> the compressed file. You
+can force this behaviour to happen even in the case of no error,
+by passing a nonzero value to
+<code class="computeroutput">abandon</code>.</p>
+<p>If <code class="computeroutput">nbytes_in</code> is non-null,
+<code class="computeroutput">*nbytes_in</code> will be set to be the
+total volume of uncompressed data handled. Similarly,
+<code class="computeroutput">nbytes_out</code> will be set to the
+total volume of compressed data written. For compatibility with
+older versions of the library,
+<code class="computeroutput">BZ2_bzWriteClose</code> only yields the
+lower 32 bits of these counts. Use
+<code class="computeroutput">BZ2_bzWriteClose64</code> if you want
+the full 64 bit counts. These two functions are otherwise
+absolutely identical.</p>
+<p>Possible assignments to
+<code class="computeroutput">bzerror</code>:</p>
+<pre class="programlisting">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</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="embed"></a>3.4.8. Handling embedded compressed data streams</h3></div></div></div>
+<p>The high-level library facilitates use of
+<code class="computeroutput">bzip2</code> data streams which form
+some part of a surrounding, larger data stream.</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p>For writing, the library takes an open file handle,
+ writes compressed data to it,
+ <code class="computeroutput">fflush</code>es it but does not
+ <code class="computeroutput">fclose</code> it. The calling
+ application can write its own data before and after the
+ compressed data stream, using that same file handle.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>Reading is more complex, and the facilities are not as
+ general as they could be since generality is hard to reconcile
+ with efficiency. <code class="computeroutput">BZ2_bzRead</code>
+ reads from the compressed file in blocks of size
+ <code class="computeroutput">BZ_MAX_UNUSED</code> bytes, and in
+ doing so probably will overshoot the logical end of compressed
+ stream. To recover this data once decompression has ended,
+ call <code class="computeroutput">BZ2_bzReadGetUnused</code> after
+ the last call of <code class="computeroutput">BZ2_bzRead</code>
+ (the one returning
+ <code class="computeroutput">BZ_STREAM_END</code>) but before
+ calling
+ <code class="computeroutput">BZ2_bzReadClose</code>.</p></li>
+</ul></div>
+<p>This mechanism makes it easy to decompress multiple
+<code class="computeroutput">bzip2</code> streams placed end-to-end.
+As the end of one stream, when
+<code class="computeroutput">BZ2_bzRead</code> returns
+<code class="computeroutput">BZ_STREAM_END</code>, call
+<code class="computeroutput">BZ2_bzReadGetUnused</code> 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
+<code class="computeroutput">BZ2_bzReadOpen</code> again, feeding in
+the unused data via the <code class="computeroutput">unused</code> /
+<code class="computeroutput">nUnused</code> parameters. Keep doing
+this until <code class="computeroutput">BZ_STREAM_END</code> return
+coincides with the physical end of file
+(<code class="computeroutput">feof(f)</code>). In this situation
+<code class="computeroutput">BZ2_bzReadGetUnused</code> will of
+course return no data.</p>
+<p>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.</p>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="std-rdwr"></a>3.4.9. Standard file-reading/writing code</h3></div></div></div>
+<p>Here's how you'd write data to a compressed file:</p>
+<pre class="programlisting">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( &amp;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 ( &amp;bzerror, b, buf, nBuf );
+ if (bzerror == BZ_IO_ERROR) {
+ BZ2_bzWriteClose ( &amp;bzerror, b );
+ /* handle error */
+ }
+}
+
+BZ2_bzWriteClose( &amp;bzerror, b );
+if (bzerror == BZ_IO_ERROR) {
+ /* handle error */
+}</pre>
+<p>And to read from a compressed file:</p>
+<pre class="programlisting">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 ( &amp;bzerror, f, 0, NULL, 0 );
+if ( bzerror != BZ_OK ) {
+ BZ2_bzReadClose ( &amp;bzerror, b );
+ /* handle error */
+}
+
+bzerror = BZ_OK;
+while ( bzerror == BZ_OK &amp;&amp; /* arbitrary other conditions */) {
+ nBuf = BZ2_bzRead ( &amp;bzerror, b, buf, /* size of buf */ );
+ if ( bzerror == BZ_OK ) {
+ /* do something with buf[0 .. nBuf-1] */
+ }
+}
+if ( bzerror != BZ_STREAM_END ) {
+ BZ2_bzReadClose ( &amp;bzerror, b );
+ /* handle error */
+} else {
+ BZ2_bzReadClose ( &amp;bzerror, b );
+}</pre>
+</div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="util-fns"></a>3.5. Utility functions</h2></div></div></div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzbufftobuffcompress"></a>3.5.1. BZ2_bzBuffToBuffCompress</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzBuffToBuffCompress( char* dest,
+ unsigned int* destLen,
+ char* source,
+ unsigned int sourceLen,
+ int blockSize100k,
+ int verbosity,
+ int workFactor );</pre>
+<p>Attempts to compress the data in <code class="computeroutput">source[0
+.. sourceLen-1]</code> into the destination buffer,
+<code class="computeroutput">dest[0 .. *destLen-1]</code>. If the
+destination buffer is big enough,
+<code class="computeroutput">*destLen</code> is set to the size of
+the compressed data, and <code class="computeroutput">BZ_OK</code>
+is returned. If the compressed data won't fit,
+<code class="computeroutput">*destLen</code> is unchanged, and
+<code class="computeroutput">BZ_OUTBUFF_FULL</code> is
+returned.</p>
+<p>Compression in this manner is a one-shot event, done with a
+single call to this function. The resulting compressed data is a
+complete <code class="computeroutput">bzip2</code> 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.</p>
+<p>For the meaning of parameters
+<code class="computeroutput">blockSize100k</code>,
+<code class="computeroutput">verbosity</code> and
+<code class="computeroutput">workFactor</code>, see
+<code class="computeroutput">BZ2_bzCompressInit</code>.</p>
+<p>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.</p>
+<p><code class="computeroutput">BZ2_bzBuffToBuffDecompress</code>
+will not write data at or beyond
+<code class="computeroutput">dest[*destLen]</code>, even in case of
+buffer overflow.</p>
+<p>Possible return values:</p>
+<pre class="programlisting">BZ_CONFIG_ERROR
+ if the library has been mis-compiled
+BZ_PARAM_ERROR
+ if dest is NULL or destLen is NULL
+ or blockSize100k &lt; 1 or blockSize100k &gt; 9
+ or verbosity &lt; 0 or verbosity &gt; 4
+ or workFactor &lt; 0 or workFactor &gt; 250
+BZ_MEM_ERROR
+ if insufficient memory is available
+BZ_OUTBUFF_FULL
+ if the size of the compressed data exceeds *destLen
+BZ_OK
+ otherwise</pre>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bzbufftobuffdecompress"></a>3.5.2. BZ2_bzBuffToBuffDecompress</h3></div></div></div>
+<pre class="programlisting">int BZ2_bzBuffToBuffDecompress( char* dest,
+ unsigned int* destLen,
+ char* source,
+ unsigned int sourceLen,
+ int small,
+ int verbosity );</pre>
+<p>Attempts to decompress the data in <code class="computeroutput">source[0
+.. sourceLen-1]</code> into the destination buffer,
+<code class="computeroutput">dest[0 .. *destLen-1]</code>. If the
+destination buffer is big enough,
+<code class="computeroutput">*destLen</code> is set to the size of
+the uncompressed data, and <code class="computeroutput">BZ_OK</code>
+is returned. If the compressed data won't fit,
+<code class="computeroutput">*destLen</code> is unchanged, and
+<code class="computeroutput">BZ_OUTBUFF_FULL</code> is
+returned.</p>
+<p><code class="computeroutput">source</code> is assumed to hold
+a complete <code class="computeroutput">bzip2</code> format data
+stream.
+<code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> tries
+to decompress the entirety of the stream into the output
+buffer.</p>
+<p>For the meaning of parameters
+<code class="computeroutput">small</code> and
+<code class="computeroutput">verbosity</code>, see
+<code class="computeroutput">BZ2_bzDecompressInit</code>.</p>
+<p>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.</p>
+<p><code class="computeroutput">BZ2_bzBuffToBuffDecompress</code>
+will not write data at or beyond
+<code class="computeroutput">dest[*destLen]</code>, even in case of
+buffer overflow.</p>
+<p>Possible return values:</p>
+<pre class="programlisting">BZ_CONFIG_ERROR
+ if the library has been mis-compiled
+BZ_PARAM_ERROR
+ if dest is NULL or destLen is NULL
+ or small != 0 &amp;&amp; small != 1
+ or verbosity &lt; 0 or verbosity &gt; 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</pre>
+</div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="zlib-compat"></a>3.6. zlib compatibility functions</h2></div></div></div>
+<p>Yoshioka Tsuneo has contributed some functions to give
+better <code class="computeroutput">zlib</code> compatibility.
+These functions are <code class="computeroutput">BZ2_bzopen</code>,
+<code class="computeroutput">BZ2_bzread</code>,
+<code class="computeroutput">BZ2_bzwrite</code>,
+<code class="computeroutput">BZ2_bzflush</code>,
+<code class="computeroutput">BZ2_bzclose</code>,
+<code class="computeroutput">BZ2_bzerror</code> and
+<code class="computeroutput">BZ2_bzlibVersion</code>. 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.</p>
+<pre class="programlisting">typedef void BZFILE;
+
+const char * BZ2_bzlibVersion ( void );</pre>
+<p>Returns a string indicating the library version.</p>
+<pre class="programlisting">BZFILE * BZ2_bzopen ( const char *path, const char *mode );
+BZFILE * BZ2_bzdopen ( int fd, const char *mode );</pre>
+<p>Opens a <code class="computeroutput">.bz2</code> file for
+reading or writing, using either its name or a pre-existing file
+descriptor. Analogous to <code class="computeroutput">fopen</code>
+and <code class="computeroutput">fdopen</code>.</p>
+<pre class="programlisting">int BZ2_bzread ( BZFILE* b, void* buf, int len );
+int BZ2_bzwrite ( BZFILE* b, void* buf, int len );</pre>
+<p>Reads/writes data from/to a previously opened
+<code class="computeroutput">BZFILE</code>. Analogous to
+<code class="computeroutput">fread</code> and
+<code class="computeroutput">fwrite</code>.</p>
+<pre class="programlisting">int BZ2_bzflush ( BZFILE* b );
+void BZ2_bzclose ( BZFILE* b );</pre>
+<p>Flushes/closes a <code class="computeroutput">BZFILE</code>.
+<code class="computeroutput">BZ2_bzflush</code> doesn't actually do
+anything. Analogous to <code class="computeroutput">fflush</code>
+and <code class="computeroutput">fclose</code>.</p>
+<pre class="programlisting">const char * BZ2_bzerror ( BZFILE *b, int *errnum )</pre>
+<p>Returns a string describing the more recent error status of
+<code class="computeroutput">b</code>, and also sets
+<code class="computeroutput">*errnum</code> to its numerical
+value.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="stdio-free"></a>3.7. Using the library in a stdio-free environment</h2></div></div></div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="stdio-bye"></a>3.7.1. Getting rid of stdio</h3></div></div></div>
+<p>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
+<code class="computeroutput">BZ_NO_STDIO</code> defined. Doing this
+gives you a library containing only the following eight
+functions:</p>
+<p><code class="computeroutput">BZ2_bzCompressInit</code>,
+<code class="computeroutput">BZ2_bzCompress</code>,
+<code class="computeroutput">BZ2_bzCompressEnd</code>
+<code class="computeroutput">BZ2_bzDecompressInit</code>,
+<code class="computeroutput">BZ2_bzDecompress</code>,
+<code class="computeroutput">BZ2_bzDecompressEnd</code>
+<code class="computeroutput">BZ2_bzBuffToBuffCompress</code>,
+<code class="computeroutput">BZ2_bzBuffToBuffDecompress</code></p>
+<p>When compiled like this, all functions will ignore
+<code class="computeroutput">verbosity</code> settings.</p>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="critical-error"></a>3.7.2. Critical error handling</h3></div></div></div>
+<p><code class="computeroutput">libbzip2</code> 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
+<code class="computeroutput">BZ_NO_STDIO</code> set.</p>
+<p>For a normal compile, an assertion failure yields the
+message:</p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>bzip2/libbzip2: internal error number N.</p>
+<p>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.
+</p>
+</blockquote></div>
+<p>where <code class="computeroutput">N</code> is some error code
+number. If <code class="computeroutput">N == 1007</code>, 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).</p>
+<p><code class="computeroutput">exit(3)</code> is then
+called.</p>
+<p>For a <code class="computeroutput">stdio</code>-free library,
+assertion failures result in a call to a function declared
+as:</p>
+<pre class="programlisting">extern void bz_internal_error ( int errcode );</pre>
+<p>The relevant code is passed as a parameter. You should
+supply such a function.</p>
+<p>In either case, once an assertion failure has occurred, any
+<code class="computeroutput">bz_stream</code> records involved can
+be regarded as invalid. You should not attempt to resume normal
+operation with them.</p>
+<p>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.</p>
+</div>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="win-dll"></a>3.8. Making a Windows DLL</h2></div></div></div>
+<p>Everything related to Windows has been contributed by
+Yoshioka Tsuneo
+(<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>), so
+you should send your queries to him (but please Cc:
+<code class="computeroutput">bzip2-devel@sourceware.org</code>).</p>
+<p>My vague understanding of what to do is: using Visual C++
+5.0, open the project file
+<code class="computeroutput">libbz2.dsp</code>, and build. That's
+all.</p>
+<p>If you can't open the project file for some reason, make a
+new one, naming these files:
+<code class="computeroutput">blocksort.c</code>,
+<code class="computeroutput">bzlib.c</code>,
+<code class="computeroutput">compress.c</code>,
+<code class="computeroutput">crctable.c</code>,
+<code class="computeroutput">decompress.c</code>,
+<code class="computeroutput">huffman.c</code>,
+<code class="computeroutput">randtable.c</code> and
+<code class="computeroutput">libbz2.def</code>. You will also need
+to name the header files <code class="computeroutput">bzlib.h</code>
+and <code class="computeroutput">bzlib_private.h</code>.</p>
+<p>If you don't use VC++, you may need to define the
+proprocessor symbol
+<code class="computeroutput">_WIN32</code>.</p>
+<p>Finally, <code class="computeroutput">dlltest.c</code> is a
+sample program using the DLL. It has a project file,
+<code class="computeroutput">dlltest.dsp</code>.</p>
+<p>If you just want a makefile for Visual C, have a look at
+<code class="computeroutput">makefile.msc</code>.</p>
+<p>Be aware that if you compile
+<code class="computeroutput">bzip2</code> itself on Win32, you must
+set <code class="computeroutput">BZ_UNIX</code> to 0 and
+<code class="computeroutput">BZ_LCCWIN32</code> to 1, in the file
+<code class="computeroutput">bzip2.c</code>, before compiling.
+Otherwise the resulting binary won't work correctly.</p>
+<p>I haven't tried any of this stuff myself, but it all looks
+plausible.</p>
+</div>
+</div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="misc"></a>4. Miscellanea</h1></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl class="toc">
+<dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt>
+<dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt>
+<dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt>
+<dt><span class="sect1"><a href="#package">4.4. Did you get the right package?</a></span></dt>
+<dt><span class="sect1"><a href="#reading">4.5. Further Reading</a></span></dt>
+</dl>
+</div>
+<p>These are just some random thoughts of mine. Your mileage
+may vary.</p>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="limits"></a>4.1. Limitations of the compressed file format</h2></div></div></div>
+<p><code class="computeroutput">bzip2-1.0.X</code>,
+<code class="computeroutput">0.9.5</code> and
+<code class="computeroutput">0.9.0</code> use exactly the same file
+format as the original version,
+<code class="computeroutput">bzip2-0.1</code>. This decision was
+made in the interests of stability. Creating yet another
+incompatible compressed file format would create further
+confusion and disruption for users.</p>
+<p>Nevertheless, this is not a painless decision. Development
+work since the release of
+<code class="computeroutput">bzip2-0.1</code> in August 1997 has
+shown complexities in the file format which slow down
+decompression and, in retrospect, are unnecessary. These
+are:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p>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.</p></li>
+<li class="listitem" style="list-style-type: disc">
+<p>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.</p>
+<p>I could have changed to Sadakane's algorithm, but I find
+ it to be slower than <code class="computeroutput">bzip2</code>'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
+ <code class="computeroutput">bzip2-0.1</code>'s performance on
+ repetitive data, so perhaps it isn't a problem for real
+ inputs.</p>
+<p>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.</p>
+</li>
+<li class="listitem" style="list-style-type: disc"><p>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
+ <code class="computeroutput">decompress.c</code> 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.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>An Adler-32 checksum, rather than a CRC32 checksum,
+ would be faster to compute.</p></li>
+</ul></div>
+<p>It would be fair to say that the
+<code class="computeroutput">bzip2</code> format was frozen before I
+properly and fully understood the performance consequences of
+doing so.</p>
+<p>Improvements which I was able to incorporate into 0.9.0,
+despite using the same file format, are:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc"><p>Single array implementation of the inverse BWT. This
+ significantly speeds up decompression, presumably because it
+ reduces the number of cache misses.</p></li>
+<li class="listitem" style="list-style-type: disc"><p>Faster inverse MTF transform for large MTF values.
+ The new implementation is based on the notion of sliding blocks
+ of values.</p></li>
+<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2-0.9.0</code> now reads
+ and writes files with <code class="computeroutput">fread</code>
+ and <code class="computeroutput">fwrite</code>; version 0.1 used
+ <code class="computeroutput">putc</code> and
+ <code class="computeroutput">getc</code>. Duh! Well, you live
+ and learn.</p></li>
+</ul></div>
+<p>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.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="port-issues"></a>4.2. Portability issues</h2></div></div></div>
+<p>After some consideration, I have decided not to use GNU
+<code class="computeroutput">autoconf</code> to configure 0.9.5 or
+1.0.</p>
+<p><code class="computeroutput">autoconf</code>, admirable and
+wonderful though it is, mainly assists with portability problems
+between Unix-like platforms. But
+<code class="computeroutput">bzip2</code> 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. <code class="computeroutput">autoconf</code> doesn't help
+in those cases, and brings in a whole load of new
+complexity.</p>
+<p>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.</p>
+<p>There are a couple of
+<code class="computeroutput">__inline__</code> directives in the
+code. GNU C (<code class="computeroutput">gcc</code>) 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
+<code class="computeroutput">#define</code>
+<code class="computeroutput">__inline__</code> to be
+<code class="computeroutput">/* */</code>. One easy way to do this
+is to compile with the flag
+<code class="computeroutput">-D__inline__=</code>, which should be
+understood by most Unix compilers.</p>
+<p>If you still have difficulties, try compiling with the
+macro <code class="computeroutput">BZ_STRICT_ANSI</code> 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
+<code class="computeroutput">bzip2</code>'s checks against
+compressing directories, symbolic links, devices, and other
+not-really-a-file entities. This could cause filesystem
+corruption!</p>
+<p>One other thing: if you create a
+<code class="computeroutput">bzip2</code> binary for public distribution,
+please consider linking it statically (<code class="computeroutput">gcc
+-static</code>). This avoids all sorts of library-version
+issues that others may encounter later on.</p>
+<p>If you build <code class="computeroutput">bzip2</code> on
+Win32, you must set <code class="computeroutput">BZ_UNIX</code> to 0
+and <code class="computeroutput">BZ_LCCWIN32</code> to 1, in the
+file <code class="computeroutput">bzip2.c</code>, before compiling.
+Otherwise the resulting binary won't work correctly.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="bugs"></a>4.3. Reporting bugs</h2></div></div></div>
+<p>I tried pretty hard to make sure
+<code class="computeroutput">bzip2</code> is bug free, both by
+design and by testing. Hopefully you'll never need to read this
+section for real.</p>
+<p>Nevertheless, if <code class="computeroutput">bzip2</code> 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.</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
+<li class="listitem" style="list-style-type: disc">
+<p>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
+ <code class="computeroutput">bzip2</code>, and I've run across two
+ such examples myself.</p>
+<p>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
+ <code class="computeroutput">-O2</code>
+ <code class="computeroutput">-fomit-frame-pointer</code>
+ <code class="computeroutput">-fno-strength-reduce</code>. You
+ should specifically <span class="emphasis"><em>not</em></span> use
+ <code class="computeroutput">-funroll-loops</code>.</p>
+<p>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.</p>
+</li>
+<li class="listitem" style="list-style-type: disc">
+<p>If <code class="computeroutput">bzip2</code>
+ crashes randomly, and the crashes are not repeatable, you may
+ have a flaky memory subsystem.
+ <code class="computeroutput">bzip2</code> 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.</p>
+<p>Try using a different machine of the same type, and see
+ if you can repeat the problem.</p>
+</li>
+<li class="listitem" style="list-style-type: disc"><p>This isn't really a bug, but ... If
+ <code class="computeroutput">bzip2</code> 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.</p></li>
+</ul></div>
+<p>If you've incorporated
+<code class="computeroutput">libbzip2</code> 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.</p>
+<p>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:</p>
+<pre class="programlisting">bzip2 crashed with segmentation fault on my machine</pre>
+<p>and absolutely nothing else. Needless to say, a such a
+report is <span class="emphasis"><em>totally, utterly, completely and
+comprehensively 100% useless; a waste of your time, my time, and
+net bandwidth</em></span>. With no details at all, there's no way
+I can possibly begin to figure out what the problem is.</p>
+<p>The rules of the game are: facts, facts, facts. Don't omit
+them because "oh, they won't be relevant". At the bare
+minimum:</p>
+<pre class="programlisting">Machine type. Operating system version.
+Exact version of bzip2 (do bzip2 -V).
+Exact version of the compiler used.
+Flags passed to the compiler.</pre>
+<p>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.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="package"></a>4.4. Did you get the right package?</h2></div></div></div>
+<p><code class="computeroutput">bzip2</code> 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.</p>
+<p>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.</p>
+<p>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, <code class="computeroutput">zlib-1.2.1</code> and
+<code class="computeroutput">gzip-1.2.4</code>. Look for them at
+<a class="ulink" href="http://www.zlib.org" target="_top">http://www.zlib.org</a> and
+<a class="ulink" href="http://www.gzip.org" target="_top">http://www.gzip.org</a>
+respectively.</p>
+<p>For something faster and lighter still, you might try Markus F
+X J Oberhumer's <code class="computeroutput">LZO</code> real-time
+compression/decompression library, at
+<a class="ulink" href="http://www.oberhumer.com/opensource" target="_top">http://www.oberhumer.com/opensource</a>.</p>
+</div>
+<div class="sect1">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="reading"></a>4.5. Further Reading</h2></div></div></div>
+<p><code class="computeroutput">bzip2</code> 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.</p>
+<p>Four documents describe essentially all the ideas behind
+<code class="computeroutput">bzip2</code>:</p>
+<div class="literallayout"><p>Michael Burrows and D. J. Wheeler:<br>
+  "A block-sorting lossless data compression algorithm"<br>
+   10th May 1994. <br>
+   Digital SRC Research Report 124.<br>
+   ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz<br>
+   If you have trouble finding it, try searching at the<br>
+   New Zealand Digital Library, http://www.nzdl.org.<br>
+<br>
+Daniel S. Hirschberg and Debra A. LeLewer<br>
+  "Efficient Decoding of Prefix Codes"<br>
+   Communications of the ACM, April 1990, Vol 33, Number 4.<br>
+   You might be able to get an electronic copy of this<br>
+   from the ACM Digital Library.<br>
+<br>
+David J. Wheeler<br>
+   Program bred3.c and accompanying document bred3.ps.<br>
+   This contains the idea behind the multi-table Huffman coding scheme.<br>
+   ftp://ftp.cl.cam.ac.uk/users/djw3/<br>
+<br>
+Jon L. Bentley and Robert Sedgewick<br>
+  "Fast Algorithms for Sorting and Searching Strings"<br>
+   Available from Sedgewick's web page,<br>
+   www.cs.princeton.edu/~rs<br>
+</p></div>
+<p>The following paper gives valuable additional insights into
+the algorithm, but is not immediately the basis of any code used
+in bzip2.</p>
+<div class="literallayout"><p>Peter Fenwick:<br>
+   Block Sorting Text Compression<br>
+   Proceedings of the 19th Australasian Computer Science Conference,<br>
+     Melbourne, Australia.  Jan 31 - Feb 2, 1996.<br>
+   ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps</p></div>
+<p>Kunihiko Sadakane's sorting algorithm, mentioned above, is
+available from:</p>
+<div class="literallayout"><p>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz<br>
+</p></div>
+<p>The Manber-Myers suffix array construction algorithm is
+described in a paper available from:</p>
+<div class="literallayout"><p>http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps<br>
+</p></div>
+<p>Finally, the following papers document some
+investigations I made into the performance of sorting
+and decompression algorithms:</p>
+<div class="literallayout"><p>Julian Seward<br>
+   On the Performance of BWT Sorting Algorithms<br>
+   Proceedings of the IEEE Data Compression Conference 2000<br>
+     Snowbird, Utah.  28-30 March 2000.<br>
+<br>
+Julian Seward<br>
+   Space-time Tradeoffs in the Inverse B-W Transform<br>
+   Proceedings of the IEEE Data Compression Conference 2001<br>
+     Snowbird, Utah.  27-29 March 2001.<br>
+</p></div>
+</div>
+</div>
+</div></body>
+</html>
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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.pdf
Binary files 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: (<http://www.ams.org>), 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<http://www.ams.org>\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: (<http://www.ams.org>), 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<http://www.ams.org>\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
+(<bzlib.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] 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 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[
+
+<!-- various strings, dates etc. common to all docs -->
+<!ENTITY % common-ents SYSTEM "entities.xml"> %common-ents;
+]>
+
+<book lang="en" id="userman" xreflabel="bzip2 Manual">
+
+ <bookinfo>
+ <title>bzip2 and libbzip2, version &bz-version;</title>
+ <subtitle>A program and library for data compression</subtitle>
+ <copyright>
+ <year>&bz-lifespan;</year>
+ <holder>Julian Seward</holder>
+ </copyright>
+ <releaseinfo>Version &bz-version; of &bz-date;</releaseinfo>
+
+ <authorgroup>
+ <author>
+ <firstname>Julian</firstname>
+ <surname>Seward</surname>
+ <affiliation>
+ <orgname>&bz-url;</orgname>
+ </affiliation>
+ </author>
+ </authorgroup>
+
+ <legalnotice id="legal">
+
+ <para>This program, <computeroutput>bzip2</computeroutput>, the
+ associated library <computeroutput>libbzip2</computeroutput>, and
+ all documentation, are copyright &copy; &bz-lifespan; Julian Seward.
+ All rights reserved.</para>
+
+ <para>Redistribution and use in source and binary forms, with
+ or without modification, are permitted provided that the
+ following conditions are met:</para>
+
+ <itemizedlist mark='bullet'>
+
+ <listitem><para>Redistributions of source code must retain the
+ above copyright notice, this list of conditions and the
+ following disclaimer.</para></listitem>
+
+ <listitem><para>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.</para></listitem>
+
+ <listitem><para>Altered source versions must be plainly marked
+ as such, and must not be misrepresented as being the original
+ software.</para></listitem>
+
+ <listitem><para>The name of the author may not be used to
+ endorse or promote products derived from this software without
+ specific prior written permission.</para></listitem>
+
+ </itemizedlist>
+
+ <para>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.</para>
+
+ <para>PATENTS: To the best of my knowledge,
+ <computeroutput>bzip2</computeroutput> and
+ <computeroutput>libbzip2</computeroutput> 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.
+ </para>
+
+</legalnotice>
+
+</bookinfo>
+
+
+
+<chapter id="intro" xreflabel="Introduction">
+<title>Introduction</title>
+
+<para><computeroutput>bzip2</computeroutput> 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.</para>
+
+<para><computeroutput>bzip2</computeroutput> is built on top of
+<computeroutput>libbzip2</computeroutput>, a flexible library for
+handling compressed data in the
+<computeroutput>bzip2</computeroutput> 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.</para>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para><xref linkend="using"/> describes how to use
+ <computeroutput>bzip2</computeroutput>; this is the only part
+ you need to read if you just want to know how to operate the
+ program.</para></listitem>
+
+ <listitem><para><xref linkend="libprog"/> describes the
+ programming interfaces in detail, and</para></listitem>
+
+ <listitem><para><xref linkend="misc"/> records some
+ miscellaneous notes which I thought ought to be recorded
+ somewhere.</para></listitem>
+
+</itemizedlist>
+
+</chapter>
+
+
+<chapter id="using" xreflabel="How to use bzip2">
+<title>How to use bzip2</title>
+
+<para>This chapter contains a copy of the
+<computeroutput>bzip2</computeroutput> man page, and nothing
+else.</para>
+
+<sect1 id="name" xreflabel="NAME">
+<title>NAME</title>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para><computeroutput>bzip2</computeroutput>,
+ <computeroutput>bunzip2</computeroutput> - a block-sorting file
+ compressor, v&bz-version;</para></listitem>
+
+ <listitem><para><computeroutput>bzcat</computeroutput> -
+ decompresses files to stdout</para></listitem>
+
+ <listitem><para><computeroutput>bzip2recover</computeroutput> -
+ recovers data from damaged bzip2 files</para></listitem>
+
+</itemizedlist>
+
+</sect1>
+
+
+<sect1 id="synopsis" xreflabel="SYNOPSIS">
+<title>SYNOPSIS</title>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para><computeroutput>bzip2</computeroutput> [
+ -cdfkqstvzVL123456789 ] [ filenames ... ]</para></listitem>
+
+ <listitem><para><computeroutput>bunzip2</computeroutput> [
+ -fkvsVL ] [ filenames ... ]</para></listitem>
+
+ <listitem><para><computeroutput>bzcat</computeroutput> [ -s ] [
+ filenames ... ]</para></listitem>
+
+ <listitem><para><computeroutput>bzip2recover</computeroutput>
+ filename</para></listitem>
+
+</itemizedlist>
+
+</sect1>
+
+
+<sect1 id="description" xreflabel="DESCRIPTION">
+<title>DESCRIPTION</title>
+
+<para><computeroutput>bzip2</computeroutput> 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.</para>
+
+<para>The command-line options are deliberately very similar to
+those of GNU <computeroutput>gzip</computeroutput>, but they are
+not identical.</para>
+
+<para><computeroutput>bzip2</computeroutput> 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
+<computeroutput>original_name.bz2</computeroutput>. 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.</para>
+
+<para><computeroutput>bzip2</computeroutput> and
+<computeroutput>bunzip2</computeroutput> will by default not
+overwrite existing files. If you want this to happen, specify
+the <computeroutput>-f</computeroutput> flag.</para>
+
+<para>If no file names are specified,
+<computeroutput>bzip2</computeroutput> compresses from standard
+input to standard output. In this case,
+<computeroutput>bzip2</computeroutput> will decline to write
+compressed output to a terminal, as this would be entirely
+incomprehensible and therefore pointless.</para>
+
+<para><computeroutput>bunzip2</computeroutput> (or
+<computeroutput>bzip2 -d</computeroutput>) decompresses all
+specified files. Files which were not created by
+<computeroutput>bzip2</computeroutput> will be detected and
+ignored, and a warning issued.
+<computeroutput>bzip2</computeroutput> attempts to guess the
+filename for the decompressed file from that of the compressed
+file as follows:</para>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para><computeroutput>filename.bz2 </computeroutput>
+ becomes
+ <computeroutput>filename</computeroutput></para></listitem>
+
+ <listitem><para><computeroutput>filename.bz </computeroutput>
+ becomes
+ <computeroutput>filename</computeroutput></para></listitem>
+
+ <listitem><para><computeroutput>filename.tbz2</computeroutput>
+ becomes
+ <computeroutput>filename.tar</computeroutput></para></listitem>
+
+ <listitem><para><computeroutput>filename.tbz </computeroutput>
+ becomes
+ <computeroutput>filename.tar</computeroutput></para></listitem>
+
+ <listitem><para><computeroutput>anyothername </computeroutput>
+ becomes
+ <computeroutput>anyothername.out</computeroutput></para></listitem>
+
+</itemizedlist>
+
+<para>If the file does not end in one of the recognised endings,
+<computeroutput>.bz2</computeroutput>,
+<computeroutput>.bz</computeroutput>,
+<computeroutput>.tbz2</computeroutput> or
+<computeroutput>.tbz</computeroutput>,
+<computeroutput>bzip2</computeroutput> complains that it cannot
+guess the name of the original file, and uses the original name
+with <computeroutput>.out</computeroutput> appended.</para>
+
+<para>As with compression, supplying no filenames causes
+decompression from standard input to standard output.</para>
+
+<para><computeroutput>bunzip2</computeroutput> 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
+(<computeroutput>-t</computeroutput>) of concatenated compressed
+files is also supported.</para>
+
+<para>You can also compress or decompress files to the standard
+output by giving the <computeroutput>-c</computeroutput> 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
+<computeroutput>bzip2</computeroutput> version 0.9.0 or later.
+Earlier versions of <computeroutput>bzip2</computeroutput> will
+stop after decompressing the first file in the stream.</para>
+
+<para><computeroutput>bzcat</computeroutput> (or
+<computeroutput>bzip2 -dc</computeroutput>) decompresses all
+specified files to the standard output.</para>
+
+<para><computeroutput>bzip2</computeroutput> will read arguments
+from the environment variables
+<computeroutput>BZIP2</computeroutput> and
+<computeroutput>BZIP</computeroutput>, in that order, and will
+process them before any arguments read from the command line.
+This gives a convenient way to supply default arguments.</para>
+
+<para>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%.</para>
+
+<para>As a self-check for your protection,
+<computeroutput>bzip2</computeroutput> 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
+<computeroutput>bzip2</computeroutput> (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
+<computeroutput>bzip2recover</computeroutput> to try to recover
+data from damaged files.</para>
+
+<para>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
+<computeroutput>bzip2</computeroutput> to panic.</para>
+
+</sect1>
+
+
+<sect1 id="options" xreflabel="OPTIONS">
+<title>OPTIONS</title>
+
+<variablelist>
+
+ <varlistentry>
+ <term><computeroutput>-c --stdout</computeroutput></term>
+ <listitem><para>Compress or decompress to standard
+ output.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-d --decompress</computeroutput></term>
+ <listitem><para>Force decompression.
+ <computeroutput>bzip2</computeroutput>,
+ <computeroutput>bunzip2</computeroutput> and
+ <computeroutput>bzcat</computeroutput> 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.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-z --compress</computeroutput></term>
+ <listitem><para>The complement to
+ <computeroutput>-d</computeroutput>: forces compression,
+ regardless of the invokation name.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-t --test</computeroutput></term>
+ <listitem><para>Check integrity of the specified file(s), but
+ don't decompress them. This really performs a trial
+ decompression and throws away the result.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-f --force</computeroutput></term>
+ <listitem><para>Force overwrite of output files. Normally,
+ <computeroutput>bzip2</computeroutput> will not overwrite
+ existing output files. Also forces
+ <computeroutput>bzip2</computeroutput> to break hard links to
+ files, which it otherwise wouldn't do.</para>
+ <para><computeroutput>bzip2</computeroutput> normally declines
+ to decompress files which don't have the correct magic header
+ bytes. If forced (<computeroutput>-f</computeroutput>),
+ however, it will pass such files through unmodified. This is
+ how GNU <computeroutput>gzip</computeroutput> behaves.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-k --keep</computeroutput></term>
+ <listitem><para>Keep (don't delete) input files during
+ compression or decompression.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-s --small</computeroutput></term>
+ <listitem><para>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.</para>
+ <para>During compression, <computeroutput>-s</computeroutput>
+ 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 <computeroutput>-s</computeroutput> for everything. See
+ <xref linkend="memory-management"/> below.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-q --quiet</computeroutput></term>
+ <listitem><para>Suppress non-essential warning messages.
+ Messages pertaining to I/O errors and other critical events
+ will not be suppressed.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-v --verbose</computeroutput></term>
+ <listitem><para>Verbose mode -- show the compression ratio for
+ each file processed. Further
+ <computeroutput>-v</computeroutput>'s increase the verbosity
+ level, spewing out lots of information which is primarily of
+ interest for diagnostic purposes.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-L --license -V --version</computeroutput></term>
+ <listitem><para>Display the software version, license terms and
+ conditions.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>-1</computeroutput> (or
+ <computeroutput>--fast</computeroutput>) to
+ <computeroutput>-9</computeroutput> (or
+ <computeroutput>-best</computeroutput>)</term>
+ <listitem><para>Set the block size to 100 k, 200 k ... 900 k
+ when compressing. Has no effect when decompressing. See <xref
+ linkend="memory-management" /> below. The
+ <computeroutput>--fast</computeroutput> and
+ <computeroutput>--best</computeroutput> aliases are primarily
+ for GNU <computeroutput>gzip</computeroutput> compatibility.
+ In particular, <computeroutput>--fast</computeroutput> doesn't
+ make things significantly faster. And
+ <computeroutput>--best</computeroutput> merely selects the
+ default behaviour.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>--</computeroutput></term>
+ <listitem><para>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:
+ <computeroutput>bzip2 --
+ -myfilename</computeroutput>.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>--repetitive-fast</computeroutput></term>
+ <term><computeroutput>--repetitive-best</computeroutput></term>
+ <listitem><para>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.</para></listitem>
+ </varlistentry>
+
+</variablelist>
+
+</sect1>
+
+
+<sect1 id="memory-management" xreflabel="MEMORY MANAGEMENT">
+<title>MEMORY MANAGEMENT</title>
+
+<para><computeroutput>bzip2</computeroutput> 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 <computeroutput>-1</computeroutput>
+through <computeroutput>-9</computeroutput> 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
+<computeroutput>bunzip2</computeroutput> then allocates itself
+just enough memory to decompress the file. Since block sizes are
+stored in compressed files, it follows that the flags
+<computeroutput>-1</computeroutput> to
+<computeroutput>-9</computeroutput> are irrelevant to and so
+ignored during decompression.</para>
+
+<para>Compression and decompression requirements, in bytes, can be
+estimated as:</para>
+<programlisting>
+Compression: 400k + ( 8 x block size )
+
+Decompression: 100k + ( 4 x block size ), or
+ 100k + ( 2.5 x block size )
+</programlisting>
+
+<para>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 <computeroutput>bzip2</computeroutput> 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.</para>
+
+<para>For files compressed with the default 900k block size,
+<computeroutput>bunzip2</computeroutput> will require about 3700
+kbytes to decompress. To support decompression of any file on a
+4 megabyte machine, <computeroutput>bunzip2</computeroutput> 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 <computeroutput>-s</computeroutput>.</para>
+
+<para>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.</para>
+
+<para>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 <computeroutput>-9</computeroutput> 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.</para>
+
+<para>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.</para>
+
+<programlisting>
+ 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
+</programlisting>
+
+</sect1>
+
+
+<sect1 id="recovering" xreflabel="RECOVERING DATA FROM DAMAGED FILES">
+<title>RECOVERING DATA FROM DAMAGED FILES</title>
+
+<para><computeroutput>bzip2</computeroutput> compresses files in
+blocks, usually 900kbytes long. Each block is handled
+independently. If a media or transmission error causes a
+multi-block <computeroutput>.bz2</computeroutput> file to become
+damaged, it may be possible to recover data from the undamaged
+blocks in the file.</para>
+
+<para>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.</para>
+
+<para><computeroutput>bzip2recover</computeroutput> is a simple
+program whose purpose is to search for blocks in
+<computeroutput>.bz2</computeroutput> files, and write each block
+out into its own <computeroutput>.bz2</computeroutput> file. You
+can then use <computeroutput>bzip2 -t</computeroutput> to test
+the integrity of the resulting files, and decompress those which
+are undamaged.</para>
+
+<para><computeroutput>bzip2recover</computeroutput> takes a
+single argument, the name of the damaged file, and writes a
+number of files <computeroutput>rec0001file.bz2</computeroutput>,
+<computeroutput>rec0002file.bz2</computeroutput>, etc, containing
+the extracted blocks. The output filenames are designed so that
+the use of wildcards in subsequent processing -- for example,
+<computeroutput>bzip2 -dc rec*file.bz2 &#62;
+recovered_data</computeroutput> -- lists the files in the correct
+order.</para>
+
+<para><computeroutput>bzip2recover</computeroutput> should be of
+most use dealing with large <computeroutput>.bz2</computeroutput>
+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.</para>
+
+</sect1>
+
+
+<sect1 id="performance" xreflabel="PERFORMANCE NOTES">
+<title>PERFORMANCE NOTES</title>
+
+<para>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
+<computeroutput>-vvvv</computeroutput> option to monitor progress
+in great detail, if you want.</para>
+
+<para>Decompression speed is unaffected by these
+phenomena.</para>
+
+<para><computeroutput>bzip2</computeroutput> 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
+<computeroutput>bzip2</computeroutput> will perform best on
+machines with very large caches.</para>
+
+</sect1>
+
+
+
+<sect1 id="caveats" xreflabel="CAVEATS">
+<title>CAVEATS</title>
+
+<para>I/O error messages are not as helpful as they could be.
+<computeroutput>bzip2</computeroutput> tries hard to detect I/O
+errors and exit cleanly, but the details of what the problem is
+sometimes seem rather misleading.</para>
+
+<para>This manual page pertains to version &bz-version; of
+<computeroutput>bzip2</computeroutput>. 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.</para>
+
+<para><computeroutput>bzip2recover</computeroutput> 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
+<computeroutput>bzip2recover</computeroutput> 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
+<computeroutput>MaybeUInt64</computeroutput> set to be an
+unsigned 64-bit integer.</para>
+
+</sect1>
+
+
+
+<sect1 id="author" xreflabel="AUTHOR">
+<title>AUTHOR</title>
+
+<para>Julian Seward,
+<computeroutput>&bz-author;</computeroutput></para>
+
+<para>The ideas embodied in
+<computeroutput>bzip2</computeroutput> 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 <computeroutput>bzip</computeroutput>, and many
+refinements), and Alistair Moffat, Radford Neal and Ian Witten
+(for the arithmetic coder in the original
+<computeroutput>bzip</computeroutput>). 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.</para>
+
+</sect1>
+
+</chapter>
+
+
+
+<chapter id="libprog" xreflabel="Programming with libbzip2">
+<title>
+Programming with <computeroutput>libbzip2</computeroutput>
+</title>
+
+<para>This chapter describes the programming interface to
+<computeroutput>libbzip2</computeroutput>.</para>
+
+<para>For general background information, particularly about
+memory use and performance aspects, you'd be well advised to read
+<xref linkend="using"/> as well.</para>
+
+
+<sect1 id="top-level" xreflabel="Top-level structure">
+<title>Top-level structure</title>
+
+<para><computeroutput>libbzip2</computeroutput> is a flexible
+library for compressing and decompressing data in the
+<computeroutput>bzip2</computeroutput> 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.</para>
+
+<para>The structure of
+<computeroutput>libbzip2</computeroutput>'s interfaces is similar
+to that of Jean-loup Gailly's and Mark Adler's excellent
+<computeroutput>zlib</computeroutput> library.</para>
+
+<para>All externally visible symbols have names beginning
+<computeroutput>BZ2_</computeroutput>. This is new in version
+1.0. The intention is to minimise pollution of the namespaces of
+library clients.</para>
+
+<para>To use any part of the library, you need to
+<computeroutput>#include &lt;bzlib.h&gt;</computeroutput>
+into your sources.</para>
+
+
+
+<sect2 id="ll-summary" xreflabel="Low-level summary">
+<title>Low-level summary</title>
+
+<para>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
+<computeroutput>stdio.h</computeroutput>, which may be helpful
+for embedded applications.</para>
+
+<para>The low-level part of the library has no global variables
+and is therefore thread-safe.</para>
+
+<para>Six routines make up the low level interface:
+<computeroutput>BZ2_bzCompressInit</computeroutput>,
+<computeroutput>BZ2_bzCompress</computeroutput>, and
+<computeroutput>BZ2_bzCompressEnd</computeroutput> for
+compression, and a corresponding trio
+<computeroutput>BZ2_bzDecompressInit</computeroutput>,
+<computeroutput>BZ2_bzDecompress</computeroutput> and
+<computeroutput>BZ2_bzDecompressEnd</computeroutput> for
+decompression. The <computeroutput>*Init</computeroutput>
+functions allocate memory for compression/decompression and do
+other initialisations, whilst the
+<computeroutput>*End</computeroutput> functions close down
+operations and release memory.</para>
+
+<para>The real work is done by
+<computeroutput>BZ2_bzCompress</computeroutput> and
+<computeroutput>BZ2_bzDecompress</computeroutput>. 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.</para>
+
+</sect2>
+
+
+<sect2 id="hl-summary" xreflabel="High-level summary">
+<title>High-level summary</title>
+
+<para>This interface provides some handy wrappers around the
+low-level interface to facilitate reading and writing
+<computeroutput>bzip2</computeroutput> format files
+(<computeroutput>.bz2</computeroutput> files). The routines
+provide hooks to facilitate reading files in which the
+<computeroutput>bzip2</computeroutput> data stream is embedded
+within some larger-scale file structure, or where there are
+multiple <computeroutput>bzip2</computeroutput> data streams
+concatenated end-to-end.</para>
+
+<para>For reading files,
+<computeroutput>BZ2_bzReadOpen</computeroutput>,
+<computeroutput>BZ2_bzRead</computeroutput>,
+<computeroutput>BZ2_bzReadClose</computeroutput> and
+<computeroutput>BZ2_bzReadGetUnused</computeroutput> are
+supplied. For writing files,
+<computeroutput>BZ2_bzWriteOpen</computeroutput>,
+<computeroutput>BZ2_bzWrite</computeroutput> and
+<computeroutput>BZ2_bzWriteFinish</computeroutput> are
+available.</para>
+
+<para>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 <computeroutput>errno</computeroutput> to
+determine the cause of the error. In that case, you'd need a C
+library which correctly supports
+<computeroutput>errno</computeroutput> in a multithreaded
+environment.</para>
+
+<para>To make the library a little simpler and more portable,
+<computeroutput>BZ2_bzReadOpen</computeroutput> and
+<computeroutput>BZ2_bzWriteOpen</computeroutput> require you to
+pass them file handles (<computeroutput>FILE*</computeroutput>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.</para>
+
+</sect2>
+
+
+<sect2 id="util-fns-summary" xreflabel="Utility functions summary">
+<title>Utility functions summary</title>
+
+<para>For very simple needs,
+<computeroutput>BZ2_bzBuffToBuffCompress</computeroutput> and
+<computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput> 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.</para>
+
+<para>Yoshioka Tsuneo
+(<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>) has
+contributed some functions to give better
+<computeroutput>zlib</computeroutput> compatibility. These
+functions are <computeroutput>BZ2_bzopen</computeroutput>,
+<computeroutput>BZ2_bzread</computeroutput>,
+<computeroutput>BZ2_bzwrite</computeroutput>,
+<computeroutput>BZ2_bzflush</computeroutput>,
+<computeroutput>BZ2_bzclose</computeroutput>,
+<computeroutput>BZ2_bzerror</computeroutput> and
+<computeroutput>BZ2_bzlibVersion</computeroutput>. 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.</para>
+
+<para>Yoshioka also contributed modifications to allow the
+library to be built as a Windows DLL.</para>
+
+</sect2>
+
+</sect1>
+
+
+<sect1 id="err-handling" xreflabel="Error handling">
+<title>Error handling</title>
+
+<para>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.</para>
+
+<para>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.</para>
+
+<para>The file <computeroutput>bzlib.h</computeroutput> contains
+all definitions needed to use the library. In particular, you
+should definitely not include
+<computeroutput>bzlib_private.h</computeroutput>.</para>
+
+<para>In <computeroutput>bzlib.h</computeroutput>, 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.</para>
+
+<variablelist>
+
+ <varlistentry>
+ <term><computeroutput>BZ_OK</computeroutput></term>
+ <listitem><para>The requested action was completed
+ successfully.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_RUN_OK, BZ_FLUSH_OK,
+ BZ_FINISH_OK</computeroutput></term>
+ <listitem><para>In
+ <computeroutput>BZ2_bzCompress</computeroutput>, the requested
+ flush/finish/nothing-special action was completed
+ successfully.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_STREAM_END</computeroutput></term>
+ <listitem><para>Compression of data was completed, or the
+ logical stream end was detected during
+ decompression.</para></listitem>
+ </varlistentry>
+
+</variablelist>
+
+<para>The following return values indicate an error of some
+kind.</para>
+
+<variablelist>
+
+ <varlistentry>
+ <term><computeroutput>BZ_CONFIG_ERROR</computeroutput></term>
+ <listitem><para>Indicates that the library has been improperly
+ compiled on your platform -- a major configuration error.
+ Specifically, it means that
+ <computeroutput>sizeof(char)</computeroutput>,
+ <computeroutput>sizeof(short)</computeroutput> and
+ <computeroutput>sizeof(int)</computeroutput> 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
+ <computeroutput>sizeof(long)</computeroutput> and
+ <computeroutput>sizeof(void*)</computeroutput> are 8. Under
+ LP64, <computeroutput>sizeof(int)</computeroutput> is still 4,
+ so <computeroutput>libbzip2</computeroutput>, which doesn't
+ use the <computeroutput>long</computeroutput> type, is
+ OK.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_SEQUENCE_ERROR</computeroutput></term>
+ <listitem><para>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.
+ <computeroutput>libbzip2</computeroutput> checks as much as it
+ can to ensure this is happening, and returns
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput> 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.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_PARAM_ERROR</computeroutput></term>
+ <listitem><para>Returned when a parameter to a function call is
+ out of range or otherwise manifestly incorrect. As with
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput>, this
+ denotes a bug in the client code. The distinction between
+ <computeroutput>BZ_PARAM_ERROR</computeroutput> and
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput> is a bit
+ hazy, but still worth making.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_MEM_ERROR</computeroutput></term>
+ <listitem><para>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
+ <computeroutput>BZ2_bzDecompress</computeroutput> and
+ <computeroutput>BZ2_bzRead</computeroutput> may return
+ <computeroutput>BZ_MEM_ERROR</computeroutput> even though some
+ of the compressed data has been read. The same is not true
+ for compression; once
+ <computeroutput>BZ2_bzCompressInit</computeroutput> or
+ <computeroutput>BZ2_bzWriteOpen</computeroutput> have
+ successfully completed,
+ <computeroutput>BZ_MEM_ERROR</computeroutput> cannot
+ occur.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_DATA_ERROR</computeroutput></term>
+ <listitem><para>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.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_DATA_ERROR_MAGIC</computeroutput></term>
+ <listitem><para>As a special case of
+ <computeroutput>BZ_DATA_ERROR</computeroutput>, it is
+ sometimes useful to know when the compressed stream does not
+ start with the correct magic bytes (<computeroutput>'B' 'Z'
+ 'h'</computeroutput>).</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_IO_ERROR</computeroutput></term>
+ <listitem><para>Returned by
+ <computeroutput>BZ2_bzRead</computeroutput> and
+ <computeroutput>BZ2_bzWrite</computeroutput> when there is an
+ error reading or writing in the compressed file, and by
+ <computeroutput>BZ2_bzReadOpen</computeroutput> and
+ <computeroutput>BZ2_bzWriteOpen</computeroutput> for attempts
+ to use a file for which the error indicator (viz,
+ <computeroutput>ferror(f)</computeroutput>) is set. On
+ receipt of <computeroutput>BZ_IO_ERROR</computeroutput>, the
+ caller should consult <computeroutput>errno</computeroutput>
+ and/or <computeroutput>perror</computeroutput> to acquire
+ operating-system specific information about the
+ problem.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_UNEXPECTED_EOF</computeroutput></term>
+ <listitem><para>Returned by
+ <computeroutput>BZ2_bzRead</computeroutput> when the
+ compressed file finishes before the logical end of stream is
+ detected.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><computeroutput>BZ_OUTBUFF_FULL</computeroutput></term>
+ <listitem><para>Returned by
+ <computeroutput>BZ2_bzBuffToBuffCompress</computeroutput> and
+ <computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput> to
+ indicate that the output data will not fit into the output
+ buffer provided.</para></listitem>
+ </varlistentry>
+
+</variablelist>
+
+</sect1>
+
+
+
+<sect1 id="low-level" xreflabel=">Low-level interface">
+<title>Low-level interface</title>
+
+
+<sect2 id="bzcompress-init" xreflabel="BZ2_bzCompressInit">
+<title>BZ2_bzCompressInit</title>
+
+<programlisting>
+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 );
+</programlisting>
+
+<para>Prepares for compression. The
+<computeroutput>bz_stream</computeroutput> structure holds all
+data pertaining to the compression activity. A
+<computeroutput>bz_stream</computeroutput> structure should be
+allocated and initialised prior to the call. The fields of
+<computeroutput>bz_stream</computeroutput> comprise the entirety
+of the user-visible data. <computeroutput>state</computeroutput>
+is a pointer to the private data structures required for
+compression.</para>
+
+<para>Custom memory allocators are supported, via fields
+<computeroutput>bzalloc</computeroutput>,
+<computeroutput>bzfree</computeroutput>, and
+<computeroutput>opaque</computeroutput>. The value
+<computeroutput>opaque</computeroutput> is passed to as the first
+argument to all calls to <computeroutput>bzalloc</computeroutput>
+and <computeroutput>bzfree</computeroutput>, but is otherwise
+ignored by the library. The call <computeroutput>bzalloc (
+opaque, n, m )</computeroutput> is expected to return a pointer
+<computeroutput>p</computeroutput> to <computeroutput>n *
+m</computeroutput> bytes of memory, and <computeroutput>bzfree (
+opaque, p )</computeroutput> should free that memory.</para>
+
+<para>If you don't want to use a custom memory allocator, set
+<computeroutput>bzalloc</computeroutput>,
+<computeroutput>bzfree</computeroutput> and
+<computeroutput>opaque</computeroutput> to
+<computeroutput>NULL</computeroutput>, and the library will then
+use the standard <computeroutput>malloc</computeroutput> /
+<computeroutput>free</computeroutput> routines.</para>
+
+<para>Before calling
+<computeroutput>BZ2_bzCompressInit</computeroutput>, fields
+<computeroutput>bzalloc</computeroutput>,
+<computeroutput>bzfree</computeroutput> and
+<computeroutput>opaque</computeroutput> should be filled
+appropriately, as just described. Upon return, the internal
+state will have been allocated and initialised, and
+<computeroutput>total_in_lo32</computeroutput>,
+<computeroutput>total_in_hi32</computeroutput>,
+<computeroutput>total_out_lo32</computeroutput> and
+<computeroutput>total_out_hi32</computeroutput> 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 <computeroutput>_hi32</computeroutput>
+fields to store the upper 32 bits of the count. So, for example,
+the total amount of data in is <computeroutput>(total_in_hi32
+&#60;&#60; 32) + total_in_lo32</computeroutput>.</para>
+
+<para>Parameter <computeroutput>blockSize100k</computeroutput>
+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.</para>
+
+<para>Parameter <computeroutput>verbosity</computeroutput> 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
+<computeroutput>-DBZ_NO_STDIO</computeroutput>, no such output
+will appear for any verbosity setting.</para>
+
+<para>Parameter <computeroutput>workFactor</computeroutput>
+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.</para>
+
+<para>Lower values of <computeroutput>workFactor</computeroutput>
+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.</para>
+
+<para>Allowable values range from 0 to 250 inclusive. 0 is a
+special case, equivalent to using the default value of 30.</para>
+
+<para>Note that the compressed output generated is the same
+regardless of whether or not the fallback algorithm is
+used.</para>
+
+<para>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.</para>
+
+<para>Possible return values:</para>
+
+<programlisting>
+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
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+BZ2_bzCompress
+ if BZ_OK is returned
+ no specific action needed in case of error
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzCompress" xreflabel="BZ2_bzCompress">
+<title>BZ2_bzCompress</title>
+
+<programlisting>
+int BZ2_bzCompress ( bz_stream *strm, int action );
+</programlisting>
+
+<para>Provides more input and/or output buffer space for the
+library. The caller maintains input and output buffers, and
+calls <computeroutput>BZ2_bzCompress</computeroutput> to transfer
+data between them.</para>
+
+<para>Before each call to
+<computeroutput>BZ2_bzCompress</computeroutput>,
+<computeroutput>next_in</computeroutput> should point at the data
+to be compressed, and <computeroutput>avail_in</computeroutput>
+should indicate how many bytes the library may read.
+<computeroutput>BZ2_bzCompress</computeroutput> updates
+<computeroutput>next_in</computeroutput>,
+<computeroutput>avail_in</computeroutput> and
+<computeroutput>total_in</computeroutput> to reflect the number
+of bytes it has read.</para>
+
+<para>Similarly, <computeroutput>next_out</computeroutput> should
+point to a buffer in which the compressed data is to be placed,
+with <computeroutput>avail_out</computeroutput> indicating how
+much output space is available.
+<computeroutput>BZ2_bzCompress</computeroutput> updates
+<computeroutput>next_out</computeroutput>,
+<computeroutput>avail_out</computeroutput> and
+<computeroutput>total_out</computeroutput> to reflect the number
+of bytes output.</para>
+
+<para>You may provide and remove as little or as much data as you
+like on each call of
+<computeroutput>BZ2_bzCompress</computeroutput>. 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.</para>
+
+<para>A second purpose of
+<computeroutput>BZ2_bzCompress</computeroutput> is to request a
+change of mode of the compressed stream.</para>
+
+<para>Conceptually, a compressed stream can be in one of four
+states: IDLE, RUNNING, FLUSHING and FINISHING. Before
+initialisation
+(<computeroutput>BZ2_bzCompressInit</computeroutput>) and after
+termination (<computeroutput>BZ2_bzCompressEnd</computeroutput>),
+a stream is regarded as IDLE.</para>
+
+<para>Upon initialisation
+(<computeroutput>BZ2_bzCompressInit</computeroutput>), the stream
+is placed in the RUNNING state. Subsequent calls to
+<computeroutput>BZ2_bzCompress</computeroutput> should pass
+<computeroutput>BZ_RUN</computeroutput> as the requested action;
+other actions are illegal and will result in
+<computeroutput>BZ_SEQUENCE_ERROR</computeroutput>.</para>
+
+<para>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,
+<computeroutput>BZ2_bzCompress</computeroutput> will no longer
+attempt to read data from
+<computeroutput>next_in</computeroutput>, but it will want to
+write data to <computeroutput>next_out</computeroutput>. 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
+<computeroutput>BZ2_bzCompress</computeroutput>.</para>
+
+<para>Instead, the calling program passes
+<computeroutput>BZ_FINISH</computeroutput> as an action to
+<computeroutput>BZ2_bzCompress</computeroutput>. This changes
+the stream's state to FINISHING. Any remaining input (ie,
+<computeroutput>next_in[0 .. avail_in-1]</computeroutput>) is
+compressed and transferred to the output buffer. To do this,
+<computeroutput>BZ2_bzCompress</computeroutput> must be called
+repeatedly until all the output has been consumed. At that
+point, <computeroutput>BZ2_bzCompress</computeroutput> returns
+<computeroutput>BZ_STREAM_END</computeroutput>, and the stream's
+state is set back to IDLE.
+<computeroutput>BZ2_bzCompressEnd</computeroutput> should then be
+called.</para>
+
+<para>Just to make sure the calling program does not cheat, the
+library makes a note of <computeroutput>avail_in</computeroutput>
+at the time of the first call to
+<computeroutput>BZ2_bzCompress</computeroutput> which has
+<computeroutput>BZ_FINISH</computeroutput> 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
+<computeroutput>avail_in</computeroutput> over subsequent calls
+to <computeroutput>BZ2_bzCompress</computeroutput>, the library
+can detect any attempts to slip in more data to compress. Any
+calls for which this is detected will return
+<computeroutput>BZ_SEQUENCE_ERROR</computeroutput>. This
+indicates a programming mistake which should be corrected.</para>
+
+<para>Instead of asking to finish, the calling program may ask
+<computeroutput>BZ2_bzCompress</computeroutput> 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 <computeroutput>BZ2_bzCompress</computeroutput>
+with an action of <computeroutput>BZ_FLUSH</computeroutput>,
+remove output data, and persist with the
+<computeroutput>BZ_FLUSH</computeroutput> action until the value
+<computeroutput>BZ_RUN</computeroutput> is returned. As with
+finishing, <computeroutput>BZ2_bzCompress</computeroutput>
+detects any attempt to provide more input data once the flush has
+begun.</para>
+
+<para>Once the flush is complete, the stream returns to the
+normal RUNNING state.</para>
+
+<para>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
+<computeroutput>BZ2_bzCompress</computeroutput>.</para>
+
+<programlisting>
+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
+</programlisting>
+
+
+<para>That still looks complicated? Well, fair enough. The
+usual sequence of calls for compressing a load of data is:</para>
+
+<orderedlist>
+
+ <listitem><para>Get started with
+ <computeroutput>BZ2_bzCompressInit</computeroutput>.</para></listitem>
+
+ <listitem><para>Shovel data in and shlurp out its compressed form
+ using zero or more calls of
+ <computeroutput>BZ2_bzCompress</computeroutput> with action =
+ <computeroutput>BZ_RUN</computeroutput>.</para></listitem>
+
+ <listitem><para>Finish up. Repeatedly call
+ <computeroutput>BZ2_bzCompress</computeroutput> with action =
+ <computeroutput>BZ_FINISH</computeroutput>, copying out the
+ compressed output, until
+ <computeroutput>BZ_STREAM_END</computeroutput> is
+ returned.</para></listitem> <listitem><para>Close up and go home. Call
+ <computeroutput>BZ2_bzCompressEnd</computeroutput>.</para></listitem>
+
+</orderedlist>
+
+<para>If the data you want to compress fits into your input
+buffer all at once, you can skip the calls of
+<computeroutput>BZ2_bzCompress ( ..., BZ_RUN )</computeroutput>
+and just do the <computeroutput>BZ2_bzCompress ( ..., BZ_FINISH
+)</computeroutput> calls.</para>
+
+<para>All required memory is allocated by
+<computeroutput>BZ2_bzCompressInit</computeroutput>. The
+compression library can accept any data at all (obviously). So
+you shouldn't get any error return values from the
+<computeroutput>BZ2_bzCompress</computeroutput> calls. If you
+do, they will be
+<computeroutput>BZ_SEQUENCE_ERROR</computeroutput>, and indicate
+a bug in your programming.</para>
+
+<para>Trivial other possible return values:</para>
+
+<programlisting>
+BZ_PARAM_ERROR
+ if strm is NULL, or strm->s is NULL
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzCompress-end" xreflabel="BZ2_bzCompressEnd">
+<title>BZ2_bzCompressEnd</title>
+
+<programlisting>
+int BZ2_bzCompressEnd ( bz_stream *strm );
+</programlisting>
+
+<para>Releases all memory associated with a compression
+stream.</para>
+
+<para>Possible return values:</para>
+
+<programlisting>
+BZ_PARAM_ERROR if strm is NULL or strm->s is NULL
+BZ_OK otherwise
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzDecompress-init" xreflabel="BZ2_bzDecompressInit">
+<title>BZ2_bzDecompressInit</title>
+
+<programlisting>
+int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );
+</programlisting>
+
+<para>Prepares for decompression. As with
+<computeroutput>BZ2_bzCompressInit</computeroutput>, a
+<computeroutput>bz_stream</computeroutput> record should be
+allocated and initialised before the call. Fields
+<computeroutput>bzalloc</computeroutput>,
+<computeroutput>bzfree</computeroutput> and
+<computeroutput>opaque</computeroutput> should be set if a custom
+memory allocator is required, or made
+<computeroutput>NULL</computeroutput> for the normal
+<computeroutput>malloc</computeroutput> /
+<computeroutput>free</computeroutput> routines. Upon return, the
+internal state will have been initialised, and
+<computeroutput>total_in</computeroutput> and
+<computeroutput>total_out</computeroutput> will be zero.</para>
+
+<para>For the meaning of parameter
+<computeroutput>verbosity</computeroutput>, see
+<computeroutput>BZ2_bzCompressInit</computeroutput>.</para>
+
+<para>If <computeroutput>small</computeroutput> 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 <xref linkend="using"/>
+for more information on memory management.</para>
+
+<para>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
+<computeroutput>BZ2_bzDecompressInit</computeroutput> succeeds, a
+subsequent <computeroutput>BZ2_bzDecompress</computeroutput>
+could fail with
+<computeroutput>BZ_MEM_ERROR</computeroutput>.</para>
+
+<para>Possible return values:</para>
+
+<programlisting>
+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
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+BZ2_bzDecompress
+ if BZ_OK was returned
+ no specific action required in case of error
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzDecompress" xreflabel="BZ2_bzDecompress">
+<title>BZ2_bzDecompress</title>
+
+<programlisting>
+int BZ2_bzDecompress ( bz_stream *strm );
+</programlisting>
+
+<para>Provides more input and/out output buffer space for the
+library. The caller maintains input and output buffers, and uses
+<computeroutput>BZ2_bzDecompress</computeroutput> to transfer
+data between them.</para>
+
+<para>Before each call to
+<computeroutput>BZ2_bzDecompress</computeroutput>,
+<computeroutput>next_in</computeroutput> should point at the
+compressed data, and <computeroutput>avail_in</computeroutput>
+should indicate how many bytes the library may read.
+<computeroutput>BZ2_bzDecompress</computeroutput> updates
+<computeroutput>next_in</computeroutput>,
+<computeroutput>avail_in</computeroutput> and
+<computeroutput>total_in</computeroutput> to reflect the number
+of bytes it has read.</para>
+
+<para>Similarly, <computeroutput>next_out</computeroutput> should
+point to a buffer in which the uncompressed output is to be
+placed, with <computeroutput>avail_out</computeroutput>
+indicating how much output space is available.
+<computeroutput>BZ2_bzCompress</computeroutput> updates
+<computeroutput>next_out</computeroutput>,
+<computeroutput>avail_out</computeroutput> and
+<computeroutput>total_out</computeroutput> to reflect the number
+of bytes output.</para>
+
+<para>You may provide and remove as little or as much data as you
+like on each call of
+<computeroutput>BZ2_bzDecompress</computeroutput>. 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.</para>
+
+<para>Use of <computeroutput>BZ2_bzDecompress</computeroutput> is
+simpler than
+<computeroutput>BZ2_bzCompress</computeroutput>.</para>
+
+<para>You should provide input and remove output as described
+above, and repeatedly call
+<computeroutput>BZ2_bzDecompress</computeroutput> until
+<computeroutput>BZ_STREAM_END</computeroutput> is returned.
+Appearance of <computeroutput>BZ_STREAM_END</computeroutput>
+denotes that <computeroutput>BZ2_bzDecompress</computeroutput>
+has detected the logical end of the compressed stream.
+<computeroutput>BZ2_bzDecompress</computeroutput> will not
+produce <computeroutput>BZ_STREAM_END</computeroutput> until all
+output data has been placed into the output buffer, so once
+<computeroutput>BZ_STREAM_END</computeroutput> appears, you are
+guaranteed to have available all the decompressed output, and
+<computeroutput>BZ2_bzDecompressEnd</computeroutput> can safely
+be called.</para>
+
+<para>If case of an error return value, you should call
+<computeroutput>BZ2_bzDecompressEnd</computeroutput> to clean up
+and release memory.</para>
+
+<para>Possible return values:</para>
+
+<programlisting>
+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
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+BZ2_bzDecompress
+ if BZ_OK was returned
+BZ2_bzDecompressEnd
+ otherwise
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzDecompress-end" xreflabel="BZ2_bzDecompressEnd">
+<title>BZ2_bzDecompressEnd</title>
+
+<programlisting>
+int BZ2_bzDecompressEnd ( bz_stream *strm );
+</programlisting>
+
+<para>Releases all memory associated with a decompression
+stream.</para>
+
+<para>Possible return values:</para>
+
+<programlisting>
+BZ_PARAM_ERROR
+ if strm is NULL or strm->s is NULL
+BZ_OK
+ otherwise
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+ None.
+</programlisting>
+
+</sect2>
+
+</sect1>
+
+
+<sect1 id="hl-interface" xreflabel="High-level interface">
+<title>High-level interface</title>
+
+<para>This interface provides functions for reading and writing
+<computeroutput>bzip2</computeroutput> format files. First, some
+general points.</para>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para>All of the functions take an
+ <computeroutput>int*</computeroutput> first argument,
+ <computeroutput>bzerror</computeroutput>. After each call,
+ <computeroutput>bzerror</computeroutput> should be consulted
+ first to determine the outcome of the call. If
+ <computeroutput>bzerror</computeroutput> is
+ <computeroutput>BZ_OK</computeroutput>, the call completed
+ successfully, and only then should the return value of the
+ function (if any) be consulted. If
+ <computeroutput>bzerror</computeroutput> is
+ <computeroutput>BZ_IO_ERROR</computeroutput>, there was an
+ error reading/writing the underlying compressed file, and you
+ should then consult <computeroutput>errno</computeroutput> /
+ <computeroutput>perror</computeroutput> to determine the cause
+ of the difficulty. <computeroutput>bzerror</computeroutput>
+ may also be set to various other values; precise details are
+ given on a per-function basis below.</para></listitem>
+
+ <listitem><para>If <computeroutput>bzerror</computeroutput> indicates
+ an error (ie, anything except
+ <computeroutput>BZ_OK</computeroutput> and
+ <computeroutput>BZ_STREAM_END</computeroutput>), you should
+ immediately call
+ <computeroutput>BZ2_bzReadClose</computeroutput> (or
+ <computeroutput>BZ2_bzWriteClose</computeroutput>, 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
+ <computeroutput>BZ2_bzReadClose</computeroutput>
+ (<computeroutput>BZ2_bzWriteClose</computeroutput>) is
+ undefined. The implication is that (1)
+ <computeroutput>bzerror</computeroutput> should be checked
+ after each call, and (2) if
+ <computeroutput>bzerror</computeroutput> indicates an error,
+ <computeroutput>BZ2_bzReadClose</computeroutput>
+ (<computeroutput>BZ2_bzWriteClose</computeroutput>) should then
+ be called to clean up.</para></listitem>
+
+ <listitem><para>The <computeroutput>FILE*</computeroutput> arguments
+ passed to <computeroutput>BZ2_bzReadOpen</computeroutput> /
+ <computeroutput>BZ2_bzWriteOpen</computeroutput> 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.</para></listitem>
+
+ <listitem><para>Memory allocation requests are handled by
+ <computeroutput>malloc</computeroutput> /
+ <computeroutput>free</computeroutput>. At present there is no
+ facility for user-defined memory allocators in the file I/O
+ functions (could easily be added, though).</para></listitem>
+
+</itemizedlist>
+
+
+
+<sect2 id="bzreadopen" xreflabel="BZ2_bzReadOpen">
+<title>BZ2_bzReadOpen</title>
+
+<programlisting>
+typedef void BZFILE;
+
+BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f,
+ int verbosity, int small,
+ void *unused, int nUnused );
+</programlisting>
+
+<para>Prepare to read compressed data from file handle
+<computeroutput>f</computeroutput>.
+<computeroutput>f</computeroutput> should refer to a file which
+has been opened for reading, and for which the error indicator
+(<computeroutput>ferror(f)</computeroutput>)is not set. If
+<computeroutput>small</computeroutput> is 1, the library will try
+to decompress using less memory, at the expense of speed.</para>
+
+<para>For reasons explained below,
+<computeroutput>BZ2_bzRead</computeroutput> will decompress the
+<computeroutput>nUnused</computeroutput> bytes starting at
+<computeroutput>unused</computeroutput>, before starting to read
+from the file <computeroutput>f</computeroutput>. At most
+<computeroutput>BZ_MAX_UNUSED</computeroutput> bytes may be
+supplied like this. If this facility is not required, you should
+pass <computeroutput>NULL</computeroutput> and
+<computeroutput>0</computeroutput> for
+<computeroutput>unused</computeroutput> and
+n<computeroutput>Unused</computeroutput> respectively.</para>
+
+<para>For the meaning of parameters
+<computeroutput>small</computeroutput> and
+<computeroutput>verbosity</computeroutput>, see
+<computeroutput>BZ2_bzDecompressInit</computeroutput>.</para>
+
+<para>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 <computeroutput>BZ2_bzReadOpen</computeroutput>
+returns <computeroutput>BZ_OK</computeroutput> but a subsequent
+call of <computeroutput>BZ2_bzRead</computeroutput> will return
+<computeroutput>BZ_MEM_ERROR</computeroutput>.</para>
+
+<para>Possible assignments to
+<computeroutput>bzerror</computeroutput>:</para>
+
+<programlisting>
+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.
+</programlisting>
+
+<para>Possible return values:</para>
+
+<programlisting>
+Pointer to an abstract BZFILE
+ if bzerror is BZ_OK
+NULL
+ otherwise
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+BZ2_bzRead
+ if bzerror is BZ_OK
+BZ2_bzClose
+ otherwise
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzread" xreflabel="BZ2_bzRead">
+<title>BZ2_bzRead</title>
+
+<programlisting>
+int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );
+</programlisting>
+
+<para>Reads up to <computeroutput>len</computeroutput>
+(uncompressed) bytes from the compressed file
+<computeroutput>b</computeroutput> into the buffer
+<computeroutput>buf</computeroutput>. If the read was
+successful, <computeroutput>bzerror</computeroutput> is set to
+<computeroutput>BZ_OK</computeroutput> and the number of bytes
+read is returned. If the logical end-of-stream was detected,
+<computeroutput>bzerror</computeroutput> will be set to
+<computeroutput>BZ_STREAM_END</computeroutput>, and the number of
+bytes read is returned. All other
+<computeroutput>bzerror</computeroutput> values denote an
+error.</para>
+
+<para><computeroutput>BZ2_bzRead</computeroutput> will supply
+<computeroutput>len</computeroutput> 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 <computeroutput>bzerror</computeroutput> after every call
+and watch out for
+<computeroutput>BZ_STREAM_END</computeroutput>.</para>
+
+<para>Internally, <computeroutput>BZ2_bzRead</computeroutput>
+copies data from the compressed file in chunks of size
+<computeroutput>BZ_MAX_UNUSED</computeroutput> bytes before
+decompressing it. If the file contains more bytes than strictly
+needed to reach the logical end-of-stream,
+<computeroutput>BZ2_bzRead</computeroutput> will almost certainly
+read some of the trailing data before signalling
+<computeroutput>BZ_SEQUENCE_END</computeroutput>. To collect the
+read but unused data once
+<computeroutput>BZ_SEQUENCE_END</computeroutput> has appeared,
+call <computeroutput>BZ2_bzReadGetUnused</computeroutput>
+immediately before
+<computeroutput>BZ2_bzReadClose</computeroutput>.</para>
+
+<para>Possible assignments to
+<computeroutput>bzerror</computeroutput>:</para>
+
+<programlisting>
+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.
+</programlisting>
+
+<para>Possible return values:</para>
+
+<programlisting>
+number of bytes read
+ if bzerror is BZ_OK or BZ_STREAM_END
+undefined
+ otherwise
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+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
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzreadgetunused" xreflabel="BZ2_bzReadGetUnused">
+<title>BZ2_bzReadGetUnused</title>
+
+<programlisting>
+void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b,
+ void** unused, int* nUnused );
+</programlisting>
+
+<para>Returns data which was read from the compressed file but
+was not needed to get to the logical end-of-stream.
+<computeroutput>*unused</computeroutput> is set to the address of
+the data, and <computeroutput>*nUnused</computeroutput> to the
+number of bytes. <computeroutput>*nUnused</computeroutput> will
+be set to a value between <computeroutput>0</computeroutput> and
+<computeroutput>BZ_MAX_UNUSED</computeroutput> inclusive.</para>
+
+<para>This function may only be called once
+<computeroutput>BZ2_bzRead</computeroutput> has signalled
+<computeroutput>BZ_STREAM_END</computeroutput> but before
+<computeroutput>BZ2_bzReadClose</computeroutput>.</para>
+
+<para>Possible assignments to
+<computeroutput>bzerror</computeroutput>:</para>
+
+<programlisting>
+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
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+BZ2_bzReadClose
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzreadclose" xreflabel="BZ2_bzReadClose">
+<title>BZ2_bzReadClose</title>
+
+<programlisting>
+void BZ2_bzReadClose ( int *bzerror, BZFILE *b );
+</programlisting>
+
+<para>Releases all memory pertaining to the compressed file
+<computeroutput>b</computeroutput>.
+<computeroutput>BZ2_bzReadClose</computeroutput> does not call
+<computeroutput>fclose</computeroutput> on the underlying file
+handle, so you should do that yourself if appropriate.
+<computeroutput>BZ2_bzReadClose</computeroutput> should be called
+to clean up after all error situations.</para>
+
+<para>Possible assignments to
+<computeroutput>bzerror</computeroutput>:</para>
+
+<programlisting>
+BZ_SEQUENCE_ERROR
+ if b was opened with BZ2_bzOpenWrite
+BZ_OK
+ otherwise
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+none
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzwriteopen" xreflabel="BZ2_bzWriteOpen">
+<title>BZ2_bzWriteOpen</title>
+
+<programlisting>
+BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f,
+ int blockSize100k, int verbosity,
+ int workFactor );
+</programlisting>
+
+<para>Prepare to write compressed data to file handle
+<computeroutput>f</computeroutput>.
+<computeroutput>f</computeroutput> should refer to a file which
+has been opened for writing, and for which the error indicator
+(<computeroutput>ferror(f)</computeroutput>)is not set.</para>
+
+<para>For the meaning of parameters
+<computeroutput>blockSize100k</computeroutput>,
+<computeroutput>verbosity</computeroutput> and
+<computeroutput>workFactor</computeroutput>, see
+<computeroutput>BZ2_bzCompressInit</computeroutput>.</para>
+
+<para>All required memory is allocated at this stage, so if the
+call completes successfully,
+<computeroutput>BZ_MEM_ERROR</computeroutput> cannot be signalled
+by a subsequent call to
+<computeroutput>BZ2_bzWrite</computeroutput>.</para>
+
+<para>Possible assignments to
+<computeroutput>bzerror</computeroutput>:</para>
+
+<programlisting>
+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
+</programlisting>
+
+<para>Possible return values:</para>
+
+<programlisting>
+Pointer to an abstract BZFILE
+ if bzerror is BZ_OK
+NULL
+ otherwise
+</programlisting>
+
+<para>Allowable next actions:</para>
+
+<programlisting>
+BZ2_bzWrite
+ if bzerror is BZ_OK
+ (you could go directly to BZ2_bzWriteClose, but this would be pretty pointless)
+BZ2_bzWriteClose
+ otherwise
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzwrite" xreflabel="BZ2_bzWrite">
+<title>BZ2_bzWrite</title>
+
+<programlisting>
+void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );
+</programlisting>
+
+<para>Absorbs <computeroutput>len</computeroutput> bytes from the
+buffer <computeroutput>buf</computeroutput>, eventually to be
+compressed and written to the file.</para>
+
+<para>Possible assignments to
+<computeroutput>bzerror</computeroutput>:</para>
+
+<programlisting>
+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
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzwriteclose" xreflabel="BZ2_bzWriteClose">
+<title>BZ2_bzWriteClose</title>
+
+<programlisting>
+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 );
+</programlisting>
+
+<para>Compresses and flushes to the compressed file all data so
+far supplied by <computeroutput>BZ2_bzWrite</computeroutput>.
+The logical end-of-stream markers are also written, so subsequent
+calls to <computeroutput>BZ2_bzWrite</computeroutput> are
+illegal. All memory associated with the compressed file
+<computeroutput>b</computeroutput> is released.
+<computeroutput>fflush</computeroutput> is called on the
+compressed file, but it is not
+<computeroutput>fclose</computeroutput>'d.</para>
+
+<para>If <computeroutput>BZ2_bzWriteClose</computeroutput> 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
+<computeroutput>fflush</computeroutput> the compressed file. You
+can force this behaviour to happen even in the case of no error,
+by passing a nonzero value to
+<computeroutput>abandon</computeroutput>.</para>
+
+<para>If <computeroutput>nbytes_in</computeroutput> is non-null,
+<computeroutput>*nbytes_in</computeroutput> will be set to be the
+total volume of uncompressed data handled. Similarly,
+<computeroutput>nbytes_out</computeroutput> will be set to the
+total volume of compressed data written. For compatibility with
+older versions of the library,
+<computeroutput>BZ2_bzWriteClose</computeroutput> only yields the
+lower 32 bits of these counts. Use
+<computeroutput>BZ2_bzWriteClose64</computeroutput> if you want
+the full 64 bit counts. These two functions are otherwise
+absolutely identical.</para>
+
+<para>Possible assignments to
+<computeroutput>bzerror</computeroutput>:</para>
+
+<programlisting>
+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
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="embed" xreflabel="Handling embedded compressed data streams">
+<title>Handling embedded compressed data streams</title>
+
+<para>The high-level library facilitates use of
+<computeroutput>bzip2</computeroutput> data streams which form
+some part of a surrounding, larger data stream.</para>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para>For writing, the library takes an open file handle,
+ writes compressed data to it,
+ <computeroutput>fflush</computeroutput>es it but does not
+ <computeroutput>fclose</computeroutput> it. The calling
+ application can write its own data before and after the
+ compressed data stream, using that same file handle.</para></listitem>
+
+ <listitem><para>Reading is more complex, and the facilities are not as
+ general as they could be since generality is hard to reconcile
+ with efficiency. <computeroutput>BZ2_bzRead</computeroutput>
+ reads from the compressed file in blocks of size
+ <computeroutput>BZ_MAX_UNUSED</computeroutput> bytes, and in
+ doing so probably will overshoot the logical end of compressed
+ stream. To recover this data once decompression has ended,
+ call <computeroutput>BZ2_bzReadGetUnused</computeroutput> after
+ the last call of <computeroutput>BZ2_bzRead</computeroutput>
+ (the one returning
+ <computeroutput>BZ_STREAM_END</computeroutput>) but before
+ calling
+ <computeroutput>BZ2_bzReadClose</computeroutput>.</para></listitem>
+
+</itemizedlist>
+
+<para>This mechanism makes it easy to decompress multiple
+<computeroutput>bzip2</computeroutput> streams placed end-to-end.
+As the end of one stream, when
+<computeroutput>BZ2_bzRead</computeroutput> returns
+<computeroutput>BZ_STREAM_END</computeroutput>, call
+<computeroutput>BZ2_bzReadGetUnused</computeroutput> 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
+<computeroutput>BZ2_bzReadOpen</computeroutput> again, feeding in
+the unused data via the <computeroutput>unused</computeroutput> /
+<computeroutput>nUnused</computeroutput> parameters. Keep doing
+this until <computeroutput>BZ_STREAM_END</computeroutput> return
+coincides with the physical end of file
+(<computeroutput>feof(f)</computeroutput>). In this situation
+<computeroutput>BZ2_bzReadGetUnused</computeroutput> will of
+course return no data.</para>
+
+<para>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.</para>
+
+</sect2>
+
+
+<sect2 id="std-rdwr" xreflabel="Standard file-reading/writing code">
+<title>Standard file-reading/writing code</title>
+
+<para>Here's how you'd write data to a compressed file:</para>
+
+<programlisting>
+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 */
+}
+</programlisting>
+
+<para>And to read from a compressed file:</para>
+
+<programlisting>
+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 );
+}
+</programlisting>
+
+</sect2>
+
+</sect1>
+
+
+<sect1 id="util-fns" xreflabel="Utility functions">
+<title>Utility functions</title>
+
+
+<sect2 id="bzbufftobuffcompress" xreflabel="BZ2_bzBuffToBuffCompress">
+<title>BZ2_bzBuffToBuffCompress</title>
+
+<programlisting>
+int BZ2_bzBuffToBuffCompress( char* dest,
+ unsigned int* destLen,
+ char* source,
+ unsigned int sourceLen,
+ int blockSize100k,
+ int verbosity,
+ int workFactor );
+</programlisting>
+
+<para>Attempts to compress the data in <computeroutput>source[0
+.. sourceLen-1]</computeroutput> into the destination buffer,
+<computeroutput>dest[0 .. *destLen-1]</computeroutput>. If the
+destination buffer is big enough,
+<computeroutput>*destLen</computeroutput> is set to the size of
+the compressed data, and <computeroutput>BZ_OK</computeroutput>
+is returned. If the compressed data won't fit,
+<computeroutput>*destLen</computeroutput> is unchanged, and
+<computeroutput>BZ_OUTBUFF_FULL</computeroutput> is
+returned.</para>
+
+<para>Compression in this manner is a one-shot event, done with a
+single call to this function. The resulting compressed data is a
+complete <computeroutput>bzip2</computeroutput> 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.</para>
+
+<para>For the meaning of parameters
+<computeroutput>blockSize100k</computeroutput>,
+<computeroutput>verbosity</computeroutput> and
+<computeroutput>workFactor</computeroutput>, see
+<computeroutput>BZ2_bzCompressInit</computeroutput>.</para>
+
+<para>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.</para>
+
+<para><computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput>
+will not write data at or beyond
+<computeroutput>dest[*destLen]</computeroutput>, even in case of
+buffer overflow.</para>
+
+<para>Possible return values:</para>
+
+<programlisting>
+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
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="bzbufftobuffdecompress" xreflabel="BZ2_bzBuffToBuffDecompress">
+<title>BZ2_bzBuffToBuffDecompress</title>
+
+<programlisting>
+int BZ2_bzBuffToBuffDecompress( char* dest,
+ unsigned int* destLen,
+ char* source,
+ unsigned int sourceLen,
+ int small,
+ int verbosity );
+</programlisting>
+
+<para>Attempts to decompress the data in <computeroutput>source[0
+.. sourceLen-1]</computeroutput> into the destination buffer,
+<computeroutput>dest[0 .. *destLen-1]</computeroutput>. If the
+destination buffer is big enough,
+<computeroutput>*destLen</computeroutput> is set to the size of
+the uncompressed data, and <computeroutput>BZ_OK</computeroutput>
+is returned. If the compressed data won't fit,
+<computeroutput>*destLen</computeroutput> is unchanged, and
+<computeroutput>BZ_OUTBUFF_FULL</computeroutput> is
+returned.</para>
+
+<para><computeroutput>source</computeroutput> is assumed to hold
+a complete <computeroutput>bzip2</computeroutput> format data
+stream.
+<computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput> tries
+to decompress the entirety of the stream into the output
+buffer.</para>
+
+<para>For the meaning of parameters
+<computeroutput>small</computeroutput> and
+<computeroutput>verbosity</computeroutput>, see
+<computeroutput>BZ2_bzDecompressInit</computeroutput>.</para>
+
+<para>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.</para>
+
+<para><computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput>
+will not write data at or beyond
+<computeroutput>dest[*destLen]</computeroutput>, even in case of
+buffer overflow.</para>
+
+<para>Possible return values:</para>
+
+<programlisting>
+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
+</programlisting>
+
+</sect2>
+
+</sect1>
+
+
+<sect1 id="zlib-compat" xreflabel="zlib compatibility functions">
+<title>zlib compatibility functions</title>
+
+<para>Yoshioka Tsuneo has contributed some functions to give
+better <computeroutput>zlib</computeroutput> compatibility.
+These functions are <computeroutput>BZ2_bzopen</computeroutput>,
+<computeroutput>BZ2_bzread</computeroutput>,
+<computeroutput>BZ2_bzwrite</computeroutput>,
+<computeroutput>BZ2_bzflush</computeroutput>,
+<computeroutput>BZ2_bzclose</computeroutput>,
+<computeroutput>BZ2_bzerror</computeroutput> and
+<computeroutput>BZ2_bzlibVersion</computeroutput>. 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.</para>
+
+<programlisting>
+typedef void BZFILE;
+
+const char * BZ2_bzlibVersion ( void );
+</programlisting>
+
+<para>Returns a string indicating the library version.</para>
+
+<programlisting>
+BZFILE * BZ2_bzopen ( const char *path, const char *mode );
+BZFILE * BZ2_bzdopen ( int fd, const char *mode );
+</programlisting>
+
+<para>Opens a <computeroutput>.bz2</computeroutput> file for
+reading or writing, using either its name or a pre-existing file
+descriptor. Analogous to <computeroutput>fopen</computeroutput>
+and <computeroutput>fdopen</computeroutput>.</para>
+
+<programlisting>
+int BZ2_bzread ( BZFILE* b, void* buf, int len );
+int BZ2_bzwrite ( BZFILE* b, void* buf, int len );
+</programlisting>
+
+<para>Reads/writes data from/to a previously opened
+<computeroutput>BZFILE</computeroutput>. Analogous to
+<computeroutput>fread</computeroutput> and
+<computeroutput>fwrite</computeroutput>.</para>
+
+<programlisting>
+int BZ2_bzflush ( BZFILE* b );
+void BZ2_bzclose ( BZFILE* b );
+</programlisting>
+
+<para>Flushes/closes a <computeroutput>BZFILE</computeroutput>.
+<computeroutput>BZ2_bzflush</computeroutput> doesn't actually do
+anything. Analogous to <computeroutput>fflush</computeroutput>
+and <computeroutput>fclose</computeroutput>.</para>
+
+<programlisting>
+const char * BZ2_bzerror ( BZFILE *b, int *errnum )
+</programlisting>
+
+<para>Returns a string describing the more recent error status of
+<computeroutput>b</computeroutput>, and also sets
+<computeroutput>*errnum</computeroutput> to its numerical
+value.</para>
+
+</sect1>
+
+
+<sect1 id="stdio-free"
+ xreflabel="Using the library in a stdio-free environment">
+<title>Using the library in a stdio-free environment</title>
+
+
+<sect2 id="stdio-bye" xreflabel="Getting rid of stdio">
+<title>Getting rid of stdio</title>
+
+<para>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
+<computeroutput>BZ_NO_STDIO</computeroutput> defined. Doing this
+gives you a library containing only the following eight
+functions:</para>
+
+<para><computeroutput>BZ2_bzCompressInit</computeroutput>,
+<computeroutput>BZ2_bzCompress</computeroutput>,
+<computeroutput>BZ2_bzCompressEnd</computeroutput>
+<computeroutput>BZ2_bzDecompressInit</computeroutput>,
+<computeroutput>BZ2_bzDecompress</computeroutput>,
+<computeroutput>BZ2_bzDecompressEnd</computeroutput>
+<computeroutput>BZ2_bzBuffToBuffCompress</computeroutput>,
+<computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput></para>
+
+<para>When compiled like this, all functions will ignore
+<computeroutput>verbosity</computeroutput> settings.</para>
+
+</sect2>
+
+
+<sect2 id="critical-error" xreflabel="Critical error handling">
+<title>Critical error handling</title>
+
+<para><computeroutput>libbzip2</computeroutput> 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
+<computeroutput>BZ_NO_STDIO</computeroutput> set.</para>
+
+<para>For a normal compile, an assertion failure yields the
+message:</para>
+
+<blockquote>
+<para>bzip2/libbzip2: internal error number N.</para>
+<para>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.
+</para></blockquote>
+
+<para>where <computeroutput>N</computeroutput> is some error code
+number. If <computeroutput>N == 1007</computeroutput>, 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).</para>
+
+<para><computeroutput>exit(3)</computeroutput> is then
+called.</para>
+
+<para>For a <computeroutput>stdio</computeroutput>-free library,
+assertion failures result in a call to a function declared
+as:</para>
+
+<programlisting>
+extern void bz_internal_error ( int errcode );
+</programlisting>
+
+<para>The relevant code is passed as a parameter. You should
+supply such a function.</para>
+
+<para>In either case, once an assertion failure has occurred, any
+<computeroutput>bz_stream</computeroutput> records involved can
+be regarded as invalid. You should not attempt to resume normal
+operation with them.</para>
+
+<para>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.</para>
+
+</sect2>
+
+</sect1>
+
+
+<sect1 id="win-dll" xreflabel="Making a Windows DLL">
+<title>Making a Windows DLL</title>
+
+<para>Everything related to Windows has been contributed by
+Yoshioka Tsuneo
+(<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>), so
+you should send your queries to him (but please Cc:
+<computeroutput>&bz-email;</computeroutput>).</para>
+
+<para>My vague understanding of what to do is: using Visual C++
+5.0, open the project file
+<computeroutput>libbz2.dsp</computeroutput>, and build. That's
+all.</para>
+
+<para>If you can't open the project file for some reason, make a
+new one, naming these files:
+<computeroutput>blocksort.c</computeroutput>,
+<computeroutput>bzlib.c</computeroutput>,
+<computeroutput>compress.c</computeroutput>,
+<computeroutput>crctable.c</computeroutput>,
+<computeroutput>decompress.c</computeroutput>,
+<computeroutput>huffman.c</computeroutput>,
+<computeroutput>randtable.c</computeroutput> and
+<computeroutput>libbz2.def</computeroutput>. You will also need
+to name the header files <computeroutput>bzlib.h</computeroutput>
+and <computeroutput>bzlib_private.h</computeroutput>.</para>
+
+<para>If you don't use VC++, you may need to define the
+proprocessor symbol
+<computeroutput>_WIN32</computeroutput>.</para>
+
+<para>Finally, <computeroutput>dlltest.c</computeroutput> is a
+sample program using the DLL. It has a project file,
+<computeroutput>dlltest.dsp</computeroutput>.</para>
+
+<para>If you just want a makefile for Visual C, have a look at
+<computeroutput>makefile.msc</computeroutput>.</para>
+
+<para>Be aware that if you compile
+<computeroutput>bzip2</computeroutput> itself on Win32, you must
+set <computeroutput>BZ_UNIX</computeroutput> to 0 and
+<computeroutput>BZ_LCCWIN32</computeroutput> to 1, in the file
+<computeroutput>bzip2.c</computeroutput>, before compiling.
+Otherwise the resulting binary won't work correctly.</para>
+
+<para>I haven't tried any of this stuff myself, but it all looks
+plausible.</para>
+
+</sect1>
+
+</chapter>
+
+
+
+<chapter id="misc" xreflabel="Miscellanea">
+<title>Miscellanea</title>
+
+<para>These are just some random thoughts of mine. Your mileage
+may vary.</para>
+
+
+<sect1 id="limits" xreflabel="Limitations of the compressed file format">
+<title>Limitations of the compressed file format</title>
+
+<para><computeroutput>bzip2-1.0.X</computeroutput>,
+<computeroutput>0.9.5</computeroutput> and
+<computeroutput>0.9.0</computeroutput> use exactly the same file
+format as the original version,
+<computeroutput>bzip2-0.1</computeroutput>. This decision was
+made in the interests of stability. Creating yet another
+incompatible compressed file format would create further
+confusion and disruption for users.</para>
+
+<para>Nevertheless, this is not a painless decision. Development
+work since the release of
+<computeroutput>bzip2-0.1</computeroutput> in August 1997 has
+shown complexities in the file format which slow down
+decompression and, in retrospect, are unnecessary. These
+are:</para>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para>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.</para></listitem>
+
+ <listitem><para>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.</para>
+
+ <para>I could have changed to Sadakane's algorithm, but I find
+ it to be slower than <computeroutput>bzip2</computeroutput>'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
+ <computeroutput>bzip2-0.1</computeroutput>'s performance on
+ repetitive data, so perhaps it isn't a problem for real
+ inputs.</para>
+
+ <para>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.</para></listitem>
+
+ <listitem><para>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
+ <computeroutput>decompress.c</computeroutput> 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.</para></listitem>
+
+ <listitem><para>An Adler-32 checksum, rather than a CRC32 checksum,
+ would be faster to compute.</para></listitem>
+
+</itemizedlist>
+
+<para>It would be fair to say that the
+<computeroutput>bzip2</computeroutput> format was frozen before I
+properly and fully understood the performance consequences of
+doing so.</para>
+
+<para>Improvements which I was able to incorporate into 0.9.0,
+despite using the same file format, are:</para>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para>Single array implementation of the inverse BWT. This
+ significantly speeds up decompression, presumably because it
+ reduces the number of cache misses.</para></listitem>
+
+ <listitem><para>Faster inverse MTF transform for large MTF values.
+ The new implementation is based on the notion of sliding blocks
+ of values.</para></listitem>
+
+ <listitem><para><computeroutput>bzip2-0.9.0</computeroutput> now reads
+ and writes files with <computeroutput>fread</computeroutput>
+ and <computeroutput>fwrite</computeroutput>; version 0.1 used
+ <computeroutput>putc</computeroutput> and
+ <computeroutput>getc</computeroutput>. Duh! Well, you live
+ and learn.</para></listitem>
+
+</itemizedlist>
+
+<para>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.</para>
+
+</sect1>
+
+
+<sect1 id="port-issues" xreflabel="Portability issues">
+<title>Portability issues</title>
+
+<para>After some consideration, I have decided not to use GNU
+<computeroutput>autoconf</computeroutput> to configure 0.9.5 or
+1.0.</para>
+
+<para><computeroutput>autoconf</computeroutput>, admirable and
+wonderful though it is, mainly assists with portability problems
+between Unix-like platforms. But
+<computeroutput>bzip2</computeroutput> 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. <computeroutput>autoconf</computeroutput> doesn't help
+in those cases, and brings in a whole load of new
+complexity.</para>
+
+<para>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.</para>
+
+<para>There are a couple of
+<computeroutput>__inline__</computeroutput> directives in the
+code. GNU C (<computeroutput>gcc</computeroutput>) 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
+<computeroutput>#define</computeroutput>
+<computeroutput>__inline__</computeroutput> to be
+<computeroutput>/* */</computeroutput>. One easy way to do this
+is to compile with the flag
+<computeroutput>-D__inline__=</computeroutput>, which should be
+understood by most Unix compilers.</para>
+
+<para>If you still have difficulties, try compiling with the
+macro <computeroutput>BZ_STRICT_ANSI</computeroutput> 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
+<computeroutput>bzip2</computeroutput>'s checks against
+compressing directories, symbolic links, devices, and other
+not-really-a-file entities. This could cause filesystem
+corruption!</para>
+
+<para>One other thing: if you create a
+<computeroutput>bzip2</computeroutput> binary for public distribution,
+please consider linking it statically (<computeroutput>gcc
+-static</computeroutput>). This avoids all sorts of library-version
+issues that others may encounter later on.</para>
+
+<para>If you build <computeroutput>bzip2</computeroutput> on
+Win32, you must set <computeroutput>BZ_UNIX</computeroutput> to 0
+and <computeroutput>BZ_LCCWIN32</computeroutput> to 1, in the
+file <computeroutput>bzip2.c</computeroutput>, before compiling.
+Otherwise the resulting binary won't work correctly.</para>
+
+</sect1>
+
+
+<sect1 id="bugs" xreflabel="Reporting bugs">
+<title>Reporting bugs</title>
+
+<para>I tried pretty hard to make sure
+<computeroutput>bzip2</computeroutput> is bug free, both by
+design and by testing. Hopefully you'll never need to read this
+section for real.</para>
+
+<para>Nevertheless, if <computeroutput>bzip2</computeroutput> 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.</para>
+
+<itemizedlist mark='bullet'>
+
+ <listitem><para>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
+ <computeroutput>bzip2</computeroutput>, and I've run across two
+ such examples myself.</para>
+
+ <para>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
+ <computeroutput>-O2</computeroutput>
+ <computeroutput>-fomit-frame-pointer</computeroutput>
+ <computeroutput>-fno-strength-reduce</computeroutput>. You
+ should specifically <emphasis>not</emphasis> use
+ <computeroutput>-funroll-loops</computeroutput>.</para>
+
+ <para>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.</para></listitem>
+
+ <listitem><para>If <computeroutput>bzip2</computeroutput>
+ crashes randomly, and the crashes are not repeatable, you may
+ have a flaky memory subsystem.
+ <computeroutput>bzip2</computeroutput> 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.</para>
+
+ <para>Try using a different machine of the same type, and see
+ if you can repeat the problem.</para></listitem>
+
+ <listitem><para>This isn't really a bug, but ... If
+ <computeroutput>bzip2</computeroutput> 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.</para></listitem>
+
+</itemizedlist>
+
+<para>If you've incorporated
+<computeroutput>libbzip2</computeroutput> 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.</para>
+
+<para>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:</para>
+
+<programlisting>
+bzip2 crashed with segmentation fault on my machine
+</programlisting>
+
+<para>and absolutely nothing else. Needless to say, a such a
+report is <emphasis>totally, utterly, completely and
+comprehensively 100% useless; a waste of your time, my time, and
+net bandwidth</emphasis>. With no details at all, there's no way
+I can possibly begin to figure out what the problem is.</para>
+
+<para>The rules of the game are: facts, facts, facts. Don't omit
+them because "oh, they won't be relevant". At the bare
+minimum:</para>
+
+<programlisting>
+Machine type. Operating system version.
+Exact version of bzip2 (do bzip2 -V).
+Exact version of the compiler used.
+Flags passed to the compiler.
+</programlisting>
+
+<para>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.</para>
+
+</sect1>
+
+
+<sect1 id="package" xreflabel="Did you get the right package?">
+<title>Did you get the right package?</title>
+
+<para><computeroutput>bzip2</computeroutput> 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.</para>
+
+<para>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.</para>
+
+<para>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, <computeroutput>zlib-1.2.1</computeroutput> and
+<computeroutput>gzip-1.2.4</computeroutput>. Look for them at
+<ulink url="http://www.zlib.org">http://www.zlib.org</ulink> and
+<ulink url="http://www.gzip.org">http://www.gzip.org</ulink>
+respectively.</para>
+
+<para>For something faster and lighter still, you might try Markus F
+X J Oberhumer's <computeroutput>LZO</computeroutput> real-time
+compression/decompression library, at
+<ulink url="http://www.oberhumer.com/opensource">http://www.oberhumer.com/opensource</ulink>.</para>
+
+</sect1>
+
+
+
+<sect1 id="reading" xreflabel="Further Reading">
+<title>Further Reading</title>
+
+<para><computeroutput>bzip2</computeroutput> 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.</para>
+
+<para>Four documents describe essentially all the ideas behind
+<computeroutput>bzip2</computeroutput>:</para>
+
+<literallayout>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
+</literallayout>
+
+<para>The following paper gives valuable additional insights into
+the algorithm, but is not immediately the basis of any code used
+in bzip2.</para>
+
+<literallayout>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</literallayout>
+
+<para>Kunihiko Sadakane's sorting algorithm, mentioned above, is
+available from:</para>
+
+<literallayout>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz
+</literallayout>
+
+<para>The Manber-Myers suffix array construction algorithm is
+described in a paper available from:</para>
+
+<literallayout>http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps
+</literallayout>
+
+<para>Finally, the following papers document some
+investigations I made into the performance of sorting
+and decompression algorithms:</para>
+
+<literallayout>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.
+</literallayout>
+
+</sect1>
+
+</chapter>
+
+</book>
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 <jseward@acm.org>
+
+ 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 <stdio.h>
+
+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 <jseward@acm.org>
+
+ 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.bz2
Binary files 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.ref
Binary files 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.bz2
Binary files 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.ref
Binary files 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.bz2
Binary files 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 <jseward@acm.org>
+
+ 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 <stdio.h>
+#include <stdlib.h>
+
+/* 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 <jseward@acm.org>
+
+ 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 <stdio.h>
+#include <assert.h>
+#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 <jseward@acm.org>
+#
+# 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] <filename.xml>';
+ 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 </dev/null
+ pdfxmltex $fofile >$OUT </dev/null
+ pdfxmltex $fofile >$OUT </dev/null
+ cleanup $OUT $xmlfmtfile *.aux *.fo *.log *.out
+ ;;
+
+ -ps)
+ echo "Creating $psfile ..."
+ xsltproc --nonet --xinclude -o $fofile $xsl_fo $xmlfmtfile
+ pdfxmltex $fofile >$OUT </dev/null
+ pdfxmltex $fofile >$OUT </dev/null
+ pdfxmltex $fofile >$OUT </dev/null
+ pdftops $pdffile $psfile
+ cleanup $OUT $xmlfmtfile $pdffile *.aux *.fo *.log *.out
+# passivetex is broken, so we can't go this route yet.
+# xmltex $fofile >$OUT </dev/null
+# xmltex $fofile >$OUT </dev/null
+# xmltex $fofile >$OUT </dev/null
+# dvips -R -q -o bzip-manual.ps *.dvi
+ ;;
+
+ *)
+ usage
+ ;;
+esac
diff --git a/src/boost/tools/boost_install/test/iostreams/test.txt.bz2 b/src/boost/tools/boost_install/test/iostreams/test.txt.bz2
new file mode 100644
index 000000000..9e69cbf45
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/test.txt.bz2
Binary files differ
diff --git a/src/boost/tools/boost_install/test/iostreams/test.txt.gz b/src/boost/tools/boost_install/test/iostreams/test.txt.gz
new file mode 100644
index 000000000..288a28236
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/test.txt.gz
Binary files differ
diff --git a/src/boost/tools/boost_install/test/iostreams/test_bzip2.cpp b/src/boost/tools/boost_install/test/iostreams/test_bzip2.cpp
new file mode 100644
index 000000000..b4a2fa7f9
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/test_bzip2.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 <boost/iostreams/device/file.hpp>
+#include <boost/iostreams/filter/bzip2.hpp>
+#include <boost/iostreams/device/back_inserter.hpp>
+#include <boost/iostreams/copy.hpp>
+#include <boost/iostreams/compose.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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 <boost/iostreams/device/file.hpp>
+#include <boost/iostreams/filter/gzip.hpp>
+#include <boost/iostreams/device/back_inserter.hpp>
+#include <boost/iostreams/copy.hpp>
+#include <boost/iostreams/compose.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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 <stdio.h> 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 <memory.h> 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 <info@winimage.com>
+ 386 asm code replacing longest_match().
+ contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
+ A C++ I/O streams interface to the zlib gz* functions
+ contrib/iostream2/ by Tyge Løvset <Tyge.Lovset@cmr.no>
+ Another C++ I/O streams interface
+ contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <paag@tid.es>
+ A very simple tar.gz file extractor using zlib
+ contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl>
+ 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 <zlib.h>, 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 <zlib@gzip.org>, or to Gilles Vollant
+<info@winimage.com> 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 <markn@ieee.org> 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 <pmqs@cpan.org> 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 <amk@amk.ca> 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 <info@winimage.com>, 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 <Osma.Ahvenlampi@hut.fi>
+# 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 $@ <from <
+$(SCOPTIONS)
+<
+
+# 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/compress.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/compress.c
new file mode 100644
index 000000000..e2db404ab
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/compress.c
@@ -0,0 +1,86 @@
+/* compress.c -- compress a memory buffer
+ * Copyright (C) 1995-2005, 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"
+
+/* ===========================================================================
+ 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 0.1% larger than sourceLen plus
+ 12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
+
+ 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.
+*/
+int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+ uLong sourceLen;
+ int level;
+{
+ z_stream stream;
+ int err;
+ const uInt max = (uInt)-1;
+ uLong left;
+
+ left = *destLen;
+ *destLen = 0;
+
+ stream.zalloc = (alloc_func)0;
+ stream.zfree = (free_func)0;
+ stream.opaque = (voidpf)0;
+
+ err = deflateInit(&stream, level);
+ if (err != Z_OK) return err;
+
+ stream.next_out = dest;
+ stream.avail_out = 0;
+ stream.next_in = (z_const Bytef *)source;
+ stream.avail_in = 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 = 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 <<EOF
+extern int getchar();
+int hello() {return getchar();}
+EOF
+
+test -z "$CC" && echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log
+cc=${CC-${CROSS_PREFIX}gcc}
+cflags=${CFLAGS-"-O3"}
+# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
+case "$cc" in
+ *gcc*) gcc=1 ;;
+ *clang*) gcc=1 ;;
+esac
+case `$cc -v 2>&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 <<EOF
+#error error
+EOF
+if ($CC -c $CFLAGS $test.c) 2>/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 <<EOF
+extern int getchar();
+int hello() {return getchar();}
+EOF
+if test $shared -eq 1; then
+ echo Checking for shared library support... | tee -a configure.log
+ # we must test in two steps (cc then ld), required at least on SunOS 4.x
+ if try $CC -w -c $SFLAGS $test.c &&
+ try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then
+ echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log
+ elif test -z "$old_cc" -a -z "$old_cflags"; then
+ echo No shared library support. | tee -a configure.log
+ shared=0;
+ else
+ echo 'No shared library support; try without defining CC and CFLAGS' | tee -a configure.log
+ shared=0;
+ fi
+fi
+if test $shared -eq 0; then
+ LDSHARED="$CC"
+ ALL="static"
+ TEST="all teststatic"
+ SHAREDLIB=""
+ SHAREDLIBV=""
+ SHAREDLIBM=""
+ echo Building static library $STATICLIB version $VER with $CC. | tee -a configure.log
+else
+ ALL="static shared"
+ TEST="all teststatic testshared"
+fi
+
+# check for underscores in external names for use by assembler code
+CPP=${CPP-"$CC -E"}
+case $CFLAGS in
+ *ASMV*)
+ echo >> 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 <<EOF
+#include <stdio.h>
+#include <stdlib.h>
+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 <<EOF
+long long dummy = 0;
+EOF
+ if try $CC -c $CFLAGS $test.c; then
+ echo "Checking for long long... Yes." | tee -a configure.log
+ cat > $test.c <<EOF
+#include <stdio.h>
+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 <<EOF
+#include <stdio.h>
+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 <<EOF
+#include <sys/types.h>
+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 <<EOF
+#include <stdio.h>
+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 <<EOF
+#include <string.h>
+#include <errno.h>
+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 <<EOF
+#include <unistd.h>
+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 <<EOF
+#include <stdarg.h>
+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 <<EOF
+#include <stdio.h>
+#include <stdarg.h>
+#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 <<EOF
+#include <stdio.h>
+#include <stdarg.h>
+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 <<EOF
+#include <stdio.h>
+#include <stdarg.h>
+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 <<EOF
+#include <stdio.h>
+#include <stdarg.h>
+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 <<EOF
+#include <stdio.h>
+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 <<EOF
+#include <stdio.h>
+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 <<EOF
+#include <stdio.h>
+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 <<EOF
+#define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+int ZLIB_INTERNAL foo;
+int main()
+{
+ return 0;
+}
+EOF
+ if tryboth $CC -c $CFLAGS $test.c; then
+ CFLAGS="$CFLAGS -DHAVE_HIDDEN"
+ SFLAGS="$SFLAGS -DHAVE_HIDDEN"
+ echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log
+ else
+ echo "Checking for attribute(visibility) support... No." | tee -a configure.log
+ fi
+fi
+
+# show the results in the log
+echo >> 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 <anisimkov@yahoo.com>
+ Support for Ada
+ See http://zlib-ada.sourceforge.net/
+
+amd64/ by Mikhail Teterin <mi@ALDAN.algebra.com>
+ asm code for AMD64
+ See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393
+
+asm686/ by Brian Raiter <breadbox@muppetlabs.com>
+ 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 <madler@alumni.caltech.edu>
+ Decompressor for output of PKWare Data Compression Library (DCL)
+
+delphi/ by Cosmin Truta <cosmint@cs.ubbcluj.ro>
+ Support for Delphi and C++ Builder
+
+dotzlib/ by Henrik Ravn <henrik@ravn.com>
+ Support for Microsoft .Net and Visual C++ .Net
+
+gcc_gvmat64/by Gilles Vollant <info@winimage.com>
+ 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 <madler@alumni.caltech.edu>
+ Unsupported diffs to infback to decode the deflate64 format
+
+inflate86/ by Chris Anderson <christop@charm.net>
+ Tuned x86 gcc asm code to replace inflate_fast()
+
+iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
+ A C++ I/O streams interface to the zlib gz* functions
+
+iostream2/ by Tyge Løvset <Tyge.Lovset@cmr.no>
+ Another C++ I/O streams interface
+
+iostream3/ by Ludwig Schwardt <schwardt@sun.ac.za>
+ and Kevin Ruland <kevin@rodin.wustl.edu>
+ Yet another C++ I/O streams interface
+
+masmx64/ by Gilles Vollant <info@winimage.com>
+ 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 <info@winimage.com>
+ 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 <info@winimage.com>
+ Mini zip and unzip based on zlib
+ Includes Zip64 support by Mathias Svensson <mathias@result42.com>
+ See http://www.winimage.com/zLibDll/minizip.html
+
+pascal/ by Bob Dellaca <bobdl@xtra.co.nz> et al.
+ Support for Pascal
+
+puff/ by Mark Adler <madler@alumni.caltech.edu>
+ Small, low memory usage inflate. Also serves to provide an
+ unambiguous description of the deflate format.
+
+testzlib/ by Gilles Vollant <info@winimage.com>
+ Example of the use of zlib
+
+untgz/ by Pedro A. Aranda Gutierrez <paag@tid.es>
+ A very simple tar.gz file extractor using zlib
+
+vstudio/ by Gilles Vollant <info@winimage.com>
+ 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 <sjs@essex.ac.uk>
+--
+-- 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<directory where libz.a is> -lz
+
+Or use the GNAT project file build for GNAT 3.15 or later:
+
+ gnatmake -Pzlib.gpr -L<directory where libz.a is>
+
+
+ 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 <anisimkov@yahoo.com>
+
+Contributors: Pascal Obry <pascal@obry.org>, Steve Sangwine <sjs@essex.ac.uk>
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 <stdlib.h>
+#include <stdio.h>
+#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 <breadbox@muppetlabs.com>
+ *
+ * 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 <stddef.h> /* for NULL */
+#include <setjmp.h> /* 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 <stdio.h>
+#include <stdlib.h>
+
+#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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.pk
Binary files 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 <cosmint@cs.ubbcluj.ro> }
+
+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 <cosmint@cs.ubbcluj.ro>
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 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="DotZLib" default="build" basedir="./DotZLib">
+ <description>A .Net wrapper library around ZLib1.dll</description>
+
+ <property name="nunit.location" value="c:/program files/NUnit V2.1/bin" />
+ <property name="build.root" value="bin" />
+
+ <property name="debug" value="true" />
+ <property name="nunit" value="true" />
+
+ <property name="build.folder" value="${build.root}/debug/" if="${debug}" />
+ <property name="build.folder" value="${build.root}/release/" unless="${debug}" />
+
+ <target name="clean" description="Remove all generated files">
+ <delete dir="${build.root}" failonerror="false" />
+ </target>
+
+ <target name="build" description="compiles the source code">
+
+ <mkdir dir="${build.folder}" />
+ <csc target="library" output="${build.folder}DotZLib.dll" debug="${debug}">
+ <references basedir="${nunit.location}">
+ <includes if="${nunit}" name="nunit.framework.dll" />
+ </references>
+ <sources>
+ <includes name="*.cs" />
+ <excludes name="UnitTests.cs" unless="${nunit}" />
+ </sources>
+ <arg value="/d:nunit" if="${nunit}" />
+ </csc>
+ </target>
+
+</project> \ 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.chm
Binary files 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\<configuration>. 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
+ /// <summary>
+ /// Implements the common functionality needed for all <see cref="ChecksumGenerator"/>s
+ /// </summary>
+ /// <example></example>
+ public abstract class ChecksumGeneratorBase : ChecksumGenerator
+ {
+ /// <summary>
+ /// The value of the current checksum
+ /// </summary>
+ protected uint _current;
+
+ /// <summary>
+ /// Initializes a new instance of the checksum generator base - the current checksum is
+ /// set to zero
+ /// </summary>
+ public ChecksumGeneratorBase()
+ {
+ _current = 0;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the checksum generator basewith a specified value
+ /// </summary>
+ /// <param name="initialValue">The value to set the current checksum to</param>
+ public ChecksumGeneratorBase(uint initialValue)
+ {
+ _current = initialValue;
+ }
+
+ /// <summary>
+ /// Resets the current checksum to zero
+ /// </summary>
+ public void Reset() { _current = 0; }
+
+ /// <summary>
+ /// Gets the current checksum value
+ /// </summary>
+ public uint Value { get { return _current; } }
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one.
+ /// This is therefore the only method a derived class has to implement</remarks>
+ public abstract void Update(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Updates the current checksum with an array of bytes.
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ public void Update(byte[] data)
+ {
+ Update(data, 0, data.Length);
+ }
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
+ public void Update(string data)
+ {
+ Update(Encoding.UTF8.GetBytes(data));
+ }
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string, using a specific encoding
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <param name="encoding">The encoding to use</param>
+ public void Update(string data, Encoding encoding)
+ {
+ Update(encoding.GetBytes(data));
+ }
+
+ }
+ #endregion
+
+ #region CRC32
+ /// <summary>
+ /// Implements a CRC32 checksum generator
+ /// </summary>
+ 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
+
+ /// <summary>
+ /// Initializes a new instance of the CRC32 checksum generator
+ /// </summary>
+ public CRC32Checksum() : base() {}
+
+ /// <summary>
+ /// Initializes a new instance of the CRC32 checksum generator with a specified value
+ /// </summary>
+ /// <param name="initialValue">The value to set the current checksum to</param>
+ public CRC32Checksum(uint initialValue) : base(initialValue) {}
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ 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
+ /// <summary>
+ /// Implements a checksum generator that computes the Adler checksum on data
+ /// </summary>
+ 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
+
+ /// <summary>
+ /// Initializes a new instance of the Adler checksum generator
+ /// </summary>
+ public AdlerChecksum() : base() {}
+
+ /// <summary>
+ /// Initializes a new instance of the Adler checksum generator with a specified value
+ /// </summary>
+ /// <param name="initialValue">The value to set the current checksum to</param>
+ public AdlerChecksum(uint initialValue) : base(initialValue) {}
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ 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
+{
+
+ /// <summary>
+ /// This class implements a circular buffer
+ /// </summary>
+ 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
+{
+ /// <summary>
+ /// Implements the common functionality needed for all <see cref="Codec"/>s
+ /// </summary>
+ public abstract class CodecBase : Codec, IDisposable
+ {
+
+ #region Data members
+
+ /// <summary>
+ /// Instance of the internal zlib buffer structure that is
+ /// passed to all functions in the zlib dll
+ /// </summary>
+ internal ZStream _ztream = new ZStream();
+
+ /// <summary>
+ /// True if the object instance has been disposed, false otherwise
+ /// </summary>
+ protected bool _isDisposed = false;
+
+ /// <summary>
+ /// The size of the internal buffers
+ /// </summary>
+ 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
+
+ /// <summary>
+ /// Initializes a new instance of the <c>CodeBase</c> class.
+ /// </summary>
+ public CodecBase()
+ {
+ try
+ {
+ _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned);
+ _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned);
+ }
+ catch (Exception)
+ {
+ CleanUp(false);
+ throw;
+ }
+ }
+
+
+ #region Codec Members
+
+ /// <summary>
+ /// Occurs when more processed data are available.
+ /// </summary>
+ public event DataAvailableHandler DataAvailable;
+
+ /// <summary>
+ /// Fires the <see cref="DataAvailable"/> event
+ /// </summary>
+ protected void OnDataAvailable()
+ {
+ if (_ztream.total_out > 0)
+ {
+ if (DataAvailable != null)
+ DataAvailable( _outBuffer, 0, (int)_ztream.total_out);
+ resetOutput();
+ }
+ }
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ public void Add(byte[] data)
+ {
+ Add(data,0,data.Length);
+ }
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ /// <remarks>This must be implemented by a derived class</remarks>
+ public abstract void Add(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ /// <remarks>This must be implemented by a derived class</remarks>
+ public abstract void Finish();
+
+ /// <summary>
+ /// Gets the checksum of the data that has been added so far
+ /// </summary>
+ public uint Checksum { get { return _checksum; } }
+
+ #endregion
+
+ #region Destructor & IDisposable stuff
+
+ /// <summary>
+ /// Destroys this instance
+ /// </summary>
+ ~CodecBase()
+ {
+ CleanUp(false);
+ }
+
+ /// <summary>
+ /// Releases any unmanaged resources and calls the <see cref="CleanUp()"/> method of the derived class
+ /// </summary>
+ public void Dispose()
+ {
+ CleanUp(true);
+ }
+
+ /// <summary>
+ /// Performs any codec specific cleanup
+ /// </summary>
+ /// <remarks>This must be implemented by a derived class</remarks>
+ 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
+
+ /// <summary>
+ /// Copies a number of bytes to the internal codec buffer - ready for proccesing
+ /// </summary>
+ /// <param name="data">The byte array that contains the data to copy</param>
+ /// <param name="startIndex">The index of the first byte to copy</param>
+ /// <param name="count">The number of bytes to copy from <c>data</c></param>
+ 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;
+
+ }
+
+ /// <summary>
+ /// Resets the internal output buffers to a known state - ready for processing
+ /// </summary>
+ protected void resetOutput()
+ {
+ _ztream.total_out = 0;
+ _ztream.avail_out = kBufferSize;
+ _ztream.next_out = _hOutput.AddrOfPinnedObject();
+ }
+
+ /// <summary>
+ /// Updates the running checksum property
+ /// </summary>
+ /// <param name="newSum">The new checksum value</param>
+ 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
+{
+
+ /// <summary>
+ /// Implements a data compressor, using the deflate algorithm in the ZLib dll
+ /// </summary>
+ 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
+
+ /// <summary>
+ /// Constructs an new instance of the <c>Deflater</c>
+ /// </summary>
+ /// <param name="level">The compression level to use for this <c>Deflater</c></param>
+ 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();
+ }
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ 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 );
+ }
+
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ 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();
+ }
+
+ /// <summary>
+ /// Closes the internal zlib deflate stream
+ /// </summary>
+ 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
+
+ /// <summary>
+ /// Defines constants for the various flush types used with zlib
+ /// </summary>
+ 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
+ /// <summary>
+ /// Defines constants for the available compression levels in zlib
+ /// </summary>
+ public enum CompressLevel : int
+ {
+ /// <summary>
+ /// The default compression level with a reasonable compromise between compression and speed
+ /// </summary>
+ Default = -1,
+ /// <summary>
+ /// No compression at all. The data are passed straight through.
+ /// </summary>
+ None = 0,
+ /// <summary>
+ /// The maximum compression rate available.
+ /// </summary>
+ Best = 9,
+ /// <summary>
+ /// The fastest available compression level.
+ /// </summary>
+ Fastest = 1
+ }
+ #endregion
+
+ #region Exception classes
+ /// <summary>
+ /// The exception that is thrown when an error occurs on the zlib dll
+ /// </summary>
+ public class ZLibException : ApplicationException
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified
+ /// error message and error code
+ /// </summary>
+ /// <param name="errorCode">The zlib error code that caused the exception</param>
+ /// <param name="msg">A message that (hopefully) describes the error</param>
+ public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg))
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified
+ /// error code
+ /// </summary>
+ /// <param name="errorCode">The zlib error code that caused the exception</param>
+ public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode))
+ {
+ }
+ }
+ #endregion
+
+ #region Interfaces
+
+ /// <summary>
+ /// Declares methods and properties that enables a running checksum to be calculated
+ /// </summary>
+ public interface ChecksumGenerator
+ {
+ /// <summary>
+ /// Gets the current value of the checksum
+ /// </summary>
+ uint Value { get; }
+
+ /// <summary>
+ /// Clears the current checksum to 0
+ /// </summary>
+ void Reset();
+
+ /// <summary>
+ /// Updates the current checksum with an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ void Update(byte[] data);
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="ArgumentNullException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ void Update(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
+ void Update(string data);
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string, using a specific encoding
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <param name="encoding">The encoding to use</param>
+ void Update(string data, Encoding encoding);
+ }
+
+
+ /// <summary>
+ /// Represents the method that will be called from a codec when new data
+ /// are available.
+ /// </summary>
+ /// <paramref name="data">The byte array containing the processed data</paramref>
+ /// <paramref name="startIndex">The index of the first processed byte in <c>data</c></paramref>
+ /// <paramref name="count">The number of processed bytes available</paramref>
+ /// <remarks>On return from this method, the data may be overwritten, so grab it while you can.
+ /// You cannot assume that startIndex will be zero.
+ /// </remarks>
+ public delegate void DataAvailableHandler(byte[] data, int startIndex, int count);
+
+ /// <summary>
+ /// Declares methods and events for implementing compressors/decompressors
+ /// </summary>
+ public interface Codec
+ {
+ /// <summary>
+ /// Occurs when more processed data are available.
+ /// </summary>
+ event DataAvailableHandler DataAvailable;
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ void Add(byte[] data);
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ void Add(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ void Finish();
+
+ /// <summary>
+ /// Gets the checksum of the data that has been added so far
+ /// </summary>
+ uint Checksum { get; }
+
+
+ }
+
+ #endregion
+
+ #region Classes
+ /// <summary>
+ /// Encapsulates general information about the ZLib library
+ /// </summary>
+ 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
+
+ /// <summary>
+ /// Constructs an instance of the <c>Info</c> class.
+ /// </summary>
+ public Info()
+ {
+ _flags = zlibCompileFlags();
+ }
+
+ /// <summary>
+ /// True if the library is compiled with debug info
+ /// </summary>
+ public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } }
+
+ /// <summary>
+ /// True if the library is compiled with assembly optimizations
+ /// </summary>
+ public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } }
+
+ /// <summary>
+ /// Gets the size of the unsigned int that was compiled into Zlib
+ /// </summary>
+ public int SizeOfUInt { get { return bitSize(_flags & 3); } }
+
+ /// <summary>
+ /// Gets the size of the unsigned long that was compiled into Zlib
+ /// </summary>
+ public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } }
+
+ /// <summary>
+ /// Gets the size of the pointers that were compiled into Zlib
+ /// </summary>
+ public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } }
+
+ /// <summary>
+ /// Gets the size of the z_off_t type that was compiled into Zlib
+ /// </summary>
+ public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } }
+
+ /// <summary>
+ /// Gets the version of ZLib as a string, e.g. "1.2.1"
+ /// </summary>
+ 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 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{BB1EE0B1-1808-46CB-B786-949D91117FC5}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "DotZLib"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Library"
+ PreBuildEvent = ""
+ PostBuildEvent = ""
+ RootNamespace = "DotZLib"
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = "docs\DotZLib.xml"
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = "1591"
+ Optimize = "false"
+ OutputPath = "bin\Debug\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = "docs\DotZLib.xml"
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
+ />
+ <Reference
+ Name = "nunit.framework"
+ AssemblyName = "nunit.framework"
+ HintPath = "E:\apps\NUnit V2.1\\bin\nunit.framework.dll"
+ AssemblyFolderKey = "hklm\dn\nunit.framework"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "AssemblyInfo.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "ChecksumImpl.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "CircularBuffer.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "CodecBase.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Deflater.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "DotZLib.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "GZipStream.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Inflater.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "UnitTests.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
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
+{
+ /// <summary>
+ /// Implements a compressed <see cref="Stream"/>, in GZip (.gz) format.
+ /// </summary>
+ 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
+ /// <summary>
+ /// Creates a new file as a writeable GZipStream
+ /// </summary>
+ /// <param name="fileName">The name of the compressed file to create</param>
+ /// <param name="level">The compression level to use when adding data</param>
+ /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
+ 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);
+ }
+
+ /// <summary>
+ /// Opens an existing file as a readable GZipStream
+ /// </summary>
+ /// <param name="fileName">The name of the file to open</param>
+ /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
+ 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
+ /// <summary>
+ /// Returns true of this stream can be read from, false otherwise
+ /// </summary>
+ public override bool CanRead
+ {
+ get
+ {
+ return !_isWriting;
+ }
+ }
+
+
+ /// <summary>
+ /// Returns false.
+ /// </summary>
+ public override bool CanSeek
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// Returns true if this tsream is writeable, false otherwise
+ /// </summary>
+ public override bool CanWrite
+ {
+ get
+ {
+ return _isWriting;
+ }
+ }
+ #endregion
+
+ #region Destructor & IDispose stuff
+
+ /// <summary>
+ /// Destroys this instance
+ /// </summary>
+ ~GZipStream()
+ {
+ cleanUp(false);
+ }
+
+ /// <summary>
+ /// Closes the external file handle
+ /// </summary>
+ 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
+ /// <summary>
+ /// Attempts to read a number of bytes from the stream.
+ /// </summary>
+ /// <param name="buffer">The destination data buffer</param>
+ /// <param name="offset">The index of the first destination byte in <c>buffer</c></param>
+ /// <param name="count">The number of bytes requested</param>
+ /// <returns>The number of bytes read</returns>
+ /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
+ /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
+ /// <exception cref="ArgumentException">If <c>offset</c> + <c>count</c> is &gt; buffer.Length</exception>
+ /// <exception cref="NotSupportedException">If this stream is not readable.</exception>
+ /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+ 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;
+ }
+
+ /// <summary>
+ /// Attempts to read a single byte from the stream.
+ /// </summary>
+ /// <returns>The byte that was read, or -1 in case of error or End-Of-File</returns>
+ public override int ReadByte()
+ {
+ if (!CanRead) throw new NotSupportedException();
+ if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+ return gzgetc(_gzFile);
+ }
+
+ /// <summary>
+ /// Writes a number of bytes to the stream
+ /// </summary>
+ /// <param name="buffer"></param>
+ /// <param name="offset"></param>
+ /// <param name="count"></param>
+ /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
+ /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
+ /// <exception cref="ArgumentException">If <c>offset</c> + <c>count</c> is &gt; buffer.Length</exception>
+ /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
+ /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+ 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();
+ }
+ }
+
+ /// <summary>
+ /// Writes a single byte to the stream
+ /// </summary>
+ /// <param name="value">The byte to add to the stream.</param>
+ /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
+ /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+ 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
+ /// <summary>
+ /// Not supported.
+ /// </summary>
+ /// <param name="value"></param>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ public override void SetLength(long value)
+ {
+ throw new NotSupportedException();
+ }
+
+ /// <summary>
+ /// Not suppported.
+ /// </summary>
+ /// <param name="offset"></param>
+ /// <param name="origin"></param>
+ /// <returns></returns>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ public override long Seek(long offset, SeekOrigin origin)
+ {
+ throw new NotSupportedException();
+ }
+
+ /// <summary>
+ /// Flushes the <c>GZipStream</c>.
+ /// </summary>
+ /// <remarks>In this implementation, this method does nothing. This is because excessive
+ /// flushing may degrade the achievable compression rates.</remarks>
+ public override void Flush()
+ {
+ // left empty on purpose
+ }
+
+ /// <summary>
+ /// Gets/sets the current position in the <c>GZipStream</c>. Not suppported.
+ /// </summary>
+ /// <remarks>In this implementation this property is not supported</remarks>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ public override long Position
+ {
+ get
+ {
+ throw new NotSupportedException();
+ }
+ set
+ {
+ throw new NotSupportedException();
+ }
+ }
+
+ /// <summary>
+ /// Gets the size of the stream. Not suppported.
+ /// </summary>
+ /// <remarks>In this implementation this property is not supported</remarks>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ 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
+{
+
+ /// <summary>
+ /// Implements a data decompressor, using the inflate algorithm in the ZLib dll
+ /// </summary>
+ 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
+
+ /// <summary>
+ /// Constructs an new instance of the <c>Inflater</c>
+ /// </summary>
+ 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();
+ }
+
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ 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 );
+ }
+
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ 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();
+ }
+
+ /// <summary>
+ /// Closes the internal zlib inflate stream
+ /// </summary>
+ 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 <stdlib.h>
+#include <stdio.h>
+#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 <stdio.h>
+
+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 <christop@charm.net>
+ * 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 <christop@charm.net>
+ * 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 <fstream.h>
+#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 T> class gzomanip {
+ friend gzofstream &operator<<(gzofstream &, const gzomanip<T> &);
+public:
+ gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { }
+private:
+ gzofstream &(*func)(gzofstream &, T);
+ T val;
+};
+
+template<class T> gzofstream &operator<<(gzofstream &s, const gzomanip<T> &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<int> setcompressionlevel(int l)
+{
+ return gzomanip<int>(&setcompressionlevel,l);
+}
+
+inline gzomanip<int> setcompressionstrategy(int l)
+{
+ return gzomanip<int>(&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 <strstream.h>
+#include <string.h>
+#include <stdio.h>
+#include "zlib.h"
+
+#if defined(_WIN32)
+# include <fcntl.h>
+# include <io.h>
+# 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 <class T, class Items>
+inline int read(izstream& zs, T* x, Items items) {
+ return ::gzread(zs.fp(), x, items*sizeof(T));
+}
+
+/*
+ * Binary input with the '>' operator.
+ */
+template <class T>
+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 <class T, class Items>
+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 <class T>
+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 <class T>
+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 <math.h>
+#include <stdlib.h>
+#include <iomanip.h>
+
+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
+<schwardt@sun.ac.za>
+
+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 <schwardt@sun.ac.za>
+ * original version by Kevin Ruland <kevin@rodin.wustl.edu>
+ */
+
+#include "zfstream.h"
+#include <iostream> // 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 <schwardt@sun.ac.za>
+ * original version by Kevin Ruland <kevin@rodin.wustl.edu>
+ *
+ * This version is standard-compliant and compatible with gcc 3.x.
+ */
+
+#include "zfstream.h"
+#include <cstring> // for strcpy, strcat, strlen (mode strings)
+#include <cstdio> // 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 <schwardt@sun.ac.za>
+ * original version by Kevin Ruland <kevin@rodin.wustl.edu>
+ *
+ * This version is standard-compliant and compatible with gcc 3.x.
+ */
+
+#ifndef ZFSTREAM_H
+#define ZFSTREAM_H
+
+#include <istream> // not iostream, since we don't need cin/cout
+#include <ostream>
+#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<gzfilebuf*>(&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<gzfilebuf*>(&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<typename T1, typename T2>
+ class gzomanip2
+ {
+ public:
+ // Allows insertor to peek at internals
+ template <typename Ta, typename Tb>
+ friend gzofstream&
+ operator<<(gzofstream&,
+ const gzomanip2<Ta,Tb>&);
+
+ // 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<typename T1, typename T2>
+ inline
+ gzomanip2<T1,T2>::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2),
+ T1 v1,
+ T2 v2)
+ : func(f), val1(v1), val2(v2)
+ { }
+
+// Insertor applies underlying manipulator function to stream
+template<typename T1, typename T2>
+ inline gzofstream&
+ operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
+ { return (*m.func)(s, m.val1, m.val2); }
+
+// Insert this onto stream to simplify setting of compression level
+inline gzomanip2<int,int>
+setcompression(int l, int s = Z_DEFAULT_STRATEGY)
+{ return gzomanip2<int,int>(&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 <christop@charm.net>
+ * 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 <stdio.h>
+#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 <christop@charm.net>
+; * 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 <breadbox@muppetlabs.com>
+;;; 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<RAND_HEAD_LEN)
+ return 0;
+
+ /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
+ * output of rand() to get less predictability, since rand() is
+ * often poorly implemented.
+ */
+ if (++calls == 1)
+ {
+ srand((unsigned)(time(NULL) ^ ZCR_SEED2));
+ }
+ init_keys(passwd, pkeys, pcrc_32_tab);
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
+ {
+ c = (rand() >> 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 <stdio.h>
+#include <stdlib.h>
+#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 <stdint.h>
+ #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 <stdlib.h>
+
+#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 <windows.h>
+
+
+#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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#ifdef _WIN32
+# include <direct.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <utime.h>
+#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;i<gi.number_entry;i++)
+ {
+ char filename_inzip[256];
+ unz_file_info64 file_info;
+ uLong ratio=0;
+ const char *string_method;
+ char charCrypt=' ';
+ err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
+ break;
+ }
+ if (file_info.uncompressed_size>0)
+ 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)<gi.number_entry)
+ {
+ err = unzGoToNextFile(uf);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGoToNextFile\n",err);
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+
+int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
+ unzFile uf;
+ const int* popt_extract_without_path;
+ int* popt_overwrite;
+ const char* password;
+{
+ char filename_inzip[256];
+ char* filename_withoutpath;
+ char* p;
+ int err=UNZ_OK;
+ FILE *fout=NULL;
+ void* buf;
+ uInt size_buf;
+
+ unz_file_info64 file_info;
+ uLong ratio=0;
+ err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
+ return err;
+ }
+
+ size_buf = WRITEBUFFERSIZE;
+ buf = (void*)malloc(size_buf);
+ if (buf==NULL)
+ {
+ printf("Error allocating memory\n");
+ return UNZ_INTERNALERROR;
+ }
+
+ p = filename_withoutpath = filename_inzip;
+ while ((*p) != '\0')
+ {
+ if (((*p)=='/') || ((*p)=='\\'))
+ filename_withoutpath = p+1;
+ p++;
+ }
+
+ if ((*filename_withoutpath)=='\0')
+ {
+ if ((*popt_extract_without_path)==0)
+ {
+ printf("creating directory: %s\n",filename_inzip);
+ mymkdir(filename_inzip);
+ }
+ }
+ else
+ {
+ const char* write_filename;
+ int skip=0;
+
+ if ((*popt_extract_without_path)==0)
+ write_filename = filename_inzip;
+ else
+ write_filename = filename_withoutpath;
+
+ err = unzOpenCurrentFilePassword(uf,password);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzOpenCurrentFilePassword\n",err);
+ }
+
+ if (((*popt_overwrite)==0) && (err==UNZ_OK))
+ {
+ char rep=0;
+ FILE* ftestexist;
+ ftestexist = FOPEN_FUNC(write_filename,"rb");
+ if (ftestexist!=NULL)
+ {
+ fclose(ftestexist);
+ do
+ {
+ char answer[128];
+ int ret;
+
+ printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename);
+ ret = scanf("%1s",answer);
+ if (ret != 1)
+ {
+ exit(EXIT_FAILURE);
+ }
+ rep = answer[0] ;
+ if ((rep>='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<gi.number_entry;i++)
+ {
+ if (do_extract_currentfile(uf,&opt_extract_without_path,
+ &opt_overwrite,
+ password) != UNZ_OK)
+ break;
+
+ if ((i+1)<gi.number_entry)
+ {
+ err = unzGoToNextFile(uf);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGoToNextFile\n",err);
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
+ unzFile uf;
+ const char* filename;
+ int opt_extract_without_path;
+ int opt_overwrite;
+ const char* password;
+{
+ int err = UNZ_OK;
+ if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
+ {
+ printf("file %s not found in the zipfile\n",filename);
+ return 2;
+ }
+
+ if (do_extract_currentfile(uf,&opt_extract_without_path,
+ &opt_overwrite,
+ password) == UNZ_OK)
+ return 0;
+ else
+ return 1;
+}
+
+
+int main(argc,argv)
+ int argc;
+ char *argv[];
+{
+ const char *zipfilename=NULL;
+ const char *filename_to_extract=NULL;
+ const char *password=NULL;
+ char filename_try[MAXFILENAME+16] = "";
+ int i;
+ int ret_value=0;
+ int opt_do_list=0;
+ int opt_do_extract=1;
+ int opt_do_extract_withoutpath=0;
+ int opt_overwrite=0;
+ int opt_extractdir=0;
+ const char *dirname=NULL;
+ unzFile uf=NULL;
+
+ do_banner();
+ if (argc==1)
+ {
+ do_help();
+ return 0;
+ }
+ else
+ {
+ for (i=1;i<argc;i++)
+ {
+ if ((*argv[i])=='-')
+ {
+ const char *p=argv[i]+1;
+
+ while ((*p)!='\0')
+ {
+ char c=*(p++);;
+ if ((c=='l') || (c=='L'))
+ opt_do_list = 1;
+ if ((c=='v') || (c=='V'))
+ opt_do_list = 1;
+ if ((c=='x') || (c=='X'))
+ opt_do_extract = 1;
+ if ((c=='e') || (c=='E'))
+ opt_do_extract = opt_do_extract_withoutpath = 1;
+ if ((c=='o') || (c=='O'))
+ opt_overwrite=1;
+ if ((c=='d') || (c=='D'))
+ {
+ opt_extractdir=1;
+ dirname=argv[i+1];
+ }
+
+ if (((c=='p') || (c=='P')) && (i+1<argc))
+ {
+ password=argv[i+1];
+ i++;
+ }
+ }
+ }
+ else
+ {
+ if (zipfilename == NULL)
+ zipfilename = argv[i];
+ else if ((filename_to_extract==NULL) && (!opt_extractdir))
+ filename_to_extract = argv[i] ;
+ }
+ }
+ }
+
+ if (zipfilename!=NULL)
+ {
+
+# ifdef USEWIN32IOAPI
+ zlib_filefunc64_def ffunc;
+# endif
+
+ strncpy(filename_try, zipfilename,MAXFILENAME-1);
+ /* strncpy doesnt append the trailing NULL, of the string is too long. */
+ filename_try[ MAXFILENAME ] = '\0';
+
+# ifdef USEWIN32IOAPI
+ fill_win32_filefunc64A(&ffunc);
+ uf = unzOpen2_64(zipfilename,&ffunc);
+# else
+ uf = unzOpen64(zipfilename);
+# endif
+ if (uf==NULL)
+ {
+ strcat(filename_try,".zip");
+# ifdef USEWIN32IOAPI
+ uf = unzOpen2_64(filename_try,&ffunc);
+# else
+ uf = unzOpen64(filename_try);
+# endif
+ }
+ }
+
+ if (uf==NULL)
+ {
+ printf("Cannot open %s or %s.zip\n",zipfilename,zipfilename);
+ return 1;
+ }
+ printf("%s opened\n",filename_try);
+
+ if (opt_do_list==1)
+ ret_value = do_list(uf);
+ else if (opt_do_extract==1)
+ {
+#ifdef _WIN32
+ if (opt_extractdir && _chdir(dirname))
+#else
+ if (opt_extractdir && chdir(dirname))
+#endif
+ {
+ printf("Error changing into %s, aborting\n", dirname);
+ exit(-1);
+ }
+
+ if (filename_to_extract == NULL)
+ ret_value = do_extract(uf, opt_do_extract_withoutpath, opt_overwrite, password);
+ else
+ ret_value = do_extract_onefile(uf, filename_to_extract, opt_do_extract_withoutpath, opt_overwrite, password);
+ }
+
+ unzClose(uf);
+
+ return ret_value;
+}
diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunzip.1 b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunzip.1
new file mode 100644
index 000000000..111ac6919
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunzip.1
@@ -0,0 +1,63 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH miniunzip 1 "Nov 7, 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 <n> 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 <broonie@sirena.org.uk>. The -d tempdir option
+was added by Dirk Eddelbuettel <edd@debian.org>.
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 <n> 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 <broonie@sirena.org.uk>.
+
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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#ifdef _WIN32
+# include <direct.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <utime.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+#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<argc;i++)
+ {
+ if ((*argv[i])=='-')
+ {
+ const char *p=argv[i]+1;
+
+ while ((*p)!='\0')
+ {
+ char c=*(p++);;
+ if ((c=='o') || (c=='O'))
+ opt_overwrite = 1;
+ if ((c=='a') || (c=='A'))
+ opt_overwrite = 2;
+ if ((c>='0') && (c<='9'))
+ opt_compress_level = c-'0';
+ if ((c=='j') || (c=='J'))
+ opt_exclude_path = 1;
+
+ if (((c=='p') || (c=='P')) && (i+1<argc))
+ {
+ password=argv[i+1];
+ i++;
+ }
+ }
+ }
+ else
+ {
+ if (zipfilenamearg == 0)
+ {
+ zipfilenamearg = i ;
+ }
+ }
+ }
+ }
+
+ size_buf = WRITEBUFFERSIZE;
+ buf = (void*)malloc(size_buf);
+ if (buf==NULL)
+ {
+ printf("Error allocating memory\n");
+ return ZIP_INTERNALERROR;
+ }
+
+ if (zipfilenamearg==0)
+ {
+ zipok=0;
+ }
+ else
+ {
+ int i,len;
+ int dot_found=0;
+
+ zipok = 1 ;
+ strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1);
+ /* strncpy doesnt append the trailing NULL, of the string is too long. */
+ filename_try[ MAXFILENAME ] = '\0';
+
+ len=(int)strlen(filename_try);
+ for (i=0;i<len;i++)
+ if (filename_try[i]=='.')
+ dot_found=1;
+
+ if (dot_found==0)
+ strcat(filename_try,".zip");
+
+ if (opt_overwrite==2)
+ {
+ /* if the file don't exist, we not append file */
+ if (check_exist_file(filename_try)==0)
+ opt_overwrite=1;
+ }
+ else
+ if (opt_overwrite==0)
+ if (check_exist_file(filename_try)!=0)
+ {
+ char rep=0;
+ do
+ {
+ char answer[128];
+ int ret;
+ printf("The file %s exists. Overwrite ? [y]es, [n]o, [a]ppend : ",filename_try);
+ ret = scanf("%1s",answer);
+ if (ret != 1)
+ {
+ exit(EXIT_FAILURE);
+ }
+ rep = answer[0] ;
+ if ((rep>='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<argc) && (err==ZIP_OK);i++)
+ {
+ if (!((((*(argv[i]))=='-') || ((*(argv[i]))=='/')) &&
+ ((argv[i][1]=='o') || (argv[i][1]=='O') ||
+ (argv[i][1]=='a') || (argv[i][1]=='A') ||
+ (argv[i][1]=='p') || (argv[i][1]=='P') ||
+ ((argv[i][1]>='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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef NOUNCRYPT
+ #define NOUNCRYPT
+#endif
+
+#include "zlib.h"
+#include "unzip.h"
+
+#ifdef STDC
+# include <stddef.h>
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+ extern int errno;
+#else
+# include <errno.h>
+#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 (c1<c2)
+ return -1;
+ if (c1>c2)
+ 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 (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos ;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ 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 (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ 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_pos<us.offset_central_dir+us.size_central_dir) &&
+ (err==UNZ_OK))
+ err=UNZ_BADZIPFILE;
+
+ if (err!=UNZ_OK)
+ {
+ ZCLOSE64(us.z_filefunc, us.filestream);
+ return NULL;
+ }
+
+ us.byte_before_the_zipfile = central_pos -
+ (us.offset_central_dir+us.size_central_dir);
+ us.central_pos = central_pos;
+ us.pfile_in_zip_read = NULL;
+ us.encrypted = 0;
+
+
+ s=(unz64_s*)ALLOC(sizeof(unz64_s));
+ if( s != NULL)
+ {
+ *s=us;
+ unzGoToFirstFile((unzFile)s);
+ }
+ return (unzFile)s;
+}
+
+
+extern unzFile ZEXPORT unzOpen2 (const char *path,
+ 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 unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 0);
+ }
+ else
+ return unzOpenInternal(path, NULL, 0);
+}
+
+extern unzFile ZEXPORT unzOpen2_64 (const void *path,
+ 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 unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 1);
+ }
+ else
+ return unzOpenInternal(path, NULL, 1);
+}
+
+extern unzFile ZEXPORT unzOpen (const char *path)
+{
+ return unzOpenInternal(path, NULL, 0);
+}
+
+extern unzFile ZEXPORT unzOpen64 (const void *path)
+{
+ return unzOpenInternal(path, NULL, 1);
+}
+
+/*
+ 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 unzClose (unzFile file)
+{
+ unz64_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+
+ if (s->pfile_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_filename<fileNameBufferSize)
+ {
+ *(szFileName+file_info.size_filename)='\0';
+ uSizeRead = file_info.size_filename;
+ }
+ else
+ uSizeRead = fileNameBufferSize;
+
+ if ((file_info.size_filename>0) && (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_extra<extraFieldBufferSize)
+ uSizeRead = file_info.size_file_extra;
+ else
+ uSizeRead = extraFieldBufferSize;
+
+ if (lSeek!=0)
+ {
+ if (ZSEEK64(s->z_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_comment<commentBufferSize)
+ {
+ *(szComment+file_info.size_file_comment)='\0';
+ uSizeRead = file_info.size_file_comment;
+ }
+ else
+ uSizeRead = commentBufferSize;
+
+ if (lSeek!=0)
+ {
+ if (ZSEEK64(s->z_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_compressed<uReadThis)
+ uReadThis = (uInt)pfile_in_zip_read_info->rest_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;i<uReadThis;i++)
+ pfile_in_zip_read_info->read_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;i<uDoCopy;i++)
+ *(pfile_in_zip_read_info->stream.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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "zlib.h"
+#include "zip.h"
+
+#ifdef STDC
+# include <stddef.h>
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+ extern int errno;
+#else
+# include <errno.h>
+#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;i<copy_this;i++)
+ *(to_copy+i)=*(from_copy+i);
+
+ ldi->filled_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 (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos ;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ 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 (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ 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_pos<offset_central_dir+size_central_dir) &&
+ (err==ZIP_OK))
+ err=ZIP_BADZIPFILE;
+
+ if (err!=ZIP_OK)
+ {
+ ZCLOSE64(pziinit->z_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;i<size_filename;i++)
+ *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i);
+
+ for (i=0;i<size_extrafield_global;i++)
+ *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) =
+ *(((const char*)extrafield_global)+i);
+
+ for (i=0;i<size_comment;i++)
+ *(zi->ci.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;i<zi->ci.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 <setjmp.h> /* 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 <stdio.h>
+#include <stdlib.h>
+#include "puff.h"
+
+#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
+
+#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 ? "<stdin>" : 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/zeros.raw
Binary files 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 <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+
+#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 <File> [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 <paag@tid.es>
+ * adaptation to Unix by Jean-loup Gailly <jloup@gzip.org>
+ * various fixes by Cosmin Truta <cosmint@cs.ubbcluj.ro>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+
+#include "zlib.h"
+
+#ifdef unix
+# include <unistd.h>
+#else
+# include <direct.h>
+# include <io.h>
+#endif
+
+#ifdef WIN32
+#include <windows.h>
+# 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 <utime.h>
+#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 <dir> %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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\miniunz.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{048af943-022b-4db6-beeb-a54c34774ee2}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{c1d600d2-888f-4aea-b73e-8b0dd9befa0c}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{0844199a-966b-4f19-81db-1e0125e141b9}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\miniunz.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\minizip.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{c0419b40-bf50-40da-b153-ff74215b79de}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{bb87b070-735b-478e-92ce-7383abb2f36c}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{f46ab6a6-548f-43cb-ae96-681abb5bd5db}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\minizip.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <RootNamespace>testzlib</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{c1f6a2e3-5da5-4955-8653-310d3efe05a9}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{c2aaffdc-2c95-4d6f-8466-4bec5890af2c}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{c274fe07-05f2-461c-964b-f6341e4e7eb5}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\compress.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\crc32.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\deflate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\infback.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inflate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inftrees.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\testzlib\testzlib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\trees.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\uncompr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{fa61a89f-93fc-4c89-b29e-36224b7592f4}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{d4b85da0-2ba2-4934-b57f-e2584e3848ee}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{e573e075-00bd-4a7d-bd67-a8cc9bfc5aca}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\testzlib\testzlib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ 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 <windows.h>
+
+#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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c" />
+ <ClCompile Include="..\..\minizip\zip.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\compress.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\crc32.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\deflate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzclose.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzlib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzread.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzwrite.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\infback.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inflate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inftrees.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\ioapi.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\trees.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\uncompr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\unzip.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\zip.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc">
+ <Filter>Source Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def">
+ <Filter>Source Files</Filter>
+ </None>
+ </ItemGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapid</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapid</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">zlibwapi</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\minizip\iowin32.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\zip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\deflate.h" />
+ <ClInclude Include="..\..\..\infblock.h" />
+ <ClInclude Include="..\..\..\infcodes.h" />
+ <ClInclude Include="..\..\..\inffast.h" />
+ <ClInclude Include="..\..\..\inftrees.h" />
+ <ClInclude Include="..\..\..\infutil.h" />
+ <ClInclude Include="..\..\..\zconf.h" />
+ <ClInclude Include="..\..\..\zlib.h" />
+ <ClInclude Include="..\..\..\zutil.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{07934a85-8b61-443d-a0ee-b2eedb74f3cd}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{1d99675b-433d-4a21-9e50-ed4ab8b19762}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;fi;fd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{431c0958-fa71-44d0-9084-2d19d100c0cc}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\compress.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\crc32.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\deflate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzclose.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzlib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzread.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\gzwrite.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\infback.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inflate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inftrees.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\ioapi.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\iowin32.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\trees.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\uncompr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\unzip.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\zip.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc">
+ <Filter>Source Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def">
+ <Filter>Source Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\deflate.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\infblock.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\infcodes.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\inffast.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\inftrees.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\infutil.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\zconf.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\zlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\zutil.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\miniunz.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\minizip.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <RootNamespace>testzlib</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 <windows.h>
+
+#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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c" />
+ <ClCompile Include="..\..\minizip\zip.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">zlibwapi</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\contrib\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\minizip\iowin32.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\zip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\deflate.h" />
+ <ClInclude Include="..\..\..\infblock.h" />
+ <ClInclude Include="..\..\..\infcodes.h" />
+ <ClInclude Include="..\..\..\inffast.h" />
+ <ClInclude Include="..\..\..\inftrees.h" />
+ <ClInclude Include="..\..\..\infutil.h" />
+ <ClInclude Include="..\..\..\zconf.h" />
+ <ClInclude Include="..\..\..\zlib.h" />
+ <ClInclude Include="..\..\..\zutil.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\miniunz.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\minizip.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <RootNamespace>testzlib</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 <windows.h>
+
+#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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c" />
+ <ClCompile Include="..\..\minizip\zip.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">zlibwapi</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\contrib\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\minizip\iowin32.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\zip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\deflate.h" />
+ <ClInclude Include="..\..\..\infblock.h" />
+ <ClInclude Include="..\..\..\infcodes.h" />
+ <ClInclude Include="..\..\..\inffast.h" />
+ <ClInclude Include="..\..\..\inftrees.h" />
+ <ClInclude Include="..\..\..\infutil.h" />
+ <ClInclude Include="..\..\..\zconf.h" />
+ <ClInclude Include="..\..\..\zlib.h" />
+ <ClInclude Include="..\..\..\zutil.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\miniunz.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\minizip.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <RootNamespace>testzlib</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 <windows.h>
+
+#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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c" />
+ <ClCompile Include="..\..\minizip\zip.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">zlibwapi</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx86
+bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\contrib\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\masmx64
+bld_ml64.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Itanium</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineIA64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\masmx64\inffas8664.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\minizip\iowin32.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\zip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\deflate.h" />
+ <ClInclude Include="..\..\..\infblock.h" />
+ <ClInclude Include="..\..\..\infcodes.h" />
+ <ClInclude Include="..\..\..\inffast.h" />
+ <ClInclude Include="..\..\..\inftrees.h" />
+ <ClInclude Include="..\..\..\infutil.h" />
+ <ClInclude Include="..\..\..\zconf.h" />
+ <ClInclude Include="..\..\..\zlib.h" />
+ <ClInclude Include="..\..\..\zutil.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ 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 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="miniunz"
+ ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ <Platform
+ Name="Itanium"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
+ IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/miniunz.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
+ IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/miniunz.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
+ IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/miniunz.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Itanium"
+ OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
+ IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/miniunz.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
+ SubSystem="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
+ IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/miniunz.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Itanium"
+ OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
+ IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/miniunz.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath="..\..\minizip\miniunz.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="minizip"
+ ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ <Platform
+ Name="Itanium"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="x86\MiniZip$(ConfigurationName)"
+ IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/minizip.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/minizip.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="x86\MiniZip$(ConfigurationName)"
+ IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/minizip.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="x64\$(ConfigurationName)"
+ IntermediateDirectory="x64\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/minizip.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/minizip.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Itanium"
+ OutputDirectory="ia64\$(ConfigurationName)"
+ IntermediateDirectory="ia64\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/minizip.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/minizip.pdb"
+ SubSystem="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="x64\$(ConfigurationName)"
+ IntermediateDirectory="x64\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/minizip.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Itanium"
+ OutputDirectory="ia64\$(ConfigurationName)"
+ IntermediateDirectory="ia64\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/minizip.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath="..\..\minizip\minizip.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="testzlib"
+ ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
+ RootNamespace="testzlib"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ <Platform
+ Name="Itanium"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="x86\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerOutput="4"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="x64\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ AssemblerListingLocation="$(IntDir)\"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
+ GenerateManifest="false"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Itanium"
+ OutputDirectory="ia64\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerOutput="4"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+ SubSystem="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|Win32"
+ OutputDirectory="x86\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|x64"
+ OutputDirectory="x64\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ AssemblerListingLocation="$(IntDir)\"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies=""
+ GenerateManifest="false"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|Itanium"
+ OutputDirectory="ia64\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="x86\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="x64\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ AssemblerListingLocation="$(IntDir)\"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
+ GenerateManifest="false"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Itanium"
+ OutputDirectory="ia64\TestZlib$(ConfigurationName)"
+ IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath="..\..\..\adler32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compress.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\crc32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\deflate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\infback.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\masmx64\inffas8664.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseWithoutAsm|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseWithoutAsm|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\inffast.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inflate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inftrees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\testzlib\testzlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\trees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\uncompr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\zutil.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="TestZlibDll"
+ ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ <Platform
+ Name="Itanium"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Itanium"
+ OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
+ IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+ SubSystem="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Itanium"
+ OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
+ IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="1"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+ StringPooling="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
+ OutputFile="$(OutDir)/testzlib.exe"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
+ <File
+ RelativePath="..\..\testzlib\testzlib.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 <windows.h>
+
+#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 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="zlibstat"
+ ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ <Platform
+ Name="Itanium"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="x86\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ ExceptionHandling="0"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="false"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="x64\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ ExceptionHandling="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Itanium"
+ OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ ExceptionHandling="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="x86\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
+ AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="x64\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
+ AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Itanium"
+ OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|Win32"
+ OutputDirectory="x86\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|x64"
+ OutputDirectory="x64\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|Itanium"
+ OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
+ IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
+ ConfigurationType="4"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="2"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
+ OutputFile="$(OutDir)\zlibstat.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ >
+ <File
+ RelativePath="..\..\..\adler32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compress.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\crc32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\deflate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzclose.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzguts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzwrite.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\infback.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\masmx64\inffas8664.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseWithoutAsm|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseWithoutAsm|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\inffast.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inflate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inftrees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\minizip\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\trees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\uncompr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\minizip\unzip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\minizip\zip.c"
+ >
+ </File>
+ <File
+ RelativePath=".\zlib.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\zlibvc.def"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\zutil.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="zlibvc"
+ ProjectGUID="{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
+ RootNamespace="zlibvc"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ <Platform
+ Name="Itanium"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="x86\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
+ ExceptionHandling="0"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="false"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="x64\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
+ ExceptionHandling="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Itanium"
+ OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="2"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+ ExceptionHandling="0"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|Win32"
+ OutputDirectory="x86\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerOutput="2"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ IgnoreAllDefaultLibraries="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|x64"
+ OutputDirectory="x64\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerOutput="2"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ IgnoreAllDefaultLibraries="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseWithoutAsm|Itanium"
+ OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="2"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerOutput="2"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ IgnoreAllDefaultLibraries="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="x86\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerOutput="2"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ IgnoreAllDefaultLibraries="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="x64\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerOutput="2"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ IgnoreAllDefaultLibraries="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Itanium"
+ OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
+ IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
+ ConfigurationType="2"
+ InheritedPropertySheets="UpgradeFromVC70.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="2"
+ TypeLibraryName="$(OutDir)/zlibvc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+ PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+ AssemblerOutput="2"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)\"
+ BrowseInformation="0"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1036"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\zlibwapi.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ IgnoreAllDefaultLibraries="false"
+ ModuleDefinitionFile=".\zlibvc.def"
+ ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/zlibwapi.map"
+ SubSystem="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(OutDir)/zlibwapi.lib"
+ TargetMachine="5"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+ >
+ <File
+ RelativePath="..\..\..\adler32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compress.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\crc32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\deflate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzclose.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzguts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\gzwrite.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\infback.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\masmx64\inffas8664.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseWithoutAsm|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseWithoutAsm|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Itanium"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\inffast.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inflate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inftrees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\minizip\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\minizip\iowin32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\trees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\uncompr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\minizip\unzip.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="ZLIB_INTERNAL"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="ZLIB_INTERNAL"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Itanium"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="ZLIB_INTERNAL"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\minizip\zip.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="ZLIB_INTERNAL"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="ZLIB_INTERNAL"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Itanium"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="ZLIB_INTERNAL"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\zlib.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\zlibvc.def"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\zutil.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;fi;fd"
+ >
+ <File
+ RelativePath="..\..\..\deflate.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\infblock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\infcodes.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inffast.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\inftrees.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\infutil.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\zconf.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\zlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\zutil.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 <rbrown64@csc.com.au> 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 <stdio.h>
+# 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)<<s->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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#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 <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#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 <stdio.h> /* fprintf() */
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror(), strcmp(), strlen(), memcpy() */
+#include <errno.h> /* errno */
+#include <fcntl.h> /* open() */
+#include <unistd.h> /* read(), write(), close(), chown(), unlink() */
+#include <sys/types.h>
+#include <sys/stat.h> /* stat(), chmod() */
+#include <utime.h> /* 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#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 <stdio.h> /* fputs(), fprintf(), fwrite(), putc() */
+#include <stdlib.h> /* exit(), malloc(), free() */
+#include <fcntl.h> /* open() */
+#include <unistd.h> /* 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 <sys/types.h>
+#include <stdio.h> /* rename, fopen, fprintf, fclose */
+#include <stdlib.h> /* malloc, free */
+#include <string.h> /* strlen, strrchr, strcpy, strncpy, strcmp */
+#include <fcntl.h> /* open */
+#include <unistd.h> /* lseek, read, write, close, unlink, sleep, */
+ /* ftruncate, fsync */
+#include <errno.h> /* errno */
+#include <time.h> /* time, ctime */
+#include <sys/stat.h> /* stat */
+#include <sys/time.h> /* 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 <setjmp.h> /* 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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>zlib Usage Example</title>
+<!-- Copyright (c) 2004, 2005 Mark Adler. -->
+</head>
+<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000">
+<h2 align="center"> zlib Usage Example </h2>
+We often get questions about how the <tt>deflate()</tt> and <tt>inflate()</tt> functions should be used.
+Users wonder when they should provide more input, when they should use more output,
+what to do with a <tt>Z_BUF_ERROR</tt>, how to make sure the process terminates properly, and
+so on. So for those who have read <tt>zlib.h</tt> (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 <tt>deflate()</tt> and <tt>inflate()</tt> 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 <em>zlib</em>.
+<p>
+Without further adieu, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>:
+<pre><b>
+/* 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
+ */
+</b></pre><!-- -->
+We now include the header files for the required definitions. From
+<tt>stdio.h</tt> we use <tt>fopen()</tt>, <tt>fread()</tt>, <tt>fwrite()</tt>,
+<tt>feof()</tt>, <tt>ferror()</tt>, and <tt>fclose()</tt> for file i/o, and
+<tt>fputs()</tt> for error messages. From <tt>string.h</tt> we use
+<tt>strcmp()</tt> for command line argument processing.
+From <tt>assert.h</tt> we use the <tt>assert()</tt> macro.
+From <tt>zlib.h</tt>
+we use the basic compression functions <tt>deflateInit()</tt>,
+<tt>deflate()</tt>, and <tt>deflateEnd()</tt>, and the basic decompression
+functions <tt>inflateInit()</tt>, <tt>inflate()</tt>, and
+<tt>inflateEnd()</tt>.
+<pre><b>
+#include &lt;stdio.h&gt;
+#include &lt;string.h&gt;
+#include &lt;assert.h&gt;
+#include "zlib.h"
+</b></pre><!-- -->
+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.
+<tt>SET_BINARY_MODE()</tt> will be used later on <tt>stdin</tt> and <tt>stdout</tt>, at the beginning of <tt>main()</tt>.
+<pre><b>
+#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
+# include &lt;fcntl.h&gt;
+# include &lt;io.h&gt;
+# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
+#else
+# define SET_BINARY_MODE(file)
+#endif
+</b></pre><!-- -->
+<tt>CHUNK</tt> is simply the buffer size for feeding data to and pulling data
+from the <em>zlib</em> routines. Larger buffer sizes would be more efficient,
+especially for <tt>inflate()</tt>. If the memory is available, buffers sizes
+on the order of 128K or 256K bytes should be used.
+<pre><b>
+#define CHUNK 16384
+</b></pre><!-- -->
+The <tt>def()</tt> routine compresses data from an input file to an output file. The output data
+will be in the <em>zlib</em> format, which is different from the <em>gzip</em> or <em>zip</em>
+formats. The <em>zlib</em> format has a very small header of only two bytes to identify it as
+a <em>zlib</em> 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.
+<pre><b>
+/* 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)
+{
+</b></pre>
+Here are the local variables for <tt>def()</tt>. <tt>ret</tt> will be used for <em>zlib</em>
+return codes. <tt>flush</tt> will keep track of the current flushing state for <tt>deflate()</tt>,
+which is either no flushing, or flush to completion after the end of the input file is reached.
+<tt>have</tt> is the amount of data returned from <tt>deflate()</tt>. The <tt>strm</tt> structure
+is used to pass information to and from the <em>zlib</em> routines, and to maintain the
+<tt>deflate()</tt> state. <tt>in</tt> and <tt>out</tt> are the input and output buffers for
+<tt>deflate()</tt>.
+<pre><b>
+ int ret, flush;
+ unsigned have;
+ z_stream strm;
+ unsigned char in[CHUNK];
+ unsigned char out[CHUNK];
+</b></pre><!-- -->
+The first thing we do is to initialize the <em>zlib</em> state for compression using
+<tt>deflateInit()</tt>. This must be done before the first use of <tt>deflate()</tt>.
+The <tt>zalloc</tt>, <tt>zfree</tt>, and <tt>opaque</tt> fields in the <tt>strm</tt>
+structure must be initialized before calling <tt>deflateInit()</tt>. Here they are
+set to the <em>zlib</em> constant <tt>Z_NULL</tt> to request that <em>zlib</em> use
+the default memory allocation routines. An application may also choose to provide
+custom memory allocation routines here. <tt>deflateInit()</tt> will allocate on the
+order of 256K bytes for the internal state.
+(See <a href="zlib_tech.html"><em>zlib Technical Details</em></a>.)
+<p>
+<tt>deflateInit()</tt> 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 <em>zlib</em> 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 <em>zlib</em> format (it is not a byte-for-byte copy of the input).
+More advanced applications of <em>zlib</em>
+may use <tt>deflateInit2()</tt> 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
+<em>gzip</em> header and trailer instead of a <em>zlib</em> header and trailer, or raw
+encoding with no header or trailer at all.
+<p>
+We must check the return value of <tt>deflateInit()</tt> against the <em>zlib</em> constant
+<tt>Z_OK</tt> to make sure that it was able to
+allocate memory for the internal state, and that the provided arguments were valid.
+<tt>deflateInit()</tt> will also check that the version of <em>zlib</em> that the <tt>zlib.h</tt>
+file came from matches the version of <em>zlib</em> actually linked with the program. This
+is especially important for environments in which <em>zlib</em> is a shared library.
+<p>
+Note that an application can initialize multiple, independent <em>zlib</em> streams, which can
+operate in parallel. The state information maintained in the structure allows the <em>zlib</em>
+routines to be reentrant.
+<pre><b>
+ /* allocate deflate state */
+ strm.zalloc = Z_NULL;
+ strm.zfree = Z_NULL;
+ strm.opaque = Z_NULL;
+ ret = deflateInit(&amp;strm, level);
+ if (ret != Z_OK)
+ return ret;
+</b></pre><!-- -->
+With the pleasantries out of the way, now we can get down to business. The outer <tt>do</tt>-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 <tt>deflate()</tt>. 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.
+<pre><b>
+ /* compress until end of file */
+ do {
+</b></pre>
+We start off by reading data from the input file. The number of bytes read is put directly
+into <tt>avail_in</tt>, and a pointer to those bytes is put into <tt>next_in</tt>. We also
+check to see if end-of-file on the input has been reached. If we are at the end of file, then <tt>flush</tt> is set to the
+<em>zlib</em> constant <tt>Z_FINISH</tt>, which is later passed to <tt>deflate()</tt> to
+indicate that this is the last chunk of input data to compress. We need to use <tt>feof()</tt>
+to check for end-of-file as opposed to seeing if fewer than <tt>CHUNK</tt> bytes have been read. The
+reason is that if the input file length is an exact multiple of <tt>CHUNK</tt>, we will miss
+the fact that we got to the end-of-file, and not know to tell <tt>deflate()</tt> to finish
+up the compressed stream. If we are not yet at the end of the input, then the <em>zlib</em>
+constant <tt>Z_NO_FLUSH</tt> will be passed to <tt>deflate</tt> to indicate that we are still
+in the middle of the uncompressed data.
+<p>
+If there is an error in reading from the input file, the process is aborted with
+<tt>deflateEnd()</tt> being called to free the allocated <em>zlib</em> state before returning
+the error. We wouldn't want a memory leak, now would we? <tt>deflateEnd()</tt> can be called
+at any time after the state has been initialized. Once that's done, <tt>deflateInit()</tt> (or
+<tt>deflateInit2()</tt>) would have to be called to start a new compression process. There is
+no point here in checking the <tt>deflateEnd()</tt> return code. The deallocation can't fail.
+<pre><b>
+ strm.avail_in = fread(in, 1, CHUNK, source);
+ if (ferror(source)) {
+ (void)deflateEnd(&amp;strm);
+ return Z_ERRNO;
+ }
+ flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
+ strm.next_in = in;
+</b></pre><!-- -->
+The inner <tt>do</tt>-loop passes our chunk of input data to <tt>deflate()</tt>, and then
+keeps calling <tt>deflate()</tt> until it is done producing output. Once there is no more
+new output, <tt>deflate()</tt> is guaranteed to have consumed all of the input, i.e.,
+<tt>avail_in</tt> will be zero.
+<pre><b>
+ /* run deflate() on input until output buffer not full, finish
+ compression if all of source has been read in */
+ do {
+</b></pre>
+Output space is provided to <tt>deflate()</tt> by setting <tt>avail_out</tt> to the number
+of available output bytes and <tt>next_out</tt> to a pointer to that space.
+<pre><b>
+ strm.avail_out = CHUNK;
+ strm.next_out = out;
+</b></pre>
+Now we call the compression engine itself, <tt>deflate()</tt>. It takes as many of the
+<tt>avail_in</tt> bytes at <tt>next_in</tt> as it can process, and writes as many as
+<tt>avail_out</tt> bytes to <tt>next_out</tt>. 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 <tt>avail_in</tt>
+and <tt>next_in</tt> are updated by <tt>deflate()</tt>, we don't have to mess with those
+between <tt>deflate()</tt> calls until it's all used up.
+<p>
+The parameters to <tt>deflate()</tt> are a pointer to the <tt>strm</tt> 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 <tt>deflate</tt> 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,
+<tt>deflate()</tt>
+must be told to terminate the stream, complete the compression with provided input data, and
+write out the trailer check value. <tt>deflate()</tt> will continue to compress normally as long
+as the flush parameter is <tt>Z_NO_FLUSH</tt>. Once the <tt>Z_FINISH</tt> parameter is provided,
+<tt>deflate()</tt> will begin to complete the compressed output stream. However depending on how
+much output space is provided, <tt>deflate()</tt> 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 <tt>Z_FINISH</tt> for those subsequent calls.
+<p>
+There are other values of the flush parameter that are used in more advanced applications. You can
+force <tt>deflate()</tt> 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 <tt>deflate()</tt> 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.
+<p>
+<tt>deflate()</tt> has a return value that can indicate errors, yet we do not check it here. Why
+not? Well, it turns out that <tt>deflate()</tt> can do no wrong here. Let's go through
+<tt>deflate()</tt>'s return values and dispense with them one by one. The possible values are
+<tt>Z_OK</tt>, <tt>Z_STREAM_END</tt>, <tt>Z_STREAM_ERROR</tt>, or <tt>Z_BUF_ERROR</tt>. <tt>Z_OK</tt>
+is, well, ok. <tt>Z_STREAM_END</tt> is also ok and will be returned for the last call of
+<tt>deflate()</tt>. This is already guaranteed by calling <tt>deflate()</tt> with <tt>Z_FINISH</tt>
+until it has no more output. <tt>Z_STREAM_ERROR</tt> is only possible if the stream is not
+initialized properly, but we did initialize it properly. There is no harm in checking for
+<tt>Z_STREAM_ERROR</tt> here, for example to check for the possibility that some
+other part of the application inadvertently clobbered the memory containing the <em>zlib</em> state.
+<tt>Z_BUF_ERROR</tt> will be explained further below, but
+suffice it to say that this is simply an indication that <tt>deflate()</tt> could not consume
+more input or produce more output. <tt>deflate()</tt> can be called again with more output space
+or more available input, which it will be in this code.
+<pre><b>
+ ret = deflate(&amp;strm, flush); /* no bad return value */
+ assert(ret != Z_STREAM_ERROR); /* state not clobbered */
+</b></pre>
+Now we compute how much output <tt>deflate()</tt> 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 <tt>deflate()</tt>. Again if there
+is a file i/o error, we call <tt>deflateEnd()</tt> before returning to avoid a memory leak.
+<pre><b>
+ have = CHUNK - strm.avail_out;
+ if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
+ (void)deflateEnd(&amp;strm);
+ return Z_ERRNO;
+ }
+</b></pre>
+The inner <tt>do</tt>-loop is repeated until the last <tt>deflate()</tt> call fails to fill the
+provided output buffer. Then we know that <tt>deflate()</tt> 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.
+<p>
+The way we tell that <tt>deflate()</tt> has no more output is by seeing that it did not fill
+the output buffer, leaving <tt>avail_out</tt> greater than zero. However suppose that
+<tt>deflate()</tt> has no more output, but just so happened to exactly fill the output buffer!
+<tt>avail_out</tt> is zero, and we can't tell that <tt>deflate()</tt> has done all it can.
+As far as we know, <tt>deflate()</tt>
+has more output for us. So we call it again. But now <tt>deflate()</tt> produces no output
+at all, and <tt>avail_out</tt> remains unchanged as <tt>CHUNK</tt>. That <tt>deflate()</tt> call
+wasn't able to do anything, either consume input or produce output, and so it returns
+<tt>Z_BUF_ERROR</tt>. (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 <tt>deflate()</tt> is really done,
+and so we drop out of the inner loop to provide more input to <tt>deflate()</tt>.
+<p>
+With <tt>flush</tt> set to <tt>Z_FINISH</tt>, this final set of <tt>deflate()</tt> calls will
+complete the output stream. Once that is done, subsequent calls of <tt>deflate()</tt> would return
+<tt>Z_STREAM_ERROR</tt> if the flush parameter is not <tt>Z_FINISH</tt>, and do no more processing
+until the state is reinitialized.
+<p>
+Some applications of <em>zlib</em> have two loops that call <tt>deflate()</tt>
+instead of the single inner loop we have here. The first loop would call
+without flushing and feed all of the data to <tt>deflate()</tt>. The second loop would call
+<tt>deflate()</tt> with no more
+data and the <tt>Z_FINISH</tt> 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.
+<pre><b>
+ } while (strm.avail_out == 0);
+ assert(strm.avail_in == 0); /* all input will be used */
+</b></pre><!-- -->
+Now we check to see if we have already processed all of the input file. That information was
+saved in the <tt>flush</tt> variable, so we see if that was set to <tt>Z_FINISH</tt>. If so,
+then we're done and we fall out of the outer loop. We're guaranteed to get <tt>Z_STREAM_END</tt>
+from the last <tt>deflate()</tt> call, since we ran it until the last chunk of input was
+consumed and all of the output was generated.
+<pre><b>
+ /* done when last data in file processed */
+ } while (flush != Z_FINISH);
+ assert(ret == Z_STREAM_END); /* stream will be complete */
+</b></pre><!-- -->
+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.
+<pre><b>
+ /* clean up and return */
+ (void)deflateEnd(&amp;strm);
+ return Z_OK;
+}
+</b></pre><!-- -->
+Now we do the same thing for decompression in the <tt>inf()</tt> routine. <tt>inf()</tt>
+decompresses what is hopefully a valid <em>zlib</em> stream from the input file and writes the
+uncompressed data to the output file. Much of the discussion above for <tt>def()</tt>
+applies to <tt>inf()</tt> as well, so the discussion here will focus on the differences between
+the two.
+<pre><b>
+/* 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)
+{
+</b></pre>
+The local variables have the same functionality as they do for <tt>def()</tt>. The
+only difference is that there is no <tt>flush</tt> variable, since <tt>inflate()</tt>
+can tell from the <em>zlib</em> stream itself when the stream is complete.
+<pre><b>
+ int ret;
+ unsigned have;
+ z_stream strm;
+ unsigned char in[CHUNK];
+ unsigned char out[CHUNK];
+</b></pre><!-- -->
+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. <tt>avail_in</tt>
+and <tt>next_in</tt> must be initialized before calling <tt>inflateInit()</tt>. This
+is because the application has the option to provide the start of the zlib stream in
+order for <tt>inflateInit()</tt> to have access to information about the compression
+method to aid in memory allocation. In the current implementation of <em>zlib</em>
+(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of
+<tt>inflate()</tt> anyway. However those fields must be initialized since later versions
+of <em>zlib</em> that provide more compression methods may take advantage of this interface.
+In any case, no decompression is performed by <tt>inflateInit()</tt>, so the
+<tt>avail_out</tt> and <tt>next_out</tt> fields do not need to be initialized before calling.
+<p>
+Here <tt>avail_in</tt> is set to zero and <tt>next_in</tt> is set to <tt>Z_NULL</tt> to
+indicate that no input data is being provided.
+<pre><b>
+ /* 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(&amp;strm);
+ if (ret != Z_OK)
+ return ret;
+</b></pre><!-- -->
+The outer <tt>do</tt>-loop decompresses input until <tt>inflate()</tt> indicates
+that it has reached the end of the compressed data and has produced all of the uncompressed
+output. This is in contrast to <tt>def()</tt> 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.
+<pre><b>
+ /* decompress until deflate stream ends or end of file */
+ do {
+</b></pre>
+We read input data and set the <tt>strm</tt> 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 <tt>inflate()</tt>, if the input file continues past the <em>zlib</em> stream.
+For applications where <em>zlib</em> 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 <em>zlib</em> stream.
+<pre><b>
+ strm.avail_in = fread(in, 1, CHUNK, source);
+ if (ferror(source)) {
+ (void)inflateEnd(&amp;strm);
+ return Z_ERRNO;
+ }
+ if (strm.avail_in == 0)
+ break;
+ strm.next_in = in;
+</b></pre><!-- -->
+The inner <tt>do</tt>-loop has the same function it did in <tt>def()</tt>, which is to
+keep calling <tt>inflate()</tt> until has generated all of the output it can with the
+provided input.
+<pre><b>
+ /* run inflate() on input until output buffer not full */
+ do {
+</b></pre>
+Just like in <tt>def()</tt>, the same output space is provided for each call of <tt>inflate()</tt>.
+<pre><b>
+ strm.avail_out = CHUNK;
+ strm.next_out = out;
+</b></pre>
+Now we run the decompression engine itself. There is no need to adjust the flush parameter, since
+the <em>zlib</em> format is self-terminating. The main difference here is that there are
+return values that we need to pay attention to. <tt>Z_DATA_ERROR</tt>
+indicates that <tt>inflate()</tt> detected an error in the <em>zlib</em> compressed data format,
+which means that either the data is not a <em>zlib</em> 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
+<tt>Z_MEM_ERROR</tt>, which can occur since memory allocation is deferred until <tt>inflate()</tt>
+needs it, unlike <tt>deflate()</tt>, whose memory is allocated at the start by <tt>deflateInit()</tt>.
+<p>
+Advanced applications may use
+<tt>deflateSetDictionary()</tt> to prime <tt>deflate()</tt> with a set of likely data to improve the
+first 32K or so of compression. This is noted in the <em>zlib</em> header, so <tt>inflate()</tt>
+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 <tt>Z_NEED_DICT</tt> indication is converted to a <tt>Z_DATA_ERROR</tt>.
+<p>
+<tt>inflate()</tt> can also return <tt>Z_STREAM_ERROR</tt>, which should not be possible here,
+but could be checked for as noted above for <tt>def()</tt>. <tt>Z_BUF_ERROR</tt> does not need to be
+checked for here, for the same reasons noted for <tt>def()</tt>. <tt>Z_STREAM_END</tt> will be
+checked for later.
+<pre><b>
+ ret = inflate(&amp;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(&amp;strm);
+ return ret;
+ }
+</b></pre>
+The output of <tt>inflate()</tt> is handled identically to that of <tt>deflate()</tt>.
+<pre><b>
+ have = CHUNK - strm.avail_out;
+ if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
+ (void)inflateEnd(&amp;strm);
+ return Z_ERRNO;
+ }
+</b></pre>
+The inner <tt>do</tt>-loop ends when <tt>inflate()</tt> has no more output as indicated
+by not filling the output buffer, just as for <tt>deflate()</tt>. In this case, we cannot
+assert that <tt>strm.avail_in</tt> will be zero, since the deflate stream may end before the file
+does.
+<pre><b>
+ } while (strm.avail_out == 0);
+</b></pre><!-- -->
+The outer <tt>do</tt>-loop ends when <tt>inflate()</tt> reports that it has reached the
+end of the input <em>zlib</em> stream, has completed the decompression and integrity
+check, and has provided all of the output. This is indicated by the <tt>inflate()</tt>
+return value <tt>Z_STREAM_END</tt>. The inner loop is guaranteed to leave <tt>ret</tt>
+equal to <tt>Z_STREAM_END</tt> if the last chunk of the input file read contained the end
+of the <em>zlib</em> stream. So if the return value is not <tt>Z_STREAM_END</tt>, the
+loop continues to read more input.
+<pre><b>
+ /* done when inflate() says it's done */
+ } while (ret != Z_STREAM_END);
+</b></pre><!-- -->
+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 <tt>inflate()</tt> return value
+is not <tt>Z_STREAM_END</tt>, then the <em>zlib</em> stream was incomplete and a data error
+is returned. Otherwise, we return with a happy return value. Of course, <tt>inflateEnd()</tt>
+is called first to avoid a memory leak.
+<pre><b>
+ /* clean up and return */
+ (void)inflateEnd(&amp;strm);
+ return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
+}
+</b></pre><!-- -->
+That ends the routines that directly use <em>zlib</em>. The following routines make this
+a command-line program by running data through the above routines from <tt>stdin</tt> to
+<tt>stdout</tt>, and handling any errors reported by <tt>def()</tt> or <tt>inf()</tt>.
+<p>
+<tt>zerr()</tt> is used to interpret the possible error codes from <tt>def()</tt>
+and <tt>inf()</tt>, 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 <tt>deflate()</tt>
+and <tt>inflate()</tt>.
+<pre><b>
+/* 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);
+ }
+}
+</b></pre><!-- -->
+Here is the <tt>main()</tt> routine used to test <tt>def()</tt> and <tt>inf()</tt>. The
+<tt>zpipe</tt> command is simply a compression pipe from <tt>stdin</tt> to <tt>stdout</tt>, if
+no arguments are given, or it is a decompression pipe if <tt>zpipe -d</tt> is used. If any other
+arguments are provided, no compression or decompression is performed. Instead a usage
+message is displayed. Examples are <tt>zpipe < foo.txt > foo.txt.z</tt> to compress, and
+<tt>zpipe -d < foo.txt.z > foo.txt</tt> to decompress.
+<pre><b>
+/* 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 &amp;&amp; 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] &lt; source &gt; dest\n", stderr);
+ return 1;
+ }
+}
+</b></pre>
+<hr>
+<i>Copyright (c) 2004, 2005 by Mark Adler<br>Last modified 11 December 2005</i>
+</body>
+</html>
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 <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "zlib.h"
+
+#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
+
+#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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#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 <stdio.h>
+#include "zlib.h"
+#ifdef STDC
+# include <string.h>
+# include <stdlib.h>
+# include <limits.h>
+#endif
+
+#ifndef _POSIX_SOURCE
+# define _POSIX_SOURCE
+#endif
+#include <fcntl.h>
+
+#ifdef _WIN32
+# include <stddef.h>
+#endif
+
+#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)
+# include <io.h>
+#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 <windows.h>
+# define zstrerror() gz_strwinerror((DWORD)GetLastError())
+#else
+# ifndef NO_STRERROR
+# include <errno.h>
+# 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:%d>", fd);
+#else
+ sprintf(path, "<fd:%d>", 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 <stdarg.h>
+
+/* -- 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 <stdio.h>
+
+/*
+ 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 <unistd.h>"
+$ write aconf "#include <unixio.h>"
+$ 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
+# <zinser@zinser.no-ip.info or martin.zinser@eurexchange.com>
+
+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 <stdio.h>
+
+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 <sp>'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=<path to>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 <eduardo.m.costa@gmail.com>
+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 <m.zinser@gsi.de>
+
+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" <jon-net@usa.net>
+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 <c_rios@sonda.cl>, 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 <michael_borgsys@hotmail.com> 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: <parameter> [optional] {Range of possible values}
+'Call subCompressFile(<path with filename to compress> [, <path with
+filename to write to>, [level of compression {1..9}]])
+'Call subUncompressFile(<path with filename to compress>)
+
+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 name=\\\"${CSRC}\\\">/,/<\\\\/source>/!d\" \
+ -e '/<depend /!d' \
+ -e 's/.* name=\"\\([^\"]*\\)\".*/\\1/' < \"${TOPDIR}/treebuild.xml\" |
+ while read HDR
+ do if action_needed \"${MODIFSNAME}\" \"${IFSDIR}/include/${HDR}\"
+ then echo recompile
+ break
+ fi
+ done`" ]
+ then return 0
+ fi
+
+ CMD="CRTCMOD MODULE(${TARGETLIB}/${1}) SRCSTMF('${2}')"
+ CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST)"
+ CMD="${CMD} LOCALETYPE(*LOCALE) FLAG(10)"
+ CMD="${CMD} INCDIR('${IFSDIR}/include' ${INCLUDES})"
+ CMD="${CMD} TGTCCSID(${TGTCCSID}) TGTRLS(${TGTRLS})"
+ CMD="${CMD} OUTPUT(${OUTPUT})"
+ CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
+ CMD="${CMD} DBGVIEW(${DEBUG})"
+ system "${CMD}"
+ LINK=YES
+}
+
+
+# Determine DB2 object name from IFS name.
+
+db2_name()
+
+{
+ basename "${1}" |
+ tr 'a-z-' 'A-Z_' |
+ sed -e 's/\..*//' \
+ -e 's/^\(.\).*\(.........\)$/\1\2/'
+}
+
+
+# Force enumeration types to be the same size as integers.
+
+copy_hfile()
+
+{
+ sed -e '1i\
+#pragma enum(int)\
+' "${@}" -e '$a\
+#pragma enum(pop)\
+'
+}
+
+
+################################################################################
+#
+# Script initialization.
+#
+################################################################################
+
+SCRIPTDIR=`dirname "${0}"`
+
+case "${SCRIPTDIR}" in
+/*) ;;
+*) SCRIPTDIR="`pwd`/${SCRIPTDIR}"
+esac
+
+while true
+do case "${SCRIPTDIR}" in
+ */.) SCRIPTDIR="${SCRIPTDIR%/.}";;
+ *) break;;
+ esac
+done
+
+# The script directory is supposed to be in ${TOPDIR}/os400.
+
+TOPDIR=`dirname "${SCRIPTDIR}"`
+export SCRIPTDIR TOPDIR
+cd "${TOPDIR}"
+
+
+# Extract the version from the master compilation XML file.
+
+VERSION=`sed -e '/^<package /!d' \
+ -e 's/^.* version="\([0-9.]*\)".*$/\1/' -e 'q' \
+ < treebuild.xml`
+export VERSION
+
+################################################################################
+
+
+# Create the OS/400 library if it does not exist.
+
+if action_needed "${LIBIFSNAME}"
+then CMD="CRTLIB LIB(${TARGETLIB}) TEXT('ZLIB: Data compression API')"
+ system "${CMD}"
+fi
+
+
+# Create the DOCS source file if it does not exist.
+
+if action_needed "${LIBIFSNAME}/DOCS.FILE"
+then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(112)"
+ CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')"
+ system "${CMD}"
+fi
+
+# Copy some documentation files if needed.
+
+for TEXT in "${TOPDIR}/ChangeLog" "${TOPDIR}/FAQ" \
+ "${TOPDIR}/README" "${SCRIPTDIR}/README400"
+do MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${TEXT}\"`.MBR"
+
+ if action_needed "${MEMBER}" "${TEXT}"
+ then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}') TOCCSID(${TGTCCSID})"
+ CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
+ system "${CMD}"
+ fi
+done
+
+
+# Create the OS/400 source program file for the C header files.
+
+SRCPF="${LIBIFSNAME}/H.FILE"
+
+if action_needed "${SRCPF}"
+then CMD="CRTSRCPF FILE(${TARGETLIB}/H) RCDLEN(112)"
+ CMD="${CMD} CCSID(${TGTCCSID}) TEXT('ZLIB: C/C++ header files')"
+ system "${CMD}"
+fi
+
+
+# Create the IFS directory for the C header files.
+
+if action_needed "${IFSDIR}/include"
+then mkdir -p "${IFSDIR}/include"
+fi
+
+# Copy the header files to DB2 library. Link from IFS include directory.
+
+for HFILE in "${TOPDIR}/"*.h
+do DEST="${SRCPF}/`db2_name \"${HFILE}\"`.MBR"
+
+ if action_needed "${DEST}" "${HFILE}"
+ then copy_hfile < "${HFILE}" > 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 '/<source name="/!d' \
+ -e 's/.* name="\([^"]*\)".*/\1/' < treebuild.xml`
+
+# Compile the sources into modules.
+
+for SRC in ${CSOURCES}
+do MODULE=`db2_name "${SRC}"`
+ make_module "${MODULE}" "${SRC}"
+done
+
+
+# If needed, (re)create the static binding directory.
+
+if action_needed "${LIBIFSNAME}/${STATBNDDIR}.BNDDIR"
+then LINK=YES
+fi
+
+if [ "${LINK}" ]
+then rm -rf "${LIBIFSNAME}/${STATBNDDIR}.BNDDIR"
+ CMD="CRTBNDDIR BNDDIR(${TARGETLIB}/${STATBNDDIR})"
+ CMD="${CMD} TEXT('ZLIB static binding directory')"
+ system "${CMD}"
+
+ for MODULE in ${MODULES}
+ do CMD="ADDBNDDIRE BNDDIR(${TARGETLIB}/${STATBNDDIR})"
+ CMD="${CMD} OBJ((${TARGETLIB}/${MODULE} *MODULE))"
+ system "${CMD}"
+ done
+fi
+
+
+# The exportation file for service program creation must be in a DB2
+# source file, so make sure it exists.
+
+if action_needed "${LIBIFSNAME}/TOOLS.FILE"
+then CMD="CRTSRCPF FILE(${TARGETLIB}/TOOLS) RCDLEN(112)"
+ CMD="${CMD} CCSID(${TGTCCSID}) TEXT('ZLIB: build tools')"
+ system "${CMD}"
+fi
+
+
+DEST="${LIBIFSNAME}/TOOLS.FILE/BNDSRC.MBR"
+
+if action_needed "${SCRIPTDIR}/bndsrc" "${DEST}"
+then CMD="CPY OBJ('${SCRIPTDIR}/bndsrc') TOOBJ('${DEST}')"
+ CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)"
+ system "${CMD}"
+ # touch -r "${SCRIPTDIR}/bndsrc" "${DEST}"
+ LINK=YES
+fi
+
+
+# Build the service program if needed.
+
+if action_needed "${LIBIFSNAME}/${SRVPGM}.SRVPGM"
+then LINK=YES
+fi
+
+if [ "${LINK}" ]
+then CMD="CRTSRVPGM SRVPGM(${TARGETLIB}/${SRVPGM})"
+ CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(BNDSRC)"
+ CMD="${CMD} MODULE(${TARGETLIB}/OS400)"
+ CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR})"
+ CMD="${CMD} TEXT('ZLIB ${VERSION} dynamic library')"
+ CMD="${CMD} TGTRLS(${TGTRLS})"
+ system "${CMD}"
+ LINK=YES
+
+ # Duplicate the service program for a versioned backup.
+
+ BACKUP=`echo "${SRVPGM}${VERSION}" |
+ sed -e 's/.*\(..........\)$/\1/' -e 's/\./_/g'`
+ BACKUP="`db2_name \"${BACKUP}\"`"
+ BKUPIFSNAME="${LIBIFSNAME}/${BACKUP}.SRVPGM"
+ rm -f "${BKUPIFSNAME}"
+ CMD="CRTDUPOBJ OBJ(${SRVPGM}) FROMLIB(${TARGETLIB})"
+ CMD="${CMD} OBJTYPE(*SRVPGM) NEWOBJ(${BACKUP})"
+ system "${CMD}"
+fi
+
+
+# If needed, (re)create the dynamic binding directory.
+
+if action_needed "${LIBIFSNAME}/${DYNBNDDIR}.BNDDIR"
+then LINK=YES
+fi
+
+if [ "${LINK}" ]
+then rm -rf "${LIBIFSNAME}/${DYNBNDDIR}.BNDDIR"
+ CMD="CRTBNDDIR BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
+ CMD="${CMD} TEXT('ZLIB dynamic binding directory')"
+ system "${CMD}"
+ CMD="ADDBNDDIRE BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
+ CMD="${CMD} OBJ((*LIBL/${SRVPGM} *SRVPGM))"
+ system "${CMD}"
+fi
diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/zlib.inc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/zlib.inc
new file mode 100644
index 000000000..c6aca2cbd
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/zlib.inc
@@ -0,0 +1,527 @@
+ * ZLIB.INC - Interface to the general purpose compression library
+ *
+ * ILE RPG400 version by Patrick Monnerat, DATASPHERE.
+ * Version 1.2.11
+ *
+ *
+ * WARNING:
+ * Procedures inflateInit(), inflateInit2(), deflateInit(),
+ * deflateInit2() and inflateBackInit() need to be called with
+ * two additional arguments:
+ * the package version string and the stream control structure.
+ * size. This is needed because RPG lacks some macro feature.
+ * Call these procedures as:
+ * inflateInit(...: ZLIB_VERSION: %size(z_stream))
+ *
+ /if not defined(ZLIB_H_)
+ /define ZLIB_H_
+ *
+ **************************************************************************
+ * Constants
+ **************************************************************************
+ *
+ * Versioning information.
+ *
+ D ZLIB_VERSION C '1.2.11'
+ D ZLIB_VERNUM C X'12a0'
+ D ZLIB_VER_MAJOR C 1
+ D ZLIB_VER_MINOR C 2
+ D ZLIB_VER_REVISION...
+ D C 11
+ D ZLIB_VER_SUBREVISION...
+ D C 0
+ *
+ * Other equates.
+ *
+ D Z_NO_FLUSH C 0
+ D Z_PARTIAL_FLUSH...
+ D C 1
+ D Z_SYNC_FLUSH C 2
+ D Z_FULL_FLUSH C 3
+ D Z_FINISH C 4
+ D Z_BLOCK C 5
+ D Z_TREES C 6
+ *
+ D Z_OK C 0
+ D Z_STREAM_END C 1
+ D Z_NEED_DICT C 2
+ D Z_ERRNO C -1
+ D Z_STREAM_ERROR C -2
+ D Z_DATA_ERROR C -3
+ D Z_MEM_ERROR C -4
+ D Z_BUF_ERROR C -5
+ D Z_VERSION_ERROR C -6
+ *
+ D Z_NO_COMPRESSION...
+ D C 0
+ D Z_BEST_SPEED C 1
+ D Z_BEST_COMPRESSION...
+ D C 9
+ D Z_DEFAULT_COMPRESSION...
+ D C -1
+ *
+ D Z_FILTERED C 1
+ D Z_HUFFMAN_ONLY C 2
+ D Z_RLE C 3
+ D Z_DEFAULT_STRATEGY...
+ D C 0
+ *
+ D Z_BINARY C 0
+ D Z_ASCII C 1
+ D Z_UNKNOWN C 2
+ *
+ D Z_DEFLATED C 8
+ *
+ D Z_NULL C 0
+ *
+ **************************************************************************
+ * Types
+ **************************************************************************
+ *
+ D z_streamp S * Stream struct ptr
+ D gzFile S * File pointer
+ D gz_headerp S *
+ D z_off_t S 10i 0 Stream offsets
+ D z_off64_t S 20i 0 Stream offsets
+ *
+ **************************************************************************
+ * Structures
+ **************************************************************************
+ *
+ * The GZIP encode/decode stream support structure.
+ *
+ D z_stream DS align based(z_streamp)
+ D zs_next_in * Next input byte
+ D zs_avail_in 10U 0 Byte cnt at next_in
+ D zs_total_in 10U 0 Total bytes read
+ D zs_next_out * Output buffer ptr
+ D zs_avail_out 10U 0 Room left @ next_out
+ D zs_total_out 10U 0 Total bytes written
+ D zs_msg * Last errmsg or null
+ D zs_state * Internal state
+ D zs_zalloc * procptr Int. state allocator
+ D zs_free * procptr Int. state dealloc.
+ D zs_opaque * Private alloc. data
+ D zs_data_type 10i 0 ASC/BIN best guess
+ D zs_adler 10u 0 Uncompr. adler32 val
+ D 10U 0 Reserved
+ D 10U 0 Ptr. alignment
+ *
+ **************************************************************************
+ * Utility function prototypes
+ **************************************************************************
+ *
+ D compress PR 10I 0 extproc('compress')
+ D dest 65535 options(*varsize) Destination buffer
+ D destLen 10U 0 Destination length
+ D source 65535 const options(*varsize) Source buffer
+ D sourceLen 10u 0 value Source length
+ *
+ D compress2 PR 10I 0 extproc('compress2')
+ D dest 65535 options(*varsize) Destination buffer
+ D destLen 10U 0 Destination length
+ D source 65535 const options(*varsize) Source buffer
+ D sourceLen 10U 0 value Source length
+ D level 10I 0 value Compression level
+ *
+ D compressBound PR 10U 0 extproc('compressBound')
+ D sourceLen 10U 0 value
+ *
+ D uncompress PR 10I 0 extproc('uncompress')
+ D dest 65535 options(*varsize) Destination buffer
+ D destLen 10U 0 Destination length
+ D source 65535 const options(*varsize) Source buffer
+ D sourceLen 10U 0 value Source length
+ *
+ D uncompress2 PR 10I 0 extproc('uncompress2')
+ D dest 65535 options(*varsize) Destination buffer
+ D destLen 10U 0 Destination length
+ D source 65535 const options(*varsize) Source buffer
+ D sourceLen 10U 0 Source length
+ *
+ /if not defined(LARGE_FILES)
+ D gzopen PR extproc('gzopen')
+ D like(gzFile)
+ D path * value options(*string) File pathname
+ D mode * value options(*string) Open mode
+ /else
+ D gzopen PR extproc('gzopen64')
+ D like(gzFile)
+ D path * value options(*string) File pathname
+ D mode * value options(*string) Open mode
+ *
+ D gzopen64 PR extproc('gzopen64')
+ D like(gzFile)
+ D path * value options(*string) File pathname
+ D mode * value options(*string) Open mode
+ /endif
+ *
+ D gzdopen PR extproc('gzdopen')
+ D like(gzFile)
+ D fd 10I 0 value File descriptor
+ D mode * value options(*string) Open mode
+ *
+ D gzbuffer PR 10I 0 extproc('gzbuffer')
+ D file value like(gzFile) File pointer
+ D size 10U 0 value
+ *
+ D gzsetparams PR 10I 0 extproc('gzsetparams')
+ D file value like(gzFile) File pointer
+ D level 10I 0 value
+ D strategy 10I 0 value
+ *
+ D gzread PR 10I 0 extproc('gzread')
+ D file value like(gzFile) File pointer
+ D buf 65535 options(*varsize) Buffer
+ D len 10u 0 value Buffer length
+ *
+ D gzfread PR 20I 0 extproc('gzfread')
+ D buf 65535 options(*varsize) Buffer
+ D size 20u 0 value Buffer length
+ D nitems 20u 0 value Buffer length
+ D file value like(gzFile) File pointer
+ *
+ D gzwrite PR 10I 0 extproc('gzwrite')
+ D file value like(gzFile) File pointer
+ D buf 65535 const options(*varsize) Buffer
+ D len 10u 0 value Buffer length
+ *
+ D gzfwrite PR 20I 0 extproc('gzfwrite')
+ D buf 65535 options(*varsize) Buffer
+ D size 20u 0 value Buffer length
+ D nitems 20u 0 value Buffer length
+ D file value like(gzFile) File pointer
+ *
+ D gzputs PR 10I 0 extproc('gzputs')
+ D file value like(gzFile) File pointer
+ D s * value options(*string) String to output
+ *
+ D gzgets PR * extproc('gzgets')
+ D file value like(gzFile) File pointer
+ D buf 65535 options(*varsize) Read buffer
+ D len 10i 0 value Buffer length
+ *
+ D gzputc PR 10i 0 extproc('gzputc')
+ D file value like(gzFile) File pointer
+ D c 10I 0 value Character to write
+ *
+ D gzgetc PR 10i 0 extproc('gzgetc')
+ D file value like(gzFile) File pointer
+ *
+ D gzgetc_ PR 10i 0 extproc('gzgetc_')
+ D file value like(gzFile) File pointer
+ *
+ D gzungetc PR 10i 0 extproc('gzungetc')
+ D c 10I 0 value Character to push
+ D file value like(gzFile) File pointer
+ *
+ D gzflush PR 10i 0 extproc('gzflush')
+ D file value like(gzFile) File pointer
+ D flush 10I 0 value Type of flush
+ *
+ /if not defined(LARGE_FILES)
+ D gzseek PR extproc('gzseek')
+ D like(z_off_t)
+ D file value like(gzFile) File pointer
+ D offset value like(z_off_t) Offset
+ D whence 10i 0 value Origin
+ /else
+ D gzseek PR extproc('gzseek64')
+ D like(z_off_t)
+ D file value like(gzFile) File pointer
+ D offset value like(z_off_t) Offset
+ D whence 10i 0 value Origin
+ *
+ D gzseek64 PR extproc('gzseek64')
+ D like(z_off64_t)
+ D file value like(gzFile) File pointer
+ D offset value like(z_off64_t) Offset
+ D whence 10i 0 value Origin
+ /endif
+ *
+ D gzrewind PR 10i 0 extproc('gzrewind')
+ D file value like(gzFile) File pointer
+ *
+ /if not defined(LARGE_FILES)
+ D gztell PR extproc('gztell')
+ D like(z_off_t)
+ D file value like(gzFile) File pointer
+ /else
+ D gztell PR extproc('gztell64')
+ D like(z_off_t)
+ D file value like(gzFile) File pointer
+ *
+ D gztell64 PR extproc('gztell64')
+ D like(z_off64_t)
+ D file value like(gzFile) File pointer
+ /endif
+ *
+ /if not defined(LARGE_FILES)
+ D gzoffset PR extproc('gzoffset')
+ D like(z_off_t)
+ D file value like(gzFile) File pointer
+ /else
+ D gzoffset PR extproc('gzoffset64')
+ D like(z_off_t)
+ D file value like(gzFile) File pointer
+ *
+ D gzoffset64 PR extproc('gzoffset64')
+ D like(z_off64_t)
+ D file value like(gzFile) File pointer
+ /endif
+ *
+ D gzeof PR 10i 0 extproc('gzeof')
+ D file value like(gzFile) File pointer
+ *
+ D gzdirect PR 10i 0 extproc('gzdirect')
+ D file value like(gzFile) File pointer
+ *
+ D gzclose_r PR 10i 0 extproc('gzclose_r')
+ D file value like(gzFile) File pointer
+ *
+ D gzclose_w PR 10i 0 extproc('gzclose_w')
+ D file value like(gzFile) File pointer
+ *
+ D gzclose PR 10i 0 extproc('gzclose')
+ D file value like(gzFile) File pointer
+ *
+ D gzerror PR * extproc('gzerror') Error string
+ D file value like(gzFile) File pointer
+ D errnum 10I 0 Error code
+ *
+ D gzclearerr PR extproc('gzclearerr')
+ D file value like(gzFile) File pointer
+ *
+ **************************************************************************
+ * Basic function prototypes
+ **************************************************************************
+ *
+ D zlibVersion PR * extproc('zlibVersion') Version string
+ *
+ D deflateInit PR 10I 0 extproc('deflateInit_') Init. compression
+ D strm like(z_stream) Compression stream
+ D level 10I 0 value Compression level
+ D version * value options(*string) Version string
+ D stream_size 10i 0 value Stream struct. size
+ *
+ D deflate PR 10I 0 extproc('deflate') Compress data
+ D strm like(z_stream) Compression stream
+ D flush 10I 0 value Flush type required
+ *
+ D deflateEnd PR 10I 0 extproc('deflateEnd') Termin. compression
+ D strm like(z_stream) Compression stream
+ *
+ D inflateInit PR 10I 0 extproc('inflateInit_') Init. expansion
+ D strm like(z_stream) Expansion stream
+ D version * value options(*string) Version string
+ D stream_size 10i 0 value Stream struct. size
+ *
+ D inflate PR 10I 0 extproc('inflate') Expand data
+ D strm like(z_stream) Expansion stream
+ D flush 10I 0 value Flush type required
+ *
+ D inflateEnd PR 10I 0 extproc('inflateEnd') Termin. expansion
+ D strm like(z_stream) Expansion stream
+ *
+ **************************************************************************
+ * Advanced function prototypes
+ **************************************************************************
+ *
+ D deflateInit2 PR 10I 0 extproc('deflateInit2_') Init. compression
+ D strm like(z_stream) Compression stream
+ D level 10I 0 value Compression level
+ D method 10I 0 value Compression method
+ D windowBits 10I 0 value log2(window size)
+ D memLevel 10I 0 value Mem/cmpress tradeoff
+ D strategy 10I 0 value Compression strategy
+ D version * value options(*string) Version string
+ D stream_size 10i 0 value Stream struct. size
+ *
+ D deflateSetDictionary...
+ D PR 10I 0 extproc('deflateSetDictionary') Init. dictionary
+ D strm like(z_stream) Compression stream
+ D dictionary 65535 const options(*varsize) Dictionary bytes
+ D dictLength 10U 0 value Dictionary length
+ *
+ D deflateCopy PR 10I 0 extproc('deflateCopy') Compress strm 2 strm
+ D dest like(z_stream) Destination stream
+ D source like(z_stream) Source stream
+ *
+ D deflateReset PR 10I 0 extproc('deflateReset') End and init. stream
+ D strm like(z_stream) Compression stream
+ *
+ D deflateParams PR 10I 0 extproc('deflateParams') Change level & strat
+ D strm like(z_stream) Compression stream
+ D level 10I 0 value Compression level
+ D strategy 10I 0 value Compression strategy
+ *
+ D deflateTune PR 10I 0 extproc('deflateTune')
+ D strm like(z_stream) Compression stream
+ D good 10I 0 value
+ D lazy 10I 0 value
+ D nice 10I 0 value
+ D chain 10I 0 value
+ *
+ D deflateBound PR 10U 0 extproc('deflateBound') Change level & strat
+ D strm like(z_stream) Compression stream
+ D sourcelen 10U 0 value Compression level
+ *
+ D deflatePending PR 10I 0 extproc('deflatePending') Change level & strat
+ D strm like(z_stream) Compression stream
+ D pending 10U 0 Pending bytes
+ D bits 10I 0 Pending bits
+ *
+ D deflatePrime PR 10I 0 extproc('deflatePrime') Change level & strat
+ D strm like(z_stream) Compression stream
+ D bits 10I 0 value # of bits to insert
+ D value 10I 0 value Bits to insert
+ *
+ D inflateInit2 PR 10I 0 extproc('inflateInit2_') Init. expansion
+ D strm like(z_stream) Expansion stream
+ D windowBits 10I 0 value log2(window size)
+ D version * value options(*string) Version string
+ D stream_size 10i 0 value Stream struct. size
+ *
+ D inflateSetDictionary...
+ D PR 10I 0 extproc('inflateSetDictionary') Init. dictionary
+ D strm like(z_stream) Expansion stream
+ D dictionary 65535 const options(*varsize) Dictionary bytes
+ D dictLength 10U 0 value Dictionary length
+ *
+ D inflateGetDictionary...
+ D PR 10I 0 extproc('inflateGetDictionary') Get dictionary
+ D strm like(z_stream) Expansion stream
+ D dictionary 65535 options(*varsize) Dictionary bytes
+ D dictLength 10U 0 Dictionary length
+ *
+ D deflateGetDictionary...
+ D PR 10I 0 extproc('deflateGetDictionary') Get dictionary
+ D strm like(z_stream) Expansion stream
+ D dictionary 65535 options(*varsize) Dictionary bytes
+ D dictLength 10U 0 Dictionary length
+ *
+ D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansion
+ D strm like(z_stream) Expansion stream
+ *
+ D inflateCopy PR 10I 0 extproc('inflateCopy')
+ D dest like(z_stream) Destination stream
+ D source like(z_stream) Source stream
+ *
+ D inflateReset PR 10I 0 extproc('inflateReset') End and init. stream
+ D strm like(z_stream) Expansion stream
+ *
+ D inflateReset2 PR 10I 0 extproc('inflateReset2') End and init. stream
+ D strm like(z_stream) Expansion stream
+ D windowBits 10I 0 value Log2(buffer size)
+ *
+ D inflatePrime PR 10I 0 extproc('inflatePrime') Insert bits
+ D strm like(z_stream) Expansion stream
+ D bits 10I 0 value Bit count
+ D value 10I 0 value Bits to insert
+ *
+ D inflateMark PR 10I 0 extproc('inflateMark') Get inflate info
+ D strm like(z_stream) Expansion stream
+ *
+ D inflateCodesUsed...
+ PR 20U 0 extproc('inflateCodesUsed')
+ D strm like(z_stream) Expansion stream
+ *
+ D inflateValidate...
+ PR 20U 0 extproc('inflateValidate')
+ D strm like(z_stream) Expansion stream
+ D check 10I 0 value
+ *
+ D inflateGetHeader...
+ PR 10U 0 extproc('inflateGetHeader')
+ D strm like(z_stream) Expansion stream
+ D head like(gz_headerp)
+ *
+ D deflateSetHeader...
+ PR 10U 0 extproc('deflateSetHeader')
+ D strm like(z_stream) Expansion stream
+ D head like(gz_headerp)
+ *
+ D inflateBackInit...
+ D PR 10I 0 extproc('inflateBackInit_')
+ D strm like(z_stream) Expansion stream
+ D windowBits 10I 0 value Log2(buffer size)
+ D window 65535 options(*varsize) Buffer
+ D version * value options(*string) Version string
+ D stream_size 10i 0 value Stream struct. size
+ *
+ D inflateBack PR 10I 0 extproc('inflateBack')
+ D strm like(z_stream) Expansion stream
+ D in * value procptr Input function
+ D in_desc * value Input descriptor
+ D out * value procptr Output function
+ D out_desc * value Output descriptor
+ *
+ D inflateBackEnd PR 10I 0 extproc('inflateBackEnd')
+ D strm like(z_stream) Expansion stream
+ *
+ D zlibCompileFlags...
+ D PR 10U 0 extproc('zlibCompileFlags')
+ *
+ **************************************************************************
+ * Checksum function prototypes
+ **************************************************************************
+ *
+ D adler32 PR 10U 0 extproc('adler32') New checksum
+ D adler 10U 0 value Old checksum
+ D buf 65535 const options(*varsize) Bytes to accumulate
+ D len 10U 0 value Buffer length
+ *
+ D adler32_combine...
+ PR 10U 0 extproc('adler32_combine') New checksum
+ D adler1 10U 0 value Old checksum
+ D adler2 10U 0 value Old checksum
+ D len2 20U 0 value Buffer length
+ *
+ D adler32_z PR 10U 0 extproc('adler32_z') New checksum
+ D adler 10U 0 value Old checksum
+ D buf 65535 const options(*varsize) Bytes to accumulate
+ D len 20U 0 value Buffer length
+ *
+ D crc32 PR 10U 0 extproc('crc32') New checksum
+ D crc 10U 0 value Old checksum
+ D buf 65535 const options(*varsize) Bytes to accumulate
+ D len 10U 0 value Buffer length
+ *
+ D crc32_combine...
+ PR 10U 0 extproc('crc32_combine') New checksum
+ D crc1 10U 0 value Old checksum
+ D crc2 10U 0 value Old checksum
+ D len2 20U 0 value Buffer length
+ *
+ D crc32_z PR 10U 0 extproc('crc32_z') New checksum
+ D crc 10U 0 value Old checksum
+ D buf 65535 const options(*varsize) Bytes to accumulate
+ D len 20U 0 value Buffer length
+ *
+ **************************************************************************
+ * Miscellaneous function prototypes
+ **************************************************************************
+ *
+ D zError PR * extproc('zError') Error string
+ D err 10I 0 value Error code
+ *
+ D inflateSyncPoint...
+ D PR 10I 0 extproc('inflateSyncPoint')
+ D strm like(z_stream) Expansion stream
+ *
+ D get_crc_table PR * extproc('get_crc_table') Ptr to ulongs
+ *
+ D inflateUndermine...
+ D PR 10I 0 extproc('inflateUndermine')
+ D strm like(z_stream) Expansion stream
+ D arg 10I 0 value Error code
+ *
+ D inflateResetKeep...
+ D PR 10I 0 extproc('inflateResetKeep') End and init. stream
+ D strm like(z_stream) Expansion stream
+ *
+ D deflateResetKeep...
+ D PR 10I 0 extproc('deflateResetKeep') End and init. stream
+ D strm like(z_stream) Expansion stream
+ *
+ /endif
diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/qnx/package.qpg b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/qnx/package.qpg
new file mode 100644
index 000000000..31e8e90db
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/qnx/package.qpg
@@ -0,0 +1,141 @@
+<QPG:Generation>
+ <QPG:Options>
+ <QPG:User unattended="no" verbosity="2" listfiles="yes"/>
+ <QPG:Defaults type="qnx_package"/>
+ <QPG:Source></QPG:Source>
+ <QPG:Release number="+"/>
+ <QPG:Build></QPG:Build>
+ <QPG:FileSorting strip="yes"/>
+ <QPG:Package targets="combine"/>
+ <QPG:Repository generate="yes"/>
+ <QPG:FinalDir></QPG:FinalDir>
+ <QPG:Cleanup></QPG:Cleanup>
+ </QPG:Options>
+
+ <QPG:Responsible>
+ <QPG:Company></QPG:Company>
+ <QPG:Department></QPG:Department>
+ <QPG:Group></QPG:Group>
+ <QPG:Team></QPG:Team>
+ <QPG:Employee></QPG:Employee>
+ <QPG:EmailAddress></QPG:EmailAddress>
+ </QPG:Responsible>
+
+ <QPG:Values>
+ <QPG:Files>
+ <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
+ <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
+ <QPG:Add file="../libz.so.1.2.11" install="/opt/lib/" user="root:bin" permission="644"/>
+ <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.11"/>
+ <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.11"/>
+ <QPG:Add file="../libz.so.1.2.11" install="/opt/lib/" component="slib"/>
+ </QPG:Files>
+
+ <QPG:PackageFilter>
+ <QPM:PackageManifest>
+ <QPM:PackageDescription>
+ <QPM:PackageType>Library</QPM:PackageType>
+ <QPM:PackageReleaseNotes></QPM:PackageReleaseNotes>
+ <QPM:PackageReleaseUrgency>Medium</QPM:PackageReleaseUrgency>
+ <QPM:PackageRepository></QPM:PackageRepository>
+ <QPM:FileVersion>2.0</QPM:FileVersion>
+ </QPM:PackageDescription>
+
+ <QPM:ProductDescription>
+ <QPM:ProductName>zlib</QPM:ProductName>
+ <QPM:ProductIdentifier>zlib</QPM:ProductIdentifier>
+ <QPM:ProductEmail>alain.bonnefoy@icbt.com</QPM:ProductEmail>
+ <QPM:VendorName>Public</QPM:VendorName>
+ <QPM:VendorInstallName>public</QPM:VendorInstallName>
+ <QPM:VendorURL>www.gzip.org/zlib</QPM:VendorURL>
+ <QPM:VendorEmbedURL></QPM:VendorEmbedURL>
+ <QPM:VendorEmail></QPM:VendorEmail>
+ <QPM:AuthorName>Jean-Loup Gailly,Mark Adler</QPM:AuthorName>
+ <QPM:AuthorURL>www.gzip.org/zlib</QPM:AuthorURL>
+ <QPM:AuthorEmbedURL></QPM:AuthorEmbedURL>
+ <QPM:AuthorEmail>zlib@gzip.org</QPM:AuthorEmail>
+ <QPM:ProductIconSmall></QPM:ProductIconSmall>
+ <QPM:ProductIconLarge></QPM:ProductIconLarge>
+ <QPM:ProductDescriptionShort>A massively spiffy yet delicately unobtrusive compression library.</QPM:ProductDescriptionShort>
+ <QPM:ProductDescriptionLong>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.</QPM:ProductDescriptionLong>
+ <QPM:ProductDescriptionURL>http://www.gzip.org/zlib</QPM:ProductDescriptionURL>
+ <QPM:ProductDescriptionEmbedURL></QPM:ProductDescriptionEmbedURL>
+ </QPM:ProductDescription>
+
+ <QPM:ReleaseDescription>
+ <QPM:ReleaseVersion>1.2.11</QPM:ReleaseVersion>
+ <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
+ <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
+ <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
+ <QPM:ReleaseNoteMajor></QPM:ReleaseNoteMajor>
+ <QPM:ExcludeCountries>
+ <QPM:Country></QPM:Country>
+ </QPM:ExcludeCountries>
+
+ <QPM:ReleaseCopyright>No License</QPM:ReleaseCopyright>
+ </QPM:ReleaseDescription>
+
+ <QPM:ContentDescription>
+ <QPM:ContentTopic xmlmultiple="true">Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic>
+ <QPM:ContentKeyword>zlib,compression</QPM:ContentKeyword>
+ <QPM:TargetOS>qnx6</QPM:TargetOS>
+ <QPM:HostOS>qnx6</QPM:HostOS>
+ <QPM:DisplayEnvironment xmlmultiple="true">None</QPM:DisplayEnvironment>
+ <QPM:TargetAudience xmlmultiple="true">Developer</QPM:TargetAudience>
+ </QPM:ContentDescription>
+ </QPM:PackageManifest>
+ </QPG:PackageFilter>
+
+ <QPG:PackageFilter proc="none" target="none">
+ <QPM:PackageManifest>
+ <QPM:ProductInstallationDependencies>
+ <QPM:ProductRequirements></QPM:ProductRequirements>
+ </QPM:ProductInstallationDependencies>
+
+ <QPM:ProductInstallationProcedure>
+ <QPM:Script xmlmultiple="true">
+ <QPM:ScriptName></QPM:ScriptName>
+ <QPM:ScriptType>Install</QPM:ScriptType>
+ <QPM:ScriptTiming>Post</QPM:ScriptTiming>
+ <QPM:ScriptBlocking>No</QPM:ScriptBlocking>
+ <QPM:ScriptResult>Ignore</QPM:ScriptResult>
+ <QPM:ShortDescription></QPM:ShortDescription>
+ <QPM:UseBinaries>No</QPM:UseBinaries>
+ <QPM:Priority>Optional</QPM:Priority>
+ </QPM:Script>
+ </QPM:ProductInstallationProcedure>
+ </QPM:PackageManifest>
+
+ <QPM:Launch>
+ </QPM:Launch>
+ </QPG:PackageFilter>
+
+ <QPG:PackageFilter type="core" component="none">
+ <QPM:PackageManifest>
+ <QPM:ProductInstallationProcedure>
+ <QPM:OrderDependency xmlmultiple="true">
+ <QPM:Order>InstallOver</QPM:Order>
+ <QPM:Product>zlib</QPM:Product>
+ </QPM:OrderDependency>
+ </QPM:ProductInstallationProcedure>
+ </QPM:PackageManifest>
+
+ <QPM:Launch>
+ </QPM:Launch>
+ </QPG:PackageFilter>
+
+ <QPG:PackageFilter type="core" component="dev">
+ <QPM:PackageManifest>
+ <QPM:ProductInstallationProcedure>
+ <QPM:OrderDependency xmlmultiple="true">
+ <QPM:Order>InstallOver</QPM:Order>
+ <QPM:Product>zlib-dev</QPM:Product>
+ </QPM:OrderDependency>
+ </QPM:ProductInstallationProcedure>
+ </QPM:PackageManifest>
+
+ <QPM:Launch>
+ </QPM:Launch>
+ </QPG:PackageFilter>
+ </QPG:Values>
+</QPG:Generation>
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 <stdio.h>
+
+#ifdef STDC
+# include <string.h>
+# include <stdlib.h>
+#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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#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(&copy, &strm); assert(ret == Z_OK);
+ ret = inflateEnd(&copy); 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(&copy, &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 <stdio.h>
+
+#ifdef STDC
+# include <string.h>
+# include <stdlib.h>
+#endif
+
+#ifdef USE_MMAP
+# include <sys/types.h>
+# include <sys/mman.h>
+# include <sys/stat.h>
+#endif
+
+#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
+# include <fcntl.h>
+# include <io.h>
+# ifdef UNDER_CE
+# include <stdlib.h>
+# 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 <unix.h> /* 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 <windows.h>
+# 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 <unistd.h> /* 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 <malbrech@eso.org> */
+
+/* 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 @@
+<?xml version="1.0" ?>
+<package name="zlib" version="1.2.11">
+ <library name="zlib" dlversion="1.2.11" dlname="z">
+ <property name="description"> zip compression library </property>
+ <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
+
+ <!-- fixme: not implemented yet -->
+ <property name="compiler/c/inline" value="yes" />
+
+ <include-file name="zlib.h" scope="public" mode="644" />
+ <include-file name="zconf.h" scope="public" mode="644" />
+
+ <source name="adler32.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ </source>
+ <source name="compress.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ </source>
+ <source name="crc32.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="crc32.h" />
+ </source>
+ <source name="gzclose.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="gzlib.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="gzread.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="gzwrite.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="uncompr.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ </source>
+ <source name="deflate.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="deflate.h" />
+ </source>
+ <source name="trees.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="deflate.h" />
+ <depend name="trees.h" />
+ </source>
+ <source name="zutil.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ </source>
+ <source name="inflate.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ <depend name="inflate.h" />
+ <depend name="inffast.h" />
+ </source>
+ <source name="infback.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ <depend name="inflate.h" />
+ <depend name="inffast.h" />
+ </source>
+ <source name="inftrees.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ </source>
+ <source name="inffast.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ <depend name="inflate.h" />
+ <depend name="inffast.h" />
+ </source>
+ </library>
+</package>
+
+<!--
+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
+
+# OBJA =
+# to use the asm code: make OBJA=match.o
+#
+match.o: match.S
+ $(CPP) match.S > _match.s
+ $(CC) -c _match.s
+ mv _match.o match.o
+ rm -f _match.s
+-->
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 <ctype.h>
+#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<<extra_lbits[code]); n++) {
+ _length_code[length++] = (uch)code;
+ }
+ }
+ Assert (length == 256, "tr_static_init: length != 256");
+ /* Note that the length 255 (match length 258) can be represented
+ * in two different ways: code 284 + 5 bits or code 285, so we
+ * overwrite length_code[255] to use the best encoding:
+ */
+ _length_code[length-1] = (uch)code;
+
+ /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+ dist = 0;
+ for (code = 0 ; code < 16; code++) {
+ base_dist[code] = dist;
+ for (n = 0; n < (1<<extra_dbits[code]); n++) {
+ _dist_code[dist++] = (uch)code;
+ }
+ }
+ Assert (dist == 256, "tr_static_init: dist != 256");
+ dist >>= 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 <stdio.h>
+# 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<<MAX_BITS)-1,
+ "inconsistent bit counts");
+ Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
+
+ for (n = 0; n <= max_code; n++) {
+ int len = tree[n].Len;
+ if (len == 0) continue;
+ /* Now reverse the bits */
+ tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
+
+ Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
+ n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
+ }
+}
+
+/* ===========================================================================
+ * Construct one Huffman tree and assigns the code bit strings and lengths.
+ * Update the total bit length for the current block.
+ * IN assertion: the field freq is set for all tree elements.
+ * OUT assertions: the fields len and code are set to the optimal bit length
+ * and corresponding code. The length opt_len is updated; static_len is
+ * also updated if stree is not null. The field max_code is set.
+ */
+local void build_tree(s, desc)
+ deflate_state *s;
+ tree_desc *desc; /* the tree descriptor */
+{
+ ct_data *tree = desc->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 <windows.h>, 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
+ <windows.h> 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
+ <<my favorite C run-time library>> ?
+
+ - 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 <cosmint@cs.ubbcluj.ro>
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 <zlib@gzip.org>. 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 <winver.h>
+#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 <stddef.h>
+ 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 <windows.h>
+ /* 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 <limits.h>
+# 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 <sys/types.h> /* for off_t */
+# endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include <stdarg.h> /* for va_list */
+# endif
+#endif
+
+#ifdef _WIN32
+# ifndef Z_SOLO
+# include <stddef.h> /* 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 <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include <unixio.h> /* 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 <stddef.h>
+ 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 <windows.h>
+ /* 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 <limits.h>
+# 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 <sys/types.h> /* for off_t */
+# endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include <stdarg.h> /* for va_list */
+# endif
+#endif
+
+#ifdef _WIN32
+# ifndef Z_SOLO
+# include <stddef.h> /* 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 <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include <unixio.h> /* 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 <stddef.h>
+ 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 <windows.h>
+ /* 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 <limits.h>
+# 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 <sys/types.h> /* for off_t */
+# endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include <stdarg.h> /* for va_list */
+# endif
+#endif
+
+#ifdef _WIN32
+# ifndef Z_SOLO
+# include <stddef.h> /* 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 <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include <unixio.h> /* 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
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3.pdf
Binary files 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 <stdlib.h>
+# 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 <stddef.h>
+# endif
+# include <string.h>
+# include <stdlib.h>
+#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 <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
+# 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 <malloc.h>
+# 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 <unix.h> /* 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 <stdio.h>
+ 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 $<CONFIG>)
+
+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 <boost/log/trivial.hpp>
+
+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 $<CONFIG>)
+
+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 <boost/mpi/environment.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+int main()
+{
+ std::pair<int, int> 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 $<CONFIG>)
+
+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 <boost/program_options.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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<std::string>(), "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>();
+ }
+
+ 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 $<CONFIG>)
+
+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 <boost/python.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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<int>( 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 $<CONFIG>)
+
+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 <boost/random/random_device.hpp>
+
+#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 <boost/core/lightweight_test.hpp>
+
+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 $<CONFIG>)
+
+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 <boost/regex.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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 $<CONFIG>)
+
+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 <boost/archive/text_iarchive.hpp>
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/core/lightweight_test.hpp>
+#include <sstream>
+#include <string>
+
+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 <boost/archive/text_wiarchive.hpp>
+#include <boost/archive/text_woarchive.hpp>
+#include <boost/core/lightweight_test.hpp>
+#include <sstream>
+#include <string>
+
+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 $<CONFIG>)
+
+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 <boost/system/error_code.hpp>
+#include <boost/core/lightweight_test.hpp>
+#include <cerrno>
+
+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 $<CONFIG>)
+
+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 <boost/test/prg_exec_monitor.hpp>
+
+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/test/unit_test.hpp>
+
+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 $<CONFIG>)
+
+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 <boost/thread.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+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 $<CONFIG>)
+
+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 <boost/wave.hpp>
+#include <boost/wave/cpplexer/cpp_lex_token.hpp>
+#include <boost/wave/cpplexer/cpp_lex_iterator.hpp>
+#include <iostream>
+
+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<token_type> lex_iterator_type;
+ typedef boost::wave::context<std::string::iterator, lex_iterator_type> 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 @@
+<!--
+ BoostBook DTD version 1.1
+
+ For further information, see: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost_Documentation_Format
+
+ Copyright (c) 2002 by Peter Simons <simons@cryp.to>
+ Copyright (c) 2003-2004 by Douglas Gregor <doug.gregor -at- gmail.com>
+ Copyright (c) 2007 by Frank Mori Hess <fmhess@users.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)
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
+ SYSTEM "http://www.boost.org/tools/boostbook/dtd/1.1/boostbook.dtd"
+
+ $Revision$
+ $Date$
+-->
+
+<!--========== Define XInclude features. ==========-->
+<!-- This is not really integrated into the DTD yet. Needs more
+ research. -->
+<!--
+<!ELEMENT xi:include (xi:fallback)?>
+<!ATTLIST xi:include
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
+ href CDATA #REQUIRED
+ parse (xml|text) "xml"
+ encoding CDATA #IMPLIED>
+
+<!ELEMENT xi:fallback ANY>
+<!ATTLIST xi:fallback
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude">
+ -->
+
+<!ENTITY % local.common.attrib "last-revision CDATA #IMPLIED">
+
+<!--========== Define the BoostBook extensions ==========-->
+<!ENTITY % boost.common.attrib "%local.common.attrib;
+ id CDATA #IMPLIED">
+
+<!ENTITY % boost.namespace.mix
+ "class|class-specialization|struct|struct-specialization|
+ union|union-specialization|typedef|enum|
+ free-function-group|function|overloaded-function|
+ namespace">
+
+<!ENTITY % boost.template.mix
+ "template-type-parameter|template-nontype-parameter|template-varargs">
+
+<!ENTITY % boost.class.members
+ "static-constant|typedef|enum|
+ copy-assignment|constructor|destructor|method-group|
+ method|overloaded-method|data-member|class|class-specialization|struct|
+ struct-specialization|union|union-specialization">
+
+<!ENTITY % boost.class.mix
+ "%boost.class.members;|free-function-group|function|overloaded-function">
+
+<!ENTITY % boost.class.content
+ "template?, inherit*, purpose?, description?,
+ (%boost.class.mix;|access)*">
+
+<!ENTITY % boost.class-specialization.content
+ "template?, specialization?, inherit?, purpose?, description?,
+ (%boost.class.mix;|access)*">
+
+<!ENTITY % boost.function.semantics
+ "purpose?, description?, requires?, effects?, postconditions?,
+ returns?, throws?, complexity?, notes?, rationale?">
+
+<!ENTITY % library.content
+ "libraryinfo, (title, ((section|library-reference|testsuite))+)?">
+
+<!ELEMENT library (%library.content;)>
+<!ATTLIST library
+ name CDATA #REQUIRED
+ dirname CDATA #REQUIRED
+ html-only CDATA #IMPLIED
+ url CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT boostbook (title, (chapter|library)*)>
+<!ATTLIST boostbook %boost.common.attrib;>
+
+<!ELEMENT libraryinfo (author+, copyright*, legalnotice*, librarypurpose, librarycategory*)>
+<!ATTLIST libraryinfo %boost.common.attrib;>
+
+<!ELEMENT librarypurpose (#PCDATA|code|ulink|functionname|methodname|classname|macroname|headername|enumname|globalname)*>
+<!ATTLIST librarypurpose %boost.common.attrib;>
+
+<!ELEMENT librarycategory (#PCDATA)>
+<!ATTLIST librarycategory
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT libraryname (#PCDATA)>
+<!ATTLIST libraryname %boost.common.attrib;>
+
+<!ELEMENT library-reference ANY>
+<!ATTLIST library-reference
+ %boost.common.attrib;>
+
+<!ELEMENT librarylist EMPTY>
+<!ATTLIST librarylist %boost.common.attrib;>
+
+<!ELEMENT librarycategorylist (librarycategorydef)*>
+<!ATTLIST librarycategorylist %boost.common.attrib;>
+
+<!ELEMENT librarycategorydef (#PCDATA)>
+<!ATTLIST librarycategorydef
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT header ANY>
+<!ATTLIST header
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT namespace (%boost.namespace.mix;)*>
+<!ATTLIST namespace
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT class (%boost.class.content;)>
+<!ATTLIST class
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT struct (%boost.class.content;)>
+<!ATTLIST struct
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT union (%boost.class.content;)>
+<!ATTLIST union
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT class-specialization (%boost.class-specialization.content;)>
+<!ATTLIST class-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT struct-specialization (%boost.class-specialization.content;)>
+<!ATTLIST struct-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT union-specialization (%boost.class-specialization.content;)>
+<!ATTLIST union-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT access (%boost.class.members;)+>
+<!ATTLIST access
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!--========= C++ Templates =========-->
+<!ELEMENT template (%boost.template.mix;)*>
+<!ATTLIST template %boost.common.attrib;>
+
+<!ELEMENT template-type-parameter (default?, purpose?)>
+<!ATTLIST template-type-parameter
+ name CDATA #REQUIRED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT template-nontype-parameter (type, default?, purpose?)>
+<!ATTLIST template-nontype-parameter
+ name CDATA #REQUIRED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT template-varargs EMPTY>
+<!ATTLIST template-varargs %boost.common.attrib;>
+
+<!ELEMENT specialization (template-arg)*>
+<!ATTLIST specialization %boost.common.attrib;>
+
+<!ELEMENT template-arg ANY>
+<!ATTLIST template-arg
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT default ANY>
+<!ATTLIST default %boost.common.attrib;>
+
+<!ELEMENT inherit (type, purpose?)>
+<!ATTLIST inherit
+ access CDATA #IMPLIED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT purpose ANY>
+<!ATTLIST purpose %boost.common.attrib;>
+
+<!ELEMENT description ANY>
+<!ATTLIST description %boost.common.attrib;>
+
+<!ELEMENT type ANY>
+<!ATTLIST type %boost.common.attrib;>
+
+<!ELEMENT typedef (type, purpose?, description?)>
+<!ATTLIST typedef
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT enum (enumvalue*, purpose?, description?)>
+<!ATTLIST enum
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT enumvalue (default?, purpose?, description?)>
+<!ATTLIST enumvalue
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT static-constant (type, default, purpose?, description?)>
+<!ATTLIST static-constant
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT data-member (type, purpose?, description?)>
+<!ATTLIST data-member
+ name CDATA #REQUIRED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT paramtype ANY>
+<!ATTLIST paramtype %boost.common.attrib;>
+
+<!ELEMENT effects ANY>
+<!ATTLIST effects %boost.common.attrib;>
+
+<!ELEMENT postconditions ANY>
+<!ATTLIST postconditions %boost.common.attrib;>
+
+<!ELEMENT method-group (method|overloaded-method)*>
+<!ATTLIST method-group
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT constructor (template?, parameter*, %boost.function.semantics;)>
+<!ATTLIST constructor
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT destructor (%boost.function.semantics;)>
+<!ATTLIST destructor
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT method (template?, type, parameter*, %boost.function.semantics;)>
+<!ATTLIST method
+ name CDATA #REQUIRED
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT function (template?, type, parameter*, %boost.function.semantics;)>
+<!ATTLIST function
+ name CDATA #REQUIRED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT overloaded-method (signature*, %boost.function.semantics;)>
+<!ATTLIST overloaded-method
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT overloaded-function (signature*, %boost.function.semantics;)>
+<!ATTLIST overloaded-function
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT signature (template?, type, parameter*)>
+<!ATTLIST signature
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT requires ANY>
+<!ATTLIST requires %boost.common.attrib;>
+
+<!ELEMENT returns ANY>
+<!ATTLIST returns %boost.common.attrib;>
+
+<!ELEMENT throws ANY>
+<!ATTLIST throws %boost.common.attrib;>
+
+<!ELEMENT complexity ANY>
+<!ATTLIST complexity %boost.common.attrib;>
+
+<!ELEMENT notes ANY>
+<!ATTLIST notes %boost.common.attrib;>
+
+<!ELEMENT rationale ANY>
+<!ATTLIST rationale %boost.common.attrib;>
+
+<!ELEMENT functionname (#PCDATA)>
+<!ATTLIST functionname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT enumname (#PCDATA)>
+<!ATTLIST enumname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT macroname (#PCDATA)>
+<!ATTLIST macroname %boost.common.attrib;>
+
+<!ELEMENT headername (#PCDATA)>
+<!ATTLIST headername %boost.common.attrib;>
+
+<!ELEMENT globalname (#PCDATA)>
+<!ATTLIST globalname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT copy-assignment
+ (template?, type?, parameter*, %boost.function.semantics;)>
+<!ATTLIST copy-assignment
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT free-function-group (function|overloaded-function)*>
+<!ATTLIST free-function-group
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT precondition ANY>
+<!ATTLIST precondition %boost.common.attrib;>
+
+<!ELEMENT code ANY>
+<!ATTLIST code %boost.common.attrib;>
+
+<!ELEMENT using-namespace EMPTY>
+<!ATTLIST using-namespace
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT using-class EMPTY>
+<!ATTLIST using-class
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!--========== Boost Testsuite Extensions ==========-->
+<!ENTITY % boost.testsuite.tests
+ "compile-test|link-test|run-test|
+ compile-fail-test|link-fail-test|run-fail-test">
+<!ENTITY % boost.testsuite.test.content
+ "source*, lib*, requirement*, purpose, if-fails?">
+
+<!ELEMENT testsuite ((%boost.testsuite.tests;)+)>
+<!ATTLIST testsuite %boost.common.attrib;>
+
+<!ELEMENT compile-test (%boost.testsuite.test.content;)>
+<!ATTLIST compile-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT link-test (%boost.testsuite.test.content;)>
+<!ATTLIST link-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT run-test (%boost.testsuite.test.content;)>
+<!ATTLIST run-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT compile-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST compile-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT link-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST link-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT run-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST run-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT source (#PCDATA|snippet)*>
+
+<!ELEMENT snippet EMPTY>
+<!ATTLIST snippet
+ name CDATA #REQUIRED>
+
+<!ELEMENT lib (#PCDATA)>
+
+<!ELEMENT requirement (#PCDATA)>
+<!ATTLIST requirement
+ name CDATA #REQUIRED>
+
+<!ELEMENT if-fails ANY>
+
+<!ELEMENT parameter (paramtype, default?, description?)>
+<!ATTLIST parameter
+ name CDATA #IMPLIED
+ pack CDATA #IMPLIED>
+
+<!ELEMENT programlisting ANY>
+<!ATTLIST programlisting
+ name CDATA #IMPLIED>
+
+<!--========== Customize the DocBook DTD ==========-->
+<!ENTITY % local.tech.char.class "|functionname|libraryname|enumname|code">
+<!ENTITY % local.para.class
+ "|using-namespace|using-class|librarylist|librarycategorylist">
+<!ENTITY % local.descobj.class "|libraryinfo">
+<!ENTITY % local.classname.attrib "alt CDATA #IMPLIED">
+<!ENTITY % local.methodname.attrib "alt CDATA #IMPLIED">
+<!ENTITY % local.refentry.class "|library-reference|testsuite">
+<!ENTITY % local.title.char.mix "">
+<!ENTITY % programlisting.module "IGNORE">
+<!ENTITY % parameter.module "IGNORE">
+<!ENTITY % function.module "IGNORE">
+<!ENTITY % type.module "IGNORE">
+
+<!--========== Import DocBook DTD ==========-->
+<!ENTITY % DocBook PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+%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 @@
+<!--
+ BoostBook DTD - development version
+
+ For further information, see: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost_Documentation_Format
+
+ Copyright (c) 2002 by Peter Simons <simons@cryp.to>
+ Copyright (c) 2003-2004 by Douglas Gregor <doug.gregor -at- gmail.com>
+ Copyright (c) 2007 by Frank Mori Hess <fmhess@users.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)
+
+ The latest stable DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
+ SYSTEM "http://www.boost.org/tools/boostbook/dtd/1.1/boostbook.dtd"
+
+ $Revision$
+ $Date$
+-->
+
+<!--========== Define XInclude features. ==========-->
+<!-- This is not really integrated into the DTD yet. Needs more
+ research. -->
+<!--
+<!ELEMENT xi:include (xi:fallback)?>
+<!ATTLIST xi:include
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
+ href CDATA #REQUIRED
+ parse (xml|text) "xml"
+ encoding CDATA #IMPLIED>
+
+<!ELEMENT xi:fallback ANY>
+<!ATTLIST xi:fallback
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude">
+ -->
+
+<!ENTITY % local.common.attrib "last-revision CDATA #IMPLIED">
+
+<!--========== Define the BoostBook extensions ==========-->
+<!ENTITY % boost.common.attrib "%local.common.attrib;
+ id CDATA #IMPLIED">
+
+<!ENTITY % boost.namespace.mix
+ "class|class-specialization|struct|struct-specialization|
+ union|union-specialization|typedef|enum|
+ free-function-group|function|overloaded-function|
+ namespace">
+
+<!ENTITY % boost.template.mix
+ "template-type-parameter|template-nontype-parameter|template-varargs">
+
+<!ENTITY % boost.class.members
+ "static-constant|typedef|enum|
+ copy-assignment|constructor|destructor|method-group|
+ method|overloaded-method|data-member|class|class-specialization|struct|
+ struct-specialization|union|union-specialization">
+
+<!ENTITY % boost.class.mix
+ "%boost.class.members;|free-function-group|function|overloaded-function">
+
+<!ENTITY % boost.class.content
+ "template?, inherit*, purpose?, description?,
+ (%boost.class.mix;|access)*">
+
+<!ENTITY % boost.class-specialization.content
+ "template?, specialization?, inherit?, purpose?, description?,
+ (%boost.class.mix;|access)*">
+
+<!ENTITY % boost.function.semantics
+ "purpose?, description?, requires?, effects?, postconditions?,
+ returns?, throws?, complexity?, notes?, rationale?">
+
+<!ENTITY % library.content
+ "libraryinfo, (title, ((section|library-reference|testsuite))+)?">
+
+<!ELEMENT library (%library.content;)>
+<!ATTLIST library
+ name CDATA #REQUIRED
+ dirname CDATA #REQUIRED
+ html-only CDATA #IMPLIED
+ url CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT boostbook (title, (chapter|library)*)>
+<!ATTLIST boostbook %boost.common.attrib;>
+
+<!ELEMENT libraryinfo (author+, copyright*, legalnotice*, librarypurpose, librarycategory*)>
+<!ATTLIST libraryinfo %boost.common.attrib;>
+
+<!ELEMENT librarypurpose (#PCDATA|code|ulink|functionname|methodname|classname|macroname|headername|enumname|globalname)*>
+<!ATTLIST librarypurpose %boost.common.attrib;>
+
+<!ELEMENT librarycategory (#PCDATA)>
+<!ATTLIST librarycategory
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT libraryname (#PCDATA)>
+<!ATTLIST libraryname %boost.common.attrib;>
+
+<!ELEMENT library-reference ANY>
+<!ATTLIST library-reference
+ %boost.common.attrib;>
+
+<!ELEMENT librarylist EMPTY>
+<!ATTLIST librarylist %boost.common.attrib;>
+
+<!ELEMENT librarycategorylist (librarycategorydef)*>
+<!ATTLIST librarycategorylist %boost.common.attrib;>
+
+<!ELEMENT librarycategorydef (#PCDATA)>
+<!ATTLIST librarycategorydef
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT header ANY>
+<!ATTLIST header
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT namespace (%boost.namespace.mix;)*>
+<!ATTLIST namespace
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT class (%boost.class.content;)>
+<!ATTLIST class
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT struct (%boost.class.content;)>
+<!ATTLIST struct
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT union (%boost.class.content;)>
+<!ATTLIST union
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT class-specialization (%boost.class-specialization.content;)>
+<!ATTLIST class-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT struct-specialization (%boost.class-specialization.content;)>
+<!ATTLIST struct-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT union-specialization (%boost.class-specialization.content;)>
+<!ATTLIST union-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT access (%boost.class.members;)+>
+<!ATTLIST access
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!--========= C++ Templates =========-->
+<!ELEMENT template (%boost.template.mix;)*>
+<!ATTLIST template %boost.common.attrib;>
+
+<!ELEMENT template-type-parameter (default?, purpose?)>
+<!ATTLIST template-type-parameter
+ name CDATA #REQUIRED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT template-nontype-parameter (type, default?, purpose?)>
+<!ATTLIST template-nontype-parameter
+ name CDATA #REQUIRED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT template-varargs EMPTY>
+<!ATTLIST template-varargs %boost.common.attrib;>
+
+<!ELEMENT specialization (template-arg)*>
+<!ATTLIST specialization %boost.common.attrib;>
+
+<!ELEMENT template-arg ANY>
+<!ATTLIST template-arg
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT default ANY>
+<!ATTLIST default %boost.common.attrib;>
+
+<!ELEMENT inherit (type, purpose?)>
+<!ATTLIST inherit
+ access CDATA #IMPLIED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT purpose ANY>
+<!ATTLIST purpose %boost.common.attrib;>
+
+<!ELEMENT description ANY>
+<!ATTLIST description %boost.common.attrib;>
+
+<!ELEMENT type ANY>
+<!ATTLIST type %boost.common.attrib;>
+
+<!ELEMENT typedef (type, purpose?, description?)>
+<!ATTLIST typedef
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT enum (enumvalue*, purpose?, description?)>
+<!ATTLIST enum
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT enumvalue (default?, purpose?, description?)>
+<!ATTLIST enumvalue
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT static-constant (type, default, purpose?, description?)>
+<!ATTLIST static-constant
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT data-member (type, purpose?, description?)>
+<!ATTLIST data-member
+ name CDATA #REQUIRED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT paramtype ANY>
+<!ATTLIST paramtype %boost.common.attrib;>
+
+<!ELEMENT effects ANY>
+<!ATTLIST effects %boost.common.attrib;>
+
+<!ELEMENT postconditions ANY>
+<!ATTLIST postconditions %boost.common.attrib;>
+
+<!ELEMENT method-group (method|overloaded-method)*>
+<!ATTLIST method-group
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT constructor (template?, parameter*, %boost.function.semantics;)>
+<!ATTLIST constructor
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT destructor (%boost.function.semantics;)>
+<!ATTLIST destructor
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT method (template?, type, parameter*, %boost.function.semantics;)>
+<!ATTLIST method
+ name CDATA #REQUIRED
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT function (template?, type, parameter*, %boost.function.semantics;)>
+<!ATTLIST function
+ name CDATA #REQUIRED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT overloaded-method (signature*, %boost.function.semantics;)>
+<!ATTLIST overloaded-method
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT overloaded-function (signature*, %boost.function.semantics;)>
+<!ATTLIST overloaded-function
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT signature (template?, type, parameter*)>
+<!ATTLIST signature
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT requires ANY>
+<!ATTLIST requires %boost.common.attrib;>
+
+<!ELEMENT returns ANY>
+<!ATTLIST returns %boost.common.attrib;>
+
+<!ELEMENT throws ANY>
+<!ATTLIST throws %boost.common.attrib;>
+
+<!ELEMENT complexity ANY>
+<!ATTLIST complexity %boost.common.attrib;>
+
+<!ELEMENT notes ANY>
+<!ATTLIST notes %boost.common.attrib;>
+
+<!ELEMENT rationale ANY>
+<!ATTLIST rationale %boost.common.attrib;>
+
+<!ELEMENT functionname (#PCDATA)>
+<!ATTLIST functionname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT enumname (#PCDATA)>
+<!ATTLIST enumname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT macroname (#PCDATA)>
+<!ATTLIST macroname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT headername (#PCDATA)>
+<!ATTLIST headername
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT globalname (#PCDATA)>
+<!ATTLIST globalname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT copy-assignment
+ (template?, type?, parameter*, %boost.function.semantics;)>
+<!ATTLIST copy-assignment
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT free-function-group (function|overloaded-function)*>
+<!ATTLIST free-function-group
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT precondition ANY>
+<!ATTLIST precondition %boost.common.attrib;>
+
+<!ELEMENT code ANY>
+<!ATTLIST code %boost.common.attrib;>
+
+<!ELEMENT using-namespace EMPTY>
+<!ATTLIST using-namespace
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT using-class EMPTY>
+<!ATTLIST using-class
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!--========== Boost Testsuite Extensions ==========-->
+<!ENTITY % boost.testsuite.tests
+ "compile-test|link-test|run-test|
+ compile-fail-test|link-fail-test|run-fail-test">
+<!ENTITY % boost.testsuite.test.content
+ "source*, lib*, requirement*, purpose, if-fails?">
+
+<!ELEMENT testsuite ((%boost.testsuite.tests;)+)>
+<!ATTLIST testsuite %boost.common.attrib;>
+
+<!ELEMENT compile-test (%boost.testsuite.test.content;)>
+<!ATTLIST compile-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT link-test (%boost.testsuite.test.content;)>
+<!ATTLIST link-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT run-test (%boost.testsuite.test.content;)>
+<!ATTLIST run-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT compile-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST compile-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT link-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST link-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT run-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST run-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT source (#PCDATA|snippet)*>
+
+<!ELEMENT snippet EMPTY>
+<!ATTLIST snippet
+ name CDATA #REQUIRED>
+
+<!ELEMENT lib (#PCDATA)>
+
+<!ELEMENT requirement (#PCDATA)>
+<!ATTLIST requirement
+ name CDATA #REQUIRED>
+
+<!ELEMENT if-fails ANY>
+
+<!ELEMENT parameter (paramtype, default?, description?)>
+<!ATTLIST parameter
+ name CDATA #IMPLIED
+ pack CDATA #IMPLIED>
+
+<!ELEMENT programlisting ANY>
+<!ATTLIST programlisting
+ name CDATA #IMPLIED>
+
+<!--========== Customize the DocBook DTD ==========-->
+<!ENTITY % local.tech.char.class "|functionname|libraryname|enumname|headername|macroname|code">
+<!ENTITY % local.para.class
+ "|using-namespace|using-class|librarylist|librarycategorylist">
+<!ENTITY % local.descobj.class "|libraryinfo">
+<!ENTITY % local.classname.attrib "alt CDATA #IMPLIED">
+<!ENTITY % local.methodname.attrib "alt CDATA #IMPLIED">
+<!ENTITY % local.refentry.class "|library-reference|testsuite">
+<!ENTITY % local.title.char.mix "">
+<!ENTITY % programlisting.module "IGNORE">
+<!ENTITY % parameter.module "IGNORE">
+<!ENTITY % function.module "IGNORE">
+<!ENTITY % type.module "IGNORE">
+
+<!--========== Import DocBook DTD ==========-->
+<!ENTITY % DocBook PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+%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 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="refresh" content=
+ "0; URL=../../doc/html/boostbook.html" /><!-- boostinspect:nolink -->
+ <!--
+ Copyright 2006 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)
+ -->
+
+ <title></title>
+</head>
+
+<body>
+ Automatic redirection failed, please go to <a href=
+ "../../doc/html/boostbook.html">../../doc/html/boostbook.html</a>
+</body>
+</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 <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)
+
+# 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 <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)
+
+# 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 <<EOF
+BEGIN { using_boostbook = 0; eaten=0 }
+
+/^\s*using boostbook/ {
+ using_boostbook = 1;
+ print "using boostbook";
+ print " : $DOCBOOK_XSL_DIR";
+ print " : $DOCBOOK_DTD_DIR";
+ eaten=1
+}
+
+using_boostbook==1 && /;/ { using_boostbook = 2 }
+using_boostbook==1 { eaten=1 }
+
+/^\s*using xsltproc.*$/ { eaten=1 }
+/^\s*using doxygen.*$/ { eaten=1 }
+/^\s*using fop.*$/ { eaten=1 }
+
+/^.*$/ { if (eaten == 0) print; eaten=0 }
+
+END {
+ if (using_boostbook==0) {
+ print "using boostbook";
+ print " : $DOCBOOK_XSL_DIR";
+ print " : $DOCBOOK_DTD_DIR";
+ print " ;"
+ }
+ print "using xsltproc : $XSLTPROC ;"
+ if ("$HAVE_DOXYGEN" == "yes") print "using doxygen : $DOXYGEN ;";
+ if ("$HAVE_FOP" == "yes") print "using fop : $FOP : : $JAVA ;";
+}
+EOF
+
+awk -f setup_boostbook.awk $JAM_CONFIG_IN > $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 :
+ <xsl:param>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 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright Daniel James 2009
+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)
+-->
+
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+
+<!--
+ xmllint:
+
+ XML_CATALOG_FILES=../../../bin.v2/boostbook_catalog.xml xmllint -noout -valid alt.xml
+
+-->
+
+<library name="Example" id="test.alt" dirname="test/alt">
+ <libraryinfo>
+ <author>
+ <firstname>Daniel</firstname>
+ <surname>James</surname>
+ </author>
+ <librarypurpose>Fictional example</librarypurpose>
+ </libraryinfo>
+
+ <title>Fictional example library, for testing</title>
+
+ <section id="test.alt.tests">
+ <title>Alt Tests</title>
+
+ <para><headername alt="example.hpp">Example header</headername></para>
+ <para>Example header: <headername>example.hpp</headername></para>
+
+ <para><macroname alt="EXAMPLE">Example macro</macroname></para>
+ <para>Example macro: <macroname>EXAMPLE</macroname></para>
+ </section>
+
+ <library-reference>
+ <header name="example.hpp">
+ <macro name="EXAMPLE" kind="functionlike">
+ <purpose>Example macro</purpose>
+ </macro>
+ </header>
+ </library-reference>
+</library>
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 ]
+ :
+ <xsl:param>"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
+ :
+ <xsl:param>boost.root=../../../../..
+ <dependency>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 @@
+<?xml version="1.0" standalone="yes"?>
+<library-reference id="example_reference"><title>Example Reference</title><header name="boost/example.hpp">
+<namespace name="example">
+<class name="example"><purpose>Documentation for class example. </purpose><description><para>Detailed documentation</para><para><programlisting language="c++">void class_code_sample();
+</programlisting> </para></description><class name="inner_class"><data-member name="x"><type>int</type></data-member>
+</class><enum name="class_enum"><enumvalue name="enumerator"/></enum>
+<typedef name="documented_type1"><description><para>This type has documentation. </para></description><type>int</type></typedef>
+<typedef name="documented_type2"><purpose>This type has documentation. </purpose><type>long</type></typedef>
+<typedef name="documented_type3"><description><para>This type has documentation. </para></description><type>long double</type></typedef>
+<typedef name="undocumented_type1"><type>short</type></typedef>
+<typedef name="undocumented_type2"><type>double</type></typedef>
+<data-member name="integer"><type>int</type></data-member>
+<data-member name="mutable_integer" specifiers="mutable"><type>int</type></data-member>
+<data-member name="const_integer"><type>const int</type></data-member>
+<data-member name="static_integer" specifiers="static"><type>int</type></data-member>
+<data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member>
+<method-group name="public member functions">
+<method name="virtual_method" specifiers="virtual"><type>int</type></method>
+<method name="virtual_abstract_method" cv="= 0" specifiers="virtual"><type>int</type></method>
+<method name="virtual_const_method" cv="const" specifiers="virtual"><type>int</type></method>
+<method name="method_with_default_value"><type>int</type><parameter name=""><paramtype>int</paramtype><default>default_value</default></parameter></method>
+<method name="method_with_fp"><type>int</type><parameter name="fp"><paramtype>int(*)()</paramtype></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_string_default1"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>")"</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_string_default2"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>"("</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_char_default1"><type>int</type><parameter name=""><paramtype>char</paramtype><default>'('</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="method_with_char_default2"><type>int</type><parameter name=""><paramtype>char</paramtype><default>')'</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_fp" cv="volatile"><type>int</type><parameter name="fp"><paramtype>int(*)()</paramtype></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_string_default1" cv="volatile"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>")"</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_string_default2" cv="volatile"><type>int</type><parameter name=""><paramtype>char *</paramtype><default>"("</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_char_default1" cv="volatile"><type>int</type><parameter name=""><paramtype>char</paramtype><default>'('</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="volatile_method_with_char_default2" cv="volatile"><type>int</type><parameter name=""><paramtype>char</paramtype><default>')'</default></parameter><parameter name=""><paramtype>volatile char</paramtype></parameter></method>
+<method name="const_method" cv="const"><type>void</type></method>
+<method name="volatile_method" cv="volatile"><type>void</type></method>
+<method name="trad_noexcept" cv="noexcept"><type>void</type></method>
+<method name="trad_noexcept_if" cv="noexcept(a==b &amp;&amp;(c||d)))"><type>void</type></method>
+<method name="boost_noexcept" cv="noexcept"><type>void</type></method>
+<method name="boost_noexcept_if" cv="noexcept(condition)"><type>void</type></method>
+<method name="trad_constexpr" cv="constexpr"><type>void</type></method>
+<method name="boost_constexpr" cv="constexpr"><type>void</type></method>
+<method name="boost_constexpr_or_const" cv="constexpr"><type>void</type></method>
+<method name="constexpr_noexcept" cv="constexpr noexcept"><type>void</type></method>
+<method name="conversion-operator" specifiers="explicit"><type>int</type></method>
+</method-group>
+<constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor>
+<copy-assignment cv="= delete"><type><classname>example</classname> &amp;</type><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment>
+<method-group name="public static functions">
+<method name="static_method" specifiers="static"><type>int</type></method>
+<method name="static_constexpr" cv="constexpr" specifiers="static"><type>int</type></method>
+</method-group>
+</class><struct name="example_template"><template>
+ <template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
+ <template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>
+ <template-type-parameter name="TypeParameterWithDefault"><default>int</default><purpose><para>This is a template parameter with a default argument </para></purpose></template-type-parameter>
+ </template><description><para>Test some doxygen markup</para><para><warning><para>This is just an example.</para></warning>
+Embedded docbook list:</para><para>
+<orderedlist><listitem><simpara>1</simpara></listitem><listitem><simpara>2</simpara></listitem></orderedlist>
+</para><para><emphasis>Special</emphasis> <emphasis role="bold">Bold</emphasis> <computeroutput>Typewriter</computeroutput> <emphasis>Italics</emphasis> <emphasis>emphasis</emphasis> <computeroutput>parameter</computeroutput> </para><para><itemizedlist>
+<listitem><para>Arg1 first argument. </para></listitem>
+<listitem><para>Arg2 second argument.</para></listitem>
+</itemizedlist>
+<itemizedlist>
+<listitem><para>First list item. </para></listitem>
+<listitem><para>Second list item</para></listitem>
+</itemizedlist>
+Line 1<sbr/>
+Line 2</para><para><programlisting language="c++">void foo() {}
+void foo2() {}
+</programlisting></para><para><programlisting language="c++">void bar() {}
+
+void bar2() {}
+</programlisting></para><para>Alternative way of writing code, has a complicated workaround because doxygen treats the empty line as a paragraph separator:</para><programlisting>
+int bar();
+
+int bar2();
+</programlisting><para>Unfortunately the workaround will merge consecutive blocks, like this:</para><programlisting>
+int foo();
+
+
+
+int foo2();
+</programlisting><para>
+</para></description></struct><struct name="specialization_test"><template>
+ <template-type-parameter name="T"/>
+ </template></struct><struct-specialization name="specialization_test"><template>
+ <template-type-parameter name="T"/>
+ </template><specialization><template-arg>T *</template-arg></specialization><method-group name="public member functions">
+</method-group>
+<constructor><description><para>A constructor. </para></description></constructor>
+<destructor><description><para>A destructor. </para></description></destructor>
+<copy-assignment><type><emphasis>unspecified</emphasis></type><parameter name=""><paramtype>const <classname>specialization_test</classname> &amp;</paramtype></parameter><description><para>An assignment operator. </para></description></copy-assignment>
+</struct-specialization><enum name="namespace_enum"><enumvalue name="enumerator"/></enum>
+<data-member name="namespace_integer"><type>int</type></data-member>
+<data-member name="namespace_static_integer" specifiers="static"><type>int</type></data-member>
+<data-member name="namespace_const_integer"><type>const int</type></data-member>
+<data-member name="namespace_static_const_integer" specifiers="static"><type>const int</type></data-member>
+<function name="free_function"><type>void</type><parameter name="x"><paramtype>int</paramtype><description><para>Parameter description.</para></description></parameter><description><para>
+<programlisting language="c++">void function_code_sample();
+</programlisting> </para></description></function>
+<function name="namespace_func"><type>int</type><parameter name="i"><paramtype>int</paramtype><description><para>A function parameter </para></description></parameter><parameter name="j"><paramtype>int</paramtype><description><para>Another </para></description></parameter><description><para>
+
+
+This is a test function. <classname alt="example::example">Link to class</classname> <classname alt="example::example_template">Link to class template</classname> <note><para>This is a note.</para></note>
+<para><emphasis role="bold">See Also:</emphasis><para><classname alt="example::example">example::example</classname> and <classname alt="example::example_template">example_template</classname> </para></para>
+</para></description><requires><para>i &gt; j</para></requires><returns><para>The answer </para></returns></function>
+<function name="namespace_func_template"><type>void</type><template>
+ <template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
+ <template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>
+ </template><description><para>Testing a function template.
+</para></description></function>
+</namespace>
+<macro name="EXAMPLE" kind="functionlike"><macro-parameter name="m"/><purpose>Documentation for macro example. </purpose></macro>
+</header>
+</library-reference> \ 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
+ * <orderedlist><listitem><simpara>1</simpara></listitem><listitem><simpara>2</simpara></listitem></orderedlist>
+ * \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:
+ *
+ * <pre>
+ * int bar();
+ *
+ * int bar2();
+ * </pre>
+ *
+ * Unfortunately the workaround will merge consecutive blocks,
+ * like this:
+ *
+ * <pre>
+ * int foo();
+ * </pre>
+ *
+ * <pre>
+ * int foo2();
+ * </pre>
+ *
+ * \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 <typename TypeParameter, int NonTypeParameter,
+ typename TypeParameterWithDefault = int>
+ 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 <typename TypeParameter, int NonTypeParameter>
+ void namespace_func_template();
+
+ template<class T>
+ struct specialization_test {
+ };
+
+ template<class T>
+ struct specialization_test<T*> {
+ /** 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Copyright Daniel James 2009
+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)
+-->
+
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="example" name="Example" dirname="example" xmlns:xi="http://www.w3.org/2001/XInclude">
+<title>Example</title>
+<xi:include href="autodoc.xml" />
+</library>
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 @@
+<?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:import href="http://docbook.sourceforge.net/release/xsl/current/html/admon.xsl"/>
+
+<!-- Already included in the main style sheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
+
+<xsl:template name="admon.graphic">
+ <xsl:param name="node" select="."/>
+
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$admon.graphics.path"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="local-name($node)='note'">note</xsl:when>
+ <xsl:when test="local-name($node)='warning'">warning</xsl:when>
+ <xsl:when test="local-name($node)='caution'">caution</xsl:when>
+ <xsl:when test="local-name($node)='tip'">tip</xsl:when>
+ <xsl:when test="local-name($node)='important'">important</xsl:when>
+ <xsl:otherwise>note</xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:value-of select="$admon.graphics.extension"/>
+</xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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:variable name="uppercase-letters" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
+ <xsl:variable name="lowercase-letters" select="'abcdefghijklmnopqrstuvwxyz'"/>
+
+ <xsl:key name="classes" match="class|struct|union|typedef" use="@name"/>
+ <xsl:key name="methods" match="method|overloaded-method" use="@name"/>
+ <xsl:key name="functions" match="function|overloaded-function" use="@name"/>
+ <xsl:key name="enums" match="enum" use="@name"/>
+ <xsl:key name="concepts" match="concept" use="@name"/>
+ <xsl:key name="libraries" match="library" use="@name"/>
+ <xsl:key name="macros" match="macro" use="@name"/>
+ <xsl:key name="headers" match="header" use="@name"/>
+ <xsl:key name="globals" match="namespace/data-member|header/data-member" use="@name"/>
+ <xsl:key name="named-entities"
+ match="class|struct|union|concept|function|overloaded-function|macro|library|namespace/data-member|header/data-member|*[attribute::id]"
+ use="translate(@name|@id, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
+
+ <xsl:template match="function|overloaded-function" mode="generate.id">
+ <xsl:call-template name="fully-qualified-id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="classname" mode="annotation">
+ <!-- Determine the (possibly qualified) class name we are looking for -->
+ <xsl:variable name="fullname">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Strip off any instantiation -->
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="contains($fullname, '&lt;')">
+ <xsl:value-of select="substring-before($fullname, '&lt;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fullname"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Determine the unqualified name -->
+ <xsl:variable name="unqualified-name">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="cxx-link-name">
+ <xsl:with-param name="lookup" select="."/>
+ <xsl:with-param name="type" select="'class'"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="display-name" select="string(.)"/>
+ <xsl:with-param name="unqualified-name" select="$unqualified-name"/>
+ <xsl:with-param name="nodes" select="key('classes', $unqualified-name)"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="globalname" mode="annotation">
+ <!-- Determine the (possibly qualified) global name we are looking for -->
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Determine the unqualified name -->
+ <xsl:variable name="unqualified-name">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="cxx-link-name">
+ <xsl:with-param name="lookup" select="."/>
+ <xsl:with-param name="type" select="'data-member'"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="display-name" select="string(.)"/>
+ <xsl:with-param name="unqualified-name" select="$unqualified-name"/>
+ <xsl:with-param name="nodes" select="key('globals', $unqualified-name)"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="methodname" mode="annotation">
+ <!-- Determine the (possibly qualified) method name we are looking for -->
+ <xsl:variable name="fullname">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Strip off any call -->
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="contains($fullname, 'operator()')">
+ <xsl:value-of select="substring-before($fullname, 'operator()')"/>
+ <xsl:value-of select="'operator()'"/>
+ </xsl:when>
+ <xsl:when test="contains($fullname, '(')">
+ <xsl:value-of select="substring-before($fullname, '(')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fullname"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Determine the unqualified name -->
+ <xsl:variable name="unqualified-name">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="cxx-link-name">
+ <xsl:with-param name="lookup" select="."/>
+ <xsl:with-param name="type" select="'method'"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="display-name" select="string(.)"/>
+ <xsl:with-param name="unqualified-name" select="$unqualified-name"/>
+ <xsl:with-param name="nodes" select="key('methods', $unqualified-name)"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="functionname" mode="annotation">
+ <!-- Determine the (possibly qualified) function name we are
+ looking for -->
+ <xsl:variable name="fullname">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Strip off any call -->
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="contains($fullname, '(')">
+ <xsl:value-of select="substring-before($fullname, '(')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fullname"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Determine the unqualified name -->
+ <xsl:variable name="unqualified-name">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="cxx-link-name">
+ <xsl:with-param name="lookup" select="."/>
+ <xsl:with-param name="type" select="'function'"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="display-name" select="string(.)"/>
+ <xsl:with-param name="unqualified-name" select="$unqualified-name"/>
+ <xsl:with-param name="nodes"
+ select="key('functions', $unqualified-name)"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="enumname" mode="annotation">
+ <!-- Determine the (possibly qualified) enum name we are
+ looking for -->
+ <xsl:variable name="fullname">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Strip off any call -->
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="contains($fullname, '(')">
+ <xsl:value-of select="substring-before($fullname, '(')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fullname"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Determine the unqualified name -->
+ <xsl:variable name="unqualified-name">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="cxx-link-name">
+ <xsl:with-param name="lookup" select="."/>
+ <xsl:with-param name="type" select="'enum'"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="display-name" select="string(.)"/>
+ <xsl:with-param name="unqualified-name" select="$unqualified-name"/>
+ <xsl:with-param name="nodes"
+ select="key('enums', $unqualified-name)"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="libraryname" mode="annotation">
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="text()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="node" select="key('libraries', $name)"/>
+
+ <xsl:choose>
+ <xsl:when test="count($node)=0">
+ <xsl:message>
+ <xsl:text>warning: Cannot find library '</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>'</xsl:text>
+ </xsl:message>
+ <xsl:value-of select="$name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="library.link">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="name" select="text()"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="conceptname" mode="annotation">
+ <xsl:param name="name" select="text()"/>
+
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="macroname" mode="annotation">
+ <xsl:param name="name">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <xsl:variable name="node" select="key('macros', $name)"/>
+ <xsl:choose>
+ <xsl:when test="count($node) = 0">
+ <xsl:message>
+ <xsl:text>warning: cannot find macro `</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>'</xsl:text>
+ </xsl:message>
+ <xsl:value-of select="$name"/>
+ </xsl:when>
+
+ <xsl:when test="count($node) = 1">
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="string(.)"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>error: macro `</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>' is multiply defined.</xsl:text>
+ </xsl:message>
+ <xsl:value-of select="$node"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="headername" mode="annotation">
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="@alt">
+ <xsl:value-of select="@alt"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="node" select="key('headers', $name)"/>
+ <xsl:choose>
+ <xsl:when test="count($node) = 0">
+ <xsl:message>
+ <xsl:text>warning: cannot find header `</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>'</xsl:text>
+ </xsl:message>
+ <xsl:value-of select="$name"/>
+ </xsl:when>
+
+ <xsl:when test="count($node) = 1">
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="string(.)"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>error: header `</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>' is multiply defined.</xsl:text>
+ </xsl:message>
+ <xsl:value-of select="$node"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="annotation">
+ <xsl:param name="highlight" select="false()"/>
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="."/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="programlisting" mode="annotation">
+ <programlisting>
+ <xsl:apply-templates mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ </programlisting>
+ </xsl:template>
+
+ <xsl:template match="code" mode="annotation">
+ <computeroutput>
+ <xsl:apply-templates mode="annotation"/>
+ </computeroutput>
+ </xsl:template>
+
+ <xsl:template match="code[@language='jam']" mode="annotation">
+ <computeroutput>
+ <xsl:apply-templates mode="annotation"/>
+ </computeroutput>
+ </xsl:template>
+
+ <xsl:template match="code[@language='c++']" mode="annotation">
+ <computeroutput>
+ <xsl:apply-templates mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ </computeroutput>
+ </xsl:template>
+
+ <xsl:template match="bold" mode="annotation">
+ <emphasis role="bold">
+ <xsl:apply-templates mode="annotation"/>
+ </emphasis>
+ </xsl:template>
+
+ <xsl:template match="description" mode="annotation">
+ <xsl:apply-templates mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="type" mode="annotation">
+ <xsl:apply-templates mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="comment()" mode="annotation">
+ <xsl:copy/>
+ </xsl:template>
+
+ <xsl:template match="node()" mode="annotation">
+ <xsl:param name="highlight" select="false()"/>
+
+ <xsl:element name="{name(.)}">
+ <xsl:copy-of select="./@*"/>
+ <xsl:apply-templates select="./*|./text()" mode="annotation">
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:apply-templates>
+ </xsl:element>
+ </xsl:template>
+
+ <!-- The "purpose" mode strips simpara/para elements so that we can
+ place the resulting text into a comment in the synopsis. -->
+ <xsl:template match="para|simpara" mode="purpose">
+ <xsl:apply-templates mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="purpose">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="purpose">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2007 Joel de Guzman <djowel -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:import href="http://docbook.sourceforge.net/release/xsl/current/html/callout.xsl"/>
+
+<!-- Already included in the main style sheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
+
+<xsl:template name="callout-bug">
+ <xsl:param name="conum" select='1'/>
+
+ <xsl:choose>
+ <xsl:when test="$callout.graphics != 0
+ and $conum &lt;= $callout.graphics.number.limit">
+
+ <xsl:variable name="relative_callout_graphics_path">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$callout.graphics.path"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <img src="{$relative_callout_graphics_path}{$conum}{$callout.graphics.extension}"
+ alt="{$conum}" border="0"/>
+ </xsl:when>
+
+ <xsl:when test="$callout.unicode != 0
+ and $conum &lt;= $callout.unicode.number.limit">
+ <xsl:choose>
+ <xsl:when test="$callout.unicode.start.character = 10102">
+ <xsl:choose>
+ <xsl:when test="$conum = 1">&#10102;</xsl:when>
+ <xsl:when test="$conum = 2">&#10103;</xsl:when>
+ <xsl:when test="$conum = 3">&#10104;</xsl:when>
+ <xsl:when test="$conum = 4">&#10105;</xsl:when>
+ <xsl:when test="$conum = 5">&#10106;</xsl:when>
+ <xsl:when test="$conum = 6">&#10107;</xsl:when>
+ <xsl:when test="$conum = 7">&#10108;</xsl:when>
+ <xsl:when test="$conum = 8">&#10109;</xsl:when>
+ <xsl:when test="$conum = 9">&#10110;</xsl:when>
+ <xsl:when test="$conum = 10">&#10111;</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
+ <xsl:text>when $callout.unicode.start.character is </xsl:text>
+ <xsl:value-of select="$callout.unicode.start.character"/>
+ </xsl:message>
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$conum"/>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$conum"/>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?xml version="1.0" ?>
+
+<!--
+Copyright (c) 2002-2003 The Trustees of Indiana University.
+ All rights reserved.
+Copyright (c) 2000-2001 University of Notre Dame. All rights reserved.
+
+ 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:strip-space elements="* xsl:*"/>
+
+ <xsl:include href="unparser.xsl"/>
+
+ <xsl:key name="concepts" match="concept" use="@name"/>
+
+ <!-- The layout type to use for concept descriptions. Can be one of:
+ sgi: simulate the SGI STL documentation
+ austern: simulate the documentation in Generic Programming and the STL,
+ by Matthew H. Austern
+ caramel: simulate the formatting from Caramel
+ -->
+ <xsl:param name="boost.concept.layout" select="'austern'"/>
+
+ <xsl:template match="concept">
+ <refentry>
+ <xsl:attribute name="id">
+ <xsl:call-template name="generate.id"/>
+ </xsl:attribute>
+
+ <refmeta>
+ <refentrytitle>Concept <xsl:value-of select="@name"/></refentrytitle>
+ <manvolnum>7</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname><xsl:value-of select="@name"/></refname>
+ <xsl:if test="purpose">
+ <refpurpose>
+ <xsl:apply-templates select="purpose/*|purpose/text()"/>
+ </refpurpose>
+ </xsl:if>
+ </refnamediv>
+
+ <!--
+ <refentryinfo>
+ <xsl:for-each select="copyright | copyright-include | legalnotice">
+ <xsl:choose>
+ <xsl:when test="name(.)='copyright'">
+ <copyright><xsl:copy-of select="./node()"/></copyright>
+ </xsl:when>
+ <xsl:when test="name(.)='legalnotice'">
+ <legalnotice><xsl:copy-of select="./node()"/></legalnotice>
+ </xsl:when>
+ <xsl:when test="name(.)='copyright-include'">
+ <copyright><xsl:copy-of select="document(concat('../concepts/', @file))/copyright/node()"/></copyright>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </refentryinfo>
+-->
+
+ <xsl:if test="description">
+ <xsl:if test="description">
+ <refsect1>
+ <title>Description</title>
+ <xsl:for-each select="description">
+ <xsl:apply-templates/>
+ </xsl:for-each>
+ </refsect1>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="refines | refines-when-mutable">
+ <refsect1>
+ <title>Refinement of</title>
+ <itemizedlist>
+ <xsl:if test="refines">
+ <xsl:for-each select="refines">
+ <listitem>
+ <para>
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="@concept"/>
+ </xsl:call-template>
+ </para>
+ </listitem>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="refines-when-mutable">
+ <xsl:for-each select="refines-when-mutable">
+ <listitem>
+ <para>
+ <xsl:text>When mutable: </xsl:text>
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="@concept"/>
+ </xsl:call-template>
+ </para>
+ </listitem>
+ </xsl:for-each>
+ </xsl:if>
+ </itemizedlist>
+ </refsect1>
+ </xsl:if>
+
+ <!-- This part must be run even if there are no associated types to print out, so the hidden type definitions can be found -->
+ <xsl:variable name="definition_list">
+ <xsl:call-template name="make-definition-list">
+ <xsl:with-param name="typedefs" select="define-type | associated-type"/>
+ <xsl:with-param name="definition_list">
+ <xsl:for-each select="param/@name">
+ @(@<xsl:value-of select="."/>=<xsl:value-of select="."/>@)@
+ </xsl:for-each>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- <xsl:message>Definition list: <xsl:value-of select="$definition_list"/></xsl:message> -->
+
+ <xsl:call-template name="print-associated-types">
+ <xsl:with-param name="typedefs" select="associated-type"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="concept.notation">
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ </xsl:call-template>
+
+ <xsl:variable name="notations">
+ <xsl:for-each select="notation">
+ @@(@@<xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="*[1]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="ignore-cv" select="true()"/>
+ <xsl:with-param name="ignore-references" select="true()"/>
+ </xsl:call-template>@@=@@<xsl:value-of select="normalize-space(@variables)"/>@@)@@
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!-- <xsl:message>Notations: <xsl:value-of select="normalize-space($notations)"/> End notations</xsl:message> -->
+
+ <xsl:if test="definition">
+ <refsect1>
+ <title>Definitions</title>
+ <xsl:for-each select="definition">
+ <p><xsl:apply-templates/></p>
+ </xsl:for-each>
+ </refsect1>
+ </xsl:if>
+
+ <xsl:if test="valid-type-expression | models | models-when-mutable">
+ <refsect1>
+ <title>Type expressions</title>
+ <variablelist>
+ <xsl:for-each select="models">
+ <varlistentry>
+ <term/>
+ <listitem>
+ <para>
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="."/>
+ <xsl:with-param name="operator_nodeset" select="key('concepts', @concept)/models-sentence/node()"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="ignore-cv" select="false()"/>
+ <xsl:with-param name="self" select="@concept"/>
+ <xsl:with-param name="use-code-block" select="true()"/>
+ </xsl:call-template>
+ </para>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ <xsl:for-each select="models-when-mutable">
+ <varlistentry>
+ <term>Only when mutable</term>
+ <listitem>
+ <para>
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="."/>
+ <xsl:with-param name="operator_nodeset" select="key('concepts', @concept)/models-sentence/node()"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="ignore-cv" select="false()"/>
+ <xsl:with-param name="self" select="@concept"/>
+ <xsl:with-param name="use-code-block" select="true()"/>
+ </xsl:call-template>
+ </para>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ <xsl:for-each select="valid-type-expression">
+ <varlistentry>
+ <term><xsl:value-of select="@name"/></term>
+ <listitem>
+ <para>
+ <type>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="*[2]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="normalize-space($notations)"/>
+ </xsl:call-template>
+ </type>
+
+ <xsl:comment/> must be
+ <xsl:for-each select="return-type/*">
+ <xsl:if test="position()!=1 and last()!=2">, </xsl:if>
+ <xsl:if test="position()=last() and last()!=1"> and </xsl:if>
+ <xsl:call-template name="unparse-constraint">
+ <xsl:with-param name="constraint" select="."/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="type-expr-mode" select="true()"/>
+ </xsl:call-template>
+ </xsl:for-each><xsl:comment/>.
+ </para>
+
+ <xsl:if test="description">
+ <xsl:for-each select="description">
+ <xsl:apply-templates/>
+ </xsl:for-each>
+ </xsl:if>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ </variablelist>
+ </refsect1>
+ </xsl:if>
+
+ <xsl:if test="valid-expression">
+ <refsect1>
+ <title>Valid expressions</title>
+
+ <xsl:variable name="columns">
+ <xsl:if test="valid-expression/return-type">
+ <xsl:text>T</xsl:text>
+ </xsl:if>
+ <xsl:if test="valid-expression/precondition">
+ <xsl:text>P</xsl:text>
+ </xsl:if>
+ <xsl:if test="valid-expression/semantics">
+ <xsl:text>S</xsl:text>
+ </xsl:if>
+ <xsl:if test="valid-expression/postcondition">
+ <xsl:text>O</xsl:text>
+ </xsl:if>
+ </xsl:variable>
+
+ <informaltable>
+ <tgroup>
+ <xsl:attribute name="cols">
+ <xsl:value-of select="string-length($columns) + 2"/>
+ </xsl:attribute>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Expression</entry>
+ <xsl:if test="contains($columns, 'T')">
+ <entry>Type</entry>
+ </xsl:if>
+ <xsl:if test="contains($columns, 'P')">
+ <entry>Precondition</entry>
+ </xsl:if>
+ <xsl:if test="contains($columns, 'S')">
+ <entry>Semantics</entry>
+ </xsl:if>
+ <xsl:if test="contains($columns, 'O')">
+ <entry>Postcondition</entry>
+ </xsl:if>
+ </row>
+ </thead>
+ <tbody>
+ <xsl:apply-templates select="valid-expression">
+ <xsl:with-param name="definition_list"
+ select="$definition_list"/>
+ <xsl:with-param name="notations"
+ select="normalize-space($notations)"/>
+ <xsl:with-param name="columns" select="$columns"/>
+ </xsl:apply-templates>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <!-- Doug prefers the table
+ <variablelist>
+ <xsl:for-each select="valid-expression">
+ <xsl:variable name="as-cxx-value">
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="*[1]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="normalize-space($notations)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <varlistentry>
+ <term><xsl:value-of select="@name"/>: <literal><xsl:value-of select="$as-cxx-value"/></literal></term>
+ <listitem><variablelist>
+ <xsl:if test="return-type/*">
+ <varlistentry><term>Return value</term><listitem><para>
+ <xsl:for-each select="return-type/*">
+ <xsl:if test="position()!=1 and last()!=2">, </xsl:if>
+ <xsl:if test="position()=last() and last()!=1"> and </xsl:if>
+ <xsl:call-template name="unparse-constraint">
+ <xsl:with-param name="constraint" select="."/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="capitalize" select="position()=1"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </para></listitem></varlistentry>
+ </xsl:if>
+
+ <xsl:for-each select="precondition">
+ <varlistentry><term>Precondition</term><listitem><para>
+ <xsl:apply-templates/>
+ </para></listitem></varlistentry>
+ </xsl:for-each>
+
+ <xsl:for-each select="semantics">
+ <varlistentry><term>Semantics</term><listitem><para>
+ <xsl:apply-templates/>
+ </para></listitem></varlistentry>
+ </xsl:for-each>
+
+ <xsl:for-each select="postcondition">
+ <varlistentry><term>Postcondition</term><listitem><para>
+ <xsl:apply-templates/>
+ </para></listitem></varlistentry>
+ </xsl:for-each>
+
+ </variablelist></listitem>
+ </varlistentry>
+
+ </xsl:for-each>
+ </variablelist>
+-->
+ </refsect1>
+ </xsl:if>
+
+ <xsl:if test="complexity">
+ <refsect1>
+ <title>Complexity</title>
+ <xsl:for-each select="complexity">
+ <para><xsl:apply-templates/></para>
+ </xsl:for-each>
+ </refsect1>
+ </xsl:if>
+
+ <xsl:if test="invariant">
+ <refsect1>
+ <title>Invariants</title>
+ <variablelist>
+ <xsl:for-each select="invariant">
+ <varlistentry>
+ <term><xsl:value-of select="@name"/></term>
+ <listitem>
+ <para><xsl:apply-templates/></para>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ </variablelist>
+ </refsect1>
+ </xsl:if>
+
+ <xsl:if test="example-model">
+ <refsect1>
+ <title>Models</title>
+ <itemizedlist>
+ <xsl:for-each select="example-model">
+ <listitem>
+ <simplelist type="inline">
+ <xsl:for-each select="*">
+ <xsl:variable name="example-value">
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="."/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <member><type><xsl:value-of select="$example-value"/></type></member>
+ </xsl:for-each>
+ </simplelist>
+ </listitem>
+ </xsl:for-each>
+ </itemizedlist>
+ </refsect1>
+ </xsl:if>
+
+ <xsl:variable name="see-also-list-0" select="concept-ref | see-also | refines | refines-when-mutable | models-as-first-arg | models | models-when-mutable"/>
+ <xsl:variable name="see-also-list-1" select="$see-also-list-0[string(@name | @concept) != string(../@name)]"/>
+ <xsl:variable name="see-also-list" select="$see-also-list-1[not(string(@name|@concept) = (preceding::*/@name | preceding::*/@concept | ancestor::*/@name | ancestor::*/@concept))]"/>
+ <xsl:if test="$see-also-list">
+ <refsect1>
+ <title>See also</title>
+ <itemizedlist>
+ <xsl:for-each select="$see-also-list">
+ <xsl:sort select="string(@name|@concept)" data-type="text"/>
+ <listitem>
+ <para>
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="@name|@concept"/>
+ </xsl:call-template>
+ </para>
+ </listitem>
+ </xsl:for-each>
+ </itemizedlist>
+ </refsect1>
+ </xsl:if>
+
+ </refentry>
+ </xsl:template>
+
+ <xsl:template name="unparse-constraint">
+ <xsl:param name="constraint"/>
+ <xsl:param name="definition_list"/>
+ <xsl:param name="type-expr-mode" select="false()"/>
+ <xsl:param name="capitalize" select="true()"/>
+
+ <xsl:choose>
+
+ <xsl:when test="name($constraint)='require-same-type'">
+ <xsl:if test="$type-expr-mode">identical to </xsl:if>
+ <type>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$constraint/*[1]"/>
+ <xsl:with-param name="definition_list" select="definition_list"/>
+ </xsl:call-template>
+ </type>
+ </xsl:when>
+
+ <xsl:when test="name($constraint)='convertible-to'">
+ <xsl:choose>
+ <xsl:when test="$type-expr-mode">convertible to </xsl:when>
+ <xsl:when test="not($type-expr-mode) and $capitalize">Convertible to </xsl:when>
+ <xsl:when test="not($type-expr-mode) and not($capitalize)">convertible to </xsl:when>
+ </xsl:choose>
+ <type>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$constraint/*[1]"/>
+ <xsl:with-param name="definition_list" select="definition_list"/>
+ </xsl:call-template>
+ </type>
+ </xsl:when>
+
+ <xsl:when test="name($constraint)='derived-from'">
+ <xsl:choose>
+ <xsl:when test="$type-expr-mode">derived from </xsl:when>
+ <xsl:when test="not($type-expr-mode) and $capitalize">Derived from </xsl:when>
+ <xsl:when test="not($type-expr-mode) and not($capitalize)">derived from </xsl:when>
+ </xsl:choose>
+ <type>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$constraint/*[1]"/>
+ <xsl:with-param name="definition_list" select="definition_list"/>
+ </xsl:call-template>
+ </type>
+ </xsl:when>
+
+ <xsl:when test="name($constraint)='assignable-to'">
+ <xsl:choose>
+ <xsl:when test="$type-expr-mode">assignable to </xsl:when>
+ <xsl:when test="not($type-expr-mode) and $capitalize">Assignable to </xsl:when>
+ <xsl:when test="not($type-expr-mode) and not($capitalize)">assignable to </xsl:when>
+ </xsl:choose>
+ <type>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$constraint/*[1]"/>
+ <xsl:with-param name="definition_list" select="definition_list"/>
+ </xsl:call-template>
+ </type>
+ </xsl:when>
+
+ <xsl:when test="name($constraint)='models-as-first-arg'">
+ <xsl:choose>
+ <xsl:when test="$type-expr-mode"> a model </xsl:when>
+ <xsl:when test="not($type-expr-mode) and $capitalize"> Models </xsl:when>
+ <xsl:when test="not($type-expr-mode) and not($capitalize)"> models </xsl:when>
+ </xsl:choose>
+ <xsl:if test="$constraint/*"><xsl:comment/>
+ (along with <xsl:for-each select="$constraint/*"><type>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="."/>
+ <xsl:with-param name="definition_list" select="definition_list"/>
+ </xsl:call-template>
+ </type>
+ <xsl:choose>
+ <xsl:when test="position()=last()"/>
+ <xsl:when test="position()=last()-1 and last()=2"> and </xsl:when>
+ <xsl:when test="position()=last()-1 and last()!=2">, and </xsl:when>
+ <xsl:otherwise>, </xsl:otherwise>
+ </xsl:choose><xsl:comment/>
+ </xsl:for-each><xsl:comment/>) <xsl:comment/>
+ </xsl:if><xsl:comment/>
+ <xsl:if test="$type-expr-mode"> of </xsl:if>
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="$constraint/@concept"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="make-definition-list">
+ <xsl:param name="typedefs"/>
+ <xsl:param name="definition_list"/>
+
+ <xsl:choose>
+ <xsl:when test="$typedefs">
+ <xsl:variable name="type_definition">
+ <xsl:if test="name($typedefs[1]/*[1])!='description'">
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$typedefs[1]/*[1]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="new_type_definition">
+ <xsl:choose>
+ <xsl:when test="name($typedefs[1])='associated-type'">
+ <xsl:value-of select="$typedefs[1]/@name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$type_definition"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="make-definition-list">
+ <xsl:with-param name="typedefs" select="$typedefs[position()!=1]"/>
+ <xsl:with-param name="definition_list" select="concat($definition_list, ' @(@', $typedefs[1]/@name, '=', $new_type_definition, '@)@')"/>
+ </xsl:call-template>
+
+ </xsl:when>
+
+ <xsl:otherwise> <!-- End of expression list, emit the results that have accumulated -->
+ <xsl:value-of select="$definition_list"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="print-associated-types">
+ <xsl:param name="typedefs"/>
+ <xsl:param name="definition_list"/>
+
+ <xsl:if test="$typedefs">
+ <refsect1>
+ <title>Associated types</title>
+
+ <xsl:choose>
+ <xsl:when test="$boost.concept.layout='sgi'">
+ <informaltable>
+ <tgroup cols="2">
+ <tbody>
+ <xsl:apply-templates select="associated-type" mode="sgi">
+ <xsl:with-param name="definition_list"
+ select="$definition_list"/>
+ </xsl:apply-templates>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </xsl:when>
+ <xsl:when test="$boost.concept.layout='austern'">
+ <itemizedlist>
+ <xsl:apply-templates select="associated-type" mode="austern">
+ <xsl:with-param name="definition_list"
+ select="$definition_list"/>
+ </xsl:apply-templates>
+ </itemizedlist>
+ </xsl:when>
+ <xsl:when test="$boost.concept.layout='caramel'">
+ <segmentedlist>
+ <segtitle>Name</segtitle>
+ <segtitle>Code</segtitle>
+ <segtitle>Description</segtitle>
+ <xsl:for-each select="$typedefs">
+ <xsl:variable name="type_definition">
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="*[1]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <seglistitem>
+ <seg><xsl:value-of select="@name"/></seg>
+ <seg><xsl:value-of select="$type_definition"/></seg>
+ <seg>
+ <xsl:for-each select="description">
+ <xsl:call-template name="description"/>
+ </xsl:for-each>
+ </seg>
+ </seglistitem>
+ </xsl:for-each>
+ </segmentedlist>
+ </xsl:when>
+ </xsl:choose>
+ </refsect1>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="comma-list">
+ <xsl:param name="list"/>
+
+ <xsl:if test="$list!=''">
+ <term><varname>
+ <xsl:if test="substring-before($list,' ')=''"><xsl:value-of select="$list"/></xsl:if>
+ <xsl:value-of select="substring-before($list,' ')"/>
+ </varname></term>
+ <xsl:call-template name="comma-list">
+ <xsl:with-param name="list" select="substring-after($list,' ')"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="associated-type" mode="sgi">
+ <row>
+ <entry><simpara><xsl:value-of select="@name"/></simpara></entry>
+
+ <entry>
+ <para>
+ <xsl:for-each select="description">
+ <xsl:apply-templates/>
+ </xsl:for-each>
+ </para>
+ </entry>
+ </row>
+ </xsl:template>
+
+ <xsl:template match="associated-type" mode="austern">
+ <xsl:param name="definition_list" select="''"/>
+
+ <listitem>
+ <para>
+ <emphasis role="bold"><xsl:value-of select="@name"/></emphasis>
+
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="*[1]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:for-each select="description">
+ <xsl:apply-templates/>
+ </xsl:for-each>
+ </para>
+ </listitem>
+ </xsl:template>
+
+ <xsl:template match="valid-expression">
+ <xsl:param name="definition_list"/>
+ <xsl:param name="notations"/>
+ <xsl:param name="columns"/>
+
+ <row>
+ <entry><simpara><xsl:value-of select="@name"/></simpara></entry>
+
+ <entry>
+ <simpara>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="*[1]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ </xsl:call-template>
+ </simpara>
+ </entry>
+
+ <xsl:if test="contains($columns, 'T')">
+ <entry>
+ <simpara>
+ <xsl:for-each select="return-type/*">
+ <xsl:if test="position()!=1 and last()!=2">, </xsl:if>
+ <xsl:if test="position()=last() and last()!=1"> and </xsl:if>
+ <xsl:call-template name="unparse-constraint">
+ <xsl:with-param name="constraint" select="."/>
+ <xsl:with-param name="definition_list"
+ select="$definition_list"/>
+ <xsl:with-param name="capitalize" select="position()=1"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </simpara>
+ </entry>
+ </xsl:if>
+
+ <xsl:if test="contains($columns, 'P')">
+ <entry>
+ <xsl:for-each select="precondition">
+ <simpara><xsl:apply-templates/></simpara>
+ </xsl:for-each>
+ </entry>
+ </xsl:if>
+
+ <xsl:if test="contains($columns, 'S')">
+ <entry>
+ <xsl:for-each select="semantics">
+ <simpara><xsl:apply-templates/></simpara>
+ </xsl:for-each>
+ </entry>
+ </xsl:if>
+
+ <xsl:if test="contains($columns, 'O')">
+ <entry>
+ <xsl:for-each select="postcondition">
+ <simpara><xsl:apply-templates/></simpara>
+ </xsl:for-each>
+ </entry>
+ </xsl:if>
+ </row>
+ </xsl:template>
+
+ <xsl:template name="concept.notation">
+ <xsl:param name="definition_list"/>
+
+ <refsect1>
+ <title>Notation</title>
+ <variablelist>
+ <xsl:for-each select="param">
+ <varlistentry>
+ <term><xsl:value-of select="@name"/></term>
+ <listitem>
+ <simpara>
+ <xsl:text>A type playing the role of </xsl:text>
+ <xsl:value-of select="@role"/>
+ <xsl:text> in the </xsl:text>
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="../@name"/>
+ </xsl:call-template>
+ <xsl:text> concept.</xsl:text>
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ <xsl:for-each select="notation">
+ <xsl:variable name="notation_name">
+ <xsl:call-template name="comma-list">
+ <xsl:with-param name="list"
+ select="normalize-space(@variables)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <varlistentry>
+ <xsl:copy-of select="$notation_name"/>
+ <listitem>
+ <simpara>
+ <xsl:variable name="output-plural" select="substring-before(normalize-space(@variables),' ')!=''"/>
+ <xsl:if test="name(*[1])='sample-value'">Object<xsl:if test="$output-plural">s</xsl:if> of type </xsl:if>
+ <xsl:variable name="typeref-to-print" select="*[name()!='sample-value'] | sample-value/*[name()!='sample-value']"/>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$typeref-to-print"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="ignore-cv" select="true()"/>
+ <xsl:with-param name="ignore-references" select="true()"/>
+ </xsl:call-template>
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ </variablelist>
+ </refsect1>
+ </xsl:template>
+
+ <xsl:template name="concept.link">
+ <xsl:param name="name" select="text()"/>
+ <xsl:param name="warn" select="true()"/>
+ <xsl:param name="text" select="$name"/>
+ <xsl:variable name="node" select="key('concepts', $name)"/>
+
+ <xsl:choose>
+ <xsl:when test="count($node)=0">
+ <xsl:if test="$warn">
+ <xsl:message>
+ <xsl:text>warning: cannot find concept '</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>'</xsl:text>
+ </xsl:message>
+ </xsl:if>
+ <xsl:value-of select="$text"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="remove-whitespace">
+ <xsl:param name="text" select="text()"/>
+
+ <xsl:variable name="normalized" select="normalize-space($text)"/>
+ <xsl:choose>
+ <xsl:when test="contains($normalized, ' ')">
+ <xsl:value-of select="substring-before($normalized, ' ')"/>
+ <xsl:call-template name="remove-whitespace">
+ <xsl:with-param name="text"
+ select="substring-after($normalized, ' ')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$normalized"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="concept" mode="generate.id">
+ <xsl:call-template name="remove-whitespace">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?xml version="1.0" ?>
+
+<!--
+Copyright (c) 2002-2003 The Trustees of Indiana University.
+ All rights reserved.
+Copyright (c) 2000-2001 University of Notre Dame. All rights reserved.
+
+ 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) -->
+
+<operator-list>
+ <!-- This list is from Pohl's book, and needs to be checked for accuracy -->
+
+ <op name="postincrement">
+ <apply priority="100"><arg num="1"/>++</apply> <!-- No assoc - always use parentheses -->
+ <impl position="method">operator++(int)</impl>
+ </op>
+
+ <op name="postdecrement">
+ <apply priority="100"><arg num="1"/>--</apply>
+ <impl position="method">operator--(int)</impl>
+ </op>
+
+ <op name="apply-function">
+ <apply priority="100"><name/>(<arg-list start="1" priority="30"/>)</apply>
+ <impl position="freestanding"><name/>(<arg-list/>)</impl>
+ </op>
+
+ <op name="apply-method">
+ <apply priority="100" assoc="1"><arg num="1"/>.<name/>(<arg-list start="2" priority="30"/>)</apply>
+ <impl position="method"><name/>(<arg-list/>)</impl>
+ </op>
+
+ <op name="pointer-apply-method">
+ <apply priority="100" assoc="1"><arg num="1"/>-&gt;<name/>(<arg-list start="2" priority="30"/>)</apply>
+ <impl>Error</impl>
+ </op>
+
+ <op name="apply-funcobj">
+ <apply priority="100" assoc="1"><arg num="1"/>(<arg-list start="2" priority="30"/>)</apply>
+ <impl position="method">operator()(<arg-list/>)</impl>
+ </op>
+
+ <op name="construct">
+ <apply priority="100"><arg num="1"/>(<arg-list start="2" priority="30"/>)</apply>
+ <impl position="method"><self/>(<arg-list/>)</impl>
+ </op>
+
+ <op name="subscript">
+ <apply priority="100" assoc="1"><arg num="1"/>[<arg num="2" priority="0"/>]</apply>
+ <impl position="method">operator[](<arg-list/>)</impl>
+ </op>
+
+ <op name="class-member">
+ <apply priority="100" assoc="1"><arg num="1"/>.<name/></apply>
+ <impl>Error</impl>
+ </op>
+
+ <op name="pointer-member">
+ <!-- Note: non-testable constraint -->
+ <apply priority="100"><arg num="1" assoc="1"/>-&gt;{member-name} (return type is pointer-to-object type)</apply>
+ <impl>operator-&gt;(<arg-list/>)</impl>
+ </op>
+
+ <op name="preincrement">
+ <apply priority="95">++<arg num="1"/></apply>
+ <impl position="method">operator++(<arg-list/>)</impl>
+ </op>
+
+ <op name="predecrement">
+ <apply priority="95">--<arg num="1"/></apply>
+ <impl position="method">operator--(<arg-list/>)</impl>
+ </op>
+
+ <op name="logical-not">
+ <apply priority="95" assoc="1">!<arg num="1"/></apply>
+ <impl position="method">operator!(<arg-list/>)</impl>
+ </op>
+
+ <op name="bitwise-not">
+ <apply priority="95" assoc="1">~<arg num="1"/></apply>
+ <impl position="method">operator~(<arg-list/>)</impl>
+ </op>
+
+ <op name="address-of">
+ <apply priority="95">&amp;<arg num="1"/></apply>
+ <impl position="method">operator&amp;(<arg-list/>)</impl>
+ </op>
+
+ <op name="dereference">
+ <apply priority="95" assoc="1">*<arg num="1"/></apply>
+ <impl position="method">operator*(<arg-list/>)</impl>
+ </op>
+
+ <op name="unary-plus">
+ <apply priority="95">+<arg num="1"/></apply>
+ <impl position="method">operator+(<arg-list/>)</impl>
+ </op>
+
+ <op name="unary-minus">
+ <apply priority="95">-<arg num="1"/></apply>
+ <impl position="method">operator-(<arg-list/>)</impl>
+ </op>
+
+ <op name="class-member-ptr">
+ <apply priority="90" assoc="1"><arg num="1"/>.*<arg num="2"/></apply>
+ <impl>Error</impl>
+ </op>
+
+ <op name="pointer-member-ptr">
+ <apply priority="90" assoc="1"><arg num="1"/>-&gt;*<arg num="2"/></apply>
+ <impl position="method">operator-&gt;*(<arg-list/>)</impl>
+ </op>
+
+ <op name="multiply">
+ <apply priority="90" assoc="1"><arg num="1"/> * <arg num="2"/></apply>
+ <impl position="freestanding">operator * (<arg-list/>)</impl>
+ </op>
+
+ <op name="divide">
+ <apply priority="90" assoc="1"><arg num="1"/> / <arg num="2"/></apply>
+ <impl position="freestanding">operator / (<arg-list/>)</impl>
+ </op>
+
+ <op name="modulus">
+ <apply priority="90" assoc="1"><arg num="1"/> % <arg num="2"/></apply>
+ <impl position="freestanding">operator % (<arg-list/>)</impl>
+ </op>
+
+ <op name="add">
+ <apply priority="85" assoc="1"><arg num="1"/> + <arg num="2"/></apply>
+ <impl position="freestanding">operator + (<arg-list/>)</impl>
+ </op>
+
+ <op name="subtract">
+ <apply priority="85" assoc="1"><arg num="1"/> - <arg num="2"/></apply>
+ <impl position="freestanding">operator - (<arg-list/>)</impl>
+ </op>
+
+ <op name="shift-left">
+ <apply priority="80" assoc="1"><arg num="1"/> &lt;&lt; <arg num="2"/></apply>
+ <impl position="freestanding">operator &lt;&lt; (<arg-list/>)</impl>
+ </op>
+
+ <op name="shift-right">
+ <apply priority="80" assoc="1"><arg num="1"/> &gt;&gt; <arg num="2"/></apply>
+ <impl position="freestanding">operator &gt;&gt; (<arg-list/>)</impl>
+ </op>
+
+ <op name="less-than">
+ <apply priority="75"><arg num="1"/> &lt; <arg num="2"/></apply>
+ <impl position="freestanding">operator &lt; (<arg-list/>)</impl>
+ </op>
+
+ <op name="greater-than">
+ <apply priority="75"><arg num="1"/> &gt; <arg num="2"/></apply>
+ <impl position="freestanding">operator &gt; (<arg-list/>)</impl>
+ </op>
+
+ <op name="less-than-or-equal">
+ <apply priority="75"><arg num="1"/> &lt;= <arg num="2"/></apply>
+ <impl position="freestanding">operator &lt;= (<arg-list/>)</impl>
+ </op>
+
+ <op name="greater-than-or-equal">
+ <apply priority="75"><arg num="1"/> &gt;= <arg num="2"/></apply>
+ <impl position="freestanding">operator &gt;= (<arg-list/>)</impl>
+ </op>
+
+ <op name="equal-to">
+ <apply priority="70"><arg num="1"/> == <arg num="2"/></apply>
+ <impl position="freestanding">operator == (<arg-list/>)</impl>
+ </op>
+
+ <op name="not-equal-to">
+ <apply priority="70"><arg num="1"/> != <arg num="2"/></apply>
+ <impl position="freestanding">operator != (<arg-list/>)</impl>
+ </op>
+
+ <op name="bitwise-and">
+ <apply priority="65" assoc="1"><arg num="1"/> &amp; <arg num="2"/></apply>
+ <impl position="freestanding">operator &amp; (<arg-list/>)</impl>
+ </op>
+
+ <op name="bitwise-or">
+ <apply priority="60" assoc="1"><arg num="1"/> | <arg num="2"/></apply>
+ <impl position="freestanding">operator | (<arg-list/>)</impl>
+ </op>
+
+ <op name="bitwise-xor">
+ <apply priority="55" assoc="1"><arg num="1"/> ^ <arg num="2"/></apply>
+ <impl position="freestanding">operator ^ (<arg-list/>)</impl>
+ </op>
+
+ <op name="logical-and">
+ <apply priority="50" assoc="1"><arg num="1"/> &amp;&amp; <arg num="2"/></apply>
+ <impl position="freestanding">operator &amp;&amp; (<arg-list/>)</impl>
+ </op>
+
+ <op name="logical-or">
+ <apply priority="45" assoc="1"><arg num="1"/> || <arg num="2"/></apply>
+ <impl position="freestanding">operator || (<arg-list/>)</impl>
+ </op>
+
+ <op name="conditional">
+ <apply priority="40" assoc="3"><arg num="1"/> ? <arg num="2"/> : <arg num="3"/></apply>
+ <impl>Error</impl>
+ </op>
+
+ <op name="assign">
+ <apply priority="35" assoc="2"><arg num="1"/> = <arg num="2"/></apply>
+ <impl position="method">operator = (<arg-list/>)</impl>
+ </op>
+
+ <op name="add-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> += <arg num="2"/></apply>
+ <impl position="method">operator += (<arg-list/>)</impl>
+ </op>
+
+ <op name="subtract-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> -= <arg num="2"/></apply>
+ <impl position="method">operator -= (<arg-list/>)</impl>
+ </op>
+
+ <op name="multiply-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> *= <arg num="2"/></apply>
+ <impl position="method">operator *= (<arg-list/>)</impl>
+ </op>
+
+ <op name="divide-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> /= <arg num="2"/></apply>
+ <impl position="method">operator /= (<arg-list/>)</impl>
+ </op>
+
+ <op name="modulus-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> %= <arg num="2"/></apply>
+ <impl position="method">operator %= (<arg-list/>)</impl>
+ </op>
+
+ <op name="shift-left-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> &lt;&lt;= <arg num="2"/></apply>
+ <impl position="method">operator &lt;&lt;= (<arg-list/>)</impl>
+ </op>
+
+ <op name="shift-right-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> &gt;&gt;= <arg num="2"/></apply>
+ <impl position="method">operator &gt;&gt;= (<arg-list/>)</impl>
+ </op>
+
+ <op name="bitwise-and-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> &amp;= <arg num="2"/></apply>
+ <impl position="method">operator &amp;= (<arg-list/>)</impl>
+ </op>
+
+ <op name="bitwise-or-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> |= <arg num="2"/></apply>
+ <impl position="method">operator |= (<arg-list/>)</impl>
+ </op>
+
+ <op name="bitwise-xor-assign">
+ <apply priority="35" assoc="2"><arg num="1"/> ^= <arg num="2"/></apply>
+ <impl position="method">operator ^= (<arg-list/>)</impl>
+ </op>
+
+ <op name="comma">
+ <apply priority="20"><arg num="1"/>, <arg num="2"/></apply>
+ <impl position="freestanding">operator , (<arg-list/>)</impl>
+ </op>
+
+ <op name="function-pointer">
+ <apply><arg num="1"/> (*)(<arg-list start="2" priority="30"/>)</apply>
+ <impl>Error</impl>
+ </op>
+
+ <op name="functorize-operator">
+ <!-- Note: non-testable constraint -->
+ <apply>functorization of operator <name/> on arguments {<arg-list start="1"/>}</apply>
+ <impl>Error</impl>
+ </op>
+
+ <op name="functorize-function">
+ <!-- Note: non-testable constraint -->
+ <apply>functorization of function <name/> on arguments {<arg-list start="1"/>}</apply>
+ <impl>Error</impl>
+ </op>
+
+</operator-list>
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 @@
+<?xml version="1.0" ?>
+
+<!--
+Copyright (c) 2002-2003 The Trustees of Indiana University.
+ All rights reserved.
+Copyright (c) 2000-2001 University of Notre Dame. All rights reserved.
+
+ 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:template name="unparse-cpp">
+ <xsl:param name="typeref"/>
+ <xsl:param name="definition_list"/>
+ <xsl:param name="priority">0</xsl:param>
+ <xsl:param name="ignore-cv" select="false()"/>
+ <xsl:param name="ignore-references" select="false()"/>
+ <xsl:param name="notations"/>
+ <xsl:param name="ignore-notation" select="false()"/>
+ <xsl:param name="print-updated-notation" select="false()"/>
+ <xsl:param name="use-typename" select="false()"/>
+ <xsl:param name="const-if-not-mutable-value" select="'const-if-not-mutable'"/>
+
+ <xsl:variable name="notation_check">
+ <xsl:if test="not($ignore-notation)"> <!-- Prevent infinite recursion -->
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="priority">0</xsl:with-param>
+ <xsl:with-param name="ignore-cv" select="true()"/>
+ <xsl:with-param name="ignore-references" select="true()"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="ignore-notation" select="true()"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <!--
+ <xsl:message>Notation check: <xsl:value-of select="$notation_check"/>
+ Notations: <xsl:value-of select="$notations"/>
+ </xsl:message> -->
+
+ <xsl:variable name="this_op_priority" select="document('cpp-operators.xml')/operator-list/op[@name=name($typeref)]/apply/@priority"/>
+
+ <xsl:variable name="result">
+
+ <xsl:variable name="subcall_priority">
+ <xsl:choose>
+ <xsl:when test="true() or ($this_op_priority &gt; $priority)">
+ <xsl:value-of select="$this_op_priority"/>
+ </xsl:when>
+ <!-- <xsl:otherwise>0</xsl:otherwise> -->
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:if test="$this_op_priority &lt;= $priority">(</xsl:if>
+
+ <xsl:choose>
+
+ <xsl:when test="name($typeref)='sample-value'"
+ >boost::sample_value &lt; <xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template> &gt;()</xsl:when>
+
+ <xsl:when test="name($typeref)='reference-to'"
+ ><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template><xsl:if test="not($ignore-references)"> &amp;</xsl:if></xsl:when>
+
+ <xsl:when test="name($typeref)='pointer-to'"
+ ><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/></xsl:call-template> *</xsl:when>
+
+ <xsl:when test="name($typeref)='const'"
+ ><xsl:if test="not($ignore-cv)">const </xsl:if><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($typeref)='const-if-not-mutable'"
+ ><xsl:if test="not($ignore-cv)"><xsl:value-of select="$const-if-not-mutable-value"/><xsl:if test="$const-if-not-mutable-value"><xsl:text> </xsl:text></xsl:if></xsl:if><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($typeref)='volatile'"
+ ><xsl:if test="not($ignore-cv)">volatile </xsl:if><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($typeref)='apply-template'">
+ <xsl:value-of select="$typeref/@name"/>&lt;<xsl:for-each select="$typeref/*">
+ <xsl:if test="position()!=1">, </xsl:if><xsl:comment/>
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="."/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template></xsl:for-each
+ ><xsl:comment/>&gt;</xsl:when>
+
+ <xsl:when test="name($typeref)='get-member-type'">
+ <xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>::<xsl:value-of select="$typeref/@name"/>
+ </xsl:when>
+
+ <xsl:when test="name($typeref)='type'">
+ <xsl:variable name="typeref_value" select="normalize-space(substring-before(substring-after($definition_list,concat('@(@',$typeref/@name,'=')),'@)@'))"/>
+ <xsl:choose>
+ <xsl:when test="$typeref_value=''">
+ <xsl:value-of select="$typeref/@name"/><xsl:comment/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$typeref_value"/><xsl:comment/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="name($typeref)='documentation'"/>
+
+ <xsl:when test="document('cpp-operators.xml')/operator-list/op[@name=name($typeref)]">
+ <xsl:variable name="op_file" select="document('cpp-operators.xml')/operator-list"/>
+ <xsl:variable name="op_info" select="$op_file/op[@name=name($typeref)]/apply/."/>
+
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="operator_nodeset" select="$op_info/child::node()"/>
+ <xsl:with-param name="my_priority" select="$subcall_priority"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ <xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
+ </xsl:call-template>
+
+ </xsl:when>
+
+ <xsl:otherwise>
+ (Unrecognized tag <xsl:value-of select="name($typeref)"/>)
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Close parenthesis code moved below -->
+
+ </xsl:variable>
+
+ <!-- <xsl:message>ignore-notation = <xsl:value-of select="$ignore-notation"/></xsl:message> -->
+ <!-- <xsl:message>notation_check = <xsl:value-of select="$notation_check"/></xsl:message> -->
+ <!-- <xsl:message>notations = <xsl:value-of select="$notations"/></xsl:message> -->
+ <!-- <xsl:message>result = <xsl:value-of select="$result"/></xsl:message> -->
+
+ <xsl:variable name="used_notation" select="boolean($notation_check) and boolean(substring-before(substring-after($notations, concat('@@(@@', $notation_check, '@@=@@')),'@@)@@'))"/>
+
+ <xsl:variable name="notations2">
+ <!-- Possibly replace from result of unparse-operator-definition -->
+ <xsl:choose>
+ <xsl:when test="contains($result, ' *@@@* ')">
+ <xsl:value-of select="substring-after($result, ' *@@@* ')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$notations"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="result2">
+ <!-- Possibly replace from result of unparse-operator-definition -->
+ <xsl:choose>
+ <xsl:when test="contains($result, ' *@@@* ')">
+ <xsl:value-of select="substring-before($result, ' *@@@* ')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$result"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!-- Close parenthesis code -->
+ <xsl:if test="$this_op_priority &lt;= $priority">)</xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="notation_varlist">
+ <xsl:choose>
+ <xsl:when test="$used_notation">
+ <xsl:value-of select="substring-before(substring-after($notations2, concat('@@(@@', $notation_check, '@@=@@')), '@@)@@')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$result2"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="new_varlist" select="substring-after(normalize-space($notation_varlist), ' ')"/>
+
+ <xsl:variable name="notation_var">
+ <xsl:choose>
+ <xsl:when test="not($used_notation)">
+ <xsl:value-of select="$result2"/>
+ </xsl:when>
+ <xsl:when test="$new_varlist=''">
+ <xsl:value-of select="$notation_varlist"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-before(normalize-space($notation_varlist), ' ')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Generate new notation list -->
+ <xsl:variable name="new_notations">
+ <xsl:choose>
+ <xsl:when test="$used_notation">
+ <xsl:value-of select="normalize-space(concat('@@(@@', $notation_check, '@@=@@', $new_varlist, '@@)@@', $notations2))"/>
+ <!-- Duplicate entries always use first occurrance, so I can optimize this -->
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$notations2"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- <xsl:message>final_result = <xsl:value-of select="normalize-space($final_result)"/></xsl:message> -->
+
+ <xsl:call-template name="add-typename"><xsl:with-param name="really-do-it" select="$use-typename"/><xsl:with-param name="type"><xsl:value-of select="normalize-space($notation_var)"/></xsl:with-param></xsl:call-template><xsl:if test="$print-updated-notation"> *@@@* <xsl:value-of select="$new_notations"/></xsl:if>
+
+ </xsl:template>
+
+ <xsl:template name="unparse-operator-definition">
+ <xsl:param name="typeref"/>
+ <xsl:param name="operator_nodeset"/>
+ <xsl:param name="current_start">1</xsl:param>
+ <xsl:param name="my_priority"/>
+ <xsl:param name="definition_list"/>
+ <xsl:param name="notations"/>
+ <xsl:param name="ignore-cv"/>
+ <xsl:param name="self"/>
+ <xsl:param name="use-code-block" select="false()"/>
+ <xsl:param name="print-updated-notation" select="false()"/>
+ <xsl:param name="const-if-not-mutable-value"/>
+
+ <xsl:variable name="op_current" select="$operator_nodeset[position()=1]"/>
+ <xsl:variable name="op_rest" select="$operator_nodeset[position()!=1]"/>
+
+ <xsl:choose>
+
+ <xsl:when test="count($operator_nodeset)=0">
+ <xsl:if test="$print-updated-notation"> *@@@* <xsl:value-of select="$notations"/></xsl:if>
+ </xsl:when>
+
+ <xsl:when test="$op_current != $op_current/../*"> <!-- If I am not an element -->
+ <xsl:value-of select="$op_current"/>
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="operator_nodeset" select="$op_rest"/>
+ <xsl:with-param name="my_priority" select="$my_priority"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="self" select="$self"/>
+ <xsl:with-param name="use-code-block" select="$use-code-block"/>
+ <xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($op_current)='name'">
+ <xsl:value-of select="$typeref/@name"/>
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="operator_nodeset" select="$op_rest"/>
+ <xsl:with-param name="my_priority" select="$my_priority"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="self" select="$self"/>
+ <xsl:with-param name="use-code-block" select="$use-code-block"/>
+ <xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($op_current)='self'">
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="string($self)"/>
+ </xsl:call-template>
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="operator_nodeset" select="$op_rest"/>
+ <xsl:with-param name="my_priority" select="$my_priority"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="self" select="$self"/>
+ <xsl:with-param name="use-code-block" select="$use-code-block"/>
+ <xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($op_current)='arg'">
+ <xsl:variable name="num" select="$op_current/@num"/>
+ <xsl:variable name="assoc" select="$op_current/../@assoc"/>
+ <xsl:variable name="my_priority_before" select="$my_priority"/>
+ <xsl:variable name="my_priority">
+ <xsl:choose>
+ <xsl:when test="count($op_current/@priority)">
+ <xsl:value-of select="$op_current/@priority"/>
+ </xsl:when>
+ <xsl:when test="$assoc and ($num = $assoc)">
+ <xsl:value-of select="$my_priority_before - 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$my_priority"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="typeref-result">
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$typeref/*[position()=$num]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="priority" select="$my_priority"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="print-updated-notation" select="true()"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="typeref-print" select="normalize-space(substring-before($typeref-result, ' *@@@* '))"/>
+ <xsl:variable name="new_notations" select="normalize-space(substring-after($typeref-result, ' *@@@* '))"/>
+
+ <xsl:choose>
+ <xsl:when test="$use-code-block">
+ <type><xsl:value-of select="$typeref-print"/></type>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$typeref-print"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="operator_nodeset" select="$op_rest"/>
+ <xsl:with-param name="my_priority" select="$my_priority_before"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$new_notations"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="self" select="$self"/>
+ <xsl:with-param name="use-code-block" select="$use-code-block"/>
+ <xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($op_current)='arg-list'">
+ <xsl:variable name="start" select="$op_current/@start"/>
+ <xsl:variable name="typeref-result">
+ <xsl:choose>
+ <xsl:when test="$current_start &gt;= $start">
+ <xsl:call-template name="unparse-cpp">
+ <xsl:with-param name="typeref" select="$typeref/*[$current_start]"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="priority" select="$my_priority"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="notations" select="$notations"/>
+ <xsl:with-param name="print-updated-notation" select="true()"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ *@@@* <xsl:value-of select="$notations"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="typeref-print" select="normalize-space(substring-before($typeref-result, ' *@@@* '))"/>
+ <xsl:variable name="new_notations" select="normalize-space(substring-after($typeref-result, ' *@@@* '))"/>
+
+ <xsl:choose>
+ <xsl:when test="$use-code-block">
+ <type><xsl:value-of select="$typeref-print"/></type>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$typeref-print"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="$current_start &gt;= $start">
+ <xsl:if test="$current_start!=count($typeref/*)">, </xsl:if>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$current_start != count($typeref/*)">
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="operator_nodeset" select="$operator_nodeset"/>
+ <xsl:with-param name="current_start" select="$current_start + 1"/>
+ <xsl:with-param name="my_priority" select="$my_priority"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$new_notations"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="self" select="$self"/>
+ <xsl:with-param name="use-code-block" select="$use-code-block"/>
+ <xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="unparse-operator-definition">
+ <xsl:with-param name="typeref" select="$typeref"/>
+ <xsl:with-param name="operator_nodeset" select="$op_rest"/>
+ <xsl:with-param name="my_priority" select="$my_priority"/>
+ <xsl:with-param name="definition_list" select="$definition_list"/>
+ <xsl:with-param name="notations" select="$new_notations"/>
+ <xsl:with-param name="ignore-cv" select="$ignore-cv"/>
+ <xsl:with-param name="self" select="$self"/>
+ <xsl:with-param name="use-code-block" select="$use-code-block"/>
+ <xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:otherwise>Invalid tag in operator definition: <xsl:value-of select="name($op_current)"/></xsl:otherwise>
+
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="add-typename">
+ <!-- Adds typename to the front of a string if it is necessary. -->
+ <xsl:param name="type"/> <!-- string to prepend to -->
+ <xsl:param name="params" select="/concept/param | /concept/define-type | /concept/associated-type"/>
+ <!-- nodeset of param tags for concept -->
+ <!-- associated types are assumed to be dependent -->
+ <xsl:param name="really-do-it"/> <!-- really change anything? -->
+
+ <xsl:variable name="type-after-last-scope">
+ <xsl:call-template name="substring-before-last">
+ <xsl:with-param name="string" select="$type"/>
+ <xsl:with-param name="to-find" select="'::'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="tokenized-type-after-last-scope">
+ <xsl:call-template name="rough-tokenize">
+ <xsl:with-param name="string" select="$type-after-last-scope"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$really-do-it and boolean($params[contains($tokenized-type-after-last-scope, concat(' ', @name, ' '))])">
+ <!-- If the tokenized string contains any of the param names in a
+ token by itself, return true. Return false otherwise -->
+ <xsl:comment/>typename <xsl:value-of select="$type"/><xsl:comment/>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="substring-before-last">
+ <xsl:param name="string"/>
+ <xsl:param name="to-find"/>
+ <xsl:param name="string-processed-so-far"/> <!-- internal -->
+ <!-- Find the substring of $string before the last occurrance of
+ $to-find, returning '' if it was not found. -->
+
+ <xsl:choose>
+ <xsl:when test="contains($string, $to-find)">
+ <xsl:call-template name="substring-before-last">
+ <xsl:with-param name="string" select="substring-after($string, $to-find)"/>
+ <xsl:with-param name="to-find" select="$to-find"/>
+ <xsl:with-param name="string-processed-so-far" select="concat($string-processed-so-far, substring-before($string, $to-find), $to-find)"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:value-of select="substring($string-processed-so-far, 1, string-length($string-processed-so-far)-(string-length($to-find)))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="substring-after-last">
+ <xsl:param name="string"/>
+ <xsl:param name="to-find"/>
+ <!-- Find the substring of $string after the last occurrance of
+ $to-find, returning the original string if it was not found. -->
+
+ <xsl:choose>
+ <xsl:when test="contains($string, $to-find)">
+ <xsl:call-template name="substring-after-last">
+ <xsl:with-param name="string" select="substring-after($string, $to-find)"/>
+ <xsl:with-param name="to-find" select="$to-find"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="rough-tokenize">
+ <xsl:param name="string"/>
+ <!-- Do a rough tokenization of the string. Right now, just translate
+ all non-token-chars to spaces, normalize-space the result, and prepend
+ and append spaces. -->
+
+ <xsl:value-of select="concat(' ', normalize-space(translate($string, '&lt;&gt;,./?;:[]{}-=\\_+|!@#$%^&amp;*()', ' ')), ' ')"/>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?xml version="1.0"?>
+<!--
+ 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">
+
+<!-- Import the HTML chunking stylesheet -->
+
+<!-- Watch out that we don't override chunk.xsl -->
+<!--
+<xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/chunk-common.xsl"/> -->
+
+<!-- Already included in the main stylesheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="recursive-chunk-filename">
+ <xsl:param name="recursive" select="false()"/>
+
+ <xsl:variable name="their">
+ <xsl:apply-imports mode="recursive-chunk-filename" select="."/>
+ </xsl:variable>
+
+ <xsl:variable name="basename" select="substring-before( $their, $html.ext )"/>
+ <xsl:choose>
+ <xsl:when test="not($recursive)">
+ <!-- translate dots into directory separators, and replace illegal file path characters with underscores -->
+ <xsl:value-of select="translate($basename, '.&lt;&gt;\:*?&quot;|,()!+=&amp;', '/_______________' )"/>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$basename"/>
+ <xsl:value-of select="'.'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="navig.content">
+ <xsl:param name="direction" select="next"/>
+ <xsl:variable name="navtext">
+ <xsl:choose>
+ <xsl:when test="$direction = 'prev'">
+ <xsl:call-template name="gentext.nav.prev"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'next'">
+ <xsl:call-template name="gentext.nav.next"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'up'">
+ <xsl:call-template name="gentext.nav.up"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'home'">
+ <xsl:call-template name="gentext.nav.home"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>xxx</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$navtext = 'xxx'">
+ <xsl:value-of select="$direction"/>
+ </xsl:when>
+ <xsl:when test="$navig.graphics != 0">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$navig.graphics.path"/>
+ </xsl:call-template>
+ <xsl:value-of select="$direction"/>
+ <xsl:value-of select="$navig.graphics.extension"/>
+ </xsl:attribute>
+ <xsl:attribute name="alt">
+ <xsl:value-of select="$navtext"/>
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$navtext"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- ====================================================================== -->
+
+<xsl:template match="@fileref">
+ <xsl:choose>
+ <xsl:when test="contains(., ':')">
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="."/>
+ <xsl:with-param name="context" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="@url">
+ <xsl:choose>
+ <xsl:when test="contains(., ':')">
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>XXX</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>XXX</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+</xsl:stylesheet>
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 @@
+<?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 version = "1.0"
+ xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
+>
+
+ <!-- needed for calsTable template -->
+
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/formal.xsl"/>
+
+ <!-- Optionally add the section id to each section's class.
+ This is useful if you want to style individual sections differently. -->
+ <xsl:param name="boost.section.class.add.id" select="0"/>
+
+ <!--
+ Override the behaviour of some DocBook elements for better
+ integration with the new look & feel.
+ -->
+
+ <xsl:template match = "programlisting[ancestor::informaltable]">
+ <pre class = "table-{name(.)}"><xsl:apply-templates/></pre>
+ </xsl:template>
+
+ <xsl:template match = "refsynopsisdiv">
+ <h2 class = "{name(.)}-title">Synopsis</h2>
+ <div class = "{name(.)}"><xsl:apply-templates/></div>
+ </xsl:template>
+
+ <!-- table: remove border = '1' -->
+
+ <xsl:template match = "table|informaltable">
+ <xsl:choose>
+ <xsl:when test = "self::table and tgroup|mediaobject|graphic">
+ <xsl:apply-imports/>
+ </xsl:when><xsl:when test = "self::informaltable and tgroup|mediaobject|graphic">
+ <xsl:call-template name = "informal.object">
+ <xsl:with-param name = "class"><xsl:choose>
+ <xsl:when test = "@tabstyle">
+ <xsl:value-of select = "@tabstyle"/>
+ </xsl:when><xsl:otherwise>
+ <xsl:value-of select = "local-name(.)"/>
+ </xsl:otherwise>
+ </xsl:choose></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when><xsl:otherwise>
+ <table class = "table"><xsl:copy-of select = "@*[not(local-name(.)='border')]"/>
+ <xsl:call-template name = "htmlTable"/>
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match = "tgroup" name = "tgroup">
+ <xsl:variable name="summary"><xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'table-summary'"/>
+ </xsl:call-template></xsl:variable>
+
+ <xsl:variable name="cellspacing"><xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'cellspacing'"/>
+ </xsl:call-template></xsl:variable>
+
+ <xsl:variable name="cellpadding"><xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="processing-instruction('dbhtml')[1]"/>
+ <xsl:with-param name="attribute" select="'cellpadding'"/>
+ </xsl:call-template></xsl:variable>
+
+ <table class = "table">
+ <xsl:choose>
+ <xsl:when test="../textobject/phrase">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="../textobject/phrase"/>
+ </xsl:attribute>
+ </xsl:when><xsl:when test="$summary != ''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$summary"/>
+ </xsl:attribute>
+ </xsl:when><xsl:when test="../title">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="string(../title)"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise/>
+ </xsl:choose><xsl:if test="$cellspacing != '' or $html.cellspacing != ''">
+ <xsl:attribute name="cellspacing"><xsl:choose>
+ <xsl:when test="$cellspacing != ''"><xsl:value-of select="$cellspacing"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$html.cellspacing"/></xsl:otherwise>
+ </xsl:choose></xsl:attribute>
+ </xsl:if><xsl:if test="$cellpadding != '' or $html.cellpadding != ''">
+ <xsl:attribute name="cellpadding"><xsl:choose>
+ <xsl:when test="$cellpadding != ''"><xsl:value-of select="$cellpadding"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$html.cellpadding"/></xsl:otherwise>
+ </xsl:choose></xsl:attribute>
+ </xsl:if><xsl:if test="../@pgwide=1">
+ <xsl:attribute name="width">100%</xsl:attribute>
+ </xsl:if>
+
+ <xsl:variable name="colgroup">
+ <colgroup><xsl:call-template name="generate.colgroup">
+ <xsl:with-param name="cols" select="@cols"/>
+ </xsl:call-template></colgroup>
+ </xsl:variable>
+
+ <xsl:variable name="explicit.table.width"><xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="../processing-instruction('dbhtml')[1]"/>
+ <xsl:with-param name="attribute" select="'table-width'"/>
+ </xsl:call-template></xsl:variable>
+
+ <xsl:variable name="table.width"><xsl:choose>
+ <xsl:when test="$explicit.table.width != ''">
+ <xsl:value-of select="$explicit.table.width"/>
+ </xsl:when><xsl:when test="$default.table.width = ''">
+ <xsl:text>100%</xsl:text>
+ </xsl:when><xsl:otherwise>
+ <xsl:value-of select="$default.table.width"/>
+ </xsl:otherwise>
+ </xsl:choose></xsl:variable>
+
+ <xsl:if test="$default.table.width != '' or $explicit.table.width != ''">
+ <xsl:attribute name="width"><xsl:choose>
+ <xsl:when test="contains($table.width, '%')">
+ <xsl:value-of select="$table.width"/>
+ </xsl:when><xsl:when test="$use.extensions != 0 and $tablecolumns.extension != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('stbl:convertLength')">
+ <xsl:value-of select="stbl:convertLength($table.width)"/>
+ </xsl:when><xsl:when test="function-available('xtbl:convertLength')">
+ <xsl:value-of select="xtbl:convertLength($table.width)"/>
+ </xsl:when><xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No convertLength function available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when><xsl:otherwise>
+ <xsl:value-of select="$table.width"/>
+ </xsl:otherwise>
+ </xsl:choose></xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$use.extensions != 0 and $tablecolumns.extension != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('stbl:adjustColumnWidths')">
+ <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/>
+ </xsl:when><xsl:when test="function-available('xtbl:adjustColumnWidths')">
+ <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/>
+ </xsl:when><xsl:when test="function-available('ptbl:adjustColumnWidths')">
+ <xsl:copy-of select="ptbl:adjustColumnWidths($colgroup)"/>
+ </xsl:when><xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No adjustColumnWidths function available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when><xsl:otherwise>
+ <xsl:copy-of select="$colgroup"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:apply-templates select="thead"/>
+ <xsl:apply-templates select="tfoot"/>
+ <xsl:apply-templates select="tbody"/>
+
+ <xsl:if test=".//footnote"><tbody class="footnotes">
+ <tr><td colspan="{@cols}">
+ <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
+ </td></tr>
+ </tbody></xsl:if>
+ </table>
+ </xsl:template>
+
+ <!-- table of contents
+
+ The standard Docbook template selects, amoung others,
+ the 'refentry' element for inclusion in TOC. In some
+ cases, this creates empty TOC. The most possible reason
+ is that there's 'refentry' element without 'refentrytitle',
+ but it's a mistery why it occurs. Even if we fix that
+ problem, we'll get non-empty TOC where no TOC is desired
+ (e.g. for section corresponding to each header file in
+ library doc). So, don't bother for now.
+ -->
+
+ <xsl:template name="section.toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="toc.title.p" select="true()"/>
+
+ <xsl:call-template name="make.toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
+ <xsl:with-param name="nodes" select="
+ section|sect1|sect2|sect3|sect4|sect5|
+ bridgehead[$bridgehead.in.toc != 0]
+ "/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- When there is both a title and a caption for a table, only use the
+ title. -->
+ <xsl:template match="table" mode="title.markup">
+ <xsl:param name="allow-anchors" select="0"/>
+ <xsl:apply-templates select="(title|caption)[1]" mode="title.markup">
+ <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+
+ <!-- Adds role class for section element resulting div. So that
+ we can style them in the resulting HTML.
+ Also, add the section id, if boost.section.class.add.id = 1.
+ This can be used to style individual sections differently. -->
+ <xsl:template match="section" mode="class.value">
+ <xsl:param name="class" select="local-name(.)"/>
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="id">
+ <xsl:if test="$boost.section.class.add.id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$node"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space(concat($class, ' ',
+ @role, ' ', translate($id, '.', '_')))"/>
+ </xsl:template>
+
+ <!-- Adds role class for simplesect element resulting div. So that
+ we can style them in the resulting HTML. -->
+ <xsl:template match="simplesect" mode="class.value">
+ <xsl:param name="class" select="local-name(.)"/>
+ <xsl:param name="node" select="."/>
+ <xsl:value-of select="normalize-space(concat($class,' ',@role))"/>
+ </xsl:template>
+
+ <!-- Allow for specifying that a section should not include the parents
+ labeling. This allows us to start clean numering of a sub-section. -->
+ <xsl:template match="section[@label-style='no-parent']" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="$label != 0">
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$section.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:number format="{$format}" count="section"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ version="1.0">
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/common/common.xsl"/>
+ <xsl:include href="reference.xsl"/>
+
+ <xsl:output method="xml"
+ doctype-public="-//OASIS//DTD DocBook XML V4.2//EN"
+ doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/>
+
+ <!-- Generate consistent id values if document is unchanged -->
+ <xsl:param name="generate.consistent.ids" select="0"/>
+
+ <!-- The maximum number of columns allowed in preformatted text -->
+ <xsl:param name="max-columns" select="78"/>
+
+ <!-- The root of the Boost directory -->
+ <xsl:param name="boost.root" select="'../..'"/>
+
+ <!-- A space-separated list of libraries to include in the
+ output. If this list is empty, all libraries will be included. -->
+ <xsl:param name="boost.include.libraries" select="''"/>
+
+ <!-- Whether to rewrite relative URL's to point to the website -->
+ <xsl:param name="boost.url.prefix"/>
+
+ <!-- A space-separated list of xml elements in the input file for which
+ whitespace should be preserved -->
+ <xsl:preserve-space elements="*"/>
+
+ <!-- The root for boost headers -->
+ <xsl:param name="boost.header.root">
+ <xsl:if test="$boost.url.prefix">
+ <xsl:value-of select="$boost.url.prefix"/>
+ <xsl:text>/</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$boost.root"/>
+ </xsl:param>
+
+ <!-- The prefix for 'boost:' links. -->
+ <xsl:variable name="boost.protocol.text">
+ <xsl:if test="($boost.url.prefix != '') and (contains($boost.root, '://') = 0)">
+ <xsl:value-of select="concat($boost.url.prefix, '/', $boost.root)"/>
+ </xsl:if>
+ <xsl:if test="($boost.url.prefix = '') or contains($boost.root, '://')">
+ <xsl:value-of select="$boost.root"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:template match="library-reference">
+ <xsl:choose>
+ <xsl:when test="ancestor::library-reference">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <section>
+ <xsl:choose>
+ <xsl:when test="@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="ancestor::library/attribute::id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="ancestor::library/attribute::id"/>
+ <xsl:text>.reference</xsl:text>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:if test="not(title)">
+ <title>
+ <xsl:text>Reference</xsl:text>
+ </title>
+ </xsl:if>
+
+ <xsl:if test="concept">
+ <section>
+ <xsl:choose>
+ <xsl:when test="@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ <xsl:text>.concepts</xsl:text>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="ancestor::library/attribute::id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="ancestor::library/attribute::id"/>
+ <xsl:text>.concepts</xsl:text>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+
+ <title>Concepts</title>
+
+ <itemizedlist>
+ <xsl:for-each select="concept">
+ <listitem><simpara>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </simpara></listitem>
+ </xsl:for-each>
+ </itemizedlist>
+ </section>
+ </xsl:if>
+
+ <xsl:apply-templates/>
+ </section>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="header">
+ <xsl:if test="*">
+ <section>
+ <xsl:attribute name="id">
+ <xsl:call-template name="generate.id"/>
+ </xsl:attribute>
+
+ <title>
+ <xsl:text>Header &lt;</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>&gt;</xsl:text>
+ </title>
+
+ <xsl:apply-templates select="para|section" mode="annotation"/>
+
+ <xsl:if test="macro">
+ <xsl:call-template name="synopsis">
+ <xsl:with-param name="text">
+ <xsl:apply-templates mode="synopsis" select="macro">
+ <xsl:with-param name="indentation" select="0"/>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="descendant::class|descendant::struct|descendant::union
+ |descendant::function|descendant::free-function-group
+ |descendant::overloaded-function|descendant::enum
+ |descendant::typedef">
+ <xsl:call-template name="synopsis">
+ <xsl:with-param name="text">
+ <xsl:apply-templates mode="synopsis"
+ select="namespace|class|struct|union
+ |function|free-function-group
+ |overloaded-function|enum
+ |typedef">
+ <xsl:with-param name="indentation" select="0"/>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:apply-templates mode="namespace-reference"/>
+ </section>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="header" mode="generate.id">
+ <xsl:text>header.</xsl:text>
+ <xsl:value-of select="translate(@name, '/.', '._')"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="passthrough">
+ <xsl:copy-of select="."/>
+ </xsl:template>
+
+ <xsl:template name="monospaced">
+ <xsl:param name="text"/>
+ <computeroutput><xsl:value-of select="$text"/></computeroutput>
+ </xsl:template>
+
+ <!-- Linking -->
+ <xsl:template match="ulink">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="url">
+ <xsl:choose>
+ <xsl:when test="starts-with(@url, 'boost:/')">
+ <xsl:value-of select="concat($boost.protocol.text, substring-after(@url, 'boost:'))"/>
+ </xsl:when>
+ <xsl:when test="starts-with(@url, 'boost:')">
+ <xsl:value-of select="concat($boost.protocol.text, '/', substring-after(@url, 'boost:'))"/>
+ </xsl:when>
+ <xsl:when test="$boost.url.prefix != '' and not(contains(@url, ':') or starts-with(@url, '//'))">
+ <xsl:value-of select="concat($boost.url.prefix, '/', @url)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@url"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template name="internal-link">
+ <xsl:param name="to"/>
+ <xsl:param name="text"/>
+ <xsl:param name="highlight" select="false()"/>
+
+ <link linkend="{$to}">
+ <xsl:if test="$highlight">
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not($highlight)">
+ <xsl:value-of select="string($text)"/>
+ </xsl:if>
+ </link>
+ </xsl:template>
+
+ <xsl:template name="anchor">
+ <xsl:param name="to"/>
+ <xsl:param name="text"/>
+ <xsl:param name="highlight" select="false()"/>
+
+ <anchor id="{$to}"/>
+ <xsl:if test="$highlight">
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not($highlight)">
+ <xsl:value-of select="$text"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="link-or-anchor">
+ <xsl:param name="to"/>
+ <xsl:param name="text"/>
+
+ <!-- True if we should create an anchor, otherwise we will create
+ a link. If you require more control (e.g., with the possibility of
+ having no link or anchor), set link-type instead: if present, it
+ takes precedence. -->
+ <xsl:param name="is-anchor"/>
+
+ <!-- 'anchor', 'link', or 'none' -->
+ <xsl:param name="link-type">
+ <xsl:choose>
+ <xsl:when test="$is-anchor">
+ <xsl:text>anchor</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>link</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <xsl:param name="highlight" select="false()"/>
+
+ <xsl:choose>
+ <xsl:when test="$link-type='anchor'">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to" select="$to"/>
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$link-type='link'">
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to" select="$to"/>
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$link-type='none'">
+ <xsl:if test="$highlight">
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not($highlight)">
+ <xsl:value-of select="$text"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-of select="$link-type"/>'
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="separator"/>
+
+ <xsl:template name="reference-documentation">
+ <xsl:param name="name"/>
+ <xsl:param name="refname"/>
+ <xsl:param name="purpose"/>
+ <xsl:param name="anchor"/>
+ <xsl:param name="synopsis"/>
+ <xsl:param name="text"/>
+
+ <refentry id="{$anchor}">
+ <refmeta>
+ <refentrytitle><xsl:value-of select="$name"/></refentrytitle>
+ <manvolnum>3</manvolnum>
+ </refmeta>
+ <refnamediv>
+ <refname><xsl:value-of select="$refname"/></refname>
+ <refpurpose>
+ <xsl:apply-templates mode="purpose" select="$purpose"/>
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <synopsis>
+ <xsl:copy-of select="$synopsis"/>
+ </synopsis>
+ </refsynopsisdiv>
+ <xsl:if test="not(string($text)='')">
+ <refsect1>
+ <title>Description</title>
+ <xsl:copy-of select="$text"/>
+ </refsect1>
+ </xsl:if>
+ </refentry>
+ </xsl:template>
+
+ <xsl:template name="member-documentation">
+ <xsl:param name="name"/>
+ <xsl:param name="text"/>
+
+ <refsect2>
+ <title><xsl:copy-of select="$name"/></title>
+ <xsl:copy-of select="$text"/>
+ </refsect2>
+ </xsl:template>
+
+ <xsl:template name="preformatted">
+ <xsl:param name="text"/>
+
+ <literallayout class="monospaced">
+ <xsl:copy-of select="$text"/>
+ </literallayout>
+ </xsl:template>
+
+ <xsl:template name="synopsis">
+ <xsl:param name="text"/>
+
+ <synopsis>
+ <xsl:copy-of select="$text"/>
+ </synopsis>
+ </xsl:template>
+
+ <!-- Fallthrough for DocBook elements -->
+ <xsl:template match="*">
+ <xsl:element name="{name(.)}">
+ <xsl:for-each select="./@*">
+ <xsl:choose>
+ <xsl:when test="local-name(.)='last-revision'">
+ <xsl:attribute
+ name="rev:last-revision"
+ namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="processing-instruction()">
+ <xsl:copy/>
+ </xsl:template>
+
+ <xsl:template match="code">
+ <computeroutput>
+ <xsl:apply-templates mode="annotation"/>
+ </computeroutput>
+ </xsl:template>
+
+ <xsl:template match="code[@language='jam']">
+ <computeroutput>
+ <xsl:apply-templates mode="highlight-jam"/>
+ </computeroutput>
+ </xsl:template>
+
+ <xsl:template match="code[@language='c++']">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="bold">
+ <emphasis role="bold">
+ <xsl:apply-templates mode="annotation"/>
+ </emphasis>
+ </xsl:template>
+
+ <xsl:template match="library">
+ <xsl:if test="not(@html-only = 1) and
+ ($boost.include.libraries='' or
+ contains($boost.include.libraries, @id))">
+ <chapter>
+ <xsl:copy-of select="@*[not(contains(' last-revision name dirname html-only url ', concat(' ',local-name(),' ')))]"/>
+ <xsl:if test="not(@id)">
+ <xsl:attribute name="id">
+ <xsl:call-template name="generate.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="@last-revision">
+ <xsl:attribute
+ name="rev:last-revision"
+ namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">
+ <xsl:value-of select="@last-revision"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </chapter>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="chapter">
+ <xsl:if test="$boost.include.libraries=''">
+ <chapter>
+ <xsl:copy-of select="./@*" />
+ <xsl:apply-templates/>
+ </chapter>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="boostbook">
+ <book>
+ <xsl:copy-of select="@*[not(contains(' last-revision name dirname html-only url ', concat(' ',local-name(),' ')))]"/>
+ <xsl:apply-templates/>
+ </book>
+ </xsl:template>
+
+ <xsl:template match="programlisting">
+ <programlisting><xsl:apply-templates/></programlisting>
+ </xsl:template>
+
+ <xsl:template match="programlisting[@language='jam']">
+ <programlisting>
+ <xsl:apply-templates mode="highlight-jam"/>
+ </programlisting>
+ </xsl:template>
+
+ <xsl:template match="programlisting[@language='c++']">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
+ <!-- These DocBook elements have special meaning. Use the annotation mode -->
+ <xsl:template match="classname|methodname|functionname|enumname|
+ macroname|headername|globalname">
+ <computeroutput>
+ <xsl:apply-templates select="." mode="annotation"/>
+ </computeroutput>
+ </xsl:template>
+
+ <xsl:template match="libraryname|conceptname">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="description">
+ <xsl:apply-templates mode="annotation"/>
+ </xsl:template>
+
+ <!-- Swallow using-namespace and using-class directives along with
+ last-revised elements -->
+ <xsl:template match="using-namespace|using-class|last-revised"/>
+
+ <!-- If there is no "namespace-reference" mode, forward to
+ "reference" mode -->
+ <xsl:template match="*" mode="namespace-reference">
+ <xsl:apply-templates select="." mode="reference"/>
+ </xsl:template>
+
+ <!-- Make the various blocks immediately below a "part" be
+ "chapter"-s. Must also take into account turning
+ chapters within chpaters into sections. -->
+ <xsl:template match="part/part|part/article">
+ <chapter>
+ <xsl:copy-of select="./@*"/>
+ <xsl:apply-templates/>
+ </chapter>
+ </xsl:template>
+ <xsl:template match="part/part/partinfo|part/article/articleinfo">
+ <chapterinfo><xsl:apply-templates/></chapterinfo>
+ </xsl:template>
+ <xsl:template match="part/part/chapter|part/part/appendix">
+ <section>
+ <xsl:copy-of select="./@*"/>
+ <xsl:apply-templates/>
+ </section>
+ </xsl:template>
+ <xsl:template match="part/part/chapter/chapterinfo|part/part/appendix/appendixinfo">
+ <sectioninfo><xsl:apply-templates/></sectioninfo>
+ </xsl:template>
+
+ <!-- Header link comment to be inserted at the start of a reference page's
+ synopsis -->
+ <xsl:template name="header-link">
+ <xsl:if test="ancestor::header">
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// In header: &lt;</xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="ancestor::header[1]"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="ancestor::header[1]/@name" />
+ </xsl:call-template>
+ <xsl:text>&gt;&#10;&#10;</xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+</xsl:stylesheet>
+
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 @@
+<?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" version="1.0" indent="yes" standalone="yes" />
+
+ <xsl:template match="/">
+ <doxygen>
+ <xsl:attribute name="version">
+ <xsl:choose>
+ <xsl:when test="doxygen">
+ <xsl:value-of select="doxygen/attribute::version"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="doxygenindex/attribute::version"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+
+ <!-- Load all doxgen generated xml files -->
+ <xsl:for-each select="doxygen/compound">
+ <xsl:variable name="id">
+ <xsl:choose>
+ <xsl:when test="@refid">
+ <xsl:value-of select="@refid"/>
+ </xsl:when>
+ <xsl:when test="@id">
+ <xsl:value-of select="@id"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="$id">
+ <xsl:copy-of select="document( concat( $id, '.xml' ), / )/doxygen/*" />
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="doxygenindex/compound">
+ <xsl:variable name="id">
+ <xsl:choose>
+ <xsl:when test="@refid">
+ <xsl:value-of select="@refid"/>
+ </xsl:when>
+ <xsl:when test="@id">
+ <xsl:value-of select="@id"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="$id">
+ <xsl:copy-of select="document( concat($id, '.xml'), /)/doxygen/*" />
+ </xsl:if>
+ </xsl:for-each>
+ </doxygen>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?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:import href="../lookup.xsl"/>
+
+ <!-- Set this parameter to a space-separated list of headers that
+ will be included in the output (all others are ignored). If this
+ parameter is omitted or left as the empty string, all headers will
+ be output. -->
+ <xsl:param name="boost.doxygen.headers" select="''"/>
+
+ <!-- The common prefix to all headers -->
+ <xsl:param name="boost.doxygen.header.prefix" select="'boost'"/>
+
+ <!-- The text that Doxygen places in overloaded functions. Damn them
+ for forcing us to compare TEXT just to figure out what's overloaded
+ and what isn't. -->
+ <xsl:param name="boost.doxygen.overload">
+ This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
+ </xsl:param>
+
+ <!-- The namespace used to identify code that should not be
+ processed at all. -->
+ <xsl:param name="boost.doxygen.detailns">detail</xsl:param>
+
+ <!-- The substring used to identify unspecified types that we can't
+ mask from within Doxygen. This is a hack (big surprise). -->
+ <xsl:param name="boost.doxygen.detail"><xsl:value-of select="$boost.doxygen.detailns"/>::</xsl:param>
+
+ <!-- The title that will be used for the BoostBook library reference emitted.
+ If left blank, BoostBook will assign a default title. -->
+ <xsl:param name="boost.doxygen.reftitle" select="''"/>
+
+ <!-- The id used for the library-reference. By default, it is the normalized
+ form of the reftitle. -->
+ <xsl:param name="boost.doxygen.refid" select="''"/>
+
+ <!-- The directory into which png files corresponding to LaTeX formulas will be found. -->
+ <xsl:param name="boost.doxygen.formuladir" select="'images/'"/>
+
+ <xsl:output method="xml" indent="no" standalone="yes"/>
+
+ <xsl:key name="compounds-by-kind" match="compounddef" use="@kind"/>
+ <xsl:key name="compounds-by-id" match="compounddef" use="@id"/>
+ <xsl:key name="members-by-id" match="memberdef" use="@id" />
+
+ <!-- Add trailing slash to formuladir if missing -->
+
+ <xsl:variable name="boost.doxygen.formuladir.fixed">
+ <xsl:choose>
+ <xsl:when test="substring(boost.doxygen.formuladir, string-length(boost.doxygen.formuladir) - 1) = '/'">
+ <xsl:value-of select="$boost.doxygen.formuladir" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($boost.doxygen.formuladir, '/')" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:strip-space elements="briefdescription detaileddescription inbodydescription"/>
+
+ <xsl:template name="kind-error-message">
+ <xsl:param name="message"/>
+
+ <xsl:variable name="location" select=".//location[1]" />
+ <xsl:variable name="name" select="./name" />
+
+ <xsl:message>
+ <xsl:if test="$location">
+ <xsl:value-of select="concat($location/@file, ':', $location/@line, ': ')" />
+ </xsl:if>
+ <xsl:value-of select="concat($message, ' with kind=', @kind)" />
+ <xsl:if test="$name">
+ <xsl:value-of select="concat(' (name=', $name, ') ')" />
+ </xsl:if>
+ </xsl:message>
+ </xsl:template>
+
+ <!-- translate-name: given a string, return a string suitable for use as a refid -->
+ <xsl:template name="translate-name">
+ <xsl:param name="name"/>
+ <xsl:value-of select="translate($name,
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ~!%^&amp;*()[].,&lt;&gt;|/ +-=',
+ 'abcdefghijklmnopqrstuvwxyz_____________________')"/>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="doxygen"/>
+ </xsl:template>
+
+ <xsl:template match="doxygen">
+ <library-reference>
+ <xsl:if test="string($boost.doxygen.reftitle) != ''">
+ <!-- when a reference section has a reftitle, also give it a refid. The id
+ is determined by the boost.doxygen.refid param, which defaults to a
+ normalized form of the boost.doxygen.reftitle -->
+ <xsl:attribute name="id">
+ <xsl:choose>
+ <xsl:when test="string($boost.doxygen.refid) != ''">
+ <xsl:value-of select="$boost.doxygen.refid"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="translate-name">
+ <xsl:with-param name="name" select="$boost.doxygen.reftitle"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+
+ <title><xsl:copy-of select="$boost.doxygen.reftitle"/></title>
+ </xsl:if>
+ <xsl:apply-templates select="key('compounds-by-kind', 'file')"/>
+ </library-reference>
+ </xsl:template>
+
+ <xsl:template match="compounddef">
+ <!-- The set of innernamespace nodes that limits our search -->
+ <xsl:param name="with-namespace-refs"/>
+ <xsl:param name="in-file"/>
+
+ <xsl:choose>
+ <!-- If the string INTERNAL ONLY is in the description, don't
+ emit this entity. This hack is necessary because Doxygen doesn't
+ tell us what is \internal and what isn't. -->
+ <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
+
+ <xsl:when test="@kind='file'">
+ <xsl:call-template name="file"/>
+ </xsl:when>
+ <xsl:when test="@kind='namespace'">
+ <xsl:call-template name="namespace">
+ <xsl:with-param name="with-namespace-refs"
+ select="$with-namespace-refs"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@kind='class'">
+ <xsl:call-template name="class">
+ <xsl:with-param name="class-key" select="'class'"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@kind='struct'">
+ <xsl:call-template name="class">
+ <xsl:with-param name="class-key" select="'struct'"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@kind='union'">
+ <xsl:call-template name="class">
+ <xsl:with-param name="class-key" select="'union'"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="kind-error-message">
+ <xsl:with-param name="message" select="'Cannot handle compounddef'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="namespace">
+ <!-- The set of innernamespace nodes that limits our search -->
+ <xsl:param name="with-namespace-refs"/>
+ <xsl:param name="in-file"/>
+
+ <xsl:variable name="fullname" select="string(compoundname)"/>
+
+ <xsl:if test="$with-namespace-refs[string(text())=$fullname]
+ and not(contains($fullname, $boost.doxygen.detailns))">
+ <!-- Namespace without the prefix -->
+ <xsl:variable name="rest">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="compoundname"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- Grab only the namespace name, not any further nested namespaces -->
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when
+ test="contains($rest, '::')">
+ <xsl:value-of select="substring-before($rest, '::')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$rest"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <namespace>
+ <xsl:attribute name="name">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+
+ <xsl:apply-templates>
+ <xsl:with-param name="with-namespace-refs"
+ select="$with-namespace-refs"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </namespace>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="class">
+ <xsl:param name="class-key"/>
+ <xsl:param name="in-file"/>
+ <xsl:param name="with-namespace-refs"/>
+
+ <xsl:if test="string(location/attribute::file)=$in-file">
+
+ <!-- The short name of this class -->
+ <xsl:variable name="name-with-spec">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="compoundname"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="name">
+ <xsl:choose>
+ <xsl:when test="contains($name-with-spec, '&lt;')">
+ <xsl:value-of select="substring-before($name-with-spec, '&lt;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name-with-spec"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="specialization">
+ <xsl:if test="contains($name-with-spec, '&lt;')">
+ <xsl:variable name="spec-with-gt"
+ select="substring-after($name-with-spec, '&lt;')"/>
+ <xsl:value-of select="substring($spec-with-gt, 1,
+ string-length($spec-with-gt)-1)"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="actual-class-key">
+ <xsl:value-of select="$class-key"/>
+ <xsl:if test="string-length($specialization) &gt; 0">
+ <xsl:text>-specialization</xsl:text>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:element name="{$actual-class-key}">
+ <xsl:attribute name="name">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="templateparamlist" mode="template"/>
+
+ <xsl:if test="string-length($specialization) &gt; 0">
+ <specialization>
+ <xsl:call-template name="specialization">
+ <xsl:with-param name="specialization" select="$specialization"/>
+ </xsl:call-template>
+ </specialization>
+ </xsl:if>
+
+ <xsl:apply-templates select="basecompoundref" mode="inherit"/>
+
+ <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+ <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:element>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="enum">
+ <xsl:param name="in-file"/>
+
+ <xsl:if test="string(location/attribute::file)=$in-file">
+ <xsl:variable name="name">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="name"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <enum>
+ <xsl:attribute name="name">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="enumvalue"/>
+
+ <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+ <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+ </enum>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="enumvalue">
+ <xsl:choose>
+ <!-- If the string INTERNAL ONLY is in the description, don't
+ emit this entity. This hack is necessary because Doxygen doesn't
+ tell us what is \internal and what isn't. -->
+ <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
+ <xsl:otherwise>
+
+ <enumvalue>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+
+ <xsl:if test="initializer">
+ <default>
+ <xsl:apply-templates select="initializer/*|initializer/text()" mode="passthrough"/>
+ </default>
+ </xsl:if>
+
+ <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+ <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+ </enumvalue>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="doxygen.include.header.rec">
+ <xsl:param name="name"/>
+ <xsl:param name="header-list" select="$boost.doxygen.headers"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($header-list, ' ')">
+ <xsl:variable name="header"
+ select="substring-before($header-list, ' ')"/>
+ <xsl:variable name="rest" select="substring-after($header-list, ' ')"/>
+
+ <xsl:choose>
+ <xsl:when test="$name=$header">
+ <xsl:text>yes</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="doxygen.include.header.rec">
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="header-list" select="$rest"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$name=$header-list">
+ <xsl:text>yes</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="doxygen.include.header">
+ <xsl:param name="name"/>
+
+ <xsl:if test="$boost.doxygen.headers=''">
+ <xsl:text>yes</xsl:text>
+ </xsl:if>
+ <xsl:if test="not($boost.doxygen.headers='')">
+ <xsl:call-template name="doxygen.include.header.rec">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="file">
+ <xsl:variable name="include-header">
+ <xsl:call-template name="doxygen.include.header">
+ <xsl:with-param name="name" select="string(compoundname)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$include-header='yes'">
+ <header>
+ <xsl:attribute name="name">
+ <xsl:call-template name="shorten.header.name">
+ <xsl:with-param name="header" select="location/attribute::file"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+
+ <xsl:if test="briefdescription/*|detaileddescription/*|inbodydescription/*">
+ <xsl:apply-templates select="briefdescription/*" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription/*" mode="passthrough"/>
+ <xsl:apply-templates select="inbdoydescription/*" mode="passthrough"/>
+ </xsl:if>
+
+ <xsl:apply-templates mode="toplevel">
+ <xsl:with-param name="with-namespace-refs"
+ select="innernamespace"/>
+ <xsl:with-param name="in-file" select="location/attribute::file"/>
+ </xsl:apply-templates>
+ </header>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="shorten.header.name">
+ <xsl:param name="header"/>
+
+ <xsl:variable name="prefix">
+ <xsl:value-of select="concat($boost.doxygen.header.prefix, '/')"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="contains($header, $prefix)">
+ <xsl:variable name="rest" select="substring-after($header, $prefix)"/>
+ <xsl:choose>
+ <xsl:when test="contains($rest, $prefix)">
+ <xsl:call-template name="shorten.header.name">
+ <xsl:with-param name="header" select="$rest"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$prefix"/>
+ <xsl:value-of select="$rest"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$header"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <xsl:template match="innernamespace">
+ <xsl:param name="with-namespace-refs"/>
+ <xsl:param name="in-file"/>
+
+ <xsl:apply-templates select="key('compounds-by-id', @refid)">
+ <xsl:with-param name="with-namespace-refs"
+ select="$with-namespace-refs"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="innernamespace" mode="toplevel">
+ <!-- The set of innernamespace nodes that limits our search -->
+ <xsl:param name="with-namespace-refs"/>
+ <xsl:param name="in-file"/>
+
+ <!-- The full name of the namespace we are referring to -->
+ <xsl:variable name="fullname"
+ select="string(key('compounds-by-id', @refid)/compoundname)"/>
+
+ <!-- Only pass on top-level namespaces -->
+ <xsl:if test="not(contains($fullname, '::'))">
+ <xsl:apply-templates select="key('compounds-by-id', @refid)">
+ <xsl:with-param name="with-namespace-refs"
+ select="$with-namespace-refs"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="sectiondef" mode="toplevel">
+ <xsl:param name="in-file" select="''"/>
+
+ <xsl:apply-templates mode="toplevel"
+ select="memberdef[generate-id() =
+ generate-id(key('members-by-id', @id))]">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="memberdef" mode="toplevel">
+ <xsl:param name="with-namespace-refs"/>
+ <xsl:param name="in-file"/>
+
+ <xsl:choose>
+ <!-- If the string INTERNAL ONLY is in the description, don't
+ emit this entity. This hack is necessary because Doxygen doesn't
+ tell us what is \internal and what isn't. -->
+ <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
+
+ <xsl:when test="@kind='define'">
+ <macro>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name/text()"/>
+ </xsl:attribute>
+
+ <xsl:if test="param">
+ <xsl:attribute name="kind">
+ <xsl:value-of select="'functionlike'"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:for-each select="param">
+ <xsl:variable name="name" select="defname/text()"/>
+ <macro-parameter>
+ <xsl:attribute name="name">
+ <xsl:value-of select="defname/text()"/>
+ </xsl:attribute>
+ <xsl:variable name="params"
+ select="../detaileddescription/para/parameterlist"/>
+ <xsl:variable name="description" select="$params/parameteritem/
+ parameternamelist/parametername[text() = $name]/../../parameterdescription/para"/>
+ <xsl:if test="$description">
+ <description>
+ <xsl:apply-templates select="$description" mode="passthrough"/>
+ </description>
+ </xsl:if>
+ </macro-parameter>
+ </xsl:for-each>
+
+ <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+ <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+ </macro>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:when>
+
+ <xsl:when test="@kind='function'">
+ <xsl:call-template name="function">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="@kind='typedef'">
+ <xsl:call-template name="typedef">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="@kind='variable'">
+ <xsl:call-template name="variable" />
+ </xsl:when>
+
+ <xsl:when test="@kind='enum'">
+ <xsl:call-template name="enum" />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="kind-error-message">
+ <xsl:with-param name="message" select="'Cannot handle toplevel memberdef element'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="innerclass" mode="toplevel">
+ <xsl:param name="with-namespace-refs"/>
+ <xsl:param name="in-file"/>
+
+ <xsl:variable name="name">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- Only process this if it is indeed global -->
+ <xsl:if test=".=$name">
+ <xsl:apply-templates select="key('compounds-by-id', @refid)">
+ <xsl:with-param name="with-namespace-refs"
+ select="$with-namespace-refs"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="innerclass">
+ <xsl:param name="with-namespace-refs"/>
+ <xsl:param name="in-file"/>
+
+ <xsl:apply-templates select="key('compounds-by-id', @refid)">
+ <xsl:with-param name="with-namespace-refs"
+ select="$with-namespace-refs"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Classes -->
+ <xsl:template match="templateparamlist" mode="template">
+ <template>
+ <xsl:apply-templates mode="template"/>
+ </template>
+ </xsl:template>
+
+ <xsl:template match="param" mode="template">
+ <xsl:choose>
+ <xsl:when test="string(type)='class' or string(type)='typename'">
+ <xsl:variable name="name" select="normalize-space(string(declname))"/>
+ <template-type-parameter>
+ <xsl:attribute name="name">
+ <xsl:value-of select="normalize-space(string(declname))"/>
+ </xsl:attribute>
+ <xsl:if test="defval">
+ <default>
+ <xsl:apply-templates select="defval/*|defval/text()"
+ mode="passthrough"/>
+ </default>
+ </xsl:if>
+ <xsl:for-each select="../../detaileddescription//parameterlist[@kind='templateparam']/parameteritem">
+ <xsl:if test="string(parameternamelist/parametername)=$name">
+ <purpose>
+ <xsl:apply-templates select="parameterdescription/para" mode="passthrough"/>
+ </purpose>
+ </xsl:if>
+ </xsl:for-each>
+ </template-type-parameter>
+ </xsl:when>
+ <!-- Doxygen 1.5.8 generates odd xml for template type parameters.
+ This deals with that -->
+ <xsl:when test="not(declname) and
+ (starts-with(string(type), 'class ') or starts-with(string(type), 'typename '))">
+ <template-type-parameter>
+ <xsl:variable name="name">
+ <xsl:value-of select="normalize-space(substring-after(string(type), ' '))"/>
+ </xsl:variable>
+ <xsl:attribute name="name">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+ <xsl:if test="defval">
+ <default>
+ <xsl:apply-templates select="defval/*|defval/text()"
+ mode="passthrough"/>
+ </default>
+ </xsl:if>
+ <xsl:for-each select="../../detaileddescription//parameterlist[@kind='templateparam']/parameteritem">
+ <xsl:if test="string(parameternamelist/parametername)=$name">
+ <purpose>
+ <xsl:apply-templates select="parameterdescription/para" mode="passthrough"/>
+ </purpose>
+ </xsl:if>
+ </xsl:for-each>
+ </template-type-parameter>
+ </xsl:when>
+ <xsl:otherwise>
+ <template-nontype-parameter>
+ <xsl:variable name="name">
+ <xsl:value-of select="normalize-space(string(declname))"/>
+ </xsl:variable>
+ <xsl:attribute name="name">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+ <type>
+ <xsl:apply-templates select="type"/>
+ </type>
+ <xsl:if test="defval">
+ <default>
+ <xsl:apply-templates select="defval/*|defval/text()"
+ mode="passthrough"/>
+ </default>
+ </xsl:if>
+ <xsl:for-each select="../../detaileddescription//parameterlist[@kind='templateparam']/parameteritem">
+ <xsl:if test="string(parameternamelist/parametername)=$name">
+ <purpose>
+ <xsl:apply-templates select="parameterdescription/para" mode="passthrough"/>
+ </purpose>
+ </xsl:if>
+ </xsl:for-each>
+ </template-nontype-parameter>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="templateparamlist"/>
+
+ <!-- "Parse" a specialization from part of a name -->
+ <xsl:template name="specialization">
+ <xsl:param name="specialization"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($specialization, ',')">
+ <template-arg>
+ <xsl:value-of
+ select="normalize-space(substring-before($specialization, ','))"/>
+ </template-arg>
+ <xsl:call-template name="specialization">
+ <xsl:with-param name="specialization"
+ select="substring-after($specialization, ',')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <template-arg>
+ <xsl:value-of select="normalize-space($specialization)"/>
+ </template-arg>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Inheritance -->
+ <xsl:template match="basecompoundref" mode="inherit">
+ <xsl:choose>
+ <xsl:when test="contains(string(.), $boost.doxygen.detail)"/>
+ <xsl:otherwise>
+ <inherit>
+ <!-- Access specifier for inheritance -->
+ <xsl:attribute name="access">
+ <xsl:value-of select="@prot"/>
+ </xsl:attribute>
+ <!-- TBD: virtual vs. non-virtual inheritance -->
+
+ <xsl:apply-templates mode="passthrough"/>
+ </inherit>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="basecompoundref"/>
+
+ <!-- Skip over sections: they aren't very useful at all -->
+ <xsl:template match="sectiondef">
+ <xsl:param name="in-file" select="''"/>
+
+ <xsl:choose>
+ <xsl:when test="@kind='public-static-func'">
+ <!-- TBD: pass on the fact that these are static functions -->
+ <method-group name="public static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates>
+ <xsl:with-param name="in-section" select="true()"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:when>
+ <xsl:when test="@kind='protected-static-func'">
+ <!-- TBD: pass on the fact that these are static functions -->
+ <method-group name="protected static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates>
+ <xsl:with-param name="in-section" select="true()"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:when>
+ <xsl:when test="@kind='private-static-func'">
+ <!-- TBD: pass on the fact that these are static functions -->
+ <method-group name="private static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates>
+ <xsl:with-param name="in-section" select="true()"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:when>
+ <xsl:when test="@kind='public-func'">
+ <xsl:variable name="members" select="./memberdef"/>
+ <xsl:variable name="num-internal-only">
+ <xsl:value-of
+ select="count($members[contains(detaileddescription/para,
+ 'INTERNAL ONLY')])"/>
+ </xsl:variable>
+ <xsl:if test="$num-internal-only &lt; count($members)">
+ <method-group name="public member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates>
+ <xsl:with-param name="in-section" select="true()"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="@kind='protected-func'">
+ <method-group name="protected member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates>
+ <xsl:with-param name="in-section" select="true()"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="@kind='private-func'">
+ <xsl:variable name="members" select="./memberdef"/>
+ <xsl:variable name="num-internal-only">
+ <xsl:value-of
+ select="count($members[contains(detaileddescription/para,
+ 'INTERNAL ONLY')])"/>
+ </xsl:variable>
+ <xsl:if test="$num-internal-only &lt; count($members)">
+ <method-group name="private member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates>
+ <xsl:with-param name="in-section" select="true()"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:if>
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="@kind='friend'">
+ <xsl:if test="./memberdef/detaileddescription/para or ./memberdef/briefdescription/para">
+ <method-group name="friend functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ <xsl:apply-templates>
+ <xsl:with-param name="in-section" select="true()"/>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="@kind='public-static-attrib' or @kind='public-attrib'">
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="@kind='public-type'">
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="@kind='private-type'">
+ <!--skip private members-->
+ </xsl:when>
+ <xsl:when test="@kind='private-static-attrib' or @kind='private-attrib'">
+ <!--skip private members-->
+ </xsl:when>
+ <xsl:when test="@kind='func'">
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="@kind='typedef'">
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="@kind='var'">
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="@kind='enum'">
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="@kind='user-defined'">
+ <xsl:apply-templates>
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="@kind=''">
+ <xsl:apply-templates select="memberdef[generate-id() =
+ generate-id(key('members-by-id', @id))]">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="kind-error-message">
+ <xsl:with-param name="message" select="'Cannot handle sectiondef'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Handle member definitions -->
+ <xsl:template match="memberdef">
+ <!-- True when we're inside a section -->
+ <xsl:param name="in-section" select="false()"/>
+ <xsl:param name="in-file" select="''"/>
+
+ <xsl:choose>
+ <!-- If the string INTERNAL ONLY is in the description, don't
+ emit this entity. This hack is necessary because Doxygen doesn't
+ tell us what is \internal and what isn't. -->
+ <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
+ <xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
+
+ <xsl:when test="@kind='typedef'">
+ <xsl:call-template name="typedef">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@kind='function'">
+ <xsl:choose>
+ <xsl:when test="ancestor::compounddef/attribute::kind='namespace'">
+ <xsl:call-template name="function">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- We are in a class -->
+ <!-- The name of the class we are in -->
+ <xsl:variable name="in-class-full">
+ <xsl:call-template name="strip-qualifiers">
+ <xsl:with-param name="name"
+ select="string(ancestor::compounddef/compoundname/text())"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name ="in-class">
+ <xsl:choose>
+ <xsl:when test="contains($in-class-full, '&lt;')">
+ <xsl:value-of select="substring-before($in-class-full, '&lt;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$in-class-full"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string(name/text())=$in-class">
+ <xsl:if test="not ($in-section)">
+ <xsl:call-template name="constructor"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="string(name/text())=concat('~',$in-class)">
+ <xsl:if test="not ($in-section)">
+ <xsl:call-template name="destructor"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="string(name/text())='operator='">
+ <xsl:if test="not ($in-section)">
+ <xsl:call-template name="copy-assignment"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="normalize-space(string(type))=''
+ and contains(name/text(), 'operator ')">
+ <xsl:if test="$in-section">
+ <xsl:call-template name="conversion-operator"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$in-section">
+ <xsl:call-template name="method"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="@kind='friend'">
+ <xsl:if test="./detaileddescription/para or ./briefdescription/para">
+ <xsl:call-template name="method"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="@kind='enum'">
+ <xsl:call-template name="enum">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@kind='variable'">
+ <xsl:call-template name="variable">
+ <xsl:with-param name="in-file" select="$in-file"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="kind-error-message">
+ <xsl:with-param name="message" select="'Cannot handle memberdef element'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Display typedefs -->
+ <xsl:template name="typedef">
+ <xsl:param name="in-file" select="''"/>
+
+ <xsl:if test="string(location/attribute::file)=$in-file">
+ <!-- TBD: Handle public/protected/private -->
+ <typedef>
+ <!-- Name of the type -->
+ <xsl:attribute name="name">
+ <xsl:value-of select="name/text()"/>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+ <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+
+ <type><xsl:apply-templates select="type"/></type>
+ </typedef>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Handle function parameters -->
+ <xsl:template match="param" mode="function">
+ <parameter>
+ <!-- Parameter name -->
+ <xsl:attribute name="name">
+ <xsl:value-of select="normalize-space(declname/text())"/>
+ </xsl:attribute>
+
+ <!-- Parameter type -->
+ <paramtype><xsl:apply-templates select="type"/></paramtype>
+
+ <!-- Default argument -->
+ <xsl:if test="defval">
+ <default>
+ <xsl:choose>
+ <xsl:when test="contains(string(defval), $boost.doxygen.detail)">
+ <emphasis>unspecified</emphasis>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="defval/*|defval/text()"
+ mode="passthrough"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </default>
+ </xsl:if>
+
+ <!-- Parameter description -->
+ <xsl:variable name="name">
+ <xsl:value-of select="normalize-space(declname/text())"/>
+ </xsl:variable>
+
+ <xsl:apply-templates select="../*[self::detaileddescription or self::inbodydescription]//parameterlist[attribute::kind='param']/*"
+ mode="parameter.description">
+ <xsl:with-param name="name">
+ <xsl:value-of select="$name"/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </parameter>
+ </xsl:template>
+
+ <xsl:template match="parameteritem" mode="parameter.description">
+ <!-- The parameter name we are looking for -->
+ <xsl:param name="name"/>
+
+ <xsl:if test="string(parameternamelist/parametername) = $name">
+ <description>
+ <xsl:apply-templates select="parameterdescription/para" mode="passthrough"/>
+ </description>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- For older versions of Doxygen, which didn't use parameteritem -->
+ <xsl:template match="parameterdescription" mode="parameter.description">
+ <!-- The parameter name we are looking for -->
+ <xsl:param name="name"/>
+
+ <!-- The parametername node associated with this description -->
+ <xsl:variable name="name-node" select="preceding-sibling::*[1]"/>
+
+ <xsl:if test="string($name-node/text()) = $name">
+ <description>
+ <xsl:apply-templates select="para" mode="passthrough"/>
+ </description>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="function.attributes">
+
+ <!-- argsstring = '(arguments) [= delete] [= default] [constexpt]' -->
+ <xsl:variable name="extra-qualifiers-a">
+ <xsl:if test="contains(argsstring/text(), '(')">
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring-after(argsstring/text(), '(')" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="extra-qualifiers">
+ <xsl:if test="$extra-qualifiers-a">
+ <xsl:value-of select="concat(' ', normalize-space($extra-qualifiers-a), ' ')" />
+ </xsl:if>
+ </xsl:variable>
+
+ <!-- CV Qualifiers -->
+ <!-- Plus deleted and defaulted function markers as they're not properly
+ supported in boostbook -->
+
+ <!-- noexcept is complicated because is can have parameters.
+ TODO: should really remove the noexcept parameters before doing
+ anything else. -->
+ <xsl:variable name="noexcept">
+ <xsl:choose>
+ <xsl:when test="contains($extra-qualifiers, ' noexcept(')">
+ <xsl:call-template name="noexcept-if">
+ <xsl:with-param name="condition" select="substring-after($extra-qualifiers, ' noexcept(')" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($extra-qualifiers, ' BOOST_NOEXCEPT_IF(')">
+ <xsl:call-template name="noexcept-if">
+ <xsl:with-param name="condition" select="substring-after($extra-qualifiers, ' BOOST_NOEXCEPT_IF(')" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($extra-qualifiers, ' noexcept ') or contains($extra-qualifiers, ' BOOST_NOEXCEPT ')">
+ <xsl:value-of select="'noexcept '" />
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Calculate constexpr now, so that we can avoid it getting confused
+ with const -->
+ <xsl:variable name="constexpr" select="
+ contains($extra-qualifiers, ' const expr ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR_OR_CONST ')" />
+
+ <!-- The 'substring' trick includes the string if the condition is true -->
+ <xsl:variable name="cv-qualifiers" select="normalize-space(concat(
+ substring('constexpr ', 1, 999 * $constexpr),
+ substring('const ', 1, 999 * (not($constexpr) and @const='yes')),
+ substring('volatile ', 1, 999 * (@volatile='yes' or contains($extra-qualifiers, ' volatile '))),
+ $noexcept,
+ substring('= delete ', 1, 999 * contains($extra-qualifiers, ' =delete ')),
+ substring('= default ', 1, 999 * contains($extra-qualifiers, ' =default ')),
+ substring('= 0 ', 1, 999 * (@virt = 'pure-virtual')),
+ ''))" />
+
+ <!-- Specifiers -->
+ <xsl:variable name="specifiers" select="normalize-space(concat(
+ substring('explicit ', 1, 999 * (@explicit = 'yes')),
+ substring('virtual ', 1, 999 * (
+ @virtual='yes' or @virt='virtual' or @virt='pure-virtual')),
+ substring('static ', 1, 999 * (@static = 'yes')),
+ ''))" />
+
+ <xsl:if test="$cv-qualifiers">
+ <xsl:attribute name="cv">
+ <xsl:value-of select="$cv-qualifiers" />
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$specifiers">
+ <xsl:attribute name="specifiers">
+ <xsl:value-of select="$specifiers" />
+ </xsl:attribute>
+ </xsl:if>
+
+ </xsl:template>
+
+ <!-- $condition = string after the opening bracket of the condition -->
+ <xsl:template name="noexcept-if">
+ <xsl:param name="condition"/>
+
+ <xsl:variable name="trailing">
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="$condition" />
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($trailing)">
+ <xsl:value-of select="concat(
+ 'noexcept(',
+ substring($condition, 1, string-length($condition) - string-length($trailing)),
+ ') ')" />
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Something has gone wrong so: -->
+ <xsl:value-of select="'noexcept(condition) '" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- $text = substring after the opening bracket -->
+ <xsl:template name="strip-brackets">
+ <xsl:param name="text"/>
+
+ <xsl:if test="contains($text, ')')">
+ <xsl:variable name="prefix1" select="substring-before($text, ')')" />
+ <xsl:variable name="prefix2" select="substring($prefix1, 1,
+ string-length(substring-before($prefix1, '(')) +
+ 999 * not(contains($prefix1, '(')))" />
+ <xsl:variable name="prefix3" select="substring($prefix2, 1,
+ string-length(substring-before($prefix2, '&quot;')) +
+ 999 * not(contains($prefix2, '&quot;')))" />
+ <xsl:variable name="prefix" select="substring($prefix3, 1,
+ string-length(substring-before($prefix3, &quot;'&quot;)) +
+ 999 * not(contains($prefix3, &quot;'&quot;)))" />
+
+ <xsl:variable name="prefix-length" select="string-length($prefix)" />
+ <xsl:variable name="char" select="substring($text, $prefix-length + 1, 1)" />
+
+ <xsl:choose>
+ <xsl:when test="$char=')'">
+ <xsl:value-of select="substring($text, $prefix-length + 2)" />
+ </xsl:when>
+ <xsl:when test="$char='('">
+ <xsl:variable name="text2">
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring($text, $prefix-length + 2)" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="$text2" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$char=&quot;'&quot;">
+ <!-- Not bothering with escapes, because this is crazy enough as it is -->
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring-after(substring($text, $prefix-length + 2), &quot;'&quot;)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$char='&quot;'">
+ <!-- Not bothering with escapes, because this is crazy enough as it is -->
+ <xsl:call-template name="strip-brackets">
+ <xsl:with-param name="text" select="substring-after(substring($text, $prefix-length + 2), '&quot;')" />
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Handle function children -->
+ <xsl:template name="function.children">
+ <xsl:param name="is-overloaded" select="false()"/>
+
+ <xsl:if test="not($is-overloaded)">
+ <!-- Emit template header -->
+ <xsl:apply-templates select="templateparamlist" mode="template"/>
+
+ <!-- Emit function parameters -->
+ <xsl:apply-templates select="param" mode="function"/>
+ </xsl:if>
+
+ <!-- The description -->
+ <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+ <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+
+ <xsl:apply-templates
+ select="*[self::detaileddescription or self::inbodydescription]/para/simplesect[@kind='pre']"
+ mode="function-clauses"/>
+ <xsl:apply-templates
+ select="*[self::detaileddescription or self::inbodydescription]/para/simplesect[@kind='post']"
+ mode="function-clauses"/>
+ <xsl:apply-templates
+ select="*[self::detaileddescription or self::inbodydescription]/para/simplesect[@kind='return']"
+ mode="function-clauses"/>
+ <xsl:if test="*[self::detaileddescription or self::inbodydescription]/para/parameterlist[@kind='exception']">
+ <throws>
+ <xsl:apply-templates
+ select="*[self::detaileddescription or self::inbodydescription]/para/parameterlist[@kind='exception']"
+ mode="function-clauses"/>
+ </throws>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Handle free functions -->
+ <xsl:template name="function">
+ <xsl:param name="in-file" select="''"/>
+
+ <xsl:variable name="firstpara"
+ select="normalize-space(detaileddescription/para[1])"/>
+ <xsl:if test="string(location/attribute::file)=$in-file
+ and
+ not($firstpara=normalize-space($boost.doxygen.overload))">
+
+ <xsl:variable name="next-node" select="following-sibling::*[1]"/>
+ <xsl:variable name="has-overload">
+ <xsl:if test="not(local-name($next-node)='memberdef')">
+ false
+ </xsl:if>
+ <xsl:if test="not(string($next-node/name/text())=string(name/text()))">
+ false
+ </xsl:if>
+ <xsl:if
+ test="not(normalize-space($next-node/detaileddescription/para[1])
+ =normalize-space($boost.doxygen.overload))">
+ false
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="not(contains($has-overload, 'false'))">
+ <overloaded-function>
+ <xsl:attribute name="name">
+ <xsl:call-template name="normalize-name"/>
+ </xsl:attribute>
+
+ <xsl:call-template name="overload-signatures"/>
+ <xsl:call-template name="function.children">
+ <xsl:with-param name="is-overloaded" select="true()"/>
+ </xsl:call-template>
+ </overloaded-function>
+ </xsl:when>
+ <xsl:otherwise>
+ <function>
+ <xsl:attribute name="name">
+ <xsl:call-template name="normalize-name"/>
+ </xsl:attribute>
+
+ <!-- Return type -->
+ <type><xsl:apply-templates select="type"/></type>
+
+ <xsl:call-template name="function.children"/>
+ </function>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:template>
+
+ <!-- Emit overload signatures -->
+ <xsl:template name="overload-signatures">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="name" select="string(name/text())"/>
+ <xsl:param name="first" select="true()"/>
+
+ <xsl:choose>
+ <xsl:when test="not(local-name($node)='memberdef')"/>
+ <xsl:when test="not(string($node/name/text())=$name)"/>
+ <xsl:when test="not(normalize-space($node/detaileddescription/para[1])
+ =normalize-space($boost.doxygen.overload))
+ and not($first)"/>
+ <xsl:otherwise>
+ <signature>
+ <type>
+ <xsl:apply-templates select="$node/type"/>
+ </type>
+ <xsl:apply-templates select="$node/templateparamlist"
+ mode="template"/>
+ <xsl:apply-templates select="$node/param" mode="function"/>
+ </signature>
+
+ <xsl:call-template name="overload-signatures">
+ <xsl:with-param name="node" select="$node/following-sibling::*[1]"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="first" select="false()"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Handle constructors -->
+ <xsl:template name="constructor">
+ <constructor>
+ <xsl:if test="@explicit = 'yes'">
+ <xsl:attribute name="specifiers">explicit</xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="function.attributes"/>
+ <xsl:call-template name="function.children"/>
+ </constructor>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:template>
+
+ <!-- Handle Destructors -->
+ <xsl:template name="destructor">
+ <destructor>
+ <xsl:call-template name="function.children"/>
+ </destructor>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:template>
+
+ <!-- Handle Copy Assignment -->
+ <xsl:template name="copy-assignment">
+ <copy-assignment>
+ <xsl:call-template name="function.attributes"/>
+ <!-- Return type -->
+ <xsl:element name="type">
+ <xsl:apply-templates select="type"/>
+ </xsl:element>
+
+ <xsl:call-template name="function.children"/>
+ </copy-assignment>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:template>
+
+ <!-- Handle conversion operator -->
+ <xsl:template name="conversion-operator">
+ <method>
+ <xsl:attribute name="name">
+ <xsl:text>conversion-operator</xsl:text>
+ </xsl:attribute>
+ <xsl:call-template name="function.attributes"/>
+
+ <!-- Conversion type -->
+ <type>
+ <xsl:value-of select="substring-after(name/text(), 'operator ')"/>
+ </type>
+
+ <xsl:call-template name="function.children"/>
+ </method>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:template>
+
+ <!-- Handle methods -->
+ <xsl:template name="method">
+ <method>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name/text()"/>
+ </xsl:attribute>
+ <xsl:call-template name="function.attributes"/>
+
+ <!-- Return type -->
+ <xsl:element name="type">
+ <xsl:apply-templates select="type"/>
+ </xsl:element>
+
+ <xsl:call-template name="function.children"/>
+ </method>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:template>
+
+ <!-- Handle member variables -->
+ <xsl:template name="variable">
+ <xsl:param name="in-file"/>
+ <xsl:if test="string(location/attribute::file)=$in-file">
+ <data-member>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name/text()"/>
+ </xsl:attribute>
+
+ <!-- Specifiers -->
+ <xsl:if test="@static = 'yes'">
+ <xsl:attribute name="specifiers">static</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@mutable = 'yes'">
+ <xsl:attribute name="specifiers">mutable</xsl:attribute>
+ </xsl:if>
+
+ <type>
+ <xsl:apply-templates select="type"/>
+ </type>
+
+ <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+ <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+ <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+ </data-member>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Things we ignore directly -->
+ <xsl:template match="compoundname" mode="toplevel"/>
+ <xsl:template match="includes|includedby|incdepgraph|invincdepgraph" mode="toplevel"/>
+ <xsl:template match="programlisting" mode="toplevel"/>
+ <xsl:template match="text()" mode="toplevel"/>
+
+ <xsl:template match="text()"/>
+
+ <!-- Passthrough of text -->
+ <xsl:template match="text()" mode="passthrough">
+ <xsl:value-of select="."/>
+ </xsl:template>
+ <xsl:template match="para" mode="passthrough">
+ <para>
+ <xsl:apply-templates mode="passthrough"/>
+ </para>
+ </xsl:template>
+ <xsl:template match="copydoc" mode="passthrough">
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:template>
+ <xsl:template match="verbatim" mode="passthrough">
+ <xsl:copy-of select="node()"/>
+ </xsl:template>
+
+ <xsl:template match="para/simplesect" mode="passthrough">
+ <xsl:if test="not (@kind='pre') and
+ not (@kind='return') and
+ not (@kind='post') and
+ not (@kind='attention') and
+ not (@kind='see') and
+ not (@kind='warning')
+ ">
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="para/simplesect[@kind='note' or @kind='attention']" mode="passthrough">
+ <note>
+ <xsl:apply-templates mode="passthrough"/>
+ </note>
+ </xsl:template>
+
+ <xsl:template match="para/simplesect[@kind='warning']" mode="passthrough">
+ <warning>
+ <xsl:apply-templates mode="passthrough"/>
+ </warning>
+ </xsl:template>
+
+ <xsl:template match="para/simplesect[@kind='par']" mode="passthrough">
+ <formalpara>
+ <xsl:apply-templates mode="passthrough"/>
+ </formalpara>
+ </xsl:template>
+
+ <xsl:template match="para/simplesect[@kind='see']" mode="passthrough">
+ <para>
+ <emphasis role="bold">
+ <xsl:text>See Also:</xsl:text>
+ </emphasis>
+ <xsl:apply-templates mode="passthrough"/>
+ </para>
+ </xsl:template>
+
+ <xsl:template match="simplesectsep" mode="passthrough">
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="passthrough">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="parameterlist" mode="passthrough"/>
+
+ <xsl:template match="bold" mode="passthrough">
+ <emphasis role="bold">
+ <xsl:apply-templates mode="passthrough"/>
+ </emphasis>
+ </xsl:template>
+
+ <xsl:template match="linebreak" mode="passthrough">
+ <sbr/>
+ </xsl:template>
+
+ <xsl:template match="ndash" mode="passthrough">
+ <xsl:text>&#8211;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="briefdescription" mode="passthrough">
+ <xsl:if test="text()|*">
+ <purpose>
+ <xsl:apply-templates mode="purpose"/>
+ </purpose>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="detaileddescription" mode="passthrough">
+ <xsl:if test="text()|*">
+ <description>
+ <xsl:apply-templates mode="passthrough"/>
+ </description>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="inbodydescription" mode="passthrough">
+ <xsl:if test="text()|*">
+ <description>
+ <xsl:apply-templates mode="passthrough"/>
+ </description>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Ignore ref elements for now, as there is a lot of documentation which
+ will have incorrect ref elements at the moment -->
+ <xsl:template match="ref" mode="passthrough">
+ <xsl:variable name="as-class" select="key('compounds-by-id', @refid)[@kind='class' or @kind='struct']"/>
+ <xsl:choose>
+ <xsl:when test="$as-class">
+ <classname>
+ <xsl:attribute name="alt">
+ <xsl:value-of select="$as-class/compoundname/text()"/>
+ </xsl:attribute>
+ <xsl:value-of select="text()"/>
+ </classname>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Handle function clauses -->
+ <xsl:template match="simplesect" mode="function-clauses">
+ <xsl:if test="@kind='pre'">
+ <requires>
+ <xsl:apply-templates mode="passthrough"/>
+ </requires>
+ </xsl:if>
+ <xsl:if test="@kind='return'">
+ <returns>
+ <xsl:apply-templates mode="passthrough"/>
+ </returns>
+ </xsl:if>
+ <xsl:if test="@kind='post'">
+ <postconditions>
+ <xsl:apply-templates mode="passthrough"/>
+ </postconditions>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="parameterlist" mode="function-clauses">
+ <xsl:if test="@kind='exception'">
+ <simpara>
+ <xsl:choose>
+ <xsl:when test="normalize-space(.//parametername//text())='nothrow'">
+ <xsl:text>Will not throw.</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <classname>
+ <xsl:value-of select=".//parametername//text()"/>
+ </classname>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates
+ select=".//parameterdescription/para/text()
+ |.//parameterdescription/para/*"
+ mode="passthrough"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </simpara>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="type">
+ <xsl:choose>
+ <xsl:when test="contains(string(.), $boost.doxygen.detail)">
+ <emphasis>unspecified</emphasis>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="type"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="ref" mode="type">
+ <xsl:choose>
+ <xsl:when test="@kindref='compound'">
+ <classname>
+ <xsl:value-of select="text()"/>
+ </classname>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="text()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="*" mode="type">
+ <xsl:value-of select="."/>
+ </xsl:template>
+
+ <!-- Normalize the names of functions, because Doxygen sometimes
+ puts in an obnoixous space. -->
+ <xsl:template name="normalize-name">
+ <xsl:param name="name" select="name/text()"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($name, ' ')">
+ <xsl:value-of select="substring-before($name, ' ')"/>
+ <xsl:value-of select="substring-after($name, ' ')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Convert HTML tables into DocBook format -->
+ <xsl:template match="table" mode="passthrough">
+ <informaltable>
+ <tgroup>
+ <xsl:attribute name="cols">
+ <xsl:value-of select="@cols"/>
+ </xsl:attribute>
+
+ <tbody>
+ <xsl:apply-templates mode="table"/>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </xsl:template>
+
+ <xsl:template match="row" mode="table">
+ <row>
+ <xsl:apply-templates mode="table"/>
+ </row>
+ </xsl:template>
+
+ <xsl:template match="entry" mode="table">
+ <entry>
+ <xsl:if test="para/center">
+ <xsl:attribute name="valign">
+ <xsl:value-of select="'middle'"/>
+ </xsl:attribute>
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="@thead='yes'">
+ <emphasis role="bold">
+ <xsl:call-template name="table-entry"/>
+ </emphasis>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="table-entry"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </entry>
+ </xsl:template>
+
+ <xsl:template name="table-entry">
+ <xsl:choose>
+ <xsl:when test="para/center">
+ <xsl:apply-templates select="para/center/*|para/center/text()"
+ mode="passthrough"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="para/*|para/text()" mode="passthrough"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Handle preformatted.
+ Doxygen generates markup such as:
+ <para><preformatted>void foo() {</preformatted></para>
+ <para><preformatted>}</preformatted></para>
+ This complicated mess tries to combine that into a single
+ programlisting element.
+ -->
+ <xsl:template match="para[preformatted][count(preformatted)=count(*)]" mode="passthrough">
+ <!-- Only do this for the first of a group of paras. -->
+ <xsl:if test="not(preceding-sibling::para[1][preformatted][count(preformatted)=count(*)])">
+ <programlisting>
+ <!-- This node's children. -->
+ <xsl:apply-templates mode="passthrough" select="./preformatted/node()"/>
+
+ <!-- Adjacent para nodes' children.
+ Based on code at: http://stackoverflow.com/a/2092144 -->
+ <xsl:variable name="following-siblings" select="following-sibling::*" />
+ <xsl:for-each select="following-sibling::para[preformatted][count(preformatted)=count(*)]">
+ <xsl:variable name="index" select="position()"/>
+ <xsl:if test="generate-id(.)=generate-id($following-siblings[$index])">
+ <xsl:text>&#xa;&#xa;</xsl:text>
+ <xsl:apply-templates mode="passthrough" select="./preformatted/node()"/>
+ </xsl:if>
+ </xsl:for-each>
+ </programlisting>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Remove empty preformatted elements. -->
+ <xsl:template match="preformatted[not(node())]" mode="passthrough"/>
+
+ <!-- Convert remaining to programlisting. -->
+ <xsl:template match="preformatted" mode="passthrough">
+ <programlisting>
+ <xsl:apply-templates mode="passthrough"/>
+ </programlisting>
+ </xsl:template>
+
+ <!-- Handle program listings -->
+ <xsl:template match="programlisting" mode="passthrough">
+ <programlisting language="c++">
+ <xsl:apply-templates mode="programlisting"/>
+ </programlisting>
+ </xsl:template>
+
+ <xsl:template match="highlight|codeline" mode="programlisting">
+ <xsl:apply-templates mode="programlisting"/>
+ </xsl:template>
+
+ <xsl:template match="sp" mode="programlisting">
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="*" mode="programlisting">
+ <xsl:apply-templates select="." mode="passthrough"/>
+ </xsl:template>
+
+ <!-- Replace top-level "para" elements with "simpara" elements in
+ the purpose -->
+ <xsl:template match="*" mode="purpose">
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="purpose">
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:template>
+
+ <xsl:template match="para" mode="purpose">
+ <xsl:apply-templates select="*|text()" mode="passthrough"/>
+ </xsl:template>
+
+ <!--
+ Eric Niebler: Jan-8-2008
+ Here is some 3/4-baked support for LaTeX formulas in
+ Doxygen comments. Doxygen doesn't generate the PNG files
+ when outputting XML. In order to use this code, you must
+ run Doxygen first to generate HTML (and the PNG files for
+ the formulas). You can do this in a Jamfile with
+ "doxygen foo.html : <sources, etc...> ; ", where the ".html"
+ is significant. Then the png files should be copied into the
+ images/ directory (or another place relative to the html/
+ directory, as specified by $boost.doxygen.formuladir XSL
+ parameter). This can be done with a custom action in a
+ Jamfile. Finally, the docs can be built as normal.
+ See libs/accumulators/doc/Jamfile.v2 for a working example.
+ -->
+ <xsl:template match="formula" mode="passthrough">
+ <xsl:choose>
+ <xsl:when test="substring(*|text(), 1, 2) = '\['">
+ <equation>
+ <title/>
+ <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</title>
+ <para>
+ <xsl:text>Elements:</xsl:text>
+ <itemizedlist spacing="compact">
+ <xsl:apply-templates select="element" mode="synopsis">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </itemizedlist>
+ </para>
+ <xsl:apply-templates select="element"/>
+ </section>
+ </xsl:template>
+
+ <!-- Element synopsis -->
+ <xsl:template match="element" mode="synopsis">
+ <listitem>
+ <simpara>
+ <link>
+ <xsl:attribute name="linkend">
+ <xsl:value-of select="concat('boostbook.dtd.',@name)"/>
+ </xsl:attribute>
+ <xsl:text>Element </xsl:text>
+ <sgmltag><xsl:value-of select="@name"/></sgmltag>
+ <xsl:text> - </xsl:text>
+ <xsl:apply-templates select="purpose"/>
+ </link>
+ </simpara>
+ </listitem>
+ </xsl:template>
+
+ <!-- Elements are transformed into DocBook refentry elements -->
+ <xsl:template match="element">
+ <refentry>
+ <xsl:attribute name="id">
+ <xsl:value-of select="concat('boostbook.dtd.',@name)"/>
+ </xsl:attribute>
+
+ <refmeta>
+ <refentrytitle>
+ BoostBook element <sgmltag><xsl:value-of select="@name"/></sgmltag>
+ </refentrytitle>
+ <manvolnum>9</manvolnum>
+ </refmeta>
+ <refnamediv>
+ <refname><xsl:value-of select="@name"/></refname>
+ <refpurpose><xsl:apply-templates select="purpose"/></refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <xsl:value-of select="@name"/><xsl:text> ::= </xsl:text>
+ <xsl:apply-templates select="content-model-expanded"/>
+ </refsynopsisdiv>
+ <xsl:apply-templates select="description"/>
+ <xsl:apply-templates select="key('attributes', @name)"/>
+ </refentry>
+ </xsl:template>
+
+ <xsl:template match="content-model-expanded">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Sequences -->
+ <xsl:template match="sequence-group">
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$separator"/>
+ </xsl:if>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates>
+ <xsl:with-param name="separator" select="', '"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ <xsl:value-of select="@occurrence"/>
+ </xsl:template>
+
+ <!-- Alternatives -->
+ <xsl:template match="or-group">
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$separator"/>
+ </xsl:if>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates>
+ <xsl:with-param name="separator" select="'| '"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ <xsl:value-of select="@occurrence"/>
+ </xsl:template>
+
+ <!-- Element references -->
+ <xsl:template match="element-name">
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$separator"/>
+ </xsl:if>
+
+ <xsl:variable name="element-node" select="key('elements', @name)"/>
+
+ <xsl:choose>
+ <xsl:when test="$element-node">
+ <link>
+ <xsl:attribute name="linkend">
+ <xsl:value-of select="concat('boostbook.dtd.',@name)"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </link>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="@occurrence"/>
+ </xsl:template>
+
+ <!-- #PCDATA -->
+ <xsl:template match="pcdata">
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$separator"/>
+ </xsl:if>
+
+ <xsl:text>#PCDATA</xsl:text>
+ </xsl:template>
+
+ <!-- ANY -->
+ <xsl:template match="any">
+ <xsl:text>ANY</xsl:text>
+ </xsl:template>
+
+ <!-- EMPTY -->
+ <xsl:template match="empty">
+ <xsl:text>EMPTY</xsl:text>
+ </xsl:template>
+
+ <!-- Just copy anything in a purpose element -->
+ <xsl:template match="purpose">
+ <xsl:copy-of select="text()|*"/>
+ </xsl:template>
+
+ <!-- Just copy anything in a description element, but place it in a
+ section. -->
+ <xsl:template match="description">
+ <refsection>
+ <title>Description</title>
+ <xsl:copy-of select="text()|*"/>
+ </refsection>
+ </xsl:template>
+
+ <!-- Attributes -->
+ <xsl:template match="attlist">
+ <refsection>
+ <title>Attributes</title>
+
+ <informaltable>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Value</entry>
+ <entry>Purpose</entry>
+ </row>
+ </thead>
+ <tbody>
+ <xsl:apply-templates/>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsection>
+ </xsl:template>
+
+ <!-- Attribute -->
+ <xsl:template match="attribute">
+ <row>
+ <entry><xsl:value-of select="@name"/></entry>
+ <entry><xsl:value-of select="@type"/></entry>
+ <entry><xsl:value-of select="@value"/></entry>
+ <entry>
+ <xsl:choose>
+ <xsl:when test="purpose">
+ <xsl:apply-templates select="purpose"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="key('attribute-purposes', @name)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </entry>
+ </row>
+ </xsl:template>
+
+ <!-- Eat attribute declarations -->
+ <xsl:template match="attdecl"/>
+</xsl:stylesheet>
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 @@
+<?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:template name="print.warning.context">
+ <xsl:message>
+ <xsl:text> In </xsl:text>
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:message>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2003 Douglas Gregor -->
+<!-- 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) -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version="1.0">
+
+ <!-- Import the FO stylesheet -->
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+
+ <xsl:param name="chapter.autolabel" select="0"/>
+ <xsl:param name="refentry.generate.name" select="0"/>
+ <xsl:param name="refentry.generate.title" select="1"/>
+ <xsl:param name="fop1.extensions" select="1"/>
+ <xsl:param name="make.year.ranges" select="1"/>
+ <xsl:param name="ulink.show" select="0"/>
+
+
+ <!--
+ The following code sets which sections start new pages in the PDF document flow.
+
+ The parameter "boost.section.newpage.depth" set how far down the hierarchy the
+ page breaks go. Defaults to 1 (the same as html chunking), in which case only
+ top level sections start a new page, set to a higher value to force nested sections
+ onto new pages as well.
+
+ For top level sections (level 1), we use "break-before" which forces the very first
+ section onto a separate page from the TOC.
+
+ For nested sections (level 2 and greater) we use "break-after" which keeps nested
+ sections together with their enclosing section (rationale: the enclosing section
+ often has nothing but a title, and no content except the nested sections, and we
+ don't want a page break right after a section title!).
+
+ For reference sections, we turn page breaks *off* by setting "refentry.pagebreak" to 0.
+ This is for the same reason we use "break-after" for nested sections - we want reference
+ entries to be on the same page as the title and synopsis which encloses them. Ideally
+ we'd use "break-after" here too, but I can't find an easy to to fix that.
+
+ Finally note that TOC's and Indexes don't get page breaks forced after them.
+ Again there's no easy fix here, *except* for the top level TOC which gets a page break
+ after it thanks to the "break-before" on level 1 sections. Unfortunately this means
+ there's no break after the last section and before the first Index, *unless* the
+ final section has nested sections which may then trigger one!
+
+ We could fix all this by cut-and-pasting the relevant XSL from the stylesheets to here
+ and making sure everything uses "break-after", but whether it's worth it is questionable...?
+
+ -->
+
+ <xsl:param name="boost.section.newpage.depth" select="1"/>
+ <xsl:param name="refentry.pagebreak" select="0"/>
+
+ <xsl:attribute-set name="section.level1.properties" use-attribute-sets="section.properties">
+ <xsl:attribute name="break-before">
+ <xsl:if test="($boost.section.newpage.depth &gt; 0)">
+ page
+ </xsl:if>
+ <xsl:if test="not($boost.section.newpage.depth &gt; 0)">
+ auto
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="section.level2.properties" use-attribute-sets="section.properties">
+ <xsl:attribute name="break-after">
+ <xsl:if test="($boost.section.newpage.depth &gt; 1)">
+ page
+ </xsl:if>
+ <xsl:if test="not($boost.section.newpage.depth &gt; 1)">
+ auto
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="section.level3.properties" use-attribute-sets="section.properties">
+ <xsl:attribute name="break-after">
+ <xsl:if test="($boost.section.newpage.depth &gt; 2)">
+ page
+ </xsl:if>
+ <xsl:if test="not($boost.section.newpage.depth &gt; 2)">
+ auto
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="section.level4.properties" use-attribute-sets="section.properties">
+ <xsl:attribute name="break-after">
+ <xsl:if test="($boost.section.newpage.depth &gt; 3)">
+ page
+ </xsl:if>
+ <xsl:if test="not($boost.section.newpage.depth &gt; 3)">
+ auto
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="section.level5.properties" use-attribute-sets="section.properties">
+ <xsl:attribute name="break-after">
+ <xsl:if test="($boost.section.newpage.depth &gt; 4)">
+ page
+ </xsl:if>
+ <xsl:if test="not($boost.section.newpage.depth &gt; 4)">
+ auto
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="section.level6.properties" use-attribute-sets="section.properties">
+ <xsl:attribute name="break-after">
+ <xsl:if test="($boost.section.newpage.depth &gt; 5)">
+ page
+ </xsl:if>
+ <xsl:if test="not($boost.section.newpage.depth &gt; 5)">
+ auto
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:attribute-set>
+
+ <!-- The question and answer templates are copied here from the
+ 1.61.3 DocBook XSL stylesheets so that we can eliminate the emission
+ of id attributes in the emitted fo:list-item-label elements. FOP
+ 0.20.5 has problems with these id attributes, and they are otherwise
+ unused. -->
+<xsl:template match="question">
+ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+ <xsl:variable name="entry.id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="parent::*"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="deflabel">
+ <xsl:choose>
+ <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+ <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+ /@defaultlabel"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$qanda.defaultlabel"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <fo:list-item id="{$entry.id}" xsl:use-attribute-sets="list.item.spacing">
+ <fo:list-item-label end-indent="label-end()">
+ <xsl:choose>
+ <xsl:when test="$deflabel = 'none'">
+ <fo:block/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:text>.</xsl:text> <!-- FIXME: Hack!!! This should be in the locale! -->
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <xsl:choose>
+ <xsl:when test="$deflabel = 'none'">
+ <fo:block font-weight="bold">
+ <xsl:apply-templates select="*[local-name(.)!='label']"/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="*[local-name(.)!='label']"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:list-item-body>
+ </fo:list-item>
+</xsl:template>
+
+<xsl:template match="answer">
+ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:variable name="entry.id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="parent::*"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="deflabel">
+ <xsl:choose>
+ <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+ <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+ /@defaultlabel"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$qanda.defaultlabel"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <fo:list-item xsl:use-attribute-sets="list.item.spacing">
+ <fo:list-item-label end-indent="label-end()">
+ <xsl:choose>
+ <xsl:when test="$deflabel = 'none'">
+ <fo:block/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block>
+ <!-- FIXME: Hack!!! This should be in the locale! -->
+ <xsl:variable name="answer.label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$answer.label"/>
+ <xsl:if test="string($answer.label) != ''">
+ <xsl:text>.</xsl:text>
+ </xsl:if>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <xsl:apply-templates select="*[local-name(.)!='label']"/>
+ </fo:list-item-body>
+ </fo:list-item>
+</xsl:template>
+
+
+<!--
+
+ The following rules apply text coloring to Quickbook items like
+
+ [role blue Some blue text]
+
+ These correspond to an arbitrary list of colors added to the CSS file
+
+ $(BOOST-ROOT)\doc\src\boostbook.css
+
+ and are required for building pdf documentation.
+
+ A more elegant way of doing this is probably possible.
+ Other colors can be added simply by copying these examples.
+-->
+
+<xsl:template match="phrase[@role='red']">
+ <fo:inline color="red">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='blue']">
+ <fo:inline color="blue">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='green']">
+ <fo:inline color="green">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='lime']">
+ <fo:inline color="lime">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='navy']">
+ <fo:inline color="navy">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='yellow']">
+ <fo:inline color="yellow">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='magenta']">
+ <fo:inline color="magenta">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='indigo']">
+ <fo:inline color="indigo">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='cyan']">
+ <fo:inline color="cyan">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='purple']">
+ <fo:inline color="purple">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='gold']">
+ <fo:inline color="gold">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='silver']">
+ <fo:inline color="silver">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='gray']">
+ <fo:inline color="gray">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<!-- alignment -->
+
+<xsl:template match="phrase[@role='aligncenter']">
+ <fo:inline>
+ <fo:block text-align="center">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignleft']">
+ <fo:inline>
+ <fo:block text-align="left">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignright']">
+ <fo:inline>
+ <fo:block text-align="right">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignjustify']">
+ <fo:inline>
+ <fo:block text-align="justify">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+ <!--
+
+ The following rules apply syntax highlighting to phrases
+ that have been appropriately marked up, the highlighting
+ used is the same as that used by our CSS style sheets,
+ but potentially we have the option to do better here
+ since we can add bold and italic formatting quite easily
+
+ -->
+
+<xsl:template match="//phrase[@role='keyword' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="#0000AA"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='special' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="#707070"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='preprocessor' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="#402080"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='char' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='comment' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="#800000"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='string' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='number' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='white_bkd' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="#FFFFFF"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//phrase[@role='dk_grey_bkd' and
+ (ancestor::programlisting or
+ ancestor::synopsis or
+ ancestor::literallayout)]">
+ <fo:inline color="#999999"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+
+<!--
+Make all hyperlinks blue colored:
+-->
+<xsl:attribute-set name="xref.properties">
+ <xsl:attribute name="color">blue</xsl:attribute>
+</xsl:attribute-set>
+
+<!--
+Put a box around admonishments and keep them together:
+-->
+<xsl:attribute-set name="graphical.admonition.properties">
+ <xsl:attribute name="border-color">#FF8080</xsl:attribute>
+ <xsl:attribute name="border-width">1px</xsl:attribute>
+ <xsl:attribute name="border-style">solid</xsl:attribute>
+ <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-top">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
+ <xsl:attribute name="keep-together.within-page">1</xsl:attribute>
+ <xsl:attribute name="margin-left">0pt</xsl:attribute>
+ <xsl:attribute name="margin-right">0pt</xsl:attribute>
+</xsl:attribute-set>
+
+<!--
+Put a box around code blocks, also set the font size
+and keep the block together if we can using the widows
+and orphans controls. Hyphenation and line wrapping
+is also turned on, so that long lines of code don't
+bleed off the edge of the page, a carriage return
+symbol is used as the hyphenation character:
+-->
+<xsl:attribute-set name="monospace.verbatim.properties">
+ <xsl:attribute name="border-color">#DCDCDC</xsl:attribute>
+ <xsl:attribute name="border-width">1px</xsl:attribute>
+ <xsl:attribute name="border-style">solid</xsl:attribute>
+ <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-top">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
+ <xsl:attribute name="widows">6</xsl:attribute>
+ <xsl:attribute name="orphans">40</xsl:attribute>
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
+ <xsl:attribute name="hyphenate">true</xsl:attribute>
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
+ <xsl:attribute name="hyphenation-character">&#x21B5;</xsl:attribute>
+ <xsl:attribute name="margin-left">0pt</xsl:attribute>
+ <xsl:attribute name="margin-right">0pt</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:param name="hyphenate.verbatim" select="1"></xsl:param>
+<xsl:param name="monospace.font.family">monospace,Symbol</xsl:param>
+
+ <!--Regular monospace text should have the same font size as code blocks etc-->
+<xsl:attribute-set name="monospace.properties">
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
+</xsl:attribute-set>
+
+<!--
+Put some small amount of padding around table cells, and keep tables
+together on one page if possible:
+-->
+<xsl:attribute-set name="table.cell.padding">
+ <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-top">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
+</xsl:attribute-set>
+
+ <!--Formal and informal tables have the same properties
+ Using widow-and-orphan control here gives much better
+ results for very large tables than a simple "keep-together"
+ instruction-->
+<xsl:attribute-set name="table.properties">
+ <xsl:attribute name="keep-together.within-page">1</xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="informaltable.properties">
+ <xsl:attribute name="keep-together.within-page">1</xsl:attribute>
+</xsl:attribute-set>
+
+<!--
+General default options go here:
+* Borders are mid-grey.
+* Body text is not indented compared to the titles.
+* Page margins are a rather small 0.5in, but we need
+ all the space we can get for code blocks.
+* Paper size is A4: an ISO standard, slightly taller and narrower than US Letter.
+* Use SVG graphics for admonishments: the bitmaps look awful in PDF's.
+* Disable draft mode so we're not constantly trying to download the necessary graphic.
+* Set default image paths to pull down direct from SVN: individual Jamfiles can override this
+ and pass an absolute path to local versions of the images, but we can't get that here, so
+ we'll use SVN instead so that most things "just work".
+-->
+<xsl:param name="table.frame.border.color">#DCDCDC</xsl:param>
+<xsl:param name="table.cell.border.color">#DCDCDC</xsl:param>
+<xsl:param name="body.start.indent">0pt</xsl:param>
+<xsl:param name="page.margin.inner">0.5in</xsl:param>
+<xsl:param name="page.margin.outer">0.5in</xsl:param>
+<xsl:param name="paper.type">A4</xsl:param>
+<xsl:param name="admon.graphics">1</xsl:param>
+<xsl:param name="admon.graphics.extension">.svg</xsl:param>
+<xsl:param name="draft.mode">no</xsl:param>
+<xsl:param name="admon.graphics.path">http://www.boost.org/doc/libs/develop/doc/src/images/</xsl:param>
+<xsl:param name="callout.graphics.path">http://www.boost.org/doc/libs/develop/doc/src/images/callouts/</xsl:param>
+<xsl:param name="img.src.path">http://www.boost.org/doc/libs/devlop/doc/html/</xsl:param>
+
+</xsl:stylesheet>
+
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 @@
+<?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:strip-space elements="requires effects postconditions returns throws
+ complexity notes rationale purpose"/>
+
+ <!-- When true, the stylesheet will emit compact definitions of
+ functions when the function does not have any detailed
+ description. -->
+ <xsl:param name="boost.compact.function">1</xsl:param>
+
+ <!-- The longest type length that is considered "short" for the
+ layout of function return types. When the length of the result type
+ and any storage specifiers is greater than this length, they will be
+ placed on a separate line from the function name and parameters
+ unless everything fits on a single line. -->
+ <xsl:param name="boost.short.result.type">12</xsl:param>
+
+ <!-- Display a function declaration -->
+ <xsl:template name="function">
+ <xsl:param name="indentation"/>
+ <xsl:param name="is-reference"/>
+
+ <!-- Whether or not we should include parameter names in the output -->
+ <xsl:param name="include-names" select="$is-reference"/>
+
+ <!-- What type of link the function name should have. This shall
+ be one of 'anchor' (the function output will be the target of
+ links), 'link' (the function output will link to a definition), or
+ 'none' (the function output will not be either a link or a link
+ target) -->
+ <xsl:param name="link-type">
+ <xsl:choose>
+ <xsl:when test="$is-reference">
+ <xsl:text>anchor</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>link</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <!-- The id we should link to or anchor as -->
+ <xsl:param name="link-to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:param>
+
+ <!-- If we are printing a constructor -->
+ <xsl:param name="constructor-for"/>
+
+ <!-- If we are printing a destructor -->
+ <xsl:param name="destructor-for"/>
+
+ <!-- If we are printing a copy assignment operator -->
+ <xsl:param name="copy-assign-for"/>
+
+ <!-- The name of this function -->
+ <xsl:param name="name" select="@name"/>
+
+ <!-- True if this is the function's separate documentation -->
+ <xsl:param name="standalone" select="false()"/>
+
+ <!-- True if we should suppress the template header -->
+ <xsl:param name="suppress-template" select="false()"/>
+
+ <!-- Calculate the specifiers -->
+ <xsl:variable name="specifiers">
+ <xsl:if test="@specifiers">
+ <xsl:value-of select="concat(@specifiers, ' ')"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <!-- Calculate the type -->
+ <xsl:variable name="type">
+ <xsl:value-of select="$specifiers"/>
+
+ <xsl:choose>
+ <!-- Conversion operators have an empty type, because the return
+ type is part of the name -->
+ <xsl:when test="$name='conversion-operator'"/>
+
+ <!-- Constructors and destructors have no return type -->
+ <xsl:when test="$constructor-for or $destructor-for"/>
+
+ <!-- Copy assignment operators return a reference to the class
+ they are in, unless another type has been explicitly
+ provided in the element. -->
+ <xsl:when test="$copy-assign-for and not(type)">
+ <xsl:value-of select="concat($copy-assign-for, '&amp; ')"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates select="type" mode="annotation"/>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Build the function name with return type -->
+ <xsl:variable name="function-name">
+ <xsl:choose>
+ <xsl:when test="$constructor-for">
+ <xsl:value-of select="$constructor-for"/>
+ </xsl:when>
+ <xsl:when test="$destructor-for">
+ <xsl:value-of select="concat('~',$destructor-for)"/>
+ </xsl:when>
+ <xsl:when test="$copy-assign-for">
+ <xsl:value-of select="'operator='"/>
+ </xsl:when>
+ <xsl:when test="$name='conversion-operator'">
+ <xsl:text>operator </xsl:text>
+ <xsl:apply-templates select="type" mode="annotation"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:if test="not ($standalone) or
+ (local-name(.)='signature' and (position() &gt; 1))
+ or $suppress-template">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+
+ <!-- Indent this declaration -->
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+
+ <!-- Build the template header -->
+ <xsl:variable name="template-length">
+ <xsl:choose>
+ <xsl:when test="$suppress-template">
+ 0
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="template.synopsis.length"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Build a full parameter string (without line breaks) -->
+ <xsl:variable name="param-string">
+ <xsl:text>(</xsl:text>
+ <xsl:call-template name="function-parameters">
+ <xsl:with-param name="include-names" select="$include-names"/>
+ <xsl:with-param name="wrap" select="false()"/>
+ </xsl:call-template>
+ <xsl:text>)</xsl:text>
+ </xsl:variable>
+
+ <!-- Build the text that follows the declarator-->
+ <xsl:variable name="postdeclarator">
+ <xsl:if test="@cv and @cv != ''">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@cv"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <!-- Build the full declaration text -->
+ <xsl:variable name="decl-string"
+ select="concat($type, $function-name, $param-string, $postdeclarator)"/>
+ <xsl:variable name="end-column"
+ select="$template-length + string-length($decl-string) + $indentation"/>
+
+ <xsl:choose>
+ <!-- Check if we should put the template header on its own line to
+ save horizontal space. -->
+ <xsl:when test="($template-length &gt; 0) and
+ ($end-column &gt; $max-columns)">
+ <!-- Emit template header on its own line -->
+ <xsl:apply-templates select="template" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+
+ <!-- Emit the rest of the function declaration (without the
+ template header) indented two extra spaces. -->
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ <xsl:with-param name="is-reference" select="$is-reference"/>
+ <xsl:with-param name="include-names" select="$include-names"/>
+ <xsl:with-param name="link-type" select="$link-type"/>
+ <xsl:with-param name="link-to" select="$link-to"/>
+ <xsl:with-param name="constructor-for" select="$constructor-for"/>
+ <xsl:with-param name="destructor-for" select="$destructor-for"/>
+ <xsl:with-param name="copy-assign-for" select="$copy-assign-for"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="standalone" select="$standalone"/>
+ <xsl:with-param name="suppress-template" select="true()"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <!-- Check if we can put the entire declaration on a single
+ line. -->
+ <xsl:when test="not($end-column &gt; $max-columns)">
+ <!-- Emit template header, if not suppressed -->
+ <xsl:if test="not($suppress-template)">
+ <xsl:apply-templates select="template" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="wrap" select="false()"/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <!-- Emit specifiers -->
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="$specifiers"/>
+ </xsl:call-template>
+
+ <!-- Emit type, if any -->
+ <xsl:choose>
+ <!-- Conversion operators have an empty type, because the return
+ type is part of the name -->
+ <xsl:when test="$name='conversion-operator'"/>
+
+ <!-- Constructors and destructors have no return type -->
+ <xsl:when test="$constructor-for or $destructor-for"/>
+
+ <!-- Copy assignment operators return a reference to the class
+ they are in, unless another type has been explicitly
+ provided in the element. -->
+ <xsl:when test="$copy-assign-for and not(type)">
+ <xsl:value-of select="concat($copy-assign-for, '&amp; ')"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates select="type" mode="highlight"/>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to" select="$link-to"/>
+ <xsl:with-param name="text" select="$function-name"/>
+ <xsl:with-param name="link-type" select="$link-type"/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'('"/>
+ </xsl:call-template>
+ <xsl:call-template name="function-parameters">
+ <xsl:with-param name="include-names" select="$include-names"/>
+ <xsl:with-param name="indentation"
+ select="$indentation + $template-length + string-length($type)
+ + string-length($function-name) + 1"/>
+ <xsl:with-param name="final" select="true()"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="')'"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="$postdeclarator"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <!-- This declaration will take multiple lines -->
+ <xsl:otherwise>
+ <!-- Emit specifiers -->
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="$specifiers"/>
+ </xsl:call-template>
+
+ <!-- Emit type, if any -->
+ <xsl:choose>
+ <!-- Conversion operators have an empty type, because the return
+ type is part of the name -->
+ <xsl:when test="$name='conversion-operator'"/>
+
+ <!-- Constructors and destructors have no return type -->
+ <xsl:when test="$constructor-for or $destructor-for"/>
+
+ <!-- Copy assignment operators return a reference to the class
+ they are in, unless another type has been explicitly
+ provided in the element. -->
+ <xsl:when test="$copy-assign-for and not(type)">
+ <xsl:value-of select="concat($copy-assign-for, '&amp; ')"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates select="type" mode="highlight"/>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="string-length($type) &gt; $boost.short.result.type">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <!-- Determine how many columns the type and storage
+ specifiers take on the same line as the function name. -->
+ <xsl:variable name="type-length">
+ <xsl:choose>
+ <xsl:when test="string-length($type) &gt; $boost.short.result.type">
+ 0
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string-length($type)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to" select="$link-to"/>
+ <xsl:with-param name="text" select="$function-name"/>
+ <xsl:with-param name="link-type" select="$link-type"/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'('"/>
+ </xsl:call-template>
+ <xsl:call-template name="function-parameters">
+ <xsl:with-param name="include-names" select="$include-names"/>
+ <xsl:with-param name="indentation"
+ select="$indentation + $type-length
+ + string-length($function-name) + 1"/>
+ <xsl:with-param name="final" select="true()"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="')'"/>
+ </xsl:call-template>
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="$postdeclarator"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Synopsis of function parameters, e.g., "(const T&, int x = 5)" -->
+ <xsl:template name="function-parameters">
+ <!-- Indentation level of this parameter list -->
+ <xsl:param name="indentation"/>
+
+ <!-- True if we should include parameter names -->
+ <xsl:param name="include-names" select="true()"/>
+
+ <!-- True if we should wrap function parameters to the next line -->
+ <xsl:param name="wrap" select="true()"/>
+
+ <!-- True if we are printing the final output -->
+ <xsl:param name="final" select="false()"/>
+
+ <!-- Internal: The prefix to emit before a parameter -->
+ <xsl:param name="prefix" select="''"/>
+
+ <!-- Internal: The list of parameters -->
+ <xsl:param name="parameters" select="parameter"/>
+
+ <!-- Internal: The column we are on -->
+ <xsl:param name="column" select="$indentation"/>
+
+ <!-- Internal: Whether this is the first parameter on this line or not -->
+ <xsl:param name="first-on-line" select="true()"/>
+
+ <xsl:if test="$parameters">
+ <!-- Information for this parameter -->
+ <xsl:variable name="parameter" select="$parameters[position()=1]"/>
+ <xsl:variable name="pack">
+ <xsl:if test="$parameter/@pack=1">
+ <xsl:choose>
+ <xsl:when test="$final">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'...'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>...</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="name">
+ <xsl:if test="$include-names and $parameter/@name != ''">
+ <xsl:text> </xsl:text><xsl:value-of select="$parameter/@name"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="type" select="string($parameter/paramtype)"/>
+
+ <xsl:variable name="default">
+ <xsl:choose>
+ <xsl:when test="$parameter/@default">
+ <xsl:choose>
+ <xsl:when test="$final">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="concat(' = ', $parameter/@default)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="$parameter/@default"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$parameter/default">
+ <xsl:choose>
+ <xsl:when test="$final">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' = '"/>
+ </xsl:call-template>
+ <xsl:apply-templates
+ select="$parameter/default/*|$parameter/default/text()"
+ mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="string($parameter/default)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="text" select="concat($type, $pack, $name, $default)"/>
+
+ <xsl:variable name="end-column"
+ select="$column + string-length($prefix) + string-length($text)"/>
+
+ <xsl:choose>
+ <!-- Parameter goes on this line -->
+ <xsl:when test="$first-on-line or ($end-column &lt; $max-columns)
+ or not($wrap)">
+ <xsl:choose>
+ <xsl:when test="$final">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="$prefix"/>
+ </xsl:call-template>
+ <xsl:apply-templates
+ select="$parameter/paramtype/*|$parameter/paramtype/text()"
+ mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:copy-of select="$pack"/>
+ <xsl:value-of select="$name"/>
+ <xsl:copy-of select="$default"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($prefix, $text)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:call-template name="function-parameters">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="include-names" select="$include-names"/>
+ <xsl:with-param name="wrap" select="$wrap"/>
+ <xsl:with-param name="final" select="$final"/>
+ <xsl:with-param name="parameters"
+ select="$parameters[position()!=1]"/>
+ <xsl:with-param name="prefix" select="', '"/>
+ <xsl:with-param name="column" select="$end-column"/>
+ <xsl:with-param name="first-on-line" select="false()"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Parameter goes on next line -->
+ <xsl:otherwise>
+ <!-- The comma goes on this line -->
+ <xsl:choose>
+ <xsl:when test="$final">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="$prefix"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$prefix"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- Indent and print the parameter -->
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="$final">
+ <xsl:apply-templates
+ select="$parameter/paramtype/*|$parameter/paramtype/text()"
+ mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:copy-of select="$pack"/>
+ <xsl:value-of select="$name"/>
+ <xsl:copy-of select="$default"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($prefix, $text)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Emit next parameter -->
+ <xsl:call-template name="function-parameters">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="include-names" select="$include-names"/>
+ <xsl:with-param name="wrap" select="$wrap"/>
+ <xsl:with-param name="final" select="$final"/>
+ <xsl:with-param name="parameters"
+ select="$parameters[position()!=1]"/>
+ <xsl:with-param name="prefix" select="', '"/>
+ <xsl:with-param name="column"
+ select="1 + string-length($text) + $indentation"/>
+ <xsl:with-param name="first-on-line" select="false()"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Function synopsis -->
+ <xsl:template match="function|method" mode="synopsis">
+ <xsl:param name="indentation"/>
+
+ <!-- True if we should compact this function -->
+ <xsl:variable name="compact"
+ select="not (para|description|requires|effects|postconditions|returns|
+ throws|complexity|notes|rationale) and
+ ($boost.compact.function='1') and
+ not (local-name(.)='method')"/>
+
+ <xsl:choose>
+ <xsl:when test="$compact">
+ <xsl:if test="purpose">
+ <!-- Compact display outputs the purpose as a comment (if
+ there is one) and the entire function declaration. -->
+ <xsl:text>&#10;&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose/*|purpose/text()"
+ mode="purpose"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="is-reference" select="false()"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="overloaded-function|overloaded-method" mode="synopsis">
+ <xsl:param name="indentation"/>
+
+ <xsl:variable name="name" select="@name"/>
+
+ <!-- True if we should compact this function -->
+ <xsl:variable name="compact"
+ select="not (para|description|requires|effects|postconditions|returns|
+ throws|complexity|notes|rationale) and
+ ($boost.compact.function='1') and
+ not (local-name(.)='overloaded-method')"/>
+
+ <xsl:choose>
+ <xsl:when test="$compact">
+ <xsl:if test="purpose">
+ <!-- Compact display outputs the purpose as a comment (if
+ there is one) and the entire function declaration. -->
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose" mode="annotation"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:for-each select="signature">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="local-name(..)='namespace'">
+ <xsl:variable name="link-to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:variable>
+
+ <xsl:for-each select="signature">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="is-reference" select="false()"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="link-to" select="$link-to"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="signature">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="is-reference" select="false()"/>
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Group free functions together under a category name (header synopsis)-->
+ <xsl:template match="free-function-group" mode="header-synopsis">
+ <xsl:param name="class"/>
+ <xsl:param name="indentation"/>
+ <xsl:apply-templates select="function|overloaded-function" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Constructors, destructor, and assignment operators -->
+ <xsl:template name="construct-copy-destruct-synopsis">
+ <xsl:param name="indentation"/>
+ <xsl:if test="constructor|copy-assignment|destructor">
+ <xsl:if test="typedef|static-constant">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>construct-copy-destruct</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="'construct/copy/destruct'"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates select="constructor" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="copy-assignment" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="destructor" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="construct-copy-destruct-reference">
+ <xsl:if test="constructor|copy-assignment|destructor">
+ <xsl:call-template name="member-documentation">
+ <xsl:with-param name="name">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>construct-copy-destruct</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="''"/>
+ </xsl:call-template>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="access-name"/>
+ <xsl:text> construct/copy/destruct</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <orderedlist>
+ <xsl:apply-templates select="constructor" mode="reference"/>
+ <xsl:apply-templates select="copy-assignment" mode="reference"/>
+ <xsl:apply-templates select="destructor" mode="reference"/>
+ </orderedlist>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="constructor" mode="reference">
+ <xsl:call-template name="function.documentation">
+ <xsl:with-param name="text">
+ <para>
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="constructor-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ <xsl:with-param name="standalone" select="true()"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:call-template name="function-requirements"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="copy-assignment" mode="reference">
+ <xsl:call-template name="function.documentation">
+ <xsl:with-param name="text">
+ <para>
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="copy-assign-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ <xsl:with-param name="standalone" select="true()"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:call-template name="function-requirements"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="destructor" mode="reference">
+ <xsl:call-template name="function.documentation">
+ <xsl:with-param name="text">
+ <para>
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="destructor-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ <xsl:with-param name="standalone" select="true()"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:call-template name="function-requirements"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Templates for functions -->
+ <xsl:template name="function.documentation">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="count(ancestor::free-function-group) &gt; 0
+ or count(ancestor::method-group) &gt; 0
+ or local-name(.)='constructor'
+ or local-name(.)='copy-assignment'
+ or local-name(.)='destructor'">
+ <listitem><xsl:copy-of select="$text"/></listitem>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Semantic descriptions of functions -->
+ <xsl:template name="function-requirements">
+ <xsl:param name="namespace-reference" select="false()"/>
+
+ <xsl:if test="$namespace-reference=false()">
+ <xsl:apply-templates select="purpose/*|purpose/text()"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="description/*"/>
+
+ <xsl:if test="parameter/description|signature/parameter/description|
+ template/template-type-parameter/purpose|
+ template/template-nontype-parameter/purpose|
+ requires|effects|postconditions|returns|throws|complexity|
+ notes|rationale">
+ <variablelist spacing="compact">
+ <xsl:processing-instruction name="dbhtml">
+ list-presentation="table"
+ </xsl:processing-instruction>
+
+ <!-- Document parameters -->
+ <xsl:if test="parameter/description|signature/parameter/description">
+ <varlistentry>
+ <term>Parameters:</term>
+ <listitem>
+ <variablelist spacing="compact">
+ <xsl:processing-instruction name="dbhtml">
+ list-presentation="table"
+ </xsl:processing-instruction>
+ <xsl:for-each select="parameter|signature/parameter">
+ <xsl:sort select="attribute::name"/>
+ <xsl:if test="description">
+ <varlistentry>
+ <term>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </term>
+ <listitem>
+ <xsl:apply-templates select="description/*"/>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+ </xsl:for-each>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+
+ <!-- Document template parameters -->
+ <xsl:if test="template/template-type-parameter/purpose|
+ template/template-nontype-parameter/purpose">
+ <varlistentry>
+ <term>Template Parameters:</term>
+ <listitem>
+ <variablelist spacing="compact">
+ <xsl:processing-instruction name="dbhtml">
+ list-presentation="table"
+ </xsl:processing-instruction>
+ <xsl:for-each select="template/template-type-parameter|
+ template/template-nontype-parameter">
+ <xsl:sort select="attribute::name"/>
+ <xsl:if test="purpose">
+ <varlistentry>
+ <term>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </term>
+ <listitem>
+ <xsl:apply-templates select="purpose/*"/>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+ </xsl:for-each>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+
+ <!-- Document rest of function's contract -->
+ <xsl:for-each select="requires|effects|postconditions|returns|throws|complexity|
+ notes|rationale">
+ <varlistentry>
+ <term><xsl:call-template name="function.requirement.name"/>:</term>
+ <listitem>
+ <xsl:apply-templates select="./*|./text()" mode="annotation"/>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+
+ </variablelist>
+ </xsl:if>
+
+ <xsl:if test="para">
+ <xsl:message>
+ <xsl:text>Warning: Use of 'para' elements in a function is deprecated.&#10;</xsl:text>
+ <xsl:text> Wrap them in a 'description' element.</xsl:text>
+ </xsl:message>
+ <xsl:call-template name="print.warning.context"/>
+ <xsl:apply-templates select="para"/>
+ </xsl:if>
+
+ </xsl:template>
+
+ <xsl:template name="function.requirement.name">
+ <xsl:param name="node" select="."/>
+ <xsl:choose>
+ <xsl:when test="local-name($node)='requires'">Requires</xsl:when>
+ <xsl:when test="local-name($node)='effects'">Effects</xsl:when>
+ <xsl:when test="local-name($node)='postconditions'">
+ <xsl:text>Postconditions</xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name($node)='returns'">Returns</xsl:when>
+ <xsl:when test="local-name($node)='throws'">Throws</xsl:when>
+ <xsl:when test="local-name($node)='complexity'">Complexity</xsl:when>
+ <xsl:when test="local-name($node)='notes'">Notes</xsl:when>
+ <xsl:when test="local-name($node)='rationale'">Rationale</xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Error: unhandled node type `</xsl:text>
+ <xsl:value-of select="local-name($node)"/>
+ <xsl:text>' in template function.requirement.name.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Function reference -->
+ <xsl:template match="function|method" mode="reference">
+ <!-- True if we should compact this function -->
+ <xsl:variable name="compact"
+ select="not (para|description|requires|effects|postconditions|returns|
+ throws|complexity|notes|rationale) and
+ ($boost.compact.function='1') and
+ not (local-name(.)='method')"/>
+
+ <xsl:if test="not ($compact)">
+ <xsl:call-template name="function.documentation">
+ <xsl:with-param name="text">
+ <para>
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="link-type" select="'anchor'"/>
+ <xsl:with-param name="standalone" select="true()"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:call-template name="function-requirements"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Reference for functions at namespace level -->
+ <xsl:template match="function" mode="namespace-reference">
+ <!-- True if we should compact this function -->
+ <xsl:variable name="compact"
+ select="not (para|description|requires|effects|postconditions|returns|
+ throws|complexity|notes|rationale) and
+ ($boost.compact.function='1')"/>
+
+ <xsl:if test="not ($compact)">
+ <xsl:call-template name="reference-documentation">
+ <xsl:with-param name="name">
+ <xsl:text>Function </xsl:text>
+ <xsl:if test="template">
+ <xsl:text>template </xsl:text>
+ </xsl:if>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="refname">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="purpose" select="purpose/*|purpose/text()"/>
+ <xsl:with-param name="anchor">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="link-type" select="'none'"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:call-template name="function-requirements">
+ <xsl:with-param name="namespace-reference" select="true()"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="overloaded-function" mode="reference">
+ <xsl:variable name="name" select="@name"/>
+
+ <!-- True if we should compact this function -->
+ <xsl:variable name="compact"
+ select="not (para|description|requires|effects|postconditions|returns|
+ throws|complexity|notes|rationale) and
+ ($boost.compact.function='1')"/>
+
+ <xsl:if test="not ($compact)">
+ <xsl:call-template name="function.documentation">
+ <xsl:with-param name="text">
+ <para>
+ <xsl:attribute name="id">
+ <xsl:call-template name="generate.id"/>
+ </xsl:attribute>
+
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:for-each select="signature">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="standalone" select="true()"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:call-template name="function-requirements"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="overloaded-function" mode="namespace-reference">
+ <!-- True if we should compact this function -->
+ <xsl:variable name="compact"
+ select="not (para|description|requires|effects|postconditions|returns|
+ throws|complexity|notes|rationale) and
+ ($boost.compact.function='1')"/>
+
+ <xsl:variable name="name" select="@name"/>
+
+ <xsl:if test="not ($compact)">
+ <xsl:call-template name="reference-documentation">
+ <xsl:with-param name="name">
+ <xsl:text>Function </xsl:text>
+ <xsl:if test="template">
+ <xsl:text>template </xsl:text>
+ </xsl:if>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="refname">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="purpose" select="purpose/*|purpose/text()"/>
+ <xsl:with-param name="anchor">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
+ <xsl:for-each select="signature">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="link-type" select="'none'"/>
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:call-template name="function-requirements">
+ <xsl:with-param name="namespace-reference" select="true()"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="overloaded-method" mode="reference">
+ <xsl:variable name="name" select="@name"/>
+
+ <xsl:call-template name="function.documentation">
+ <xsl:with-param name="text">
+ <para>
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:for-each select="signature">
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="standalone" select="true()"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:call-template name="function-requirements"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Group member functions together under a category name (synopsis)-->
+ <xsl:template match="method-group" mode="synopsis">
+ <xsl:param name="indentation"/>
+ <xsl:if test="count(child::*) &gt; 0">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="string(@name)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates select="method|overloaded-method"
+ mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Group member functions together under a category name (reference)-->
+ <xsl:template match="method-group" mode="reference">
+ <xsl:if test="count(child::*) &gt; 0">
+ <xsl:call-template name="member-documentation">
+ <xsl:with-param name="name">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="''"/>
+ </xsl:call-template>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <orderedlist>
+ <xsl:apply-templates select="method|overloaded-method"
+ mode="reference"/>
+ </orderedlist>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Group free functions together under a category name (synopsis)-->
+ <xsl:template match="free-function-group" mode="synopsis">
+ <xsl:param name="class"/>
+ <xsl:param name="indentation"/>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="string(@name)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates select="function|overloaded-function" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Group free functions together under a category name (reference)-->
+ <xsl:template match="free-function-group" mode="reference">
+ <xsl:param name="class"/>
+ <xsl:call-template name="member-documentation">
+ <xsl:with-param name="name">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="''"/>
+ </xsl:call-template>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="$class"/>
+ </xsl:call-template>
+ <xsl:value-of select="concat(' ',@name)"/>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <orderedlist>
+ <xsl:apply-templates select="function|overloaded-function"
+ mode="reference"/>
+ </orderedlist>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?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:template name="global-synopsis">
+ <xsl:param name="indentation" select="0" />
+ <xsl:if test="not(local-name(preceding-sibling::*[position()=1])=local-name(.)) and (position() &gt; 1)">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation" />
+ </xsl:call-template>
+ <xsl:call-template name="global-synopsis-impl">
+ <xsl:with-param name="link-type" select="'link'" />
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="global-reference">
+ <xsl:call-template name="reference-documentation">
+ <xsl:with-param name="refname">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="." />
+ </xsl:call-template>
+ <xsl:apply-templates select="specialization" />
+ </xsl:with-param>
+ <xsl:with-param name="purpose" select="purpose/*|purpose/text()" />
+ <xsl:with-param name="anchor">
+ <xsl:call-template name="generate.id" />
+ </xsl:with-param>
+ <xsl:with-param name="name">
+ <xsl:text>Global </xsl:text>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name" />
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
+ <xsl:call-template name="global-synopsis-impl">
+ <xsl:with-param name="link-type" select="'none'" />
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:apply-templates select="description" />
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="global-synopsis-impl">
+ <xsl:param name="link-type" />
+ <xsl:if test="@specifiers">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="@specifiers" />
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="type/*|type/text()" mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id" select="." />
+ </xsl:with-param>
+ <xsl:with-param name="text" select="@name" />
+ <xsl:with-param name="link-type" select="$link-type" />
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="data-member" mode="generate.id">
+ <xsl:call-template name="fully-qualified-id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?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"
+ xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
+ version="1.0">
+
+ <xsl:param name="html.stylesheet">
+ <xsl:choose>
+ <xsl:when test = "$boost.defaults = 'Boost'">
+ <xsl:value-of select = "concat($boost.root, '/doc/src/boostbook.css')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ boostbook.css
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <xsl:param name="boost.graphics.root">
+ <xsl:choose>
+ <xsl:when test = "$boost.defaults = 'Boost'">
+ <xsl:value-of select = "concat($boost.root, '/doc/src/images/')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select = "'images/'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <xsl:param name="boost.mathjax" select="0"/>
+ <xsl:param name="boost.mathjax.script"
+ select="'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'"/>
+ <!--See usage below for explanation of this param-->
+ <xsl:param name="boost.noexpand.chapter.toc" select="0"/>
+ <!-- Currently just adds a viewport meta tag -->
+ <xsl:param name="boost.mobile" select="0"/>
+
+ <xsl:param name="admon.style"/>
+ <xsl:param name="admon.graphics">1</xsl:param>
+ <xsl:param name="boostbook.verbose" select="0"/>
+ <xsl:param name="navig.graphics" select="1"/>
+ <xsl:param name="navig.graphics.extension" select="'.png'"/>
+ <xsl:param name="chapter.autolabel" select="1"/>
+ <xsl:param name="use.id.as.filename" select="1"/>
+ <xsl:param name="refentry.generate.name" select="0"/>
+ <xsl:param name="refentry.generate.title" select="1"/>
+ <xsl:param name="make.year.ranges" select="1"/>
+ <xsl:param name="generate.manifest" select="1"/>
+ <xsl:param name="generate.section.toc.level" select="3"/>
+ <xsl:param name="doc.standalone">false</xsl:param>
+ <xsl:param name="chunker.output.indent">yes</xsl:param>
+ <xsl:param name="chunker.output.encoding">UTF-8</xsl:param>
+ <xsl:param name="chunk.quietly" select="not(number($boostbook.verbose))"/>
+ <xsl:param name="toc.max.depth">2</xsl:param>
+ <xsl:param name="callout.graphics.number.limit">15</xsl:param>
+ <xsl:param name = "admon.graphics.path" select="$boost.graphics.root" />
+ <xsl:param name = "navig.graphics.path" select="$boost.graphics.root" />
+ <xsl:param name = "callout.graphics.path"
+ select = "concat($boost.graphics.root, 'callouts/')"/>
+
+
+ <xsl:param name="admon.style">
+ <!-- Remove the style. Let the CSS do the styling -->
+</xsl:param>
+
+<!-- Always have graphics -->
+<xsl:param name="admon.graphics" select="1"/>
+
+ <xsl:param name="generate.toc">
+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
+ </xsl:param>
+
+
+ <xsl:template name="format.cvs.revision">
+ <xsl:param name="text"/>
+
+ <!-- Remove the "$Date: " -->
+ <xsl:variable name="text.noprefix"
+ select="substring-after($text, '$Date: ')"/>
+
+ <!-- Grab the year -->
+ <xsl:variable name="year" select="substring-before($text.noprefix, '/')"/>
+ <xsl:variable name="text.noyear"
+ select="substring-after($text.noprefix, '/')"/>
+
+ <!-- Grab the month -->
+ <xsl:variable name="month" select="substring-before($text.noyear, '/')"/>
+ <xsl:variable name="text.nomonth"
+ select="substring-after($text.noyear, '/')"/>
+
+ <!-- Grab the year -->
+ <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/>
+ <xsl:variable name="text.noday"
+ select="substring-after($text.nomonth, ' ')"/>
+
+ <!-- Get the time -->
+ <xsl:variable name="time" select="substring-before($text.noday, ' ')"/>
+
+ <xsl:variable name="month.name">
+ <xsl:choose>
+ <xsl:when test="$month=1">January</xsl:when>
+ <xsl:when test="$month=2">February</xsl:when>
+ <xsl:when test="$month=3">March</xsl:when>
+ <xsl:when test="$month=4">April</xsl:when>
+ <xsl:when test="$month=5">May</xsl:when>
+ <xsl:when test="$month=6">June</xsl:when>
+ <xsl:when test="$month=7">July</xsl:when>
+ <xsl:when test="$month=8">August</xsl:when>
+ <xsl:when test="$month=9">September</xsl:when>
+ <xsl:when test="$month=10">October</xsl:when>
+ <xsl:when test="$month=11">November</xsl:when>
+ <xsl:when test="$month=12">December</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ',
+ $time, ' GMT')"/>
+ </xsl:template>
+
+
+ <xsl:template name="format.svn.revision">
+ <xsl:param name="text"/>
+
+ <!-- Remove the "$Date: " or "$Date:: " -->
+ <xsl:variable name="text.noprefix"
+ select="substring-after($text, ': ')"/>
+
+ <!-- Grab the year -->
+ <xsl:variable name="year" select="substring-before($text.noprefix, '-')"/>
+ <xsl:variable name="text.noyear"
+ select="substring-after($text.noprefix, '-')"/>
+
+ <!-- Grab the month -->
+ <xsl:variable name="month" select="substring-before($text.noyear, '-')"/>
+ <xsl:variable name="text.nomonth"
+ select="substring-after($text.noyear, '-')"/>
+
+ <!-- Grab the year -->
+ <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/>
+ <xsl:variable name="text.noday"
+ select="substring-after($text.nomonth, ' ')"/>
+
+ <!-- Get the time -->
+ <xsl:variable name="time" select="substring-before($text.noday, ' ')"/>
+ <xsl:variable name="text.notime"
+ select="substring-after($text.noday, ' ')"/>
+
+ <!-- Get the timezone -->
+ <xsl:variable name="timezone" select="substring-before($text.notime, ' ')"/>
+
+ <xsl:variable name="month.name">
+ <xsl:choose>
+ <xsl:when test="$month=1">January</xsl:when>
+ <xsl:when test="$month=2">February</xsl:when>
+ <xsl:when test="$month=3">March</xsl:when>
+ <xsl:when test="$month=4">April</xsl:when>
+ <xsl:when test="$month=5">May</xsl:when>
+ <xsl:when test="$month=6">June</xsl:when>
+ <xsl:when test="$month=7">July</xsl:when>
+ <xsl:when test="$month=8">August</xsl:when>
+ <xsl:when test="$month=9">September</xsl:when>
+ <xsl:when test="$month=10">October</xsl:when>
+ <xsl:when test="$month=11">November</xsl:when>
+ <xsl:when test="$month=12">December</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year)"/>
+ <xsl:if test="$time != ''">
+ <xsl:value-of select="concat(' at ', $time, ' ', $timezone)"/>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Footer Copyright -->
+ <xsl:template match="copyright" mode="boost.footer">
+ <xsl:if test="position() &gt; 1">
+ <br/>
+ </xsl:if>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Copyright'"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">copyright</xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="copyright.years">
+ <xsl:with-param name="years" select="year"/>
+ <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
+ <xsl:with-param name="single.year.ranges"
+ select="$make.single.year.ranges"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+ </xsl:template>
+
+ <!-- Footer License -->
+ <xsl:template match="legalnotice" mode="boost.footer">
+ <xsl:apply-templates select="para" mode="titlepage.mode" />
+ </xsl:template>
+
+ <xsl:template name="user.footer.content">
+ <table width="100%">
+ <tr>
+ <td align="left">
+ <xsl:variable name="revision-nodes"
+ select="ancestor-or-self::*
+ [not (attribute::rev:last-revision='')]"/>
+ <xsl:if test="count($revision-nodes) &gt; 0">
+ <xsl:variable name="revision-node"
+ select="$revision-nodes[last()]"/>
+ <xsl:variable name="revision-text">
+ <xsl:value-of
+ select="normalize-space($revision-node/attribute::rev:last-revision)"/>
+ </xsl:variable>
+ <xsl:if test="string-length($revision-text) &gt; 0 and not($revision-text = '$Date$')">
+ <p>
+ <small>
+ <xsl:text>Last revised: </xsl:text>
+ <xsl:choose>
+ <xsl:when test="not(contains($revision-text, '$Date: ')) and not(contains($revision-text, '$Date:: '))">
+ <xsl:value-of select="$revision-text"/>
+ </xsl:when>
+ <xsl:when test="contains($revision-text, '/')">
+ <xsl:call-template name="format.cvs.revision">
+ <xsl:with-param name="text" select="$revision-text"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="format.svn.revision">
+ <xsl:with-param name="text" select="$revision-text"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </small>
+ </p>
+ </xsl:if>
+ </xsl:if>
+ </td>
+ <td align="right">
+ <div class = "copyright-footer">
+ <xsl:apply-templates select="ancestor::*/*/copyright"
+ mode="boost.footer"/>
+ <xsl:apply-templates select="ancestor::*/*/legalnotice"
+ mode="boost.footer"/>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <!-- We don't want refentry's to show up in the TOC because they
+ will merely be redundant with the synopsis. -->
+ <xsl:template match="refentry" mode="toc"/>
+
+ <!-- override the behaviour of some DocBook elements for better
+ rendering facilities -->
+
+ <xsl:template match = "programlisting[ancestor::informaltable]">
+ <pre class = "table-{name(.)}"><xsl:apply-templates/></pre>
+ </xsl:template>
+
+ <xsl:template match = "refsynopsisdiv">
+ <h2 class = "{name(.)}-title">Synopsis</h2>
+ <div class = "{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="generate.html.title"/>
+
+ <xsl:template match="*" mode="detect-math">
+ <xsl:variable name="is-chunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+ <xsl:if test="$is-chunk = '0'">
+ <xsl:apply-templates mode="detect-math"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="detect-math"/>
+
+ <xsl:template match="textobject[@role='tex']" mode="detect-math">
+ <xsl:text>1</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="user.head.content">
+ <xsl:if test="$boost.mathjax = 1">
+ <xsl:variable name="has-math">
+ <xsl:apply-templates mode="detect-math" select="*"/>
+ </xsl:variable>
+ <xsl:if test="string($has-math) != ''">
+ <script type="text/javascript" src="{$boost.mathjax.script}"/>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$boost.mobile = 1">
+ <meta name="viewport" content="width=device-width"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="inlinemediaobject">
+ <xsl:choose>
+ <xsl:when test="$boost.mathjax = 1 and textobject[@role='tex']">
+ <xsl:variable name="content" select="string(textobject[@role='tex'])"/>
+ <xsl:variable name="plain-content">
+ <xsl:choose>
+ <!--strip $$-->
+ <xsl:when test="substring($content, 1, 1) = '$' and
+ substring($content, string-length($content), 1) = '$'">
+ <xsl:value-of select="substring($content, 2, string-length($content) - 2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <script type="math/tex">
+ <xsl:value-of select="$plain-content"/>
+ </script>
+ <noscript>
+ <xsl:apply-imports/>
+ </noscript>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-imports/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="output.html.stylesheets">
+ <xsl:param name="stylesheets" select="''"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($stylesheets, ' ')">
+ <link rel="stylesheet">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="substring-before($stylesheets, ' ')"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:if test="$html.stylesheet.type != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$html.stylesheet.type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$stylesheets != ''">
+ <link rel="stylesheet">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$stylesheets"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:if test="$html.stylesheet.type != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$html.stylesheet.type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="itemizedlist[@role = 'index']" mode="class.value">
+ <xsl:value-of select="'index'"/>
+</xsl:template>
+
+<xsl:template match="sidebar[@role = 'blurb']" mode="class.value">
+ <xsl:value-of select="'blurb'"/>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix|article" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <!--
+ When boost.noexpand.chapter.toc is set to 1, then the TOC for
+ chapters is only one level deep (ie toc.max.depth has no effect)
+ and nested sections within chapters are not shown. TOC's and LOC's
+ at other levels are not effected and respond to toc.max.depth as normal.
+ -->
+ <xsl:choose>
+ <xsl:when test="local-name($toc-context) = 'book' and $boost.noexpand.chapter.toc = 1">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="foo"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="section|sect1|glossary|bibliography|index
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+
+
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 @@
+<?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"
+ xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
+ version="1.0">
+
+ <!-- Import the HTML chunking stylesheet -->
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"/>
+
+ <xsl:param name="admon.style"/>
+ <xsl:param name="admon.graphics">1</xsl:param>
+ <xsl:param name="boostbook.verbose" select="0"/>
+ <xsl:param name="html.stylesheet" select="'boostbook.css'"/>
+ <xsl:param name="chapter.autolabel" select="1"/>
+ <xsl:param name="use.id.as.filename" select="1"/>
+ <xsl:param name="refentry.generate.name" select="0"/>
+ <xsl:param name="refentry.generate.title" select="1"/>
+ <xsl:param name="make.year.ranges" select="1"/>
+ <xsl:param name="generate.manifest" select="1"/>
+ <xsl:param name="callout.graphics.number.limit">15</xsl:param>
+ <xsl:param name="draft.mode">no</xsl:param>
+ <xsl:param name="admon.graphics" select="1"/>
+
+ <!-- We don't want refentry's to show up in the TOC because they
+ will merely be redundant with the synopsis. -->
+ <xsl:template match="refentry" mode="toc"/>
+
+ <!-- override the behaviour of some DocBook elements for better
+ rendering facilities -->
+
+ <xsl:template match = "programlisting[ancestor::informaltable]">
+ <pre class = "table-{name(.)}"><xsl:apply-templates/></pre>
+ </xsl:template>
+
+ <xsl:template match = "refsynopsisdiv">
+ <h2 class = "{name(.)}-title">Synopsis</h2>
+ <div class = "{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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"
+ xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
+ version="1.0">
+
+ <!-- Import the HTML stylesheet -->
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/math.xsl"/>
+
+ <xsl:output method="html" encoding="UTF-8" indent="no"/>
+
+ <!-- We have to make sure that our templates override all
+ docbook templates. Therefore, we include our own templates
+ instead of importing them. In order for this to work,
+ the stylesheets included here cannot also include each other -->
+ <xsl:include href="docbook-layout.xsl"/>
+ <xsl:include href="admon.xsl"/>
+ <xsl:include href="xref.xsl"/>
+ <xsl:include href="relative-href.xsl"/>
+ <xsl:include href="callout.xsl"/>
+
+ <xsl:param name="admon.style"/>
+ <xsl:param name="admon.graphics">1</xsl:param>
+ <xsl:param name="chapter.autolabel" select="0"/>
+ <xsl:param name="refentry.generate.name" select="0"/>
+ <xsl:param name="refentry.generate.title" select="1"/>
+ <xsl:param name="make.year.ranges" select="1"/>
+
+</xsl:stylesheet>
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 @@
+<?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"
+ xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
+ version="1.0">
+
+ <!-- Import the HTML chunking stylesheet -->
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/math.xsl"/>
+
+ <!-- Bring in the fast chunking overrides. There's nothing
+ that we need to override, so include instead of importing it. -->
+ <xsl:include
+ href="http://docbook.sourceforge.net/release/xsl/current/html/chunkfast.xsl"/>
+
+ <!-- We have to make sure that our templates override all
+ docbook templates. Therefore, we include our own templates
+ instead of importing them. In order for this to work,
+ the stylesheets included here cannot also include each other -->
+ <xsl:include href="chunk-common.xsl"/>
+ <xsl:include href="docbook-layout.xsl"/>
+ <xsl:include href="navbar.xsl"/>
+ <xsl:include href="admon.xsl"/>
+ <xsl:include href="xref.xsl"/>
+ <xsl:include href="relative-href.xsl"/>
+ <xsl:include href="callout.xsl"/>
+ <xsl:include href="html-base.xsl"/>
+
+</xsl:stylesheet>
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 @@
+<?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:template match="class-index">
+
+ </xsl:template>
+
+ <xsl:template match="function-index">
+
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?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:key name="library-categories" match="library"
+ use="libraryinfo/librarycategory/@name"/>
+
+ <xsl:template match="librarylist">
+ <itemizedlist spacing="compact">
+ <xsl:apply-templates select="//library"
+ mode="build-library-list">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </itemizedlist>
+ </xsl:template>
+
+ <xsl:template name="library.link">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="name" select="$node/attribute::name"/>
+
+ <xsl:choose>
+ <xsl:when test="$node/attribute::html-only = 1">
+ <xsl:variable name="url">
+ <xsl:choose>
+ <xsl:when test="$node/attribute::url">
+ <xsl:value-of select="$node/attribute::url"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($boost.root,
+ '/libs/',
+ $node/attribute::dirname,
+ '/index.html')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <ulink>
+ <xsl:attribute name="url">
+ <xsl:value-of select="$url"/>
+ </xsl:attribute>
+ <xsl:value-of select="$name"/>
+ </ulink>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:choose>
+ <xsl:when test="$node/attribute::id">
+ <xsl:value-of select="$node/attribute::id"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="$name"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="library" mode="build-library-list">
+ <listitem>
+ <simpara>
+ <xsl:call-template name="library.link"/>
+ <xsl:text> - </xsl:text>
+ <xsl:apply-templates select="libraryinfo/librarypurpose"
+ mode="build-library-list"/>
+ </simpara>
+ </listitem>
+ </xsl:template>
+
+ <xsl:template match="librarypurpose" mode="build-library-list">
+ <xsl:apply-templates/>
+ <xsl:text>, from </xsl:text>
+ <xsl:apply-templates select="../author" mode="display-author-list"/>
+ </xsl:template>
+
+ <xsl:template match="author" mode="display-author-list">
+ <xsl:if test="(position() &gt; 1) and (count(../author) &gt; 2)">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:if test="(position() = count(../author)) and (position() &gt; 1)">
+ <xsl:if test="position() &lt; 3">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text>and </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="firstname/text()"/>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="surname/text()"/>
+ <xsl:if test="(position() = count(../author))">
+ <xsl:text>.</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="librarycategorylist">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="librarycategorydef">
+ <section>
+ <title><xsl:apply-templates/></title>
+ <xsl:variable name="name" select="@name"/>
+ <itemizedlist spacing="compact">
+ <xsl:apply-templates select="key('library-categories', $name)"
+ mode="build-library-list">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </itemizedlist>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="libraryinfo">
+ <chapterinfo>
+ <xsl:apply-templates select="author|authorgroup/author|copyright|legalnotice"/>
+ </chapterinfo>
+ </xsl:template>
+
+ <xsl:template match="librarypurpose|librarycategory"/>
+
+</xsl:stylesheet>
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 @@
+<?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"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0">
+
+ <!-- Maximum length of directory and file names is 31 characters.
+ '.html' uses 5 characters.
+ 31 - 5 = 26 -->
+ <xsl:param name="boost.max.id.part.length">26</xsl:param>
+
+ <!-- Generate an ID for the entity referenced -->
+ <xsl:template name="generate.id">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates select="$node" mode="generate.id"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.id">
+ <xsl:variable name="raw.id"><xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:value-of select="translate($raw.id, '.', '_')"/>
+ <xsl:text>-bb</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="postfix.id">
+ <xsl:variable name="raw.id"><xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="starts-with($raw.id, 'id-')">
+ <xsl:value-of select="translate(substring-after($raw.id, 'id-'), '.', '_')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$raw.id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="strip-qualifiers-non-template">
+ <xsl:param name="name"/>
+ <xsl:choose>
+ <xsl:when test="contains($name, '&gt;')">
+ <xsl:call-template name="strip-qualifiers-non-template">
+ <xsl:with-param name="name" select="substring-after($name, '&gt;')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains($name, '::')">
+ <xsl:call-template name="strip-qualifiers-non-template">
+ <xsl:with-param name="name" select="substring-after($name, '::')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="strip-balanced">
+ <xsl:param name="name"/>
+ <xsl:param name="open" select="'&lt;'"/>
+ <xsl:param name="close" select="'&gt;'"/>
+ <xsl:param name="depth" select="0"/>
+ <xsl:choose>
+ <xsl:when test="contains($name, $open)
+ and not(contains(substring-before($name, $open), $close))">
+ <xsl:call-template name="strip-balanced">
+ <xsl:with-param name="name" select="substring-after($name, $open)"/>
+ <xsl:with-param name="open" select="$open"/>
+ <xsl:with-param name="close" select="$close"/>
+ <xsl:with-param name="depth" select="$depth + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains($name, $close) and ($depth &gt; 1)">
+ <xsl:call-template name="strip-balanced">
+ <xsl:with-param name="name" select="substring-after($name, $close)"/>
+ <xsl:with-param name="open" select="$open"/>
+ <xsl:with-param name="close" select="$close"/>
+ <xsl:with-param name="depth" select="$depth - 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($name, $close)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="strip-qualifiers-template">
+ <xsl:param name="name"/>
+ <xsl:choose>
+ <xsl:when test="contains($name, '::')
+ and not(contains(substring-before($name, '::'), '&lt;'))">
+ <xsl:call-template name="strip-qualifiers-template">
+ <xsl:with-param name="name" select="substring-after($name, '::')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="rest">
+ <xsl:call-template name="strip-balanced">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$rest != ''">
+ <xsl:call-template name="strip-qualifiers-template">
+ <xsl:with-param name="name" select="$rest"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Strip the qualifiers off a qualified name and return the unqualified
+ name. For instance, "boost::python::function" would become just
+ "function".
+ Must handle ns::foo -> foo
+ Must handle ns::foo<bar::baz> -> foo<bar::baz>
+ Must handle ns::foo<bar::baz>::nested -> nested
+ Must handle ns::foo<x>::bar<y> -> bar<y> -->
+ <xsl:template name="strip-qualifiers">
+ <xsl:param name="name"/>
+ <xsl:choose>
+ <xsl:when test="substring($name, string-length($name)) = '&gt;'">
+ <xsl:call-template name="strip-qualifiers-template">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="strip-qualifiers-non-template">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Build the fully-qualified id of the given node -->
+ <xsl:template name="fully-qualified-id">
+ <xsl:param name="node"/>
+
+ <xsl:apply-templates select="$node" mode="fully-qualified-name">
+ <xsl:with-param name="is.id" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Build the fully-qualified name of the given node -->
+ <xsl:template name="fully-qualified-name">
+ <xsl:param name="node"/>
+ <xsl:apply-templates select="$node" mode="fully-qualified-name"/>
+ </xsl:template>
+
+ <!-- Hack to make the node we are building the current node so that the
+ ancestor:: syntax will work -->
+ <xsl:template match="*" mode="fully-qualified-name">
+ <xsl:param name="is.id" select="false()" />
+ <xsl:call-template name="build-fully-qualified-name">
+ <xsl:with-param name="is.id" select="$is.id"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- The real routine that builds a fully-qualified name for the current
+ node. -->
+ <xsl:template name="build-fully-qualified-name">
+ <xsl:param name="is.id" select="false()" />
+
+ <!-- Determine the set of ancestor namespaces -->
+ <xsl:variable name="ancestors"
+ select="ancestor::namespace|
+ ancestor::class|ancestor::struct|ancestor::union|
+ ancestor::class-specialization|ancestor::struct-specialization|ancestor::union-specialization"/>
+
+ <xsl:for-each select="$ancestors">
+ <xsl:apply-templates select="." mode="fast-print-id-part">
+ <xsl:with-param name="is.id" select="$is.id"/>
+ </xsl:apply-templates>
+ <xsl:choose>
+ <xsl:when test="$is.id"><xsl:text>.</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>::</xsl:text></xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates select="." mode="fast-print-id-part">
+ <xsl:with-param name="is.id" select="$is.id"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:variable name="elements-with-ids">
+ <xsl:apply-templates select="namespace|class|struct|union|class-specialization|struct-specialization|union-specialization"
+ mode="preprocess-ids"/>
+ </xsl:variable>
+
+ <xsl:variable name="fast-elements" select="exsl:node-set($elements-with-ids)"/>
+
+ <xsl:template match="*" mode="preprocess-ids">
+ <element>
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id()"/>
+ </xsl:attribute>
+ <xsl:attribute name="part-id">
+ <xsl:call-template name="print-id-part"/>
+ </xsl:attribute>
+ </element>
+ </xsl:template>
+
+ <xsl:template name="print-id-part">
+ <xsl:apply-templates select="." mode="print-id-part"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="fast-print-id-part">
+ <xsl:param name="is.id"/>
+ <xsl:choose>
+ <xsl:when test="not($is.id)">
+ <xsl:apply-templates select="." mode="print-name"/>
+ </xsl:when>
+ <xsl:when test="$fast-elements[@id=generate-id()]">
+ <xsl:value-of select="$fast-elements[@id=generate-id()]/@part-id"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="." mode="print-id-part">
+ <xsl:with-param name="is.id" select="$is.id"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Print the part of a fully qualified name for a single element -->
+ <xsl:template match="*" mode="print-id-part">
+ <xsl:param name="is.id"/>
+
+ <xsl:variable name="part">
+ <xsl:apply-templates select="." mode="print-name"/>
+ </xsl:variable>
+
+ <xsl:variable name="unique-name">
+ <xsl:apply-templates select="." mode="unique.name"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test=
+ "$is.id and (
+ string-length($part) &gt; $boost.max.id.part.length or
+ $unique-name = 0 or
+ translate($part, '.&lt;&gt;;\:*?&quot;| ', '') != $part
+ )">
+ <xsl:variable name="normalized" select="translate(normalize-space(translate($part, '.&lt;&gt;;\:*?&quot;|_', ' ')), ' ', '_')"/>
+ <xsl:variable name="id"><xsl:call-template name="postfix.id"/></xsl:variable>
+ <xsl:value-of select =
+ "concat(
+ substring($normalized, 1, $boost.max.id.part.length - string-length($id) - 1),
+ concat('_', $id))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$part"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Override this if an id might not be unique -->
+ <xsl:template match="*" mode="unique.name">
+ <xsl:value-of select="1"/>
+ </xsl:template>
+
+ <xsl:template match="function|overloaded-function" mode="unique.name">
+ <xsl:variable name="func-name">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- Count the number of elements with the same qualified name -->
+ <xsl:variable name="count-elements">
+ <xsl:for-each select="key('named-entities', translate(@name, $uppercase-letters, $lowercase-letters))">
+ <xsl:variable name="other-name">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$func-name = $other-name">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:value-of select="number(string-length($count-elements) = 1)"/>
+ </xsl:template>
+
+ <!-- Print the name of the current node -->
+ <xsl:template match="*" mode="print-name">
+ <xsl:value-of select="@name"/>
+ </xsl:template>
+
+ <xsl:template match="template-arg" mode="print-name">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="text()"/>
+ <xsl:if test="@pack=1">
+ <xsl:text>...</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template
+ match="struct-specialization|class-specialization|union-specialization"
+ mode="print-name">
+ <xsl:value-of select="@name"/>
+ <xsl:text>&lt;</xsl:text>
+ <xsl:apply-templates select="specialization/template-arg" mode="print-name"/>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="concat-directives">
+ <xsl:param name="directives"/>
+ <xsl:for-each select="$directives">
+ <xsl:apply-templates select="." mode="print-name"/>
+ <xsl:text>::</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="find-nodes-matching-name">
+ <!-- The name we are looking for -->
+ <xsl:param name="name"/>
+
+ <!-- The context in which this name occurs -->
+ <xsl:param name="context"/>
+
+ <!-- The node that we are checking against -->
+ <xsl:param name="nodes"/>
+
+ <!-- The set of using directives for this context node -->
+ <xsl:variable name="directives"
+ select="$context/ancestor::*/using-namespace |
+ $context/ancestor::namespace |
+ $context/ancestor::*/using-class |
+ $context/ancestor::class |
+ $context/ancestor::struct"/>
+
+ <xsl:variable name="directives-str">
+ <xsl:call-template name="concat-directives">
+ <xsl:with-param name="directives" select="$directives"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:apply-templates select="$nodes" mode="generate-cxx-links">
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="directives-str" select="$directives-str"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate-cxx-links">
+ <xsl:param name="name"/>
+ <xsl:param name="directives-str"/>
+
+ <xsl:variable name="node-name">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="leading-chars"
+ select="string-length($node-name) - string-length($name)"/>
+
+ <!-- Check if this node matches any visible namespace -->
+ <xsl:if test="string-length($node-name) &gt;= string-length($name) and
+ substring($node-name, $leading-chars + 1,
+ string-length($name)) = $name">
+ <xsl:variable name="qualifiers"
+ select="substring($node-name, 1, $leading-chars)"/>
+ <xsl:if test="contains($directives-str, $qualifiers)">
+ <xsl:variable name="myid">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+ <cxx-link-helper>
+ <xsl:attribute name="id">
+ <xsl:value-of select="$myid"/>
+ </xsl:attribute>
+ <xsl:attribute name="namespace">
+ <xsl:value-of select="$qualifiers"/>
+ </xsl:attribute>
+ <xsl:text>random text</xsl:text>
+ </cxx-link-helper>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="cxx-link-name">
+ <!-- The actual lookup node -->
+ <xsl:param name="lookup"/>
+
+ <!-- The type of name to lookup (e.g., class) -->
+ <xsl:param name="type"/>
+
+ <!-- The name we are looking for -->
+ <xsl:param name="name"/>
+
+ <!-- The name we will display -->
+ <xsl:param name="display-name"/>
+
+ <!-- The name we are looking for (unqualified)-->
+ <xsl:param name="unqualified-name"/>
+
+ <!-- The list of nodes that match the lookup node in both name and type -->
+ <xsl:param name="nodes"/>
+
+ <!-- Filter the nodes to leave only the ones that are in scope. -->
+ <xsl:variable name="matches1">
+ <xsl:call-template name="find-nodes-matching-name">
+ <xsl:with-param name="name" select="$name"/>
+ <xsl:with-param name="nodes" select="$nodes"/>
+ <xsl:with-param name="context" select="$lookup"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="matches" select="exsl:node-set($matches1)//cxx-link-helper"/>
+
+ <xsl:choose>
+ <xsl:when test="count($matches) = 0">
+ <xsl:message>
+ <xsl:text>Cannot find </xsl:text>
+ <xsl:value-of select="$type"/>
+ <xsl:text> named '</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>'</xsl:text>
+ </xsl:message>
+ <xsl:value-of select="$display-name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- If we found more than one, print a message and take the first -->
+ <xsl:if test="count($matches) &gt; 1">
+ <xsl:message>
+ <xsl:text>Reference to </xsl:text>
+ <xsl:value-of select="$type"/>
+ <xsl:text> '</xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>' is ambiguous. Found:</xsl:text>
+ <xsl:for-each select="$matches">
+ <xsl:text>
+ Match in namespace ::</xsl:text>
+ <xsl:value-of select="@namespace"/>
+ </xsl:for-each>
+ </xsl:message>
+ </xsl:if>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:value-of select="$matches[position() = 1]/@id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="$display-name"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?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:template match="macro" mode="synopsis">
+ <xsl:param name="indentation" select="0"/>
+
+ <xsl:text>&#10;</xsl:text>
+ <xsl:if
+ test="not(local-name(preceding-sibling::*[position()=1])=local-name(.))">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="macro-synopsis">
+ <xsl:with-param name="link-type" select="'link'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="macro" mode="reference">
+ <xsl:call-template name="reference-documentation">
+ <xsl:with-param name="refname" select="@name"/>
+ <xsl:with-param name="purpose" select="purpose/*|purpose/text()"/>
+ <xsl:with-param name="anchor">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="name">
+ <xsl:text>Macro </xsl:text>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
+ <xsl:call-template name="macro-synopsis">
+ <xsl:with-param name="link-type" select="'none'"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:apply-templates select="description"/>
+
+ <xsl:if test="macro-parameter/description">
+ <variablelist spacing="compact">
+ <xsl:processing-instruction name="dbhtml">
+ list-presentation="table"
+ </xsl:processing-instruction>
+
+ <!-- Document parameters -->
+ <xsl:if test="macro-parameter/description">
+ <varlistentry>
+ <term>Parameters:</term>
+ <listitem>
+ <variablelist spacing="compact">
+ <xsl:processing-instruction name="dbhtml">
+ list-presentation="table"
+ </xsl:processing-instruction>
+ <xsl:for-each select="macro-parameter">
+ <xsl:sort select="attribute::name"/>
+ <xsl:if test="description">
+ <varlistentry>
+ <term>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </term>
+ <listitem>
+ <xsl:apply-templates select="description/*"/>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+ </xsl:for-each>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+ </variablelist>
+ </xsl:if>
+
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="macro-synopsis">
+ <xsl:param name="link-type"/>
+
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id" select="."/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="@name"/>
+ <xsl:with-param name="link-type" select="$link-type"/>
+ </xsl:call-template>
+
+ <xsl:if test="@kind='functionlike'">
+ <xsl:text>(</xsl:text>
+ <xsl:for-each select="macro-parameter">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="@name"/>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="macro" mode="generate.id">
+ <xsl:choose>
+ <xsl:when test="string-length(@name) &gt; $boost.max.id.part.length or
+ count(key('named-entities',
+ translate(@name, $uppercase-letters, $lowercase-letters)))!=1">
+ <xsl:variable name="raw.id"><xsl:call-template name="postfix.id"/></xsl:variable>
+ <xsl:value-of select="substring(@name, 1, $boost.max.id.part.length - string-length($raw.id) - 1)"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="$raw.id"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?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">
+
+ <!-- Import the man pages stylesheet -->
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
+
+ <xsl:param name="generate.manifest" select="1"/>
+ <xsl:param name="manifest">man.manifest</xsl:param>
+
+ <xsl:template match="literallayout">
+ <xsl:text>&#10;.nf&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.fi&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="para|simpara|remark" mode="list">
+ <xsl:variable name="foo">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="literallayout">
+ <xsl:copy-of select="$foo"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space($foo)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:if test="following-sibling::para or following-sibling::simpara or
+ following-sibling::remark">
+ <!-- Make sure multiple paragraphs within a list item don't -->
+ <!-- merge together. -->
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="build.refentry.filename">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="section" select="$node/refmeta/manvolnum"/>
+ <xsl:variable name="name" select="$node/refnamediv/refname[1]"/>
+ <xsl:value-of select="concat('man', $section, '/',
+ translate(normalize-space($name),
+ '&lt;&gt;', '__'),
+ '.', $section)"/>
+
+ </xsl:template>
+
+ <xsl:template match="refentry" mode="manifest">
+ <xsl:call-template name="build.refentry.filename"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="//refentry">
+ <xsl:apply-templates select="//refentry"/>
+ <xsl:if test="$generate.manifest=1">
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename" select="$manifest"/>
+ <xsl:with-param name="content">
+ <xsl:value-of select="$manifest"/>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates select="//refentry" mode="manifest"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>No refentry elements!</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+<xsl:template match="refentry">
+ <xsl:variable name="section" select="refmeta/manvolnum"/>
+ <xsl:variable name="name" select="refnamediv/refname[1]"/>
+
+ <!-- standard man page width is 64 chars; 6 chars needed for the two
+ (x) volume numbers, and 2 spaces, leaves 56 -->
+ <xsl:variable name="twidth" select="(56 - string-length(refmeta/refentrytitle)) div 2"/>
+
+ <xsl:variable name="reftitle"
+ select="substring(refmeta/refentrytitle, 1, $twidth)"/>
+
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="refentryinfo/title">
+ <xsl:value-of select="refentryinfo/title"/>
+ </xsl:when>
+ <xsl:when test="../referenceinfo/title">
+ <xsl:value-of select="../referenceinfo/title"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="date">
+ <xsl:choose>
+ <xsl:when test="refentryinfo/date">
+ <xsl:value-of select="refentryinfo/date"/>
+ </xsl:when>
+ <xsl:when test="../referenceinfo/date">
+ <xsl:value-of select="../referenceinfo/date"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="productname">
+ <xsl:choose>
+ <xsl:when test="refentryinfo/productname">
+ <xsl:value-of select="refentryinfo/productname"/>
+ </xsl:when>
+ <xsl:when test="../referenceinfo/productname">
+ <xsl:value-of select="../referenceinfo/productname"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename">
+ <xsl:call-template name="build.refentry.filename"/>
+ </xsl:with-param>
+ <xsl:with-param name="content">
+ <xsl:text>.\"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 "</xsl:text>
+ <xsl:value-of select="translate($reftitle,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ <xsl:text>" </xsl:text>
+ <xsl:value-of select="refmeta/manvolnum[1]"/>
+ <xsl:text> "</xsl:text>
+ <xsl:value-of select="normalize-space($date)"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="normalize-space($productname)"/>
+ <xsl:text>" "</xsl:text>
+ <xsl:value-of select="$title"/>
+ <xsl:text>"
+</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- Author section -->
+ <xsl:choose>
+ <xsl:when test="refentryinfo//author">
+ <xsl:apply-templates select="refentryinfo" mode="authorsect"/>
+ </xsl:when>
+ <xsl:when test="/book/bookinfo//author">
+ <xsl:apply-templates select="/book/bookinfo" mode="authorsect"/>
+ </xsl:when>
+ <xsl:when test="/article/articleinfo//author">
+ <xsl:apply-templates select="/article/articleinfo" mode="authorsect"/>
+ </xsl:when>
+ </xsl:choose>
+
+ </xsl:with-param>
+ </xsl:call-template>
+ <!-- Now generate stub include pages for every page documented in
+ this refentry (except the page itself) -->
+ <xsl:for-each select="refnamediv/refname">
+ <xsl:if test=". != $name">
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename"
+ select="concat(normalize-space(.), '.', $section)"/>
+ <xsl:with-param name="content" select="concat('.so man',
+ $section, '/', $name, '.', $section, '&#10;')"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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">
+
+<!-- Already included in the main style sheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
+
+ <!--
+ boost.defaults:
+ *none - only use explicitly set parameters
+ Boost - use standard boost settings, can be overridden
+ -->
+ <xsl:param name = "boost.defaults" select = "'none'"/>
+
+ <!--
+ how to render the Home | Libraries | ... | More contents
+ *none - do not display ("standalone" mode)
+ horizontal - display in old-Boost style format (default for Boost)
+ vertical - like the new Getting Started layout
+ -->
+ <xsl:param name = "nav.layout">
+ <xsl:choose>
+ <xsl:when test = "$boost.defaults='Boost'">horizontal</xsl:when>
+ <xsl:otherwise>none</xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+ <!--
+ header border layout
+ Boost - place the old-Boost border around the header
+ Fullbleed - Simple CSS based full bleed header image
+ *none - do not place a border around the header
+ -->
+ <xsl:param name = "nav.border" select = "'none'" />
+
+ <!--
+ nav.flow:
+ none - do not display navigation at the header
+ DocBook - display the navigation after the header
+ *Spirit - display "mini" navigation on the right
+ -->
+ <xsl:param name = "nav.flow" select = "'Spirit'"/>
+
+ <!-- location of the various Boost elements -->
+
+ <xsl:param name = "boost.root" select = "'../..'"/>
+ <xsl:param name = "boost.website" select = "'http://www.boost.org'"/>
+ <!-- Logo image location, leave empty for no logo -->
+ <xsl:param name = "boost.image.src">
+ <xsl:if test = "$boost.defaults = 'Boost'">
+ <xsl:value-of select = "concat($boost.root, '/boost.png')"/>
+ </xsl:if>
+ </xsl:param>
+ <xsl:param name = "boost.image.alt">
+ <xsl:if test = "$boost.defaults = 'Boost'">
+ <xsl:value-of select = "'Boost C++ Libraries'"/>
+ </xsl:if>
+ </xsl:param>
+ <xsl:param name = "boost.image.w">
+ <xsl:if test = "$boost.defaults = 'Boost'">
+ <xsl:value-of select = "277"/>
+ </xsl:if>
+ </xsl:param>
+ <xsl:param name = "boost.image.h">
+ <xsl:if test = "$boost.defaults = 'Boost'">
+ <xsl:value-of select = "86"/>
+ </xsl:if>
+ </xsl:param>
+ <xsl:param name = "boost.libraries">
+ <xsl:if test = "$boost.defaults = 'Boost'">
+ <xsl:value-of select = "concat($boost.root, '/libs/libraries.htm')"/>
+ </xsl:if>
+ </xsl:param>
+
+ <!-- header -->
+
+ <xsl:template name = "header.navigation">
+ <xsl:param name = "prev" select = "/foo"/>
+ <xsl:param name = "next" select = "/foo"/>
+ <xsl:param name = "nav.context"/>
+
+ <xsl:variable name = "home" select = "/*[1]"/>
+ <xsl:variable name = "up" select = "parent::*"/>
+
+ <xsl:choose>
+ <xsl:when test = "$nav.border = 'Fullbleed'">
+ <xsl:if test = "boolean(normalize-space($boost.image.src))">
+ <div class="header-fullbleed">
+ <img alt="{$boost.image.alt}" width="{$boost.image.w}" height="{$boost.image.h}">
+ <xsl:attribute name="src">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$boost.image.src"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </img>
+ </div>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test = "boolean(normalize-space($boost.image.src)) or $nav.layout != 'none'">
+ <table cellpadding = "2" width = "100%"><tr>
+ <xsl:if test = "$nav.border = 'Boost'">
+ <xsl:attribute name = "class">boost-head</xsl:attribute>
+ </xsl:if>
+
+ <td valign = "top">
+ <xsl:if test = "$nav.border = 'Boost'">
+ <xsl:attribute name = "style">background-color: white; width: 50%;</xsl:attribute>
+ </xsl:if>
+ <xsl:if test = "boolean(normalize-space($boost.image.src))">
+ <img alt="{$boost.image.alt}" width="{$boost.image.w}" height="{$boost.image.h}">
+ <xsl:attribute name="src">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$boost.image.src"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </img>
+ </xsl:if>
+ </td><xsl:choose>
+ <xsl:when test = "$nav.layout = 'horizontal'">
+ <xsl:call-template name = "header.navdata-horiz"/>
+ </xsl:when><xsl:when test = "$nav.layout = 'vertical'">
+ <xsl:call-template name = "header.navdata-vert"/>
+ </xsl:when>
+ </xsl:choose>
+ </tr></table>
+ <hr/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test = "$nav.flow = 'DocBook'">
+ <table width = "100%" class = "navheader">
+ <xsl:call-template name = "navbar.docbook-homeinfo">
+ <xsl:with-param name = "prev" select = "$prev"/>
+ <xsl:with-param name = "next" select = "$next"/>
+ <xsl:with-param name = "nav.context" select = "$nav.context"/>
+ </xsl:call-template>
+ <xsl:call-template name = "navbar.docbook-prevnext">
+ <xsl:with-param name = "prev" select = "$prev"/>
+ <xsl:with-param name = "next" select = "$next"/>
+ <xsl:with-param name = "nav.context" select = "$nav.context"/>
+ </xsl:call-template>
+ </table>
+ </xsl:when><xsl:when test = "$nav.flow = 'Spirit'">
+ <xsl:call-template name = "navbar.spirit">
+ <xsl:with-param name = "prev" select = "$prev"/>
+ <xsl:with-param name = "next" select = "$next"/>
+ <xsl:with-param name = "nav.context" select = "$nav.context"/>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name = "header.navdata-horiz">
+ <xsl:variable name="home_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.root, '/index.html' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="libraries_link">
+ <xsl:if test = "boolean($boost.libraries)">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$boost.libraries"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="people_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.website, '/users/people.html' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="faq_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.website, '/users/faq.html' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="more_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.root, '/more/index.htm' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test = "$nav.border = 'Boost'">
+ <td align = "center" class = "boost-headtd"><a href = "{$home_link}" class = "boost-headelem">Home</a></td>
+ <xsl:if test = "boolean($libraries_link)">
+ <td align = "center" class = "boost-headtd"><a href = "{$libraries_link}" class = "boost-headelem">Libraries</a></td>
+ </xsl:if>
+ <td align = "center" class = "boost-headtd"><a href = "{$people_link}" class = "boost-headelem">People</a></td>
+ <td align = "center" class = "boost-headtd"><a href = "{$faq_link}" class = "boost-headelem">FAQ</a></td>
+ <td align = "center" class = "boost-headtd"><a href = "{$more_link}" class = "boost-headelem">More</a></td>
+ </xsl:when><xsl:otherwise>
+ <td align = "center"><a href = "{$home_link}">Home</a></td>
+ <td align = "center"><a href = "{$libraries_link}">Libraries</a></td>
+ <td align = "center"><a href = "{$people_link}">People</a></td>
+ <td align = "center"><a href = "{$faq_link}">FAQ</a></td>
+ <td align = "center"><a href = "{$more_link}">More</a></td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name = "header.navdata-vert">
+ <xsl:variable name="home_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.root, '/index.html' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="libraries_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$boost.libraries"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="people_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.website, '/users/people.html' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="faq_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.website, '/users/faq.html' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="more_link">
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="concat( $boost.root, '/more/index.htm' )"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <td><div>
+ <xsl:if test = "$nav.border != 'Boost'">
+ <xsl:attribute name = "class">boost-toc</xsl:attribute>
+ </xsl:if>
+ <div><a href = "{$home_link}">Home</a></div>
+ <div><a href = "{$libraries_link}">Libraries</a></div>
+ <div><a href = "{$people_link}">People</a></div>
+ <div><a href = "{$faq_link}">FAQ</a></div>
+ <div><a href = "{$more_link}">More</a></div>
+ </div></td>
+ </xsl:template>
+
+
+ <!-- footer -->
+
+ <xsl:template name = "footer.navigation">
+ <xsl:param name = "prev" select = "/foo"/>
+ <xsl:param name = "next" select = "/foo"/>
+ <xsl:param name = "nav.context"/>
+
+ <hr/>
+ <xsl:choose>
+ <xsl:when test = "$nav.flow = 'DocBook'">
+ <table width = "100%" class = "navheader">
+ <xsl:call-template name = "navbar.docbook-prevnext">
+ <xsl:with-param name = "prev" select = "$prev"/>
+ <xsl:with-param name = "next" select = "$next"/>
+ <xsl:with-param name = "nav.context" select = "$nav.context"/>
+ </xsl:call-template>
+ <xsl:call-template name = "navbar.docbook-homeinfo">
+ <xsl:with-param name = "prev" select = "$prev"/>
+ <xsl:with-param name = "next" select = "$next"/>
+ <xsl:with-param name = "nav.context" select = "$nav.context"/>
+ </xsl:call-template>
+ </table>
+ </xsl:when><xsl:when test = "$nav.flow = 'Spirit'">
+ <xsl:call-template name = "navbar.spirit">
+ <xsl:with-param name = "prev" select = "$prev"/>
+ <xsl:with-param name = "next" select = "$next"/>
+ <xsl:with-param name = "nav.context" select = "$nav.context"/>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- navbar -->
+
+ <xsl:template name = "navbar.docbook-homeinfo">
+ <xsl:param name = "prev" select = "/foo"/>
+ <xsl:param name = "next" select = "/foo"/>
+ <xsl:param name = "nav.context"/>
+
+ <xsl:variable name = "home" select = "/*[1]"/>
+ <tr>
+ <td align = "left" width = "40%">
+ <xsl:if test = "$navig.showtitles != 0"> <!-- prev:name -->
+ <xsl:apply-templates select = "$prev" mode = "object.title.markup"/>
+ </xsl:if>
+ </td><td align = "center" width = "20%">
+ <!-- home -->
+ <xsl:if test = "$home != . or $nav.context = 'toc'">
+ <a accesskey = "h">
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$home"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'home'"/>
+ </xsl:call-template>
+ </a>
+ <xsl:if test = "$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <xsl:text>|</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test = "$chunk.tocs.and.lots != 0 and $nav.context != 'toc'"><a accesskey = "t">
+ <xsl:attribute name = "href">
+ <xsl:apply-templates select = "/*[1]" mode = "recursive-chunk-filename"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select = "$html.ext"/>
+ </xsl:attribute>
+ <xsl:call-template name = "gentext">
+ <xsl:with-param name = "key" select = "'nav-toc'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ </td><td align = "right" width = "40%">
+ <xsl:if test = "$navig.showtitles != 0"> <!-- next:name -->
+ <xsl:apply-templates select = "$next" mode = "object.title.markup"/>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template name = "navbar.docbook-prevnext">
+ <xsl:param name = "prev" select = "/foo"/>
+ <xsl:param name = "next" select = "/foo"/>
+ <xsl:param name = "nav.context"/>
+
+ <xsl:variable name = "up" select = "parent::*"/>
+ <tr>
+ <td align = "left" width = "40%">
+ <xsl:if test = "count($prev)>0"><a accesskey = "p"> <!-- prev -->
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$prev"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'prev'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ </td><td align = "center" width = "20%">
+ <xsl:if test = "count($up)>0"><a accesskey = "u"> <!-- up -->
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$up"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'up'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ </td><td align = "right" width = "40%">
+ <xsl:if test = "count($next)>0"><a accesskey = "n"> <!-- next -->
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$next"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'next'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template name = "navbar.spirit">
+ <xsl:param name = "prev" select = "/foo"/>
+ <xsl:param name = "next" select = "/foo"/>
+ <xsl:param name = "nav.context"/>
+
+ <xsl:variable name = "home" select = "/*[1]"/>
+ <xsl:variable name = "up" select = "parent::*"/>
+
+ <div class = "spirit-nav">
+ <!-- prev -->
+ <xsl:if test = "count($prev)>0"><a accesskey = "p">
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$prev"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'prev'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ <!-- up -->
+ <xsl:if test = "count($up)>0"><a accesskey = "u">
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$up"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'up'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ <!-- home -->
+ <xsl:if test = "generate-id($home) != generate-id(.) or $nav.context = 'toc'">
+ <a accesskey = "h">
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$home"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'home'"/>
+ </xsl:call-template>
+ </a>
+ <xsl:if test = "$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <xsl:text>|</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test = "$chunk.tocs.and.lots != 0 and $nav.context != 'toc'"><a accesskey = "t">
+ <xsl:attribute name = "href">
+ <xsl:apply-templates select = "/*[1]" mode = "recursive-chunk-filename"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select = "$html.ext"/>
+ </xsl:attribute>
+ <xsl:call-template name = "gentext">
+ <xsl:with-param name = "key" select = "'nav-toc'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ <!-- next -->
+ <xsl:if test = "count($next)>0"><a accesskey = "n">
+ <xsl:attribute name = "href"><xsl:call-template name = "href.target">
+ <xsl:with-param name = "object" select = "$next"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name = "navig.content">
+ <xsl:with-param name = "direction" select = "'next'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?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:include href="annotation.xsl"/>
+ <xsl:include href="template.xsl"/>
+ <xsl:include href="function.xsl"/>
+ <xsl:include href="type.xsl"/>
+ <xsl:include href="source-highlight.xsl"/>
+ <xsl:include href="utility.xsl"/>
+ <xsl:include href="lookup.xsl"/>
+ <xsl:include href="library.xsl"/>
+ <xsl:include href="index.xsl"/>
+ <xsl:include href="error.xsl"/>
+ <xsl:include href="macro.xsl"/>
+ <xsl:include href="testing/testsuite.xsl"/>
+ <xsl:include href="caramel/concept2docbook.xsl"/>
+
+ <xsl:template name="namespace-synopsis">
+ <xsl:param name="indentation" select="0"/>
+ <!-- Open namespace-->
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="concat('namespace ',@name, ' {')"/>
+ </xsl:call-template>
+
+ <!-- Emit namespace types -->
+ <xsl:apply-templates select="class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization|
+ typedef|enum|data-member" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+
+ <!-- Emit namespace functions -->
+ <xsl:apply-templates
+ select="free-function-group|function|overloaded-function"
+ mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+
+ <!-- Emit namespaces -->
+ <xsl:apply-templates select="namespace" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+
+ <!-- Close namespace -->
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'}'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Emit namespace synopsis -->
+ <xsl:template match="namespace" mode="synopsis">
+ <xsl:param name="indentation" select="0"/>
+
+ <xsl:choose>
+ <xsl:when test="count(ancestor::namespace)=0">
+ <xsl:call-template name="namespace-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="namespace-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Emit namespace reference -->
+ <xsl:template match="namespace" mode="reference">
+ <xsl:apply-templates select="namespace|free-function-group"
+ mode="reference">
+ <xsl:with-param name="indentation" select="0"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization|enum|function|
+ overloaded-function|data-member|typedef"
+ mode="namespace-reference"/>
+ </xsl:template>
+
+ <!-- Eat extra documentation when in the synopsis or reference sections -->
+ <xsl:template match="para|section" mode="synopsis"/>
+ <xsl:template match="para|section" mode="reference"/>
+
+ <xsl:template name="find-wrap-point">
+ <xsl:param name="text"/>
+ <xsl:param name="prefix"/>
+ <xsl:param name="result" select="0"/>
+ <xsl:param name="default" select="$max-columns - string-length($prefix)"/>
+ <xsl:variable name="s" select="substring($text, 2)"/>
+ <xsl:variable name="candidate">
+ <xsl:choose>
+ <xsl:when test="contains($s, ' ')">
+ <xsl:value-of select="string-length(substring-before($s, ' ')) + 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string-length($text)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($prefix) + $result + $candidate &lt;= $max-columns">
+ <xsl:call-template name="find-wrap-point">
+ <xsl:with-param name="text" select="substring($text, $candidate + 1)"/>
+ <xsl:with-param name="prefix" select="$prefix"/>
+ <xsl:with-param name="result" select="$result + $candidate"/>
+ <xsl:with-param name="default" select="$result + $candidate"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$default"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="wrap-comment">
+ <xsl:param name="prefix"/>
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="string-length($prefix) + string-length($text) &lt;= $max-columns">
+ <xsl:value-of select="$text"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="size">
+ <xsl:call-template name="find-wrap-point">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="substring($text, 1, $size)"/>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:value-of select="$prefix"/>
+ <xsl:call-template name="wrap-comment">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ <xsl:with-param name="text" select="normalize-space(substring($text, $size + 1))"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Comment mode tries to wipe out any extra spacing in the output -->
+ <xsl:template match="purpose" mode="comment">
+ <xsl:param name="wrap" select="false()"/>
+ <xsl:param name="prefix"/>
+ <xsl:apply-templates mode="comment">
+ <xsl:with-param name="wrap"
+ select="$wrap and count(text()|*) = 1"/>
+ <xsl:with-param name="prefix" select="$prefix"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="simpara|para" mode="comment">
+ <xsl:param name="wrap" select="false()"/>
+ <xsl:param name="prefix"/>
+ <xsl:apply-templates select="text()|*" mode="comment">
+ <xsl:with-param name="wrap"
+ select="$wrap and count(text()|*) = 1"/>
+ <xsl:with-param name="prefix" select="$prefix"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="comment">
+ <xsl:param name="wrap" select="false()"/>
+ <xsl:param name="prefix"/>
+ <xsl:variable name="stripped" select="normalize-space(.)"/>
+ <xsl:choose>
+ <xsl:when test="$wrap">
+ <xsl:call-template name="wrap-comment">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ <xsl:with-param name="text" select="$stripped"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="*" mode="comment">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?xml version="1.0"?>
+<!--
+ 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:import href="http://docbook.sourceforge.net/release/xsl/current/lib/lib.xsl"/>
+
+<!-- ==================================================================== -->
+
+<!-- Check if path is absolute
+
+ Not attempting to fully parse or validate absolute vs. relative URI.
+ Assumes an absolute url when $target matches the regex '^[a-zA-Z.+-]*:'
+
+ According to RFC1808, however, the colon (':') may also appear in a relative
+ URL. To workaround this limitation for relative links containing colons one
+ may use the alternatives below, instead.
+
+ For the relative URI this:that use ./this:that or this%3Athat, instead.
+-->
+<xsl:template name="is.absolute.uri">
+ <xsl:param name="uri"/>
+
+ <xsl:variable name="scheme1" select="substring-before($uri, ':')"/>
+ <xsl:variable name="scheme2" select="translate($scheme1, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.', '')"/>
+
+ <xsl:choose>
+ <xsl:when test="$scheme1 and not($scheme2)">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="href.target.relative">
+ <xsl:param name="target"/>
+ <xsl:param name="context" select="."/>
+
+ <xsl:variable name="isabsoluteuri">
+ <xsl:call-template name="is.absolute.uri">
+ <xsl:with-param name="uri" select="$target"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$isabsoluteuri='1'">
+ <xsl:value-of select="$target"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="href.to.uri" select="$target"/>
+ <xsl:variable name="href.from.uri">
+ <xsl:call-template name="href.target.uri">
+ <xsl:with-param name="object" select="$context"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href.to">
+ <xsl:call-template name="trim.common.uri.paths">
+ <xsl:with-param name="uriA" select="$href.to.uri"/>
+ <xsl:with-param name="uriB" select="$href.from.uri"/>
+ <xsl:with-param name="return" select="'A'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href.from">
+ <xsl:call-template name="trim.common.uri.paths">
+ <xsl:with-param name="uriA" select="$href.to.uri"/>
+ <xsl:with-param name="uriB" select="$href.from.uri"/>
+ <xsl:with-param name="return" select="'B'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:call-template name="count.uri.path.depth">
+ <xsl:with-param name="filename" select="$href.from"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href">
+ <xsl:call-template name="copy-string">
+ <xsl:with-param name="string" select="'../'"/>
+ <xsl:with-param name="count" select="$depth"/>
+ </xsl:call-template>
+ <xsl:value-of select="$href.to"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$href"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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:param name="boost.syntax.highlight">1</xsl:param>
+
+ <xsl:template name="source-highlight">
+ <xsl:param name="text" select="."/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:variable name="id-start-chars" select="'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'"/>
+ <xsl:variable name="id-chars" select="'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_'"/>
+ <xsl:variable name="digits" select="'1234567890'"/>
+ <xsl:variable name="number-chars" select="'1234567890abcdefABCDEFxX.'"/>
+ <xsl:variable name="keywords"
+ select="' alignas ailgnof asm auto bool break case catch char char16_t char32_t class 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 nullptr operator private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this thread_local throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while '"/>
+ <xsl:variable name="operators4" select="'%:%:'"/>
+ <xsl:variable name="operators3" select="'&gt;&gt;= &lt;&lt;= -&gt;* ...'"/>
+ <xsl:variable name="operators2" select="'.* :: ## &lt;: :&gt; &lt;% %&gt; %: += -= *= /= %= ^= &amp;= |= &lt;&lt; &gt;&gt; == != &lt;= &gt;= &amp;&amp; || ++ -- -&gt;'"/>
+ <xsl:variable name="operators1" select="'. ? { } [ ] # ( ) ; : + - * / % ^ &amp; | ~ ! = &lt; &gt; ,'"/>
+ <xsl:variable name="single-quote">'</xsl:variable>
+
+ <!-- Syntax highlighting -->
+ <xsl:template name="highlight-keyword">
+ <xsl:param name="keyword"/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="keyword">
+ <xsl:value-of select="$keyword"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$keyword"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-identifier">
+ <xsl:param name="identifier"/>
+ <xsl:choose>
+ <xsl:when test="contains($keywords, concat(' ', $identifier, ' '))">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="$identifier"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="identifier">
+ <xsl:value-of select="$identifier"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$identifier"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-comment">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="comment">
+ <xsl:copy-of select="$text"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-special">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="special">
+ <xsl:value-of select="$text"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-number">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="number">
+ <xsl:value-of select="$text"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-string">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="string">
+ <xsl:value-of select="$text"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-char">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="char">
+ <xsl:value-of select="$text"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-pp-directive">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="$boost.syntax.highlight='1'">
+ <phrase role="preprocessor">
+ <xsl:value-of select="$text"/>
+ </phrase>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-text-ident-length">
+ <xsl:param name="text"/>
+ <xsl:param name="pos" select="1"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) + 1 = $pos">
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:when>
+ <xsl:when test="contains($id-chars, substring($text, $pos, 1))">
+ <xsl:call-template name ="highlight-text-ident-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="pos" select="$pos + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-text-number-length">
+ <xsl:param name="text"/>
+ <xsl:param name="pos" select="1"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) + 1 = $pos">
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:when>
+ <xsl:when test="contains($number-chars, substring($text, $pos, 1))">
+ <xsl:call-template name ="highlight-text-ident-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="pos" select="$pos + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-text-string-length">
+ <xsl:param name="text"/>
+ <xsl:param name="terminator"/>
+ <xsl:param name="pos" select="2"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) + 1 = $pos">
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:when>
+ <xsl:when test="substring($text, $pos, 1) = $terminator">
+ <xsl:value-of select="$pos"/>
+ </xsl:when>
+ <xsl:when test="substring($text, $pos, 1) = '\' and
+ string-length($text) != $pos">
+ <xsl:call-template name="highlight-text-string-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="terminator" select="$terminator"/>
+ <xsl:with-param name="pos" select="$pos + 2"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-text-string-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="terminator" select="$terminator"/>
+ <xsl:with-param name="pos" select="$pos + 1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-text-operator-length">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) &gt;= 4 and
+ not(contains(substring($text, 1, 4), ' ')) and
+ contains($operators4, substring($text, 1, 4))">
+ <xsl:value-of select="4"/>
+ </xsl:when>
+ <xsl:when test="string-length($text) &gt;= 3 and
+ not(contains(substring($text, 1, 3), ' ')) and
+ contains($operators3, substring($text, 1, 3))">
+ <xsl:value-of select="3"/>
+ </xsl:when>
+ <xsl:when test="string-length($text) &gt;= 2 and
+ not(contains(substring($text, 1, 2), ' ')) and
+ contains($operators2, substring($text, 1, 2))">
+ <xsl:value-of select="2"/>
+ </xsl:when>
+ <xsl:when test="string-length($text) &gt;= 1 and
+ not(contains(substring($text, 1, 1), ' ')) and
+ contains($operators1, substring($text, 1, 1))">
+ <xsl:value-of select="1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="0"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-text-pp-directive-length">
+ <xsl:param name="text"/>
+ <!-- Assume that the first character is a # -->
+ <xsl:param name="pos" select="2"/>
+ <xsl:choose>
+ <xsl:when test="contains($id-chars, substring($text, $pos, 1))">
+ <xsl:call-template name="highlight-text-ident-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="pos" select="$pos + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains(' &#x9;', substring($text, $pos, 1))">
+ <xsl:call-template name="highlight-text-pp-directive-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="pos" select="$pos + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-text-impl-leading-whitespace">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) = 0"/>
+ <xsl:when test="contains(' &#xA;&#xD;&#x9;', substring($text, 1, 1))">
+ <xsl:value-of select="substring($text, 1, 1)"/>
+ <xsl:call-template name="highlight-text-impl-leading-whitespace">
+ <xsl:with-param name="text" select="substring($text, 2)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="'#' = substring($text, 1, 1)">
+ <xsl:variable name="pp-length">
+ <xsl:call-template name="highlight-text-pp-directive-length">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="highlight-pp-directive">
+ <xsl:with-param name="text" select="substring($text, 1, $pp-length)"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, $pp-length + 1)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-text-impl-root">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) = 0"/>
+ <xsl:when test="contains($id-start-chars, substring($text, 1, 1))">
+ <xsl:variable name="ident-length">
+ <xsl:call-template name="highlight-text-ident-length">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="highlight-identifier">
+ <xsl:with-param name="identifier" select="substring($text, 1, $ident-length)"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, $ident-length + 1)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains($digits, substring($text, 1, 1))">
+ <xsl:variable name="number-length">
+ <xsl:call-template name="highlight-text-number-length">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="highlight-number">
+ <xsl:with-param name="text" select="substring($text, 1, $number-length)"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, $number-length + 1)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="substring($text, 1, 1) = '&#x22;'">
+ <xsl:variable name="string-length">
+ <xsl:call-template name="highlight-text-string-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="terminator" select="'&#x22;'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="highlight-string">
+ <xsl:with-param name="text" select="substring($text, 1, $string-length)"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, $string-length + 1)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="substring($text, 1, 1) = $single-quote">
+ <xsl:variable name="char-length">
+ <xsl:call-template name="highlight-text-string-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="terminator" select="$single-quote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="highlight-char">
+ <xsl:with-param name="text" select="substring($text, 1, $char-length)"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, $char-length + 1)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="substring($text, 1, 2) = '//'">
+ <xsl:choose>
+ <xsl:when test="contains($text, '&#xA;')">
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="substring-before($text, '&#xA;')"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="concat('&#xA;', substring-after($text, '&#xA;'))"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="substring($text, 1, 2) = '/*'">
+ <xsl:variable name="after-start" select="substring($text, 3)" />
+ <xsl:choose>
+ <xsl:when test="contains($after-start, '*/')">
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="concat('/*', substring-before($after-start, '*/'), '*/')"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring-after($after-start, '*/')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="contains('&#xA;&#xD;', substring($text, 1, 1))">
+ <xsl:value-of select="substring($text, 1, 1)"/>
+ <xsl:call-template name="highlight-text-impl-leading-whitespace">
+ <xsl:with-param name="text" select="substring($text, 2)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains(' &#x9;', substring($text, 1, 1))">
+ <xsl:value-of select="substring($text, 1, 1)"/>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, 2)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="operator-length">
+ <xsl:call-template name="highlight-text-operator-length">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$operator-length = 0">
+ <xsl:value-of select="substring($text, 1, 1)"/>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, 2)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="substring($text, 1, $operator-length)"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text-impl-root">
+ <xsl:with-param name="text" select="substring($text, $operator-length + 1)"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Jam syntax highlighting -->
+
+ <xsl:variable name="jam-keywords" select="' actions bind case class default else for if ignore in include local module on piecemeal quietly return rule switch together updated while '"/>
+ <xsl:variable name="jam-operators" select="' ! != &amp; &amp;&amp; ( ) += : ; &lt; &lt;= = &gt; &gt;= ?= [ ] { | || } '"/>
+
+ <xsl:template name="highlight-jam-word">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="contains($jam-keywords, concat(' ', $text, ' '))">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="$text"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains($jam-operators, concat(' ', $text, ' '))">
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="jam-word-length">
+ <xsl:param name="text"/>
+ <xsl:param name="pos" select="1"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) + 1= $pos">
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:when>
+ <xsl:when test="contains(' &#xA;&#xD;&#x9;', substring($text, $pos, 1))">
+ <xsl:value-of select="$pos - 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="jam-word-length">
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="pos" select="$pos + 1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="highlight-jam-text">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="string-length($text) = 0"/>
+ <xsl:when test="contains(' &#xA;&#xD;&#x9;', substring($text, 1, 1))">
+ <xsl:value-of select="substring($text, 1, 1)"/>
+ <xsl:call-template name="highlight-jam-text">
+ <xsl:with-param name="text" select="substring($text, 2)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="substring($text, 1, 1) = '#'">
+ <xsl:choose>
+ <xsl:when test="contains($text, '&#xA;')">
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="substring-before($text, '&#xA;')"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-jam-text">
+ <xsl:with-param name="text" select="concat('&#xA;', substring-after($text, '&#xA;'))"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="length">
+ <xsl:call-template name="jam-word-length">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="highlight-jam-word">
+ <xsl:with-param name="text" select="substring($text, 1, $length)"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-jam-text">
+ <xsl:with-param name="text" select="substring($text, $length + 1)"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Perform C++ syntax highlighting on the given text -->
+ <xsl:template name="highlight-text">
+ <xsl:param name="text" select="."/>
+ <xsl:call-template name="highlight-text-impl-leading-whitespace">
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="*" mode="highlight">
+ <xsl:element name="{name(.)}">
+ <xsl:for-each select="./@*">
+ <xsl:choose>
+ <xsl:when test="local-name(.)='last-revision'">
+ <xsl:attribute
+ name="rev:last-revision"
+ namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
+>
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates mode="highlight"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="highlight">
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="classname|methodname|functionname|libraryname|enumname|
+ conceptname|macroname|globalname" mode="highlight">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="type" mode="highlight">
+ <xsl:apply-templates mode="highlight"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="highlight-jam">
+ <xsl:apply-templates select="." mode="annotation"/>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="highlight-jam">
+ <xsl:call-template name="highlight-jam-text">
+ <xsl:with-param name="text" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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:param name="template.param.brief" select="false()"/>
+
+ <!-- Determine the length of a template header synopsis -->
+ <xsl:template name="template.synopsis.length">
+ <xsl:variable name="text">
+ <xsl:apply-templates select="template" mode="synopsis">
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="wrap" select="false()"/>
+ <xsl:with-param name="highlight" select="false()"/>
+ </xsl:apply-templates>
+ </xsl:variable>
+ <xsl:value-of select="string-length($text)"/>
+ </xsl:template>
+
+ <!-- Determine the length of a template header reference -->
+ <xsl:template name="template.reference.length">
+ <xsl:choose>
+ <xsl:when test="not(template)">
+ 0
+ </xsl:when>
+ <xsl:when test="template/*/purpose">
+ <!-- TBD: The resulting value need only be greater than the number of
+ columns. We chose to add 17 because it's funny for C++
+ programmers. :) -->
+ <xsl:value-of select="$max-columns + 17"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="template.synopsis.length"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Output a template header in synopsis mode -->
+ <xsl:template match="template" mode="synopsis">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="wrap" select="true()"/>
+ <xsl:param name="highlight" select="true()"/>
+
+ <xsl:call-template name="template.synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="wrap" select="$wrap"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Output a template header in reference mode -->
+ <xsl:template match="template" mode="reference">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="highlight" select="true()"/>
+ <xsl:call-template name="template.reference">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Emit a template header synopsis -->
+ <xsl:template name="template.synopsis">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="wrap" select="true()"/>
+ <xsl:param name="highlight" select="true()"/>
+
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="'template'"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="'&lt;'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>template</xsl:text>
+ <xsl:text>&lt;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="template.synopsis.parameters">
+ <xsl:with-param name="indentation" select="$indentation + 9"/>
+ <xsl:with-param name="wrap" select="$wrap"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="'&gt;'"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&gt; </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Display a list of template parameters for a synopsis (no comments) -->
+ <xsl:template name="template.synopsis.parameters">
+ <xsl:param name="indentation"/>
+ <xsl:param name="wrap" select="true()"/>
+ <xsl:param name="highlight" select="true()"/>
+
+ <xsl:param name="column" select="$indentation"/>
+ <xsl:param name="prefix" select="''"/>
+ <xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/>
+ <xsl:param name="first-on-line" select="true()"/>
+
+ <xsl:if test="$parameters">
+ <!-- Emit the prefix (either a comma-space, or empty if this is
+ the first parameter) -->
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="$prefix"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$prefix"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Get the actual parameter and its attributes -->
+ <xsl:variable name="parameter" select="$parameters[position()=1]"/>
+ <xsl:variable name="rest" select="$parameters[position()!=1]"/>
+
+ <!-- Compute the actual text of this parameter -->
+ <xsl:variable name="text">
+ <xsl:call-template name="template.parameter">
+ <xsl:with-param name="parameter" select="$parameter"/>
+ <xsl:with-param name="is-last" select="not(rest)"/>
+ <xsl:with-param name="highlight" select="false()"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- Where will this template parameter finish? -->
+ <xsl:variable name="end-column"
+ select="$column + string-length($prefix) + string-length($text)"/>
+
+ <!-- Should the text go on this line or on the next? -->
+ <xsl:choose>
+ <xsl:when test="$first-on-line or ($end-column &lt; $max-columns) or
+ not($wrap)">
+ <!-- Print on this line -->
+ <xsl:call-template name="template.parameter">
+ <xsl:with-param name="parameter" select="$parameter"/>
+ <xsl:with-param name="is-last" select="not($rest)"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+
+ <!-- Recurse -->
+ <xsl:call-template name="template.synopsis.parameters">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="wrap" select="$wrap"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ <xsl:with-param name="column" select="$end-column"/>
+ <xsl:with-param name="prefix" select="', '"/>
+ <xsl:with-param name="parameters" select="$rest"/>
+ <xsl:with-param name="first-on-line" select="false()"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Print on next line -->
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="template.parameter">
+ <xsl:with-param name="parameter" select="$parameter"/>
+ <xsl:with-param name="is-last" select="not($rest)"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="template.synopsis.parameters">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="wrap" select="$wrap"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ <xsl:with-param name="column"
+ select="$indentation + string-length($text)"/>
+ <xsl:with-param name="prefix" select="', '"/>
+ <xsl:with-param name="parameters" select="$rest"/>
+ <xsl:with-param name="first-on-line" select="false()"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Emit a template header reference -->
+ <xsl:template name="template.reference">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="highlight" select="true()"/>
+
+ <xsl:if test="template-type-parameter|template-varargs|template-nontype-parameter">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="'template'"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="'&lt;'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>template</xsl:text>
+ <xsl:text>&lt;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="template.reference.parameters">
+ <xsl:with-param name="indentation" select="$indentation + 9"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="'&gt;'"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&gt; </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Display a set of template parameters for a reference -->
+ <xsl:template name="template.reference.parameters">
+ <xsl:param name="indentation"/>
+ <xsl:param name="highlight" select="true()"/>
+ <xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/>
+
+ <xsl:choose>
+ <xsl:when test="$parameters/purpose and $template.param.brief">
+ <xsl:call-template name="template.reference.parameters.comments">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="template.synopsis.parameters">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="wrap" select="true()"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Output template parameters when there are comments with the parameters.
+ For clarity, we output each template parameter on a separate line. -->
+ <xsl:template name="template.reference.parameters.comments">
+ <xsl:param name="indentation"/>
+ <xsl:param name="highlight" select="true()"/>
+ <xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/>
+
+ <xsl:if test="$parameters">
+ <!-- Get the actual parameter and its attributes -->
+ <xsl:variable name="parameter" select="$parameters[position()=1]"/>
+ <xsl:variable name="rest" select="$parameters[position()!=1]"/>
+
+ <!-- Display the parameter -->
+ <xsl:call-template name="template.parameter">
+ <xsl:with-param name="parameter" select="$parameter"/>
+ <xsl:with-param name="is-last" select="not($rest)"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+
+ <xsl:if test="$rest">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="', '"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <!-- Display the comment -->
+ <xsl:if test="$parameter/purpose">
+ <xsl:variable name="param-text">
+ <!-- Display the parameter -->
+ <xsl:call-template name="template.parameter">
+ <xsl:with-param name="parameter" select="$parameter"/>
+ <xsl:with-param name="is-last" select="not($rest)"/>
+ <xsl:with-param name="highlight" select="false()"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text> // </xsl:text>
+ <xsl:apply-templates
+ select="$parameter/purpose/*|$parameter/purpose/text()" mode="comment">
+ <xsl:with-param name="wrap" select="true()"/>
+ <xsl:with-param name="prefix">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + string-length($param-text)"/>
+ </xsl:call-template>
+ <xsl:if test="$rest">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text> // </xsl:text>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <!-- Indent the next line -->
+ <xsl:if test="$parameter/purpose or $rest">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <!-- Recurse to print the rest of the parameters -->
+ <xsl:call-template name="template.reference.parameters.comments">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ <xsl:with-param name="parameters" select="$rest"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Print a template parameter -->
+ <xsl:template name="template.parameter">
+ <xsl:param name="parameter"/>
+ <xsl:param name="is-last"/>
+ <xsl:param name="highlight" select="true()"/>
+ <xsl:apply-templates select="$parameter"
+ mode="print.parameter">
+ <xsl:with-param name="parameter" select="$parameter"/>
+ <xsl:with-param name="is-last" select="$is-last"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template name="template.parameter.name">
+ <xsl:param name="name" select="@name"/>
+ <xsl:param name="highlight" select="true()"/>
+
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name"
+ select="translate($name, '0123456789', '')"/>
+ <xsl:with-param name="text" select="$name"/>
+ <xsl:with-param name="warn" select="false"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="template-type-parameter" mode="print.parameter">
+ <xsl:param name="parameter"/>
+ <xsl:param name="is-last"/>
+ <xsl:param name="highlight"/>
+
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="'typename'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>typename</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="$parameter/@pack=1">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'...'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>...</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+
+ <xsl:call-template name="template.parameter.name">
+ <xsl:with-param name="name" select="$parameter/@name"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+
+ <xsl:variable name="def">
+ <xsl:choose>
+ <xsl:when test="$parameter/@default">
+ <xsl:message>
+ <xsl:text>Warning: 'default' attribute of template parameter element is deprecated. Use 'default' element.</xsl:text>
+ <xsl:call-template name="print.warning.context"/>
+ </xsl:message>
+ <xsl:choose>
+ <xsl:when test="$highlight and false()">
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text">
+ <xsl:value-of select="$parameter/@default"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$parameter/@default"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$parameter/default">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:apply-templates
+ select="$parameter/default/*|$parameter/default/text()"
+ mode="highlight"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string($parameter/default)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:if test="not($def='')">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' = '"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> = </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:copy-of select="$def"/>
+
+ <!-- If this is the last parameter, add an extra space to
+ avoid printing >> -->
+ <xsl:if
+ test="$is-last and (substring($def, string-length($def))='&gt;')">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="template-nontype-parameter" mode="print.parameter">
+ <xsl:param name="parameter"/>
+ <xsl:param name="is-last"/>
+ <xsl:param name="highlight"/>
+
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text">
+ <xsl:apply-templates
+ select="$parameter/type/*|$parameter/type/text()"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$parameter/type/*|$parameter/type/text()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="$parameter/@pack=1">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'...'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>...</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+
+ <xsl:call-template name="template.parameter.name">
+ <xsl:with-param name="name" select="$parameter/@name"/>
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:call-template>
+
+ <xsl:variable name="def">
+ <xsl:value-of select="string($parameter/default)"/>
+ </xsl:variable>
+
+ <xsl:if test="not($def='')">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' = '"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> = </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:apply-templates select="$parameter/default/*|$parameter/default/text()" mode="highlight"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$def"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- If this is the last parameter, add an extra space to
+ avoid printing >> -->
+ <xsl:if
+ test="$is-last and (substring($def, string-length($def))='&gt;')">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="template-varargs" mode="print.parameter">
+ <xsl:param name="highlight" select="true()"/>
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'...'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>...</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="specialization">
+ <xsl:param name="highlight" select="true()"/>
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'&lt;'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&lt;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="template-arg">
+ <xsl:with-param name="highlight" select="$highlight"/>
+ </xsl:apply-templates>
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'&gt;'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="template-arg">
+ <xsl:param name="highlight" select="true()"/>
+ <xsl:if test="position() &gt; 1">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="', '"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:apply-templates mode="highlight"/>
+ <xsl:if test="@pack=1">
+ <xsl:choose>
+ <xsl:when test="$highlight">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'...'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>...</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+</xsl:stylesheet>
+
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 @@
+<?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:include href="http://docbook.sourceforge.net/release/xsl/current/html/chunker.xsl"/>
+ <xsl:include href="http://docbook.sourceforge.net/release/xsl/current/common/common.xsl"/>
+
+ <!-- The root of the Boost directory -->
+ <xsl:param name="boost.root"/>
+
+ <!-- The number of columns in a source file line -->
+ <xsl:param name="boost.source.columns" select="78"/>
+
+ <xsl:output method="text"/>
+ <xsl:template match="/">
+ <xsl:if test="$boost.root">
+ <!-- Output testsuite Jamfiles -->
+ <xsl:apply-templates select="//testsuite" mode="Jamfile"/>
+
+ <!-- Output any source files that are written in XML -->
+ <xsl:apply-templates select="//source" mode="testsuite.generate"/>
+ </xsl:if>
+
+ <xsl:if test="not($boost.root)">
+ <xsl:message>
+ Please set the XSL stylesheet parameter "boost.root" to the top-level
+ Boost directory (i.e., BOOST_ROOT)
+ </xsl:message>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="testsuite" mode="Jamfile">
+ <xsl:variable name="subproject"
+ select="concat('libs/',ancestor::library/attribute::dirname,'/test')"/>
+ <xsl:variable name="filename"
+ select="concat($boost.root,'/libs/',ancestor::library/attribute::dirname,
+ '/test/Jamfile')"/>
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="source.print.header">
+ <xsl:with-param name="prefix" select="'#'"/>
+ </xsl:call-template>
+
+# Testing Jamfile autogenerated from XML source
+subproject <xsl:value-of select="$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 <xsl:value-of select="ancestor::library/attribute::dirname"/>
+ : <xsl:apply-templates mode="Jamfile"/> ;
+}
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="compile-test|link-test|run-test|compile-fail-test|link-fail-test|run-fail-test"
+ mode="Jamfile">
+ <xsl:variable name="fullname"
+ select="concat(substring-before(local-name(.), '-test'), ' libs/',
+ ancestor::library/attribute::dirname, '/test/',
+ @filename)"/>
+ <xsl:text>[ </xsl:text>
+ <xsl:value-of select="$fullname"/>
+ <xsl:apply-templates select="lib" mode="Jamfile"/>
+ <xsl:text> : </xsl:text>
+ <!-- ... -->
+ <xsl:text> : </xsl:text>
+ <!-- ... -->
+ <xsl:text> : </xsl:text>
+ <xsl:apply-templates select="requirement" mode="Jamfile"/>
+ <!-- ... -->
+ <xsl:text> : </xsl:text>
+ <xsl:if test="@name">
+ <xsl:value-of select="@name"/>
+ </xsl:if>
+ <xsl:text> ]</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="lib" mode="Jamfile">
+ <xsl:text> &lt;lib&gt;</xsl:text><xsl:value-of select="text()"/>
+ </xsl:template>
+
+ <xsl:template match="requirement" mode="Jamfile">
+ <xsl:if test="count(preceding-sibling::requirement) &gt; 0">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="concat('&lt;', @name, '&gt;')"/>
+ <xsl:value-of select="."/>
+ </xsl:template>
+
+ <xsl:template match="source" mode="testsuite.generate">
+ <xsl:variable name="filename"
+ select="concat($boost.root,'/libs/',ancestor::library/attribute::dirname,
+ '/test/',../@filename)"/>
+
+ <xsl:variable name="prefix" select="'//'"/>
+
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="source.print.header">
+ <xsl:with-param name="prefix" select="'//'"/>
+ </xsl:call-template>
+ <!-- Source code -->
+ <xsl:apply-templates mode="testsuite.generate"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="snippet" mode="testsuite.generate">
+ <xsl:variable name="snippet-name" select="@name"/>
+ <xsl:value-of select="//programlisting[@name=$snippet-name]"/>
+ </xsl:template>
+
+ <!-- Prints a header to a source file containing the library name,
+ copyright information, license information, and a link to the Boost
+ web site. The text is output using the "prefix" parameter at the
+ beginning of each line (it should denote a single-line comment) and
+ will only print up to boost.source.columns characters per line
+ (including the prefix). -->
+ <xsl:template name="source.print.header">
+ <xsl:param name="prefix"/>
+
+ <!-- Library name -->
+ <xsl:value-of select="concat($prefix, ' ',
+ ancestor::library/attribute::name,
+ ' library')"/>
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- Copyrights -->
+ <xsl:apply-templates select="ancestor::library/libraryinfo/copyright"
+ mode="testsuite.generate">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ </xsl:apply-templates>
+
+ <!-- Legal notice -->
+ <xsl:apply-templates select="ancestor::library/libraryinfo/legalnotice"
+ mode="testsuite.generate">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ </xsl:apply-templates>
+
+ <xsl:text>&#10;&#10;</xsl:text>
+
+ <!-- For more information... -->
+ <xsl:value-of
+ select="concat($prefix,
+ ' For more information, see http://www.boost.org/')"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="copyright" mode="testsuite.generate">
+ <xsl:param name="prefix"/>
+
+ <xsl:text>&#10;</xsl:text>
+
+ <xsl:value-of select="concat($prefix, ' Copyright (C) ')"/>
+ <xsl:call-template name="copyright.years">
+ <xsl:with-param name="years" select="year"/>
+ <xsl:with-param name="print.ranges" select="1"/>
+ <xsl:with-param name="single.year.ranges" select="1"/>
+ </xsl:call-template>
+
+ <xsl:text> </xsl:text>
+
+ <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+ </xsl:template>
+
+ <xsl:template match="legalnotice" mode="testsuite.generate">
+ <xsl:param name="prefix"/>
+
+ <xsl:variable name="text" select="normalize-space(.)"/>
+
+ <xsl:text>&#10;&#10;</xsl:text>
+ <xsl:value-of select="concat($prefix, ' ')"/>
+
+ <xsl:call-template name="source.print.legalnotice">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="column" select="string-length($prefix) + 1"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="source.print.legalnotice">
+ <xsl:param name="prefix"/>
+ <xsl:param name="text"/>
+ <xsl:param name="column"/>
+
+ <xsl:if test="contains($text, ' ') or string-length($text) &gt; 0">
+ <xsl:variable name="word">
+ <xsl:choose>
+ <xsl:when test="contains($text, ' ')">
+ <xsl:value-of select="substring-before($text, ' ')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="rest" select="substring-after($text, ' ')"/>
+
+ <xsl:choose>
+ <xsl:when
+ test="$column + string-length($word) &gt; $boost.source.columns">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:value-of select="concat($prefix, ' ')"/>
+ <xsl:call-template name="source.print.legalnotice">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ <xsl:with-param name="text" select="$text"/>
+ <xsl:with-param name="column" select="string-length($prefix) + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($word, ' ')"/>
+ <xsl:call-template name="source.print.legalnotice">
+ <xsl:with-param name="prefix" select="$prefix"/>
+ <xsl:with-param name="text" select="$rest"/>
+ <xsl:with-param name="column"
+ select="$column + string-length($word) + 1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="*" mode="testsuite.generate"/>
+</xsl:stylesheet>
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 @@
+<?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:template match="testsuite">
+ <section>
+ <xsl:choose>
+ <xsl:when test="@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="../@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="concat(../@id, '.tests')"/>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+
+ <title>Testsuite</title>
+
+ <xsl:if test="compile-test|link-test|run-test">
+ <section>
+ <xsl:if test="@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ <xsl:text>.acceptance</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+
+ <title>Acceptance tests</title>
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colnum="2" colwidth="1in"/>
+ <thead>
+ <row>
+ <entry>Test</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>If failing...</entry>
+ </row>
+ </thead>
+ <tbody>
+ <xsl:apply-templates select="compile-test|link-test|run-test"/>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ </xsl:if>
+
+ <xsl:if test="compile-fail-test|link-fail-test|run-fail-test">
+ <section>
+ <xsl:if test="@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ <xsl:text>.negative</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <title>Negative tests</title>
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colnum="2" colwidth="1in"/>
+ <thead>
+ <row>
+ <entry>Test</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>If failing...</entry>
+ </row>
+ </thead>
+ <tbody>
+ <xsl:apply-templates
+ select="compile-fail-test|link-fail-test|run-fail-test"/>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ </xsl:if>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="compile-test|link-test|run-test|
+ compile-fail-test|link-fail-test|run-fail-test">
+ <row>
+ <entry>
+ <simpara>
+ <ulink>
+ <xsl:attribute name="url">
+ <xsl:value-of
+ select="concat('../../libs/',
+ ancestor::library/attribute::dirname, '/test/',
+ @filename)"/>
+ </xsl:attribute>
+ <xsl:value-of select="@filename"/>
+ </ulink>
+ </simpara>
+ </entry>
+ <entry>
+ <simpara>
+ <xsl:value-of select="substring-before(local-name(.), '-test')"/>
+ </simpara>
+ </entry>
+ <entry><xsl:apply-templates select="purpose/*"/></entry>
+ <entry><xsl:apply-templates select="if-fails/*"/></entry>
+ </row>
+ </xsl:template>
+
+ <xsl:template match="snippet">
+ <xsl:variable name="snippet-name" select="@name"/>
+ <xsl:apply-templates select="//programlisting[@name=$snippet-name]"/>
+ </xsl:template>
+</xsl:stylesheet>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
+ Copyright (c) 2007 Frank Mori Hess <fmhess@users.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)
+ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:include href="global.xsl"/>
+ <xsl:strip-space elements="inherit purpose"/>
+
+ <!-- When true, the stylesheet will emit compact definitions of
+ enumerations when the enumeration does not have any detailed
+ description. A compact definition renders the enum definition along
+ with a comment for the purpose of the enum (if it exists) directly
+ within the synopsis. A non-compact definition will create a
+ separate refentry element for the enum. -->
+ <xsl:param name="boost.compact.enum">1</xsl:param>
+
+ <!-- When true, the stylesheet will emit compact definitions of
+ typedefs when the typedef does not have any detailed
+ description. -->
+ <xsl:param name="boost.compact.typedef">1</xsl:param>
+
+ <xsl:template match="class|struct|union" mode="generate.id">
+ <xsl:call-template name="fully-qualified-id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="class-specialization|struct-specialization|union-specialization" mode="generate.id">
+ <xsl:call-template name="fully-qualified-id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="typedef" mode="generate.id">
+ <xsl:call-template name="fully-qualified-id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="enum" mode="generate.id">
+ <xsl:call-template name="fully-qualified-id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="enumvalue" mode="generate.id">
+ <xsl:call-template name="fully-qualified-id">
+ <xsl:with-param name="node" select="parent::enum"/>
+ </xsl:call-template>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:template>
+
+ <!-- Display the full name of the current node, e.g., "Class
+ template function". -->
+ <xsl:template name="type.display.name">
+ <xsl:choose>
+ <xsl:when test="contains(local-name(.), 'class')">
+ <xsl:text>Class </xsl:text>
+ </xsl:when>
+ <xsl:when test="contains(local-name(.), 'struct')">
+ <xsl:text>Struct </xsl:text>
+ </xsl:when>
+ <xsl:when test="contains(local-name(.), 'union')">
+ <xsl:text>Union </xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name(.)='enum'">
+ <xsl:text>Type </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.name
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="template and count(template/*) &gt; 0">
+ <xsl:text>template </xsl:text>
+ </xsl:if>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text">
+ <xsl:value-of select="@name"/>
+ <xsl:apply-templates select="specialization"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Determine the class key for the given node -->
+ <xsl:template name="type.class.key">
+ <xsl:param name="node" select="."/>
+ <xsl:choose>
+ <xsl:when test="contains(local-name($node), '-specialization')">
+ <xsl:value-of select="substring-before(local-name($node), '-')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name($node)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Emit class synopsis -->
+ <xsl:template match="class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization" mode="synopsis">
+ <xsl:param name="indentation"/>
+
+ <!-- The keyword used to declare this class type, e.g., class,
+ struct, or union. -->
+ <xsl:variable name="class-key">
+ <xsl:call-template name="type.class.key"/>
+ </xsl:variable>
+
+ <!-- Spacing -->
+ <xsl:if test="not (local-name(preceding-sibling::*[position()=1])=local-name(.)) and (position() &gt; 1)">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- Calculate how long this declaration would be if we put it all
+ on one line -->
+ <xsl:variable name="full-decl-string">
+ <xsl:apply-templates select="template" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="wrap" select="false()"/>
+ </xsl:apply-templates>
+ <xsl:value-of select="$class-key"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:apply-templates select="specialization"/>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="(string-length($full-decl-string) +
+ string-length($indentation)) &lt; $max-columns">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="template" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="$class-key"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:value-of select="@name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates select="specialization"/>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <!-- Template header -->
+ <xsl:if test="template">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="template" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- Indent class templates' names in the synopsis -->
+ <xsl:text> </xsl:text>
+ </xsl:if>
+
+ <!-- Class name -->
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="$class-key"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="string(@name)"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="specialization"/>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Free functions associated with the class -->
+ <xsl:apply-templates select="free-function-group" mode="header-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="class" select="@name"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Emit a typedef synopsis -->
+ <xsl:template name="type.typedef.display.aligned">
+ <xsl:param name="compact"/>
+ <xsl:param name="indentation"/>
+ <xsl:param name="is-reference"/>
+ <xsl:param name="max-type-length"/>
+ <xsl:param name="max-name-length"/>
+
+ <!-- What type of link the typedef name should have. This shall
+ be one of 'anchor' (the typedef output will be the target of
+ links), 'link' (the typedef output will link to a definition), or
+ 'none' (the typedef output will not be either a link or a link
+ target) -->
+ <xsl:param name="link-type">
+ <xsl:choose>
+ <xsl:when test="$is-reference">
+ <xsl:text>anchor</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>link</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <!-- The id we should link to or anchor as -->
+ <xsl:param name="link-to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:param>
+
+ <!-- The id we should link to or anchor as -->
+ <xsl:param name="typedef-name">
+ <xsl:value-of select="@name"/>
+ </xsl:param>
+
+ <!-- Padding for the typedef types -->
+ <xsl:variable name="type-padding">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$max-type-length"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- Padding for the typedef names -->
+ <xsl:variable name="name-padding">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$max-name-length"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:text>&#10;</xsl:text>
+ <xsl:choose>
+ <!-- Create a vertical ellipsis -->
+ <xsl:when test="@name = '...'">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + 3"/>
+ </xsl:call-template>
+ <xsl:text>.&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + 3"/>
+ </xsl:call-template>
+ <xsl:text>.&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + 3"/>
+ </xsl:call-template>
+ <xsl:text>.</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="'typedef'"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+
+ <!-- Length of the type -->
+ <xsl:variable name="type-length">
+ <xsl:choose>
+ <xsl:when test="@type">
+ <xsl:message>
+ <xsl:text>Warning: `type' attribute of `typedef' element is deprecated. Use 'type' element instead.</xsl:text>
+ </xsl:message>
+ <xsl:call-template name="print.warning.context"/>
+ <xsl:value-of select="string-length(@type)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string-length(type)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Emit the type -->
+ <xsl:choose>
+ <xsl:when test="@type">
+ <xsl:value-of select="@type"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="type/*|type/text()"
+ mode="highlight"/>
+ <!--
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text">
+ <xsl:apply-templates select="type/*|type/text()"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ -->
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="$max-type-length &gt; 0">
+ <xsl:value-of select="substring($type-padding, 1,
+ $max-type-length - $type-length)"/>
+ <xsl:text> </xsl:text>
+ <xsl:variable name="truncated-typedef-name" select="substring(@name,
+ 1, $max-name-length)"/>
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to" select="$link-to"/>
+ <xsl:with-param name="text" select="$truncated-typedef-name"/>
+ <xsl:with-param name="link-type" select="$link-type"/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="substring(concat(';', $name-padding),
+ 1, $max-name-length - string-length($truncated-typedef-name))"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to" select="$link-to"/>
+ <xsl:with-param name="text" select="$typedef-name"/>
+ <xsl:with-param name="link-type" select="$link-type"/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="$compact and purpose">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose" mode="comment"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="typedef" mode="synopsis">
+ <xsl:param name="indentation"/>
+ <xsl:param name="max-type-length" select="0"/>
+ <xsl:param name="max-name-length" select="0"/>
+ <xsl:param name="allow-anchor" select="true()"/>
+
+ <!-- True if we should compact this typedef -->
+ <xsl:variable name="compact"
+ select="not (para|description) and ($boost.compact.typedef='1')"/>
+
+ <xsl:choose>
+ <xsl:when test="$compact">
+ <!-- Spacing -->
+ <xsl:if test="not (local-name(preceding-sibling::*[position()=1])=local-name(.)) and (position() &gt; 1)">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+
+ <xsl:call-template name="type.typedef.display.aligned">
+ <xsl:with-param name="compact" select="$compact"/>
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="is-reference" select="$allow-anchor"/>
+ <xsl:with-param name="max-type-length" select="$max-type-length"/>
+ <xsl:with-param name="max-name-length" select="$max-name-length"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="type.typedef.display.aligned">
+ <xsl:with-param name="compact" select="$compact"/>
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="is-reference" select="false()"/>
+ <xsl:with-param name="max-type-length" select="$max-type-length"/>
+ <xsl:with-param name="max-name-length" select="$max-name-length"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Emit a typedef reference entry -->
+ <xsl:template match="typedef" mode="namespace-reference">
+ <!-- True if this typedef was compacted -->
+ <xsl:variable name="compact"
+ select="not (para|description) and ($boost.compact.typedef='1')"/>
+
+ <xsl:if test="not ($compact)">
+ <xsl:call-template name="reference-documentation">
+ <xsl:with-param name="refname" select="@name"/>
+ <xsl:with-param name="purpose" select="purpose/*|purpose/text()"/>
+ <xsl:with-param name="anchor">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="name">
+ <xsl:text>Type definition </xsl:text>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
+ <xsl:call-template name="type.typedef.display.aligned">
+ <xsl:with-param name="compact" select="false()"/>
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="link-type" select="'none'"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:apply-templates select="description"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="typedef" mode="reference">
+ <!-- True if this typedef was compacted -->
+ <xsl:variable name="compact"
+ select="not (para|description) and ($boost.compact.typedef='1')"/>
+
+ <xsl:if test="not ($compact)">
+ <listitem>
+ <para>
+ <xsl:call-template name="type.typedef.display.aligned">
+ <xsl:with-param name="compact" select="false()"/>
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="link-type" select="'anchor'"/>
+ </xsl:call-template>
+ </para>
+ <xsl:apply-templates select="description"/>
+ </listitem>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Emit a list of static constants -->
+ <xsl:template match="static-constant" mode="synopsis">
+ <xsl:param name="indentation"/>
+ <xsl:text>&#10;</xsl:text>
+
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="'static const '"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="type" mode="highlight"/>
+
+ <xsl:if test="not(@name = '')">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:text> = </xsl:text>
+
+ <xsl:call-template name="source-highlight">
+ <xsl:with-param name="text">
+ <xsl:apply-templates select="default/*|default/text()"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+
+ <xsl:if test="purpose">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose" mode="comment"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Format base classes on a single line -->
+ <xsl:template name="print.base.classes.single">
+ <xsl:apply-templates select="inherit"/>
+ </xsl:template>
+
+ <xsl:template name="print.base.classes.multi">
+ <xsl:param name="indentation"/>
+
+ <xsl:variable name="n" select="count(inherit)"/>
+ <xsl:for-each select="inherit">
+ <!-- Indentation -->
+ <xsl:if test="position() &gt; 1">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <!-- Output the access specifier -->
+ <xsl:variable name="access">
+ <xsl:choose>
+ <xsl:when test="@access">
+ <xsl:value-of select="@access"/>
+ </xsl:when>
+ <xsl:when test="parent::class|parent::class-specialization">
+ <xsl:text>private</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>public</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="@access"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+
+ <!-- Output the type -->
+ <xsl:choose>
+ <xsl:when test="type">
+ <xsl:apply-templates select="type/*|type/text()" mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Warning: missing 'type' element inside 'inherit'</xsl:text>
+ </xsl:message>
+ <xsl:call-template name="print.warning.context"/>
+ <xsl:apply-templates mode="annotation"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="@pack=1"><xsl:text>...</xsl:text></xsl:if>
+
+ <!-- Output a comma if not at the end -->
+ <xsl:if test="position() &lt; $n">
+ <xsl:text>,</xsl:text>
+ </xsl:if>
+
+ <!-- Output a comment if we have one -->
+ <xsl:if test="purpose">
+ <xsl:choose>
+ <xsl:when test="position() &lt; $n">
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose"
+ mode="comment"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="position() &lt; $n">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="print.base.classes">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="base-indentation" select="0"/>
+
+ <xsl:variable name="single-line-candidate" select="not(inherit/purpose)"/>
+ <xsl:variable name="single-line">
+ <xsl:if test="$single-line-candidate">
+ <xsl:call-template name="print.base.classes.single"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$single-line-candidate and
+ (string-length($single-line) + $indentation + 3
+ &lt; $max-columns)">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' : '"/>
+ </xsl:call-template>
+ <xsl:call-template name="print.base.classes.single"/>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' {'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$single-line-candidate and
+ (string-length($single-line) + $base-indentation + 2
+ &lt; $max-columns)">
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' :&#10;'"/>
+ </xsl:call-template>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$base-indentation + 2"/>
+ </xsl:call-template>
+ <xsl:call-template name="print.base.classes.single"/>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$base-indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="'{'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' : '"/>
+ </xsl:call-template>
+ <xsl:call-template name="print.base.classes.multi">
+ <xsl:with-param name="indentation" select="$indentation + 3"/>
+ </xsl:call-template>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$base-indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'{'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Emit a list of base classes without comments and on a single line -->
+ <xsl:template match="inherit">
+ <xsl:choose>
+ <xsl:when test="position()=1">
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="@access"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates mode="annotation">
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:if test="@pack=1"><xsl:text>...</xsl:text></xsl:if>
+ </xsl:template>
+
+ <!-- Find the maximum length of the types in typedefs -->
+ <xsl:template name="find-max-type-length">
+ <xsl:param name="typedefs" select="typedef"/>
+ <xsl:param name="max-length" select="0"/>
+ <xsl:param name="want-name" select="false()"/>
+
+ <xsl:choose>
+ <xsl:when test="$typedefs">
+ <xsl:variable name="typedef" select="$typedefs[position()=1]"/>
+ <xsl:variable name="rest" select="$typedefs[position()!=1]"/>
+
+ <!-- Find the length of the type -->
+ <xsl:variable name="length">
+ <xsl:choose>
+ <xsl:when test="$typedef/@name != '...'">
+ <xsl:choose>
+ <xsl:when test="$want-name">
+ <xsl:value-of select="string-length($typedef/@name) + 1"/>
+ </xsl:when>
+ <xsl:when test="$typedef/@type">
+ <xsl:value-of select="string-length($typedef/@type)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string-length($typedef/type)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ 0
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Pass on the larger length -->
+ <xsl:choose>
+ <xsl:when test="$length &gt; $max-length">
+ <xsl:call-template name="find-max-type-length">
+ <xsl:with-param name="typedefs" select="$rest"/>
+ <xsl:with-param name="max-length" select="$length"/>
+ <xsl:with-param name="want-name" select="$want-name"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="find-max-type-length">
+ <xsl:with-param name="typedefs" select="$rest"/>
+ <xsl:with-param name="max-length" select="$max-length"/>
+ <xsl:with-param name="want-name" select="$want-name"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$max-length"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="constructor" mode="synopsis">
+ <xsl:param name="indentation"/>
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="context" select="../@name"/>
+ <xsl:with-param name="is-reference" select="false()"/>
+ <xsl:with-param name="constructor-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="copy-assignment" mode="synopsis">
+ <xsl:param name="indentation"/>
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="context" select="../@name"/>
+ <xsl:with-param name="is-reference" select="false()"/>
+ <xsl:with-param name="copy-assign-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="destructor" mode="synopsis">
+ <xsl:param name="indentation"/>
+ <xsl:call-template name="function">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="context" select="../@name"/>
+ <xsl:with-param name="is-reference" select="false()"/>
+ <xsl:with-param name="destructor-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="class-members-synopsis">
+ <xsl:param name="indentation" select="0"/>
+ <!-- Used to suppress anchors in nested synopsis, so we don't get multiple anchors -->
+ <xsl:param name="allow-synopsis-anchors" select="false()"/>
+
+ <!-- Typedefs -->
+ <xsl:if test="typedef">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <!-- True if there are any non-compacted typedefs -->
+ <xsl:variable name="have-typedef-references"
+ select="typedef and ((typedef/para|typedef/description) or ($boost.compact.typedef='0'))"/>
+ <xsl:choose>
+ <xsl:when test="$have-typedef-references">
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>types</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="'types'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>types</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:variable name="max-type-length">
+ <xsl:call-template name="find-max-type-length"/>
+ </xsl:variable>
+ <xsl:variable name="max-name-length">
+ <xsl:call-template name="find-max-type-length">
+ <xsl:with-param name="want-name" select="true()"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:apply-templates select="typedef" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ <xsl:with-param name="max-type-length"
+ select="$max-type-length"/>
+ <xsl:with-param name="max-name-length"
+ select="$max-name-length"/>
+ <xsl:with-param name="allow-anchor" select="$allow-synopsis-anchors"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <!-- Static constants -->
+ <xsl:if test="static-constant">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:if test="typedef">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="'// static constants'"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="static-constant" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <!-- Nested classes/structs/unions -->
+ <xsl:if test="class|class-specialization|struct|struct-specialization|union|union-specialization">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:if test="typedef|static-constant">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text" select="'// member classes/structs/unions'"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization"
+ mode="reference">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <!-- Enums -->
+ <xsl:apply-templates select="enum" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+
+ <!-- Construct/Copy/Destruct -->
+ <xsl:call-template name="construct-copy-destruct-synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:call-template>
+
+ <!-- Member functions -->
+ <xsl:apply-templates
+ select="method-group|method|overloaded-method"
+ mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+
+ <!-- Data members -->
+ <xsl:if test="data-member">
+ <xsl:text>&#10;&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:choose>
+ <xsl:when test="data-member/description">
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>public-data-members</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="'public data members'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>public data members</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates select="data-member" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="print-access-specification">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="specification" select="'public'"/>
+
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="$specification"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="':'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="access" mode="synopsis">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="allow-synopsis-anchors" select="false()"/>
+
+ <xsl:call-template name="print-access-specification">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="specification" select="@name"/>
+ </xsl:call-template>
+ <xsl:call-template name="class-members-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="allow-synopsis-anchors" select="$allow-synopsis-anchors"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="class-type-synopsis">
+ <xsl:param name="indentation" select="0"/>
+ <xsl:param name="allow-synopsis-anchors" select="false()"/>
+
+ <!-- The keyword used to declare this class type, e.g., class,
+ struct, or union. -->
+ <xsl:variable name="class-key">
+ <xsl:call-template name="type.class.key"/>
+ </xsl:variable>
+
+ <xsl:if test="ancestor::class|ancestor::class-specialization|
+ ancestor::struct|ancestor::struct-specialization|
+ ancestor::union|ancestor::union-specialization">
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- If this nested class has a "purpose" element, use it as a
+ comment. -->
+ <xsl:if test="purpose">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:variable name="spaces">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:copy-of select="$spaces"/>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose" mode="comment">
+ <xsl:with-param name="wrap" select="true()"/>
+ <xsl:with-param name="prefix" select="concat($spaces, '// ')"/>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+
+ <!-- Template header -->
+ <xsl:if test="template">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="template" mode="reference">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- Class name -->
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="$class-key"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+
+ <!-- Make the class name a link to the class reference page (useful for nested classes) -->
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:value-of select="@name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="specialization"/>
+
+ <xsl:choose>
+ <xsl:when test="inherit">
+ <!-- Base class list (with opening brace) -->
+ <xsl:call-template name="print.base.classes">
+ <xsl:with-param name="indentation"
+ select="string-length($class-key) + string-length(@name)
+ + $indentation + 1"/>
+ <xsl:with-param name="base-indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Opening brace -->
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' {'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Default public designator for members not inside explicit <access> elements -->
+ <xsl:if test="contains(local-name(.), 'class')">
+ <xsl:if test="count(static-constant|typedef|enum|
+ copy-assignment|constructor|destructor|method-group|
+ method|overloaded-method|data-member|
+ class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization) &gt; 0">
+ <xsl:call-template name="print-access-specification">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:call-template name="class-members-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="allow-synopsis-anchors" select="$allow-synopsis-anchors"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="access" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="allow-synopsis-anchors" select="$allow-synopsis-anchors"/>
+ </xsl:apply-templates>
+
+ <!-- Closing brace -->
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="'};'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Emit nested class reference documentation -->
+ <xsl:template match="class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization" mode="reference">
+ <xsl:param name="indentation"/>
+
+ <xsl:call-template name="class-type-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Document template parameters -->
+ <xsl:template name="class-templates-reference">
+ <xsl:if test="(template/template-type-parameter/purpose|
+ template/template-nontype-parameter/purpose)
+ and not($template.param.brief)">
+ <refsect2>
+ <title>Template Parameters</title>
+ <orderedlist>
+ <xsl:for-each select="template/template-type-parameter|
+ template/template-nontype-parameter">
+ <listitem>
+ <para>
+ <xsl:variable name="link-to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:variable>
+
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:call-template name="template.parameter">
+ <xsl:with-param name="parameter" select="."/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:if test="purpose">
+ <para>
+ <xsl:apply-templates select="purpose/*"/>
+ </para>
+ </xsl:if>
+ </listitem>
+ </xsl:for-each>
+ </orderedlist>
+ </refsect2>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="member-typedefs-reference">
+ <!-- True if there are any non-compacted typedefs -->
+ <xsl:variable name="have-typedef-references"
+ select="typedef and ((typedef/para|typedef/description) or ($boost.compact.typedef='0'))"/>
+ <xsl:if test="$have-typedef-references">
+ <xsl:call-template name="member-documentation">
+ <xsl:with-param name="name">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>types</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="''"/>
+ </xsl:call-template>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="access-name"/>
+ <xsl:text> types</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <orderedlist>
+ <xsl:apply-templates select="typedef" mode="reference"/>
+ </orderedlist>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="data-member-reference">
+ <xsl:if test="data-member/description">
+ <xsl:call-template name="member-documentation">
+ <xsl:with-param name="name">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>public-data-members</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="''"/>
+ </xsl:call-template>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="access-name"/>
+ <xsl:text> public data members</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <orderedlist>
+ <xsl:apply-templates select="data-member" mode="reference"/>
+ </orderedlist>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="class-members-reference">
+
+ <xsl:call-template name="member-typedefs-reference"/>
+
+ <xsl:call-template name="construct-copy-destruct-reference"/>
+
+ <xsl:apply-templates
+ select="method-group|method|overloaded-method"
+ mode="reference"/>
+
+ <xsl:call-template name="data-member-reference"/>
+
+ <!-- Emit reference docs for nested classes -->
+ <xsl:apply-templates
+ select="class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization"
+ mode="namespace-reference"/>
+
+ <!-- Emit reference docs for nested enums -->
+ <xsl:apply-templates
+ select="enum"
+ mode="namespace-reference"/>
+ </xsl:template>
+
+ <xsl:template match="access" mode="namespace-reference">
+ <xsl:call-template name="class-members-reference"/>
+ </xsl:template>
+
+ <!-- Emit namespace-level class reference documentation -->
+ <xsl:template match="class|class-specialization|
+ struct|struct-specialization|
+ union|union-specialization" mode="namespace-reference">
+ <xsl:param name="indentation" select="0"/>
+
+ <xsl:call-template name="separator"/>
+ <xsl:call-template name="reference-documentation">
+ <xsl:with-param name="refname">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="purpose" select="purpose/*|purpose/text()"/>
+ <xsl:with-param name="anchor">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="name">
+ <xsl:call-template name="type.display.name"/>
+ </xsl:with-param>
+ <xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
+ <xsl:call-template name="class-type-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="allow-synopsis-anchors" select="true()"/>
+ </xsl:call-template>
+ <!-- Associated free functions -->
+ <xsl:apply-templates select="free-function-group"
+ mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="class" select="@name"/>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <!-- Paragraphs go into the top of the "Description" section. -->
+ <xsl:if test="para">
+ <xsl:message>
+ <xsl:text>Warning: Use of 'para' elements in 'class' element is deprecated.&#10;Wrap them in a 'description' element.</xsl:text>
+ </xsl:message>
+ <xsl:call-template name="print.warning.context"/>
+ <xsl:apply-templates select="para" mode="annotation"/>
+ </xsl:if>
+ <xsl:apply-templates select="description"/>
+ <xsl:call-template name="class-templates-reference"/>
+ <xsl:call-template name="class-members-reference"/>
+ <xsl:apply-templates select="access" mode="namespace-reference"/>
+
+ <xsl:apply-templates select="free-function-group" mode="reference">
+ <xsl:with-param name="class" select="@name"/>
+ </xsl:apply-templates>
+
+ <!-- Specializations of this class -->
+ <!-- TBD: fix this. We should key off the class name and match
+ fully-qualified names -->
+ <xsl:variable name="name" select="@name"/>
+ <xsl:if test="local-name(.)='class' and
+ ../class-specialization[@name=$name]">
+ <refsect2>
+ <title>Specializations</title>
+ <itemizedlist>
+ <xsl:apply-templates
+ select="../class-specialization[@name=$name]"
+ mode="specialization-list"/>
+ </itemizedlist>
+ </refsect2>
+ </xsl:if>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Output a link to a specialization -->
+ <xsl:template match="class-specialization|
+ struct-specialization|
+ union-specialization" mode="specialization-list">
+ <listitem>
+ <para>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <xsl:call-template name="type.display.name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ </listitem>
+ </xsl:template>
+
+ <!-- Data member synopsis -->
+ <xsl:template match="data-member" mode="synopsis">
+ <xsl:param name="indentation"/>
+
+ <xsl:choose>
+ <xsl:when test="ancestor::class|ancestor::class-specialization|
+ ancestor::struct|ancestor::struct-specialization|
+ ancestor::union|ancestor::union-specialization">
+
+ <!-- Spacing -->
+ <xsl:if
+ test="not(local-name(preceding-sibling::*[position()=1])=local-name(.)) and (position() &gt; 1)">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+
+ <!-- Indent -->
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+
+ <xsl:if test="@specifiers">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="@specifiers"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+
+ <xsl:apply-templates select="type" mode="highlight"/>
+ <xsl:text> </xsl:text>
+ <xsl:choose>
+ <xsl:when test="description">
+ <xsl:variable name="link-to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:variable>
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to" select="$link-to"/>
+ <xsl:with-param name="text" select="@name"/>
+ <xsl:with-param name="link-type" select="'link'"/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="highlight-identifier">
+ <xsl:with-param name="identifier" select="@name"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="global-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- If there is a <purpose>, then add it as an
+ inline comment immediately following the data
+ member definition in the synopsis -->
+ <xsl:if test="purpose">
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose/*|purpose/text()"
+ mode="purpose"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Data member reference -->
+ <xsl:template match="data-member" mode="reference">
+ <xsl:choose>
+ <xsl:when test="ancestor::class|ancestor::class-specialization|
+ ancestor::struct|ancestor::struct-specialization|
+ ancestor::union|ancestor::union-specialization">
+ <xsl:if test="description">
+ <listitem>
+ <para>
+ <xsl:variable name="link-to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:variable>
+
+ <xsl:call-template name="preformatted">
+ <xsl:with-param name="text">
+ <xsl:if test="@specifiers">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="@specifiers"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+
+ <xsl:apply-templates select="type" mode="highlight"/>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="link-or-anchor">
+ <xsl:with-param name="to" select="$link-to"/>
+ <xsl:with-param name="text" select="@name"/>
+ <xsl:with-param name="link-type" select="'anchor'"/>
+ <xsl:with-param name="highlight" select="true()"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-special">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </para>
+ <xsl:apply-templates select="description"/>
+ </listitem>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="global-reference"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- Enumeration synopsis -->
+ <xsl:template match="enum" mode="synopsis">
+ <xsl:param name="indentation"/>
+
+ <!-- Spacing -->
+ <xsl:if
+ test="(not (local-name(preceding-sibling::*[position()=1])=local-name(.))
+ and (position() &gt; 1)) or
+ not (para or description or not ($boost.compact.enum=1))">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+
+ <!-- Indent -->
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <!-- When there is a detailed description, we only put the
+ declaration in the synopsis and will put detailed documentation
+ in either a <refentry/> or in class documentation. -->
+ <xsl:when test="para or description or not ($boost.compact.enum=1)">
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="'enum'"/>
+ </xsl:call-template>
+
+ <xsl:text> </xsl:text>
+
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="string(@name)"/>
+ <xsl:with-param name="higlhight" select="false()"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- When there is no detailed description, we put the enum
+ definition within the synopsis. The purpose of the enum (if
+ available) is formatted as a comment prior to the
+ definition. This way, we do not create a separate block of text
+ for what is generally a very small amount of information. -->
+ <xsl:otherwise>
+ <xsl:if test="purpose">
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// </xsl:text>
+ <xsl:apply-templates select="purpose" mode="comment"/>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="'enum'"/>
+ </xsl:call-template>
+
+ <xsl:text> </xsl:text>
+
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="@name"/>
+ <xsl:with-param name="higlhight" select="false()"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' { '"/>
+ </xsl:call-template>
+ <xsl:call-template name="type.enum.list.compact">
+ <xsl:with-param name="indentation"
+ select="$indentation + string-length(@name) + 8"/>
+ <xsl:with-param name="compact" select="true()"/>
+ </xsl:call-template>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' }'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="';'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Enumeration reference at namespace level -->
+ <xsl:template match="enum" mode="namespace-reference">
+ <xsl:if test="para or description or not ($boost.compact.enum=1)">
+ <xsl:call-template name="reference-documentation">
+ <xsl:with-param name="name">
+ <xsl:call-template name="type.display.name"/>
+ </xsl:with-param>
+ <xsl:with-param name="refname">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="purpose" select="purpose/*|purpose/text()"/>
+ <xsl:with-param name="anchor">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
+ <xsl:call-template name="type.enum.display"/>
+ </xsl:with-param>
+
+ <xsl:with-param name="text">
+ <!-- Paragraphs go into the top of the "Description" section. -->
+ <xsl:if test="para">
+ <xsl:message>
+ <xsl:text>Warning: Use of 'para' elements in 'enum' element is deprecated.&#10;Wrap them in a 'description' element.</xsl:text>
+ </xsl:message>
+ <xsl:call-template name="print.warning.context"/>
+ <xsl:apply-templates select="para" mode="annotation"/>
+ </xsl:if>
+ <xsl:apply-templates select="description"/>
+ <xsl:if test="enumvalue/purpose | enumvalue/description">
+ <variablelist spacing="compact">
+ <xsl:apply-templates select="enumvalue" mode="reference"/>
+ </variablelist>
+ </xsl:if>
+ </xsl:with-param>
+
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Output an enumeration along with its values -->
+ <xsl:template name="type.enum.display">
+ <!-- Spacing -->
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+
+ <xsl:text>&#10;</xsl:text>
+
+ <xsl:call-template name="highlight-keyword">
+ <xsl:with-param name="keyword" select="'enum'"/>
+ </xsl:call-template>
+
+ <!-- Header -->
+ <xsl:variable name="header" select="concat(' ', @name, ' { ')"/>
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="$header"/>
+ </xsl:call-template>
+
+ <!-- Print the enumeration values -->
+ <xsl:call-template name="type.enum.list.compact">
+ <xsl:with-param name="indentation" select="4 + string-length($header)"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="highlight-text">
+ <xsl:with-param name="text" select="' };'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- List enumeration values in a compact form e.g.,
+ enum Name { value1 = foo, value2 = bar, ... };
+ This routine prints only the enumeration values; the caller is
+ responsible for printing everything outside the braces
+ (inclusive). -->
+ <xsl:template name="type.enum.list.compact">
+ <xsl:param name="indentation"/>
+ <xsl:param name="compact" select="false()"/>
+
+ <!-- Internal: The column we are on -->
+ <xsl:param name="column" select="$indentation"/>
+
+ <!-- Internal: The index of the current enumvalue
+ we're processing -->
+ <xsl:param name="pos" select="1"/>
+
+ <!-- Internal: a prefix that we need to print prior to printing
+ this value. -->
+ <xsl:param name="prefix" select="''"/>
+
+ <xsl:if test="not($pos &gt; count(enumvalue))">
+ <xsl:variable name="value" select="enumvalue[position()=$pos]"/>
+
+ <!-- Compute the string to be printed for this value -->
+ <xsl:variable name="result">
+ <xsl:value-of select="$prefix"/>
+ <xsl:value-of select="$value/attribute::name"/>
+
+ <xsl:if test="$value/default">
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="$value/default/*|$value/default/text()"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <!-- The column we will end on, assuming that this value fits on
+ this line -->
+ <xsl:variable name="end" select="$column + string-length($result)"/>
+
+ <!-- The column we will actually end on -->
+ <xsl:variable name="end2">
+ <xsl:choose>
+ <!-- If the enumeration value fits on this line, put it there -->
+ <xsl:when test="$end &lt; $max-columns">
+ <xsl:value-of select="$end"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$indentation
+ + string-length($result)
+ - string-length($prefix)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:value-of select="$prefix"/>
+
+ <!-- If the enumeration value doesn't fit on this line,
+ put it on a new line -->
+ <xsl:if test="not($end &lt; $max-columns)">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <!-- If the enumeration value has a description, link it
+ to its description. -->
+ <xsl:choose>
+ <xsl:when test="($value/purpose or $value/description) and not($compact)">
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="$value"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="$value/attribute::name"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$value/attribute::name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- If the enumeration value has a default,
+ print it. -->
+ <xsl:if test="$value/default">
+ <xsl:text> = </xsl:text>
+ <xsl:apply-templates
+ select="$value/default/*|$value/default/text()"/>
+ </xsl:if>
+
+ <!-- Recursively generate the rest of the enumeration list -->
+ <xsl:call-template name="type.enum.list.compact">
+ <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="compact" select="$compact"/>
+ <xsl:with-param name="column" select="$end2"/>
+ <xsl:with-param name="pos" select="$pos + 1"/>
+ <xsl:with-param name="prefix" select="', '"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Enumeration reference at namespace level -->
+ <xsl:template match="enumvalue" mode="reference">
+ <xsl:if test="purpose or description">
+ <varlistentry>
+ <term>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text" select="@name"/>
+ </xsl:call-template>
+ <!-- Note: the anchor must come after the text here, and not
+ before it; otherwise, FOP goes into an infinite loop. -->
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="''"/>
+ </xsl:call-template>
+ </term>
+ <listitem>
+ <xsl:apply-templates select="purpose|description" mode="comment"/>
+ </listitem>
+ </varlistentry>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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">
+ <!-- Indent the current line-->
+ <xsl:template name="indent">
+ <xsl:param name="indentation"/>
+ <xsl:if test="$indentation > 0">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="indent">
+ <xsl:with-param name="indentation" select="$indentation - 1"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- get name of first ancestor-or-self which is a class, struct or union -->
+ <xsl:template name="object-name">
+ <xsl:variable name="ancestors" select="ancestor-or-self::class |
+ ancestor-or-self::class-specialization |
+ ancestor-or-self::struct |
+ ancestor-or-self::struct-specialization |
+ ancestor-or-self::union |
+ ancestor-or-self::union-specialization"/>
+ <xsl:value-of select="$ancestors[last()]/@name"/>
+ </xsl:template>
+
+ <!-- get name of access specification that we are inside -->
+ <xsl:template name="access-name">
+ <xsl:variable name="ancestors" select="ancestor-or-self::access |
+ ancestor-or-self::class |
+ ancestor-or-self::class-specialization |
+ ancestor-or-self::struct |
+ ancestor-or-self::struct-specialization |
+ ancestor-or-self::union |
+ ancestor-or-self::union-specialization"/>
+ <xsl:choose>
+ <xsl:when test="name($ancestors[last()])='access'">
+ <xsl:value-of select="$ancestors[last()]/@name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ public
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
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 @@
+<?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"
+ xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
+ version="1.0">
+
+ <!-- Import the HTML chunking stylesheet -->
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
+ <xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/xhtml/math.xsl"/>
+
+ <!-- Bring in the fast chunking overrides. There's nothing
+ that we need to override, so include instead of importing it. -->
+ <xsl:include
+ href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunkfast.xsl"/>
+
+ <!-- We have to make sure that our templates override all
+ docbook templates. Therefore, we include our own templates
+ instead of importing them. In order for this to work,
+ the stylesheets included here cannot also include each other -->
+ <xsl:include href="chunk-common.xsl"/>
+ <xsl:include href="docbook-layout.xsl"/>
+ <xsl:include href="navbar.xsl"/>
+ <xsl:include href="admon.xsl"/>
+ <xsl:include href="xref.xsl"/>
+ <xsl:include href="relative-href.xsl"/>
+ <xsl:include href="callout.xsl"/>
+ <xsl:include href="html-base.xsl"/>
+
+</xsl:stylesheet>
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 @@
+<?xml version="1.0"?>
+<!--
+ 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"
+ xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
+ exclude-result-prefixes="suwl"
+ version="1.0">
+
+<!-- Import the HTML chunking stylesheet -->
+<xsl:import
+ href="http://docbook.sourceforge.net/release/xsl/current/html/xref.xsl"/>
+
+
+<xsl:template name="adjust-url">
+ <xsl:param name="target"/>
+ <xsl:param name="context" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="contains($target, ':')">
+ <xsl:value-of select="$target"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target.relative">
+ <xsl:with-param name="target" select="$target"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+
+<xsl:template match="ulink" name="ulink">
+ <xsl:variable name="link">
+ <a>
+ <xsl:if test="@id">
+ <xsl:attribute name="name">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="href">
+ <xsl:call-template name="adjust-url">
+ <xsl:with-param name="target" select="@url"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:if test="$ulink.target != ''">
+ <xsl:attribute name="target">
+ <xsl:value-of select="$ulink.target"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="count(child::node())=0">
+ <xsl:value-of select="@url"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('suwl:unwrapLinks')">
+ <xsl:copy-of select="suwl:unwrapLinks($link)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$link"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+</xsl:stylesheet>
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 : <location>../../../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 <library> 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..d5b540260
--- /dev/null
+++ b/src/boost/tools/boostdep/depinst/exceptions.txt
@@ -0,0 +1,396 @@
+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
+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="<div class='logo'><div class='upper'>boost</div><div class='lower'>Dependency Report</div><div class='description'>%BRANCH%-%SHREV%, %DATE% %TIME%</div></div><hr />"
+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/src/boostdep.cpp b/src/boost/tools/boostdep/src/boostdep.cpp
new file mode 100644
index 000000000..22897f376
--- /dev/null
+++ b/src/boost/tools/boostdep/src/boostdep.cpp
@@ -0,0 +1,3005 @@
+
+// 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 <boost/filesystem.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <string>
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <map>
+#include <set>
+#include <algorithm>
+#include <climits>
+#include <cstdlib>
+#include <streambuf>
+#include <sstream>
+#include <cctype>
+
+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<std::string> > 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 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<std::string, std::string>::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<std::string>::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<h1 id=\"primary-dependencies\">Primary dependencies for <em>" << module << "</em></h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2 id=\"" << module << "\"><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2>\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ }
+
+ void header_start( std::string const & header )
+ {
+ std::cout << " <h3><code>&lt;" << header << "&gt;</code></h3><ul>\n";
+ }
+
+ void header_end( std::string const & /*header*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void from_header( std::string const & header )
+ {
+ std::cout << " <li>from <code>&lt;" << header << "&gt;</code></li>\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<h1 id=\"secondary-dependencies\">Secondary dependencies for <em>" << module << "</em></h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2><ul>\n";
+ m2_ = module;
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void module_adds( std::string const & module )
+ {
+ std::cout << " <li><a href=\"" << m2_ << ".html#" << module << "\">adds <em>" << module << "</em></a></li>\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 << "<h1>Inclusion report for <code>&lt;" << header << "&gt;</code> (in module <em>" << module << "</em>)</h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2>From <a href=\"" << module << ".html\"><em>" << module << "</em></a></h2><ul>\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void header( std::string const & header )
+ {
+ std::cout << " <li><code>&lt;" << header << "&gt;</code></li>\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<h1 id=\"reverse-dependencies\">Reverse dependencies for <em>" << module << "</em></h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2 id=\"reverse-" << module << "\"><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2>\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ }
+
+ void header_start( std::string const & header )
+ {
+ std::cout << " <h3><code>&lt;" << header << "&gt;</code></h3><ul>\n";
+ }
+
+ void header_end( std::string const & /*header*/ )
+ {
+ std::cout << " </ul>\n";
+ }
+
+ void from_header( std::string const & header )
+ {
+ std::cout << " <li>from <code>&lt;" << header << "&gt;</code></li>\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 << "<div id='module-levels'><h1>Module Levels</h1>\n";
+ }
+
+ void end()
+ {
+ std::cout << "</div>\n";
+ }
+
+ void level_start( int level )
+ {
+ if( level >= unknown_level )
+ {
+ std::cout << " <h2>Level <em>undetermined</em></h2>\n";
+ }
+ else
+ {
+ std::cout << " <h2 id='level:" << level << "'>Level " << level << "</h2>\n";
+ }
+
+ level_ = level;
+ }
+
+ void level_end( int /*level*/ )
+ {
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h3 id='" << module << "'><a href=\"" << module << ".html\">" << module << "</a></h3><p class='primary-list'>";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "</p>\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 << "<strong>";
+ }
+
+ std::cout << module;
+
+ if( level < unknown_level )
+ {
+ std::cout << "<sup>" << level << "</sup>";
+ }
+
+ if( important )
+ {
+ std::cout << "</strong>";
+ }
+ }
+};
+
+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 << "<div id='module-overview'><h1>Module Overview</h1>\n";
+ }
+
+ void end()
+ {
+ std::cout << "</div>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2 id='" << module << "'><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2><p class='primary-list'>";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "</p>\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 << "<html>\n";
+ std::cout << "<head>\n";
+ std::cout << "<title>" << title << "</title>\n";
+
+ if( !stylesheet.empty() )
+ {
+ std::cout << "<link rel=\"stylesheet\" type=\"text/css\" href=\"" << stylesheet << "\" />\n";
+ }
+
+ std::cout << "</head>\n";
+ std::cout << "<body>\n";
+
+ if( !prefix.empty() )
+ {
+ std::cout << prefix << std::endl;
+ }
+}
+
+static void output_html_footer( std::string const & footer )
+{
+ std::cout << "<hr />\n";
+ std::cout << "<p class=\"footer\">" << footer << "</p>\n";
+ std::cout << "</body>\n";
+ std::cout << "</html>\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 << "<div id='module-weights'>\n<h1>Module Weights</h1>\n";
+ }
+
+ void end()
+ {
+ std::cout << "</div>\n";
+ }
+
+ void weight_start( int weight )
+ {
+ std::cout << " <h2 id='weight:" << weight << "'>Weight " << weight << "</h2>\n";
+ weight_ = weight;
+ }
+
+ void weight_end( int /*weight*/ )
+ {
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h3 id='" << module << "'><a href=\"" << module << ".html\">" << module << "</a></h3>";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "\n";
+ }
+
+ void module_primary_start()
+ {
+ std::cout << "<p class='primary-list'>";
+ }
+
+ void module_primary( std::string const & module, int weight )
+ {
+ std::cout << " ";
+
+ bool heavy = weight >= 0.8 * weight_;
+
+ if( heavy )
+ {
+ std::cout << "<strong>";
+ }
+
+ std::cout << module << "<sup>" << weight << "</sup>";
+
+ if( heavy )
+ {
+ std::cout << "</strong>";
+ }
+ }
+
+ void module_primary_end()
+ {
+ std::cout << "</p>";
+ }
+
+ void module_secondary_start()
+ {
+ std::cout << "<p class='secondary-list'>";
+ }
+
+ void module_secondary( std::string const & module, int /*weight*/ )
+ {
+ std::cout << " " << module;
+ }
+
+ void module_secondary_end()
+ {
+ std::cout << "</p>";
+ }
+};
+
+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<std::string> const & path ) = 0;
+};
+
+static void add_module_headers( fs::path const & dir, std::set<std::string> & 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<std::string> const & headers, module_subset_actions & actions )
+{
+ // build header closure
+
+ // header -> (header)*
+ std::map< std::string, std::set<std::string> > inc2;
+
+ // (header, header) -> path
+ std::map< std::pair<std::string, std::string>, std::vector<std::string> > paths;
+
+ for( std::set<std::string>::const_iterator i = headers.begin(); i != headers.end(); ++i )
+ {
+ std::set<std::string> & s = inc2[ *i ];
+
+ s = s_header_includes[ *i ];
+
+ for( std::set<std::string>::const_iterator j = s.begin(); j != s.end(); ++j )
+ {
+ std::vector<std::string> & 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<std::string> >::iterator i = inc2.begin(); i != inc2.end(); ++i )
+ {
+ std::set<std::string> & s2 = i->second;
+
+ for( std::set<std::string>::const_iterator j = s2.begin(); j != s2.end(); ++j )
+ {
+ std::set<std::string> const & s = s_header_includes[ *j ];
+
+ for( std::set<std::string>::const_iterator k = s.begin(); k != s.end(); ++k )
+ {
+ if( s2.count( *k ) == 0 )
+ {
+ s2.insert( *k );
+
+ std::vector<std::string> const & v1 = paths[ std::make_pair( i->first, *j ) ];
+ std::vector<std::string> & 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<std::string> > > subset;
+
+ for( std::set<std::string>::const_iterator i = headers.begin(); i != headers.end(); ++i )
+ {
+ std::set<std::string> const & s = inc2[ *i ];
+
+ for( std::set<std::string>::const_iterator j = s.begin(); j != s.end(); ++j )
+ {
+ std::string const & m = s_header_map[ *j ];
+
+ if( m.empty() ) continue;
+
+ std::vector<std::string> 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<std::string> > >::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<std::string> >::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<std::string> 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<std::string> const & path )
+ {
+ for( std::vector<std::string>::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<h1 id=\"subset-dependencies\">Subset dependencies for <em>" << module << "</em></h1>\n";
+ }
+
+ void module_start( std::string const & module )
+ {
+ std::cout << " <h2 id=\"subset-" << module << "\"><a href=\"" << module << ".html\"><em>" << module << "</em></a></h2><ul>\n";
+ }
+
+ void module_end( std::string const & /*module*/ )
+ {
+ std::cout << "</ul>\n";
+ }
+
+ void from_path( std::vector<std::string> const & path )
+ {
+ std::cout << " <li>";
+
+ for( std::vector<std::string>::const_iterator i = path.begin(); i != path.end(); ++i )
+ {
+ if( i != path.begin() )
+ {
+ std::cout << " &#8674; ";
+ }
+
+ std::cout << "<code>" << *i << "</code>";
+ }
+
+ std::cout << "</li>\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<std::string> >::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 void output_module_cmake_report( std::string module )
+{
+ std::cout <<
+
+ "# Generated by `boostdep --cmake " << module << "`\n"
+ "# Copyright 2020 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 3.5...3.16)\n"
+ "\n"
+ ;
+
+ std::replace( module.begin(), module.end(), '/', '~' );
+
+ std::vector<std::string> 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"
+ ;
+ }
+ }
+ else
+ {
+ // compiled library
+
+ std::cout <<
+
+ "add_library(boost_" << lm << "\n";
+
+ for( std::vector<std::string>::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"
+ ;
+ }
+
+ std::string um( lm );
+
+ for( std::string::iterator i = um.begin(); i != um.end(); ++i )
+ {
+ *i = std::toupper( static_cast<unsigned char>( *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"
+ "\n"
+ ;
+}
+
+// --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<std::string> const & headers, bool html )
+{
+ for( std::set<std::string>::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<std::string>::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] <module>\n"
+ " boostdep [options] --secondary <module>\n"
+ " boostdep [options] --reverse <module>\n"
+ " boostdep [options] --subset <module>\n"
+ " boostdep [options] [--header] <header>\n"
+ " boostdep --test <module>\n"
+ " boostdep --cmake <module>\n"
+ " boostdep --pkgconfig <module> <version> [<var>=<value>] [<var>=<value>]...\n"
+ " boostdep [options] --subset-for <directory>\n"
+ "\n"
+ " [options]: [--boost-root <path-to-boost>]\n"
+ " [--[no-]track-sources] [--[no-]track-tests]\n"
+ " [--html-title <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 = false;
+ 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 == "--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..00d53e8a3
--- /dev/null
+++ b/src/boost/tools/boostdep/test/assert-primary.txt
@@ -0,0 +1,9 @@
+Primary dependencies for assert:
+
+config:
+ <boost/config.hpp>
+ from <boost/assert.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..959936cfb
--- /dev/null
+++ b/src/boost/tools/boostdep/test/bind-secondary.txt
@@ -0,0 +1,5 @@
+Secondary dependencies for bind:
+
+core:
+ adds assert
+
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
--- /dev/null
+++ b/src/boost/tools/boostdep/test/utf8-test.zip
Binary files differ
diff --git a/src/boost/tools/build/CONTRIBUTING.adoc b/src/boost/tools/build/CONTRIBUTING.adoc
new file mode 100644
index 000000000..2d9d12d8f
--- /dev/null
+++ b/src/boost/tools/build/CONTRIBUTING.adoc
@@ -0,0 +1,179 @@
+// 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 http://www.boost.org/LICENSE_1_0.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, that 10 mins that you spare writing a comment, for example,
+might lead to significantly longer delay for everyone.
+
+Before contributing, make sure you are subscribed to our mailing list
+at boost-build@lists.boost.org.
+
+== Additional resources include
+
+=== The issue tracker
+
+https://github.com/boostorg/build/issues
+
+=== Mailing list
+
+boost-build@lists.boost.org
+
+http://lists.boost.org/boost-build/
+
+== 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
+ develop 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 develop 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). \ No newline at end of file
diff --git a/src/boost/tools/build/Jamroot.jam b/src/boost/tools/build/Jamroot.jam
new file mode 100644
index 000000000..be460547e
--- /dev/null
+++ b/src/boost/tools/build/Jamroot.jam
@@ -0,0 +1,271 @@
+# 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_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+import path ;
+import package ;
+import os ;
+import feature ;
+import set ;
+import toolset ;
+import bison ;
+import indirect ;
+import "class" : new ;
+import type ;
+import virtual-target ;
+import errors ;
+
+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 ;
+
+#|
+Generate the embedded jambase.
+|#
+
+feature.feature mkjambase : : dependency free ;
+toolset.flags mkjambase TOOL <mkjambase> ;
+
+exe mkjambase
+ : src/engine/mkjambase.cpp
+ ;
+explicit mkjambase ;
+
+actions mkjambase bind TOOL
+{
+ "$(TOOL)" "$(<)" "$(>)"
+}
+
+make jambase.cpp
+ : src/engine/Jambase
+ : @mkjambase
+ : <location>src/engine
+ <mkjambase>mkjambase <dependency>mkjambase ;
+explicit jambase.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 ;
+}
+
+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_cxx11.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)
+ python
+ : <target-os>windows:<source>$(b2_src_nt)
+ <target-os>vms:<source>$(b2_src_vms)
+ <target-os>$(unix_os):<source>$(b2_src_unix)
+ <dependency>jamgram.cpp
+ <dependency>jambase.cpp
+ <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.
+|#
+
+local ext = "" ;
+if [ os.on-windows ] || [ os.on-vms ]
+{
+ ext = ".exe" ;
+}
+
+package.install boost-build-engine boost-build
+ : # properties
+ : # binaries
+ $(SELF)/src/engine/b2$(ext)
+ ;
+explicit boost-build-engine ;
+
+local examples ;
+for local e in [ glob-tree-ex $(SELF)/example : * : . .svn ]
+{
+ if [ CHECK_IF_FILE [ path.native $(e) ] ]
+ {
+ examples += $(e) ;
+ }
+}
+package.install-data boost-build-examples
+ : # Which subdir of $prefix/share
+ boost-build
+ : # What to install
+ $(examples)
+ : # What is the root of the directory
+ <install-source-root>.
+ ;
+explicit boost-build-examples ;
+
+local .core-sources =
+ $(SELF)/boost-build.jam
+ $(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 ]
+ ;
+}
+
+package.install-data boost-build-core
+ : # Which subdir of $prefix/share
+ boost-build
+ : # What to install
+ $(.core-sources)
+ : # What is the root of the directory
+ <install-source-root>.
+ ;
+explicit boost-build-core ;
+
+#|
+Only install example files when requested to avoid bloating install footprint.
+|#
+if --with-examples in [ modules.peek : ARGV ]
+{
+ alias install : boost-build-engine boost-build-core boost-build-examples ;
+}
+else
+{
+ alias install : boost-build-engine boost-build-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..2ca949fcb
--- /dev/null
+++ b/src/boost/tools/build/README.adoc
@@ -0,0 +1,31 @@
+= 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/boostorg/build.svg["GitHub code size in bytes", link="https://github.com/boostorg/build"]
+
+== License
+
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+== Testing
+
+Continuously tested on:
+
+* Linux Clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8
+* Linux GCC 4.7, 4.8, 4.9, 5, 6, 7, 8, 9
+* macOS Xcode 8.3.3, 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 11.0, 11.1, 11.2, 11.3, 11.3.1
+* Windows MinGW 8.1.0
+* Windows VS 2013, 2015, 2017, 2019
+
+image:https://img.shields.io/azure-devops/build/grafikrobot/200cb3a3-3fcf-4a47-85ad-3cc17f2bec9e/3/master.svg?label=master&logo=azuredevops["Linux/Windows/macOS: master", link="https://dev.azure.com/grafikrobot/B2"]
+image:https://img.shields.io/azure-devops/build/grafikrobot/200cb3a3-3fcf-4a47-85ad-3cc17f2bec9e/3/develop.svg?label=develop&logo=azuredevops["Linux/Windows/macOS: develop", link="https://dev.azure.com/grafikrobot/B2"]
+
+== More
+
+See the link:https://boostorg.github.io/build/[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..ebb568de8
--- /dev/null
+++ b/src/boost/tools/build/azure-pipelines.yml
@@ -0,0 +1,727 @@
+# 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 Rivera 2015-2019.
+
+trigger:
+ branches:
+ include:
+ - develop
+ - master
+ - feature/*
+pr:
+ branches:
+ include:
+ - develop
+
+stages:
+
+- stage: Test
+ jobs:
+
+ - job: 'Linux'
+ pool:
+ vmImage: 'ubuntu-16.04'
+ strategy:
+ matrix:
+ GCC 9:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ GCC 8:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-8
+ PACKAGES: g++-8
+ GCC 7:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-7
+ PACKAGES: g++-7
+ GCC 6:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-6
+ PACKAGES: g++-6
+ GCC 5:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-5
+ PACKAGES: g++-5
+ GCC 4.9:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-4.9
+ PACKAGES: g++-4.9
+ GCC 4.8:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-4.8
+ PACKAGES: g++-4.8
+ GCC 4.7:
+ TOOLSET: gcc
+ TEST_TOOLSET: gcc
+ CXX: g++-4.7
+ PACKAGES: g++-4.7
+ Clang 8:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-8
+ PACKAGES: clang-8
+ LLVM_REPO: llvm-toolchain-xenial-8
+ Clang 7:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-7
+ PACKAGES: clang-7
+ LLVM_REPO: llvm-toolchain-xenial-7
+ Clang 6:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-6.0
+ PACKAGES: clang-6.0
+ LLVM_REPO: llvm-toolchain-xenial-6.0
+ Clang 5:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-5.0
+ PACKAGES: clang-5.0
+ LLVM_REPO: llvm-toolchain-xenial-5.0
+ Clang 4:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-4.0
+ PACKAGES: clang-4.0
+ LLVM_REPO: llvm-toolchain-xenial-4.0
+ Clang 3.9:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-3.9
+ PACKAGES: clang-3.9
+ Clang 3.8:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-3.8
+ PACKAGES: clang-3.8
+ Clang 3.7:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-3.7
+ PACKAGES: clang-3.7
+ Clang 3.6:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-3.6
+ PACKAGES: clang-3.6
+ Clang 3.5:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++-3.5
+ PACKAGES: clang-3.5
+ steps:
+ - bash: |
+ set -e
+ uname -a
+ sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ if test -n "${LLVM_REPO}" ; then
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
+ sudo -E apt-add-repository "deb http://apt.llvm.org/xenial/ ${LLVM_REPO} main"
+ fi
+ sudo -E apt-get update
+ sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
+ displayName: Install
+ - bash: |
+ set -e
+ cd src/engine
+ set PATH=${PATH};${CXX_PATH}
+ ./build.sh ${TOOLSET}
+ ./b2 -v
+ cd ../..
+ displayName: Build
+ - bash: |
+ set -e
+ CXX_PATH=`which ${CXX}`
+ cd test
+ echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
+ python test_all.py ${TEST_TOOLSET}
+ cd ..
+ displayName: Test
+ - bash: |
+ set -e
+ CXX_PATH=`which ${CXX}`
+ echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
+ ./src/engine/b2 b2 warnings-as-errors=on toolset=${TEST_TOOLSET}
+ displayName: "No Warnings"
+ - bash: |
+ set -e
+ CXX_PATH=`which ${CXX}`
+ echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
+ ./bootstrap.sh --with-toolset=${TOOLSET}
+ ./b2 --prefix=./.b2 install ${TEST_TOOLSET}
+ displayName: Bootstrap
+
+ - job: 'Windows'
+ strategy:
+ matrix:
+ VS 2019:
+ TOOLSET: vc142
+ TEST_TOOLSET: msvc
+ VM_IMAGE: 'windows-2019'
+ VS 2017:
+ TOOLSET: vc141
+ TEST_TOOLSET: msvc
+ VM_IMAGE: 'vs2017-win2016'
+ VS 2015:
+ TOOLSET: vc14
+ TEST_TOOLSET: msvc
+ VM_IMAGE: 'vs2015-win2012r2'
+ VS 2013:
+ TOOLSET: vc12
+ TEST_TOOLSET: msvc
+ VM_IMAGE: 'vs2015-win2012r2'
+ MinGW 8.1.0:
+ TOOLSET: mingw
+ TEST_TOOLSET: gcc
+ VM_IMAGE: 'vs2017-win2016'
+ pool:
+ vmImage: $(VM_IMAGE)
+ 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 test
+ echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam
+ python test_all.py $env:TEST_TOOLSET
+ cd ..
+ displayName: Test
+ - powershell: |
+ $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH
+ $env:path += ';' + $env:CXX_PATH
+ echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam
+ ./src/engine/b2.exe --debug-configuration b2 warnings-as-errors=on toolset=$env:TEST_TOOLSET
+ displayName: "No Warnings"
+ - powershell: |
+ $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH
+ $env:path += ';' + $env:CXX_PATH
+ echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam
+ ./bootstrap.bat
+ ./b2.exe --debug-configuration --prefix=./.b2 install toolset=$env:TEST_TOOLSET
+ displayName: Bootstrap
+
+ - job: 'macOS'
+ strategy:
+ matrix:
+ 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:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.2.app
+ VM_IMAGE: 'macOS-10.15'
+ Xcode 11.1:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.1.app
+ VM_IMAGE: 'macOS-10.15'
+ Xcode 11.0:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.app
+ VM_IMAGE: 'macOS-10.15'
+ Xcode 10.2.1:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_10.2.1.app
+ VM_IMAGE: 'macOS-10.14'
+ Xcode 10.2:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_10.2.app
+ VM_IMAGE: 'macOS-10.14'
+ Xcode 10.1:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_10.1.app
+ VM_IMAGE: 'macOS-10.14'
+ Xcode 10.0:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_10.app
+ VM_IMAGE: 'macOS-10.14'
+ Xcode 9.4.1:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.4.1.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 9.4:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.4.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 9.3.1:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.3.1.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 9.3:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.3.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 9.2:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.2.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 9.1:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.1.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 9.0.1:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.0.1.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 9.0:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_9.app
+ VM_IMAGE: 'macOS-10.13'
+ Xcode 8.3.3:
+ TOOLSET: clang
+ TEST_TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_8.3.3.app
+ VM_IMAGE: 'macOS-10.13'
+ pool:
+ vmImage: $(VM_IMAGE)
+ 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}
+ ./b2 -v
+ cd ../..
+ displayName: Build
+ - bash: |
+ set -e
+ CXX_PATH=`which ${CXX}`
+ cd test
+ echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
+ python test_all.py ${TEST_TOOLSET}
+ cd ..
+ displayName: Test
+ - bash: |
+ set -e
+ CXX_PATH=`which ${CXX}`
+ echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
+ ./src/engine/b2 b2 warnings-as-errors=on toolset=${TEST_TOOLSET}
+ displayName: "No Warnings"
+ - bash: |
+ set -e
+ CXX_PATH=`which ${CXX}`
+ echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
+ ./bootstrap.sh --with-toolset=${TOOLSET}
+ ./b2 --prefix=./.b2 install ${TEST_TOOLSET}
+ displayName: Bootstrap
+
+- stage: Boost
+ jobs:
+
+ - job: 'Release_Linux'
+ displayName: 'Release Linux'
+ pool:
+ vmImage: 'ubuntu-latest'
+ strategy:
+ matrix:
+ 1.72.0 .. GCC 9:
+ BOOST_VERSION: 1.72.0
+ BOOST_VERSION_U: 1_72_0
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ 1.71.0 .. GCC 9:
+ BOOST_VERSION: 1.71.0
+ BOOST_VERSION_U: 1_71_0
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ 1.70.0 .. GCC 9:
+ BOOST_VERSION: 1.70.0
+ BOOST_VERSION_U: 1_70_0
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ 1.69.0 .. GCC 9:
+ BOOST_VERSION: 1.69.0
+ BOOST_VERSION_U: 1_69_0
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ 1.68.0 .. GCC 9:
+ BOOST_VERSION: 1.68.0
+ BOOST_VERSION_U: 1_68_0
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ 1.67.0 .. GCC 9:
+ BOOST_VERSION: 1.67.0
+ BOOST_VERSION_U: 1_67_0
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ 1.66.0 .. GCC 9:
+ BOOST_VERSION: 1.66.0
+ BOOST_VERSION_U: 1_66_0
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ steps:
+ - bash: |
+ set -e
+ uname -a
+ sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ if test -n "${LLVM_REPO}" ; then
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
+ sudo -E apt-add-repository "deb http://apt.llvm.org/xenial/ ${LLVM_REPO} main"
+ fi
+ sudo -E apt-get update
+ sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
+ displayName: Install
+ - bash: |
+ set -e
+ cd src/engine
+ ./build.sh ${TOOLSET}
+ ./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: 'Dev_Linux'
+ displayName: 'Dev Linux'
+ pool:
+ vmImage: 'ubuntu-latest'
+ strategy:
+ matrix:
+ Master .. GCC 9:
+ BOOST_BRANCH: master
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ Master .. Clang 8:
+ BOOST_BRANCH: master
+ TOOLSET: clang
+ CXX: clang++-8
+ PACKAGES: clang-8
+ LLVM_REPO: llvm-toolchain-xenial-8
+ Develop .. GCC 9:
+ BOOST_BRANCH: develop
+ TOOLSET: gcc
+ CXX: g++-9
+ PACKAGES: g++-9
+ Develop .. Clang 8:
+ BOOST_BRANCH: develop
+ TOOLSET: clang
+ CXX: clang++-8
+ PACKAGES: clang-8
+ LLVM_REPO: llvm-toolchain-xenial-8
+ steps:
+ - bash: |
+ set -e
+ uname -a
+ sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ if test -n "${LLVM_REPO}" ; then
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
+ sudo -E apt-add-repository "deb http://apt.llvm.org/xenial/ ${LLVM_REPO} main"
+ fi
+ sudo -E apt-get update
+ sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
+ displayName: Install
+ - bash: |
+ set -e
+ cd src/engine
+ ./build.sh ${TOOLSET}
+ ./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: 'Release_macOS'
+ displayName: 'Release macOS'
+ pool:
+ vmImage: 'macOS-latest'
+ strategy:
+ matrix:
+ 1.72.0 .. Xcode 11.3.1:
+ BOOST_VERSION: 1.72.0
+ BOOST_VERSION_U: 1_72_0
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.app
+ 1.71.0 .. Xcode 11.3.1:
+ BOOST_VERSION: 1.71.0
+ BOOST_VERSION_U: 1_71_0
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.app
+ 1.70.0 .. Xcode 11.3.1:
+ BOOST_VERSION: 1.70.0
+ BOOST_VERSION_U: 1_70_0
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.app
+ 1.69.0 .. Xcode 11.3.1:
+ BOOST_VERSION: 1.69.0
+ BOOST_VERSION_U: 1_69_0
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.app
+ 1.68.0 .. Xcode 11.3.1:
+ BOOST_VERSION: 1.68.0
+ BOOST_VERSION_U: 1_68_0
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.2.app
+ 1.67.0 .. Xcode 11.3.1:
+ BOOST_VERSION: 1.67.0
+ BOOST_VERSION_U: 1_67_0
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.app
+ 1.66.0 .. Xcode 11.3.1:
+ BOOST_VERSION: 1.66.0
+ BOOST_VERSION_U: 1_66_0
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.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}
+ ./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: 'Dev_macOS'
+ displayName: 'Dev macOS'
+ pool:
+ vmImage: 'macOS-latest'
+ strategy:
+ matrix:
+ Master .. Xcode 11.3.1:
+ BOOST_BRANCH: master
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.app
+ Develop .. Xcode 11.3.1:
+ BOOST_BRANCH: develop
+ TOOLSET: clang
+ CXX: clang++
+ XCODE_APP: /Applications/Xcode_11.3.1.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}
+ ./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: 'Release_Windows'
+ displayName: 'Release Windows'
+ pool:
+ vmImage: 'windows-latest'
+ strategy:
+ matrix:
+ 1.72.0 .. VS 2019:
+ BOOST_VERSION: 1.72.0
+ BOOST_VERSION_U: 1_72_0
+ TOOLSET: vc142
+ 1.71.0 .. VS 2019:
+ BOOST_VERSION: 1.71.0
+ BOOST_VERSION_U: 1_71_0
+ TOOLSET: vc142
+ 1.70.0 .. VS 2019:
+ BOOST_VERSION: 1.70.0
+ BOOST_VERSION_U: 1_70_0
+ TOOLSET: vc142
+ 1.69.0 .. VS 2019:
+ BOOST_VERSION: 1.69.0
+ BOOST_VERSION_U: 1_69_0
+ TOOLSET: vc142
+ 1.68.0 .. VS 2019:
+ BOOST_VERSION: 1.68.0
+ BOOST_VERSION_U: 1_68_0
+ TOOLSET: vc142
+ 1.67.0 .. VS 2019:
+ BOOST_VERSION: 1.67.0
+ BOOST_VERSION_U: 1_67_0
+ TOOLSET: vc142
+ 1.66.0 .. VS 2019:
+ BOOST_VERSION: 1.66.0
+ BOOST_VERSION_U: 1_66_0
+ TOOLSET: vc142
+ 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
+
+ - job: 'Dev_Windows'
+ displayName: 'Dev Windows'
+ pool:
+ vmImage: 'windows-latest'
+ strategy:
+ matrix:
+ Master .. VS 2019:
+ BOOST_BRANCH: master
+ TOOLSET: vc142
+ Develop .. VS 2019:
+ BOOST_BRANCH: develop
+ TOOLSET: vc142
+ 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: WebsiteUpdate
+ displayName: 'Website Update'
+ condition: in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/develop')
+ jobs:
+
+ - job: Documentation
+ pool:
+ vmImage: 'ubuntu-16.04'
+ steps:
+ - task: UsePythonVersion@0
+ inputs:
+ versionSpec: '2.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..a1240fdf7
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..25acc0a1c
--- /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..37bc9502f
--- /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`
+( cd "./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..ef70113d4
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.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..d03788c5c
--- /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_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.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..02abe407f
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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
--- /dev/null
+++ b/src/boost/tools/build/example/built_tool/core/a.td
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..a219fa5c6
--- /dev/null
+++ b/src/boost/tools/build/example/complex-testing/compile-fail.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 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)
+//
+// http://www.boost.org
+//
+
+#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..965661188
--- /dev/null
+++ b/src/boost/tools/build/example/complex-testing/fail.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 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)
+//
+// http://www.boost.org
+//
+
+#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..a5942a239
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..6282e8f24
--- /dev/null
+++ b/src/boost/tools/build/example/complex-testing/post.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 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)
+//
+// http://www.boost.org
+//
+
+#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..a7e2b6ca0
--- /dev/null
+++ b/src/boost/tools/build/example/complex-testing/success.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 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)
+//
+// http://www.boost.org
+//
+
+#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..6cdb45e4d
--- /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_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.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..9f13acd87
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..5e986d91c
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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
--- /dev/null
+++ b/src/boost/tools/build/example/customization/t2.verbatim
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..7b51604c4
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..089bd3831
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..364975671
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..c48f2207b
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..9703134db
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..b3d9e7633
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..d5096df30
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..862f8930c
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..6888e1aba
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..97ac7fd6b
--- /dev/null
+++ b/src/boost/tools/build/example/hello/hello.cpp
@@ -0,0 +1,18 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+// tag::source[]
+#include <iostream>
+
+int main()
+{
+ std::cout << "Hello!\n";
+ return 1;
+}
+// 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..78d327751
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..f62c1c35d
--- /dev/null
+++ b/src/boost/tools/build/example/libraries/app/app.cpp
@@ -0,0 +1,15 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+#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..ed2054e13
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..e6339ee9b
--- /dev/null
+++ b/src/boost/tools/build/example/libraries/util/foo/bar.cpp
@@ -0,0 +1,13 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+#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..50f5e19d2
--- /dev/null
+++ b/src/boost/tools/build/example/libraries/util/foo/include/lib1.h
@@ -0,0 +1,10 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+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..7b6359ea4
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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/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..fd1528510
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..741bf7025
--- /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_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.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..115164aae
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..f618056a0
--- /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_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.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..190948174
--- /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_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.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..36f37bfb3
--- /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_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.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..f911d4577
--- /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_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.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..5df7ff0ef
--- /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_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.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..ca9bcc738
--- /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_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.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..8d843637b
--- /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_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.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..c53e75d58
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..bbeb7007c
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..303363e91
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..c6d23c9d4
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..f9f950267
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..03be582e5
--- /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_1_0.txt
+# or copy at http://www.boost.org/LICENSE_1_0.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..8f1ffc2fb
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..ed36f7469
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..d0b806294
--- /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_1_0.txt
+# or copy at http://www.boost.org/LICENSE_1_0.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..f2a08b5fa
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..e821b1690
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..d7743864f
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..df27444bd
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..ffc96cc3e
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..40675a72e
--- /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_1_0.txt
+# or copy at http://www.boost.org/LICENSE_1_0.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..fc72fd5e6
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..b964324ca
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..8297df876
--- /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_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.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..ad22d6744
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..a219fa5c6
--- /dev/null
+++ b/src/boost/tools/build/example/testing/compile-fail.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 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)
+//
+// http://www.boost.org
+//
+
+#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..965661188
--- /dev/null
+++ b/src/boost/tools/build/example/testing/fail.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 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)
+//
+// http://www.boost.org
+//
+
+#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..047aff39c
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..bf5588062
--- /dev/null
+++ b/src/boost/tools/build/example/testing/success.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 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)
+//
+// http://www.boost.org
+//
+
+#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..680802289
--- /dev/null
+++ b/src/boost/tools/build/example/time/hello.cpp
@@ -0,0 +1,16 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+#include <iostream>
+
+int main()
+{
+ std::cout << "Hello!\n";
+ return 1;
+}
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..3e2730f80
--- /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_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.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..8b4aed1ba
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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:
+#
+# http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html
+#
+# 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:
+#
+# http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html
+#
+
+# 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:
+#
+# http://boost.org/boost-build2/doc/html/bbv2/advanced.html#bbv2.advanced.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..42b69f335
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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..eb81a2fd4
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..52d21e498
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..60d8e64bb
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..26cb4b1e6
--- /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_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.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/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
--- /dev/null
+++ b/src/boost/tools/build/src/__init__.py
diff --git a/src/boost/tools/build/src/bootstrap.jam b/src/boost/tools/build/src/bootstrap.jam
new file mode 100644
index 000000000..04cc023e4
--- /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_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.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..60425c542
--- /dev/null
+++ b/src/boost/tools/build/src/build-system.jam
@@ -0,0 +1,1079 @@
+# 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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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 = darwin ;
+ }
+ }
+
+ 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: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ;
+
+ 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)
+ {
+ expanded += [ build-request.convert-command-line-elements $(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 ] ;
+ }
+
+ # 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
--- /dev/null
+++ b/src/boost/tools/build/src/build/__init__.py
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..09eb26ea9
--- /dev/null
+++ b/src/boost/tools/build/src/build/ac.jam
@@ -0,0 +1,324 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.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 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)" ;
+ 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)" ;
+ 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" ;
+ return [ $(library[1]).add-raw <include>$(includes) ] $(library[2-]) ;
+ }
+ else
+ {
+ config-cache.set $(key) : missing ;
+ configure.log-library-search-result $(name) : "no" ;
+ 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..3a97b7263
--- /dev/null
+++ b/src/boost/tools/build/src/build/alias.jam
@@ -0,0 +1,78 @@
+# Copyright 2003, 2004, 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)
+
+# 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 ] ] ;
+ }
+}
+
+
+# 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..e9078c746
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..4c767c3b2
--- /dev/null
+++ b/src/boost/tools/build/src/build/build-request.jam
@@ -0,0 +1,400 @@
+# Copyright 2002 Dave 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)
+
+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 = <$(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 ! $(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..65bf91a8c
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..646b05a03
--- /dev/null
+++ b/src/boost/tools/build/src/build/configure.jam
@@ -0,0 +1,620 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright 2017 Rene Rivera.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.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 ;
+
+
+# The configure feature allows external definition of what features are
+# relevant for doing configuration builds. One can add additional relevant
+# features by using:
+#
+# import feature ;
+# import configure ;
+# feature.compose <configure> : <threading> ;
+#
+feature.feature configure : : composite optional ;
+
+# This is the initial set of relevant features. Note that subfeature of all
+# relevant features are also considered relevant.
+#
+feature.compose <configure> :
+ <target-os> <toolset> <address-model> <architecture> <cxxstd> ;
+
+
+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) ;
+}
+
+
+rule log-check-result ( result )
+{
+ if ! $(.announced-checks)
+ {
+ ECHO "Performing configuration checks\n" ;
+ .announced-checks = 1 ;
+ }
+
+ ECHO $(result) ;
+ # FIXME: Unfinished code. Nothing seems to set .check-results at the moment.
+ #.check-results += $(result) ;
+}
+
+
+rule log-library-search-result ( library : result )
+{
+ local x = [ PAD " - $(library)" : $(.width) ] ;
+ log-check-result "$(x) : $(result)" ;
+}
+
+
+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 ( )
+{
+ # 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-name = $(what) [ $(ps).raw ] ;
+ cache-name = $(cache-name:J=-) ;
+ local value = [ config-cache.get $(cache-name) ] ;
+
+ local result ;
+ local jam-targets ;
+
+ maybe-force-rebuild $(targets) ;
+
+ for local t in $(targets)
+ {
+ jam-targets += [ $(t).actualize ] ;
+ }
+
+ if $(value)
+ {
+ local x = [ PAD " - $(what)" : $(.width) ] ;
+ if $(value) = true
+ {
+ .$(what)-supported.$(ps) = yes ;
+ result = true ;
+ log-check-result "$(x) : yes (cached)" ;
+ }
+ else
+ {
+ log-check-result "$(x) : no (cached)" ;
+ }
+ }
+ else if ! UPDATE_NOW in [ RULENAMES ]
+ {
+ # Cannot determine. Assume existence.
+ }
+ else
+ {
+ local x = [ PAD " - $(what)" : $(.width) ] ;
+ if [ UPDATE_NOW $(jam-targets) :
+ $(.log-fd) : ignore-minus-n : ignore-minus-q ]
+ {
+ .$(what)-supported.$(ps) = yes ;
+ result = true ;
+ log-check-result "$(x) : yes" ;
+ }
+ else
+ {
+ log-check-result "$(x) : no" ;
+ }
+ }
+ 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-name = $(what) $($(args)[1]) [ $(ps).raw ] ;
+ cache-name = $(cache-name:J=-) ;
+ local value = [ config-cache.get $(cache-name) ] ;
+
+ 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)" ;
+ }
+ 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])" ;
+ break ;
+ }
+ }
+ if ! $(result)
+ {
+ log-check-result "$(x) : none" ;
+ 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 ( )
+{
+ local relevant = [ feature.expand <configure> ] ;
+ local result = ;
+ for local f in $(relevant)
+ {
+ if $(f) != <configure>
+ {
+ local sub = [ modules.peek feature : $(f).subfeatures ] ;
+ local name = [ utility.ungrist $(f) ] ;
+ result += $(f) <$(name)-$(sub)> ;
+ }
+ }
+ return $(result) ;
+}
+
+rule builds ( metatarget-reference : properties * : what ? : retry ? )
+{
+ local toolset-subfeatures = [ modules.peek feature : <toolset>.subfeatures ] ;
+ toolset-subfeatures = <toolset-$(toolset-subfeatures)> ;
+ # FIXME: This should not be hardcoded. Other checks might want to consider a
+ # different set of features as relevant.
+ local relevant = [ property.select [ 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 = [ property.select [ 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) : $(19) ] ;
+}
+
+
+# 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 18 19
+ {
+ 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 18 19 ;
+ 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)
+ : $(self.targets.18) $(self.what.18)
+ : $(self.targets.19) $(self.what.19) ] ;
+ 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)
+ : [ configure.get-relevant-features ] ] ;
+}
+
+# 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 ]
+ : [ configure.get-relevant-features ] ] ;
+}
+
+
+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..9bb043773
--- /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_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.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..6e49a8b5e
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.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..dd517395f
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..09d7af1a5
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..86e72144d
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..36d8304bf
--- /dev/null
+++ b/src/boost/tools/build/src/build/generators.jam
@@ -0,0 +1,1447 @@
+# Copyright 2002. Vladimir Prus
+# Copyright 2006. 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)
+
+# 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)
+ {
+ 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..4e77276d7
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..172315e4f
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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 "'http://www.boost.org'." ;
+ }
+
+ 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..29e99a2c2
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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 'http://boost.org/boost-build2'."""
+ % (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..ae6dd2ca4
--- /dev/null
+++ b/src/boost/tools/build/src/build/property-set.jam
@@ -0,0 +1,591 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2003, 2004, 2005, 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)
+
+import "class" : new ;
+import feature ;
+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 [ $(parent-requirements).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) ;
+ }
+}
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..35bf96281
--- /dev/null
+++ b/src/boost/tools/build/src/build/property.jam
@@ -0,0 +1,977 @@
+# 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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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 * )
+{
+ local base ;
+ 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
+ {
+ base += $(p) ;
+ }
+ }
+
+ local result = $(base) ;
+ 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)
+ {
+ result += $(s[2]) ;
+ }
+ }
+ else
+ {
+ # Have negative checks
+ local fail ;
+ while $(condition)
+ {
+ local c = $(condition[1]) ;
+ local m = [ MATCH ^!(.*) : $(c) ] ;
+ if $(m)
+ {
+ local p = $(m:G=$(c:G)) ;
+ if $(p) in $(context)
+ {
+ fail = true ;
+ c = ;
+ }
+ }
+ else
+ {
+ if ! $(c) in $(context)
+ {
+ fail = true ;
+ c = ;
+ }
+ }
+ condition = $(condition[2-]) ;
+ }
+ if ! $(fail)
+ {
+ result += $(s[2]) ;
+ }
+ }
+ }
+ # Import here to avoid cyclic dependency
+ import project ;
+ 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 ] ] ;
+ result +=
+ [ translate $(new) : $(project-id) : $(location) : $(m) ] ;
+ }
+ else
+ {
+ result += $(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 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) "," ]
+ {
+ e += [ feature.expand-subfeatures $(c) : true ] ;
+ }
+
+ 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)
+ {
+ 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 ;
+ 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 <define>MY_RELEASE
+ : 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 ;
+
+ 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 ;
+
+ 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..e7f5c982d
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..bbb9b4db4
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..9f5fc76f2
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..cb841f8fe
--- /dev/null
+++ b/src/boost/tools/build/src/build/targets.jam
@@ -0,0 +1,1792 @@
+# Copyright Vladimir Prus 2002.
+# Copyright Rene Rivera 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)
+
+# 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)
+ {
+ names += [ $(t).full-name ] ;
+ }
+
+ import errors ;
+ errors.error "Recursion in main target references"
+ : "the following target are being built currently:"
+ : $(names) ;
+ }
+ .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 ] ;
+ }
+
+ if ( $(rproperties[1]) != "@error" ) && ( [ $(rproperties).get
+ <build> ] != no )
+ {
+ 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) ;
+ }
+
+ 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) ] ;
+ 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) ;
+ }
+ }
+ else
+ {
+ if $(rproperties[1]) = "@error"
+ {
+ ECHO [ targets.indent ] "Skipping build of:" [ full-name ]
+ "cannot compute common properties" ;
+ }
+ 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.
+ }
+ else
+ {
+ ECHO [ targets.indent ] "Skipping build of: " [ full-name ]
+ " unknown reason" ;
+ }
+
+ # We are here either because there has been an error computing
+ # properties or there is <build>no in properties. 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. 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 is not clear if that is a good idea anyway. The alias
+ # target, for example, should not fail to build if a
+ # dependency fails.
+ 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" ;
+ }
+}
+
+
+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 http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ;
+ 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..45bbe497e
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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 http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html"
+
+ 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..d103f6b70
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..323e7fba3
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..419656df0
--- /dev/null
+++ b/src/boost/tools/build/src/build/type.jam
@@ -0,0 +1,404 @@
+# 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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." ;
+ }
+
+ {
+ .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..e6f0c8fe0
--- /dev/null
+++ b/src/boost/tools/build/src/build/version.jam
@@ -0,0 +1,166 @@
+# 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_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+import numbers ;
+
+
+# Mirror engine JAM_VERSION
+.major = "4" ;
+.minor = "2" ;
+
+
+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 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.
+}
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..d7b84321c
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..babe53eef
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html"
+
+ 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
--- /dev/null
+++ b/src/boost/tools/build/src/contrib/__init__.py
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..46a153a51
--- /dev/null
+++ b/src/boost/tools/build/src/contrib/boost.jam
@@ -0,0 +1,308 @@
+# Copyright 2008 - 2013 Roland Schwarz
+# 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 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 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..352941e01
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..cba517048
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..0bd0ae559
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..9ec97ef51
--- /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_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.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/Jambase b/src/boost/tools/build/src/engine/Jambase
new file mode 100644
index 000000000..b2f8ebf31
--- /dev/null
+++ b/src/boost/tools/build/src/engine/Jambase
@@ -0,0 +1,189 @@
+#
+# /+\
+# +\ 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 2002-2004 Rene Rivera.
+# 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)
+
+if $(NT)
+{
+ SLASH ?= \\ ;
+}
+SLASH ?= / ;
+
+
+# Glob for patterns in the directories starting from the given start directory,
+# up to and including the root of the file-system. We stop globbing as soon as
+# we find at least one match.
+#
+rule find-to-root ( dir : patterns + )
+{
+ local globs = [ GLOB $(dir) : $(patterns) ] ;
+ while ! $(globs) && $(dir:P) != $(dir)
+ {
+ dir = $(dir:P) ;
+ globs = [ GLOB $(dir) : $(patterns) ] ;
+ }
+ return $(globs) ;
+}
+
+
+# This global will hold the location of the user's boost-build.jam file.
+.boost-build-file = ;
+
+# This global will hold the location of the build system bootstrap file.
+.bootstrap-file = ;
+
+# Remember the value of $(BOOST_BUILD_PATH) supplied to us by the user.
+BOOST_BUILD_PATH.user-value = $(BOOST_BUILD_PATH) ;
+
+# On Unix only, when BOOST_BUILD_PATH is not supplied by the user, set it to a
+# sensible default value. This allows B2 to work without any
+# environment variables, which is good in itself and also required by the Debian
+# Policy.
+if ! $(BOOST_BUILD_PATH) && $(UNIX)
+{
+ BOOST_BUILD_PATH = /usr/share/boost-build ;
+}
+
+
+rule _poke ( module-name ? : variables + : value * )
+{
+ module $(<)
+ {
+ $(>) = $(3) ;
+ }
+}
+
+
+# This rule can be invoked from an optional user's boost-build.jam file to both
+# indicate where to find the build system files, and to load them. The path
+# indicated is relative to the location of the boost-build.jam file.
+#
+rule boost-build ( dir ? )
+{
+ if $(.bootstrap-file)
+ {
+ ECHO "Error: Illegal attempt to re-bootstrap the build system by invoking" ;
+ ECHO ;
+ ECHO " 'boost-build" $(dir) ";'" ;
+ ECHO ;
+ EXIT "Please consult the documentation at 'http://www.boost.org'." ;
+ }
+
+ # Add the given directory to the path so we can find the build system. If
+ # dir is empty, has no effect.
+ BOOST_BUILD_PATH = $(dir:R=$(.boost-build-file:D)) $(BOOST_BUILD_PATH) ;
+
+ # We might have just modified the *global* value of BOOST_BUILD_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.
+ _poke .ENVIRON : BOOST_BUILD_PATH : $(BOOST_BUILD_PATH) ;
+
+ # Try to find the build system bootstrap file 'bootstrap.jam'.
+ local bootstrap-file = [ GLOB $(BOOST_BUILD_PATH) : bootstrap.jam ] ;
+ .bootstrap-file = $(bootstrap-file[1]) ;
+
+ # There is no bootstrap.jam we can find, exit with an error.
+ if ! $(.bootstrap-file)
+ {
+ ECHO "Unable to load B2: could not find build system." ;
+ ECHO --------------------------------------------------------- ;
+ ECHO "$(.boost-build-file) attempted to load the build system by invoking" ;
+ ECHO ;
+ ECHO " 'boost-build" $(dir) ";'" ;
+ ECHO ;
+ ECHO "but we were unable to find \"bootstrap.jam\" in the specified directory" ;
+ ECHO "or in BOOST_BUILD_PATH (searching "$(BOOST_BUILD_PATH:J=", ")")." ;
+ ECHO ;
+ EXIT "Please consult the documentation at 'http://www.boost.org'." ;
+ }
+
+ if [ MATCH .*(--debug-configuration).* : $(ARGV) ]
+ {
+ ECHO "notice: loading B2 from"
+ [ NORMALIZE_PATH $(.bootstrap-file:D) ] ;
+ }
+
+ # Load the build system, now that we know where to start from.
+ include $(.bootstrap-file) ;
+}
+
+
+{
+ # We attempt to load "boost-build.jam" by searching from the current
+ # invocation directory up to the root of the file-system.
+ #
+ # boost-build.jam is expected to invoke the "boost-build" rule to load the
+ # B2 files.
+
+ local search-path = $(BOOST_BUILD_PATH) $(BOOST_ROOT) ;
+ local self = [ SELF_PATH ] ;
+ local boost-build-relative = ../../share/boost-build ;
+ local self-based-path = [ NORMALIZE_PATH $(boost-build-relative:R=$(self)) ] ;
+
+ local boost-build-files =
+ [ find-to-root [ PWD ] : boost-build.jam ]
+ [ GLOB $(self-based-path) : boost-build.jam ]
+ # Another temporary measure so Jam works with B2 v1.
+ [ GLOB $(search-path) : boost-build.jam ] ;
+
+ .boost-build-file = $(boost-build-files[1]) ;
+
+ # There is no boost-build.jam we can find, exit with an error, and
+ # information.
+ if ! $(.boost-build-file)
+ {
+ ECHO "Unable to load B2: could not find \"boost-build.jam\"" ;
+ ECHO --------------------------------------------------------------- ;
+
+ if ! [ MATCH .*(bjam).* : $(ARGV[1]:BL) ]
+ {
+ ECHO "BOOST_ROOT must be set, either in the environment, or " ;
+ ECHO "on the command-line with -sBOOST_ROOT=..., to the root" ;
+ ECHO "of the boost installation." ;
+ ECHO ;
+ }
+
+ ECHO "Attempted search from" [ PWD ] "up to the root" ;
+ ECHO "at" $(self-based-path) ;
+ ECHO "and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: "$(search-path:J=", ")"." ;
+ EXIT "Please consult the documentation at 'http://www.boost.org'." ;
+ }
+
+ if [ MATCH .*(--debug-configuration).* : $(ARGV) ]
+ {
+ ECHO "notice: found boost-build.jam at"
+ [ NORMALIZE_PATH $(.boost-build-file) ] ;
+ }
+
+ # Now load the boost-build.jam to get the build system loaded. This
+ # incidentaly loads the users jamfile and attempts to build targets.
+ #
+ # We also set it up so we can tell whether we are loading the new V2 system
+ # or the the old V1 system.
+ include $(.boost-build-file) ;
+
+ # Check that, at minimum, the bootstrap file was found.
+ if ! $(.bootstrap-file)
+ {
+ ECHO "Unable to load B2" ;
+ ECHO -------------------------- ;
+ ECHO "\"$(.boost-build-file)\" was found by searching from" [ PWD ] "up to the root" ;
+ ECHO "and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: "$(search-path:J=", ")"." ;
+ ECHO ;
+ ECHO "However, it failed to call the \"boost-build\" rule to indicate" ;
+ ECHO "the location of the build system." ;
+ ECHO ;
+ EXIT "Please consult the documentation at 'http://www.boost.org'." ;
+ }
+}
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..cd6cefac8
--- /dev/null
+++ b/src/boost/tools/build/src/engine/build.bat
@@ -0,0 +1,194 @@
+@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, metrowerks, mingw,
+ECHO ### vc11, vc12, vc14, vc141, vc142
+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 filent.cpp filesys.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% jambase.cpp 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 regexp.cpp rules.cpp scan.cpp search.cpp jam_strings.cpp
+set B2_SOURCES=%B2_SOURCES% subst.cpp sysinfo.cpp 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..41af3715e
--- /dev/null
+++ b/src/boost/tools/build/src/engine/build.sh
@@ -0,0 +1,496 @@
+#!/bin/sh
+
+#~ Copyright 2002-2019 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)
+
+# Reset the toolset.
+B2_TOOLSET=
+B2_OS=
+
+# Run a command, and echo before doing so. Also checks the exit status and quits
+# if there was an error.
+echo_run ()
+{
+ echo "> $@"
+ $@
+ r=$?
+ if test $r -ne 0 ; 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 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
+environment variable. You can also use additional flags for the compiler
+with the CXXFLAGS environment variable.
+
+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, CXXFLAGS, and LIBS environment variables, if present.
+
+Similarly, the cross-cxx toolset is available for cross-compiling by using the
+BUILD_CXX, BUILD_CXXFLAGS, and BUILD_LDFLAGS environment variables to compile
+binaries that will be executed on the build system. This allows CXX etc. to be
+set for cross-compilers to be propagated to subprocesses.
+" 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
+}
+
+# Check that the given command runs.
+test_exec ()
+{
+ "$*" 1>/dev/null 2>/dev/null
+}
+
+# Check that the compiler can do C++11.
+test_cxx11 ()
+{
+ if ! test $NO_CXX11_CHECK ; then
+ case $1 in
+ gcc) ( ${CXX:=g++} -x c++ -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ intel-darwin) ( ${CXX:=icc} -xc++ check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ intel-linux) ( ${CXX:=icc} -xc++ check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ vacpp) ( ${CXX:=xlC_r} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ xlcpp) ( ${CXX:=xlC_r} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ como) ( ${CXX:=como} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ kcc) ( ${CXX:=KCC} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ kylix) ( ${CXX:=bc++} -tC -q check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ mipspro) ( ${CXX:=CC} -FE:template_in_elf_section -ptused check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ pathscale) ( ${CXX:=pathCC} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ pgi) ( ${CXX:=pgc++} -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ sun*) ( ${CXX:=CC} -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ clang*) ( ${CXX:=clang++} -x c++ -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ tru64cxx) ( ${CXX:=cc} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ acc) ( ${CXX:=aCC} -AA check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ qcc) ( ${CXX:=QCC} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ cxx) ( ${CXX:=cxx} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ cross-cxx) ( ${CXX:=cxx} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;;
+ *) test "0" = "1" ;;
+ esac
+ else
+ test $NO_CXX11_CHECK
+ fi
+}
+
+# Try and guess the toolset to bootstrap the build with...
+guess_toolset ()
+{
+ if test_uname Darwin && test_cxx11 clang ; then B2_TOOLSET=clang
+ elif test_uname IRIX && test_cxx11 mipspro ; then B2_TOOLSET=mipspro
+ elif test_uname IRIX64 && test_cxx11 mipspro ; then B2_TOOLSET=mipspro
+ elif test_uname OSF1 && test_cxx11 tru64cxx ; then B2_TOOLSET=tru64cxx
+ elif test_uname QNX && test_path QCC && test_cxx11 qcc ; then B2_TOOLSET=qcc
+ elif test_uname Linux && test_path xlC_r ; then
+ if /usr/bin/lscpu | grep Byte | grep Little > /dev/null 2>&1 ; then
+ # Little endian linux
+ B2_TOOLSET=xlcpp
+ else
+ #Big endian linux
+ B2_TOOLSET=vacpp
+ fi
+ elif test_uname AIX && test_path xlC_r && test_cxx11 vacpp ; then B2_TOOLSET=vacpp
+ elif test_uname FreeBSD && test_path freebsd-version && test_path clang++ && test_cxx11 clang ; then B2_TOOLSET=clang
+ elif test_path g++ && test_cxx11 gcc ; then B2_TOOLSET=gcc
+ elif test_path clang++ && test_cxx11 clang ; then B2_TOOLSET=clang
+ elif test_path icc && test_cxx11 intel-linux ; then B2_TOOLSET=intel-linux
+ elif test -r /opt/intel/cc/9.0/bin/iccvars.sh && test_cxx11 intel-linux ; then
+ B2_TOOLSET=intel-linux
+ B2_TOOLSET_ROOT=/opt/intel/cc/9.0
+ elif test -r /opt/intel_cc_80/bin/iccvars.sh && test_cxx11 intel-linux ; then
+ B2_TOOLSET=intel-linux
+ B2_TOOLSET_ROOT=/opt/intel_cc_80
+ elif test -r /opt/intel/compiler70/ia32/bin/iccvars.sh && test_cxx11 intel-linux ; then
+ B2_TOOLSET=intel-linux
+ B2_TOOLSET_ROOT=/opt/intel/compiler70/ia32/
+ elif test -r /opt/intel/compiler60/ia32/bin/iccvars.sh && test_cxx11 intel-linux ; then
+ B2_TOOLSET=intel-linux
+ B2_TOOLSET_ROOT=/opt/intel/compiler60/ia32/
+ elif test -r /opt/intel/compiler50/ia32/bin/iccvars.sh && test_cxx11 intel-linux ; then
+ B2_TOOLSET=intel-linux
+ B2_TOOLSET_ROOT=/opt/intel/compiler50/ia32/
+ elif test_path pgc++ && test_cxx11 pgi ; then B2_TOOLSET=pgi
+ elif test_path pathCC && test_cxx11 pathscale ; then B2_TOOLSET=pathscale
+ elif test_path como && test_cxx11 como ; then B2_TOOLSET=como
+ elif test_path KCC && test_cxx11 kcc ; then B2_TOOLSET=kcc
+ elif test_path bc++ && test_cxx11 kylix ; then B2_TOOLSET=kylix
+ elif test_path aCC && test_cxx11 acc ; then B2_TOOLSET=acc
+ elif test_uname HP-UX ; then B2_TOOLSET=acc
+ elif test -r /opt/SUNWspro/bin/cc && test_cxx11 sunpro ; then
+ B2_TOOLSET=sunpro
+ B2_TOOLSET_ROOT=/opt/SUNWspro/
+ # Test for some common compile command as the default fallback.
+ elif test_path $CXX ; then B2_TOOLSET=cxx
+ elif test_path cxx ; then
+ B2_TOOLSET=cxx
+ CXX=cxx
+ elif test_path cpp ; then
+ B2_TOOLSET=cxx
+ CXX=cpp
+ elif test_path CC ; then
+ B2_TOOLSET=cxx
+ CXX=CC
+ fi
+ if test "$B2_TOOLSET" = "" ; then
+ error_exit "Could not find a suitable toolset."
+ fi
+}
+
+check_debug_build ()
+{
+ while test $# -gt 0
+ do
+ case "$1" in
+ --debug) return 0 ;;
+ esac
+ shift
+ done
+ return 1
+}
+
+# The one option we support in the invocation
+# is the name of the toolset to force building
+# with.
+case "$1" in
+ --guess-toolset) NO_CXX11_CHECK=1 ; guess_toolset ; echo "$B2_TOOLSET" ; exit 1 ;;
+ -*) guess_toolset ;;
+ ?*) B2_TOOLSET=$1 ; shift ;;
+ *) guess_toolset ;;
+esac
+
+# We need a C++11 compiler. Check here and given some feedback about it.
+if ! test_cxx11 $B2_TOOLSET ; then
+ error_exit "
+A C++11 capable compiler is required for building the B2 engine.
+Toolset '$B2_TOOLSET' does not appear to support C++11.
+
+** 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
+
+case $B2_TOOLSET in
+
+ gcc)
+ CXX=${CXX:=g++}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ # Check whether it's MinGW GCC, which has Windows headers and none of POSIX ones.
+ machine=$(${CXX} -dumpmachine 2>/dev/null)
+ if test $? -ne 0 ; then
+ echo "B2_TOOLSET is gcc, but the 'gcc' command cannot be executed."
+ echo "Make sure 'gcc' is in PATH, or use a different toolset."
+ exit 1
+ fi
+ case $machine in
+ *mingw*)
+ # MinGW insists that its bin directory be in PATH.
+ if test -r ${B2_TOOLSET_ROOT}bin/gcc ; then
+ export PATH=${B2_TOOLSET_ROOT}bin:$PATH
+ fi
+ B2_CXX="${CXX} -x c++ -std=c++11"
+ B2_CXXFLAGS_RELEASE="-O2 -s"
+ B2_CXXFLAGS_DEBUG="-O0 -g"
+ B2_OS="NT"
+ ;;
+
+ *cygwin*)
+ B2_CXX="${CXX} -x c++ -std=gnu++11"
+ B2_CXXFLAGS_RELEASE="-O2 -s"
+ B2_CXXFLAGS_DEBUG="-O0 -g"
+ ;;
+
+ *)
+ B2_CXX="${CXX} -x c++ -std=c++11"
+ B2_CXXFLAGS_RELEASE="-O2 -s"
+ B2_CXXFLAGS_DEBUG="-O0 -g"
+ esac
+ ;;
+
+ intel-darwin)
+ CXX=${CXX:=icc}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX} -xc++"
+ B2_CXXFLAGS_RELEASE="-O3 -s"
+ B2_CXXFLAGS_DEBUG="-O0 -g -p"
+ ;;
+
+ intel-linux)
+ CXX=${CXX:=icc}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ test_path ${CXX} >/dev/null 2>&1
+ if test $? ; then
+ echo "Found ${CXX} in environment"
+ B2_TOOLSET_ROOT=`echo ${CXX}| sed -e 's/bin.*\/icc//'`
+ # probably the most widespread
+ ARCH=intel64
+ else
+ echo "No intel compiler in current path"
+ echo "Look in a few old place for legacy reason"
+ if test -r /opt/intel/cc/9.0/bin/iccvars.sh ; then
+ B2_TOOLSET_ROOT=/opt/intel/cc/9.0/
+ elif test -r /opt/intel_cc_80/bin/iccvars.sh ; then
+ B2_TOOLSET_ROOT=/opt/intel_cc_80/
+ elif test -r /opt/intel/compiler70/ia32/bin/iccvars.sh ; then
+ B2_TOOLSET_ROOT=/opt/intel/compiler70/ia32/
+ elif test -r /opt/intel/compiler60/ia32/bin/iccvars.sh ; then
+ B2_TOOLSET_ROOT=/opt/intel/compiler60/ia32/
+ elif test -r /opt/intel/compiler50/ia32/bin/iccvars.sh ; then
+ B2_TOOLSET_ROOT=/opt/intel/compiler50/ia32/
+ fi
+ fi
+ if test -r ${B2_TOOLSET_ROOT}bin/iccvars.sh ; then
+ # iccvars does not change LD_RUN_PATH. We adjust LD_RUN_PATH here in
+ # order not to have to rely on ld.so.conf knowing the icc library
+ # directory. We do this before running iccvars.sh in order to allow a
+ # user to add modifications to LD_RUN_PATH in iccvars.sh.
+ if test -z "${LD_RUN_PATH}"; then
+ LD_RUN_PATH="${B2_TOOLSET_ROOT}lib"
+ else
+ LD_RUN_PATH="${B2_TOOLSET_ROOT}lib:${LD_RUN_PATH}"
+ fi
+ export LD_RUN_PATH
+ . ${B2_TOOLSET_ROOT}bin/iccvars.sh $ARCH
+ fi
+ B2_CXX="${CXX} -xc++"
+ B2_CXXFLAGS_RELEASE="-O3 -s"
+ B2_CXXFLAGS_DEBUG="-O0 -g -p"
+ ;;
+
+ vacpp)
+ CXX=${CXX:=xlC_r}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=-qversion}
+ B2_CXX="${CXX}"
+ B2_CXXFLAGS_RELEASE="-O3 -s -qstrict -qinline"
+ B2_CXXFLAGS_DEBUG="-g -qNOOPTimize -qnoinline -pg"
+ ;;
+
+ xlcpp)
+ CXX=${CXX:=xlC_r}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=-qversion}
+ B2_CXX="${CXX}"
+ B2_CXXFLAGS_RELEASE="-s -O3 -qstrict -qinline"
+ B2_CXXFLAGS_DEBUG="-g -qNOOPTimize -qnoinline -pg"
+ ;;
+
+ como)
+ CXX=${CXX:=como}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX}"
+ B2_CXXFLAGS_RELEASE="-O3 --inlining"
+ B2_CXXFLAGS_DEBUG="-O0 -g --no_inlining --long_long"
+ ;;
+
+ kcc)
+ CXX=${CXX:=KCC}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="KCC"
+ B2_CXXFLAGS_RELEASE="+K2 -s"
+ B2_CXXFLAGS_DEBUG="+K0 -g"
+ ;;
+
+ kylix)
+ CXX=${CXX:=bc++}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="bc++ -tC -q"
+ B2_CXXFLAGS_RELEASE="-O2 -vi -w-inl -s"
+ B2_CXXFLAGS_DEBUG="-Od -v -vi-"
+ ;;
+
+ mipspro)
+ CXX=${CXX:=CC}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX} -FE:template_in_elf_section -ptused"
+ B2_CXXFLAGS_RELEASE="-Ofast -g0 \"-INLINE:none\" -s"
+ B2_CXXFLAGS_DEBUG="-O0 -INLINE -g"
+ ;;
+
+ pathscale)
+ CXX=${CXX:=pathCC}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX}"
+ B2_CXXFLAGS_RELEASE="-O3 -inline -s"
+ B2_CXXFLAGS_DEBUG="-O0 -noinline -ggdb"
+ ;;
+
+ pgi)
+ CXX=${CXX:=pgc++}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX} -std=c++11"
+ B2_CXXFLAGS_RELEASE="-fast -s"
+ B2_CXXFLAGS_DEBUG="-O0 -gopt"
+ ;;
+
+ sun*)
+ CXX=${CXX:=CC}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=-V}
+ if test -z "${B2_TOOLSET_ROOT}" -a -r /opt/SUNWspro/bin/CC ; then
+ B2_TOOLSET_ROOT=/opt/SUNWspro/
+ fi
+ if test -r "${B2_TOOLSET_ROOT}/bin/CC" ; then
+ PATH=${B2_TOOLSET_ROOT}bin:${PATH}
+ export PATH
+ fi
+ B2_CXX="${CXX} -std=c++11"
+ B2_CXXFLAGS_RELEASE="-xO4 -s"
+ B2_CXXFLAGS_DEBUG="-g"
+ ;;
+
+ clang*)
+ CXX=${CXX:=clang++}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX} -x c++ -std=c++11"
+ B2_TOOLSET=clang
+ B2_CXXFLAGS_RELEASE="-O3 -s"
+ B2_CXXFLAGS_DEBUG="-O0 -fno-inline -g"
+ ;;
+
+ tru64cxx)
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="cc"
+ B2_CXXFLAGS_RELEASE="-O5 -inline speed -s"
+ B2_CXXFLAGS_DEBUG="-O0 -pg -g"
+ ;;
+
+ acc)
+ CXX=${CXX:=aCC}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX} -AA"
+ B2_CXXFLAGS_RELEASE="-O3 -s"
+ B2_CXXFLAGS_DEBUG="+d -g"
+ ;;
+
+ qcc)
+ CXX=${CXX:=QCC}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX}"
+ B2_CXXFLAGS_RELEASE="-O3 -Wc,-finline-functions"
+ B2_CXXFLAGS_DEBUG="O0 -Wc,-fno-inline -gstabs+"
+ ;;
+
+ cxx)
+ CXX=${CXX:=cxx}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX}"
+ ;;
+
+ cross-cxx)
+ CXX=${BUILD_CXX:=cxx}
+ CXXFLAGS=${BUILD_CXXFLAGS}
+ CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
+ B2_CXX="${CXX}"
+ ;;
+
+ *)
+ error_exit "Unknown toolset: $B2_TOOLSET"
+ ;;
+esac
+
+echo "
+###
+###
+### Using '$B2_TOOLSET' toolset.
+###
+###
+"
+echo_run ${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 \
+ filesys.cpp \
+ frames.cpp \
+ function.cpp \
+ glob.cpp\
+ hash.cpp \
+ hcache.cpp \
+ hdrmacro.cpp \
+ headers.cpp \
+ jam.cpp \
+ jambase.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 \
+ pathsys.cpp \
+ regexp.cpp \
+ rules.cpp \
+ scan.cpp \
+ search.cpp \
+ jam_strings.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 \
+ "
+case $B2_OS in
+ NT)
+ B2_SOURCES="${B2_SOURCES} execnt.cpp filent.cpp pathnt.cpp"
+ ;;
+
+ *)
+ B2_SOURCES="${B2_SOURCES} execunix.cpp fileunix.cpp pathunix.cpp"
+ ;;
+esac
+
+if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}"
+else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG"
+fi
+echo_run ${B2_CXX} ${CXXFLAGS} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2
+echo_run cp b2 bjam
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..eb6af8c82
--- /dev/null
+++ b/src/boost/tools/build/src/engine/builtins.cpp
@@ -0,0 +1,2728 @@
+/*
+ * 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 "subst.h"
+#include "timestamp.h"
+#include "variable.h"
+#include "output.h"
+
+#include <ctype.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
+ t->depends = 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 ) )
+ s->dependants = targetentry( s->dependants, bindtarget(
+ list_item( t_iter ) )->includes );
+ }
+ else
+ s->dependants = 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 ) );
+ t->rebuilds = 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
+ exit( status );
+ }
+ else
+ 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 = 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 );
+ 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 );
+ 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;
+ if ( !strcmp( f, "+" ) )
+ {
+ f = "jambase.c";
+ l += 3;
+ }
+ *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 ) );
+}
+
+
+LIST * builtin_normalize_path( FRAME * frame, int flags )
+{
+ LIST * arg = lol_get( frame->args, 0 );
+
+ /* First, we iterate over all '/'-separated elements, starting from the end
+ * of string. If we see a '..', we remove a preceding path element. If we
+ * see '.', we remove it. Removal is done by overwriting data using '\1'
+ * characters. After the whole string has been processed, we do a second
+ * pass, removing any entered '\1' characters.
+ */
+
+ string in[ 1 ];
+ string out[ 1 ];
+ /* Last character of the part of string still to be processed. */
+ char * end;
+ /* Working pointer. */
+ char * current;
+ /* Number of '..' elements seen and not processed yet. */
+ int dotdots = 0;
+ int rooted = 0;
+ OBJECT * result = 0;
+ LISTITER arg_iter = list_begin( arg );
+ LISTITER arg_end = list_end( arg );
+
+ /* Make a copy of input: we should not change it. Prepend a '/' before it as
+ * a guard for the algorithm later on and remember whether it was originally
+ * rooted or not.
+ */
+ string_new( in );
+ string_push_back( in, '/' );
+ for ( ; arg_iter != arg_end; arg_iter = list_next( arg_iter ) )
+ {
+ if ( object_str( list_item( arg_iter ) )[ 0 ] != '\0' )
+ {
+ if ( in->size == 1 )
+ rooted = ( object_str( list_item( arg_iter ) )[ 0 ] == '/' ) ||
+ ( object_str( list_item( arg_iter ) )[ 0 ] == '\\' );
+ else
+ string_append( in, "/" );
+ string_append( in, object_str( list_item( arg_iter ) ) );
+ }
+ }
+
+ /* Convert \ into /. On Windows, paths using / and \ are equivalent, and we
+ * want this function to obtain a canonic representation.
+ */
+ for ( current = in->value, end = in->value + in->size;
+ current < end; ++current )
+ if ( *current == '\\' )
+ *current = '/';
+
+ /* Now we remove any extra path elements by overwriting them with '\1'
+ * characters and count how many more unused '..' path elements there are
+ * remaining. Note that each remaining path element with always starts with
+ * a '/' character.
+ */
+ for ( end = in->value + in->size - 1; end >= in->value; )
+ {
+ /* Set 'current' to the next occurrence of '/', which always exists. */
+ for ( current = end; *current != '/'; --current );
+
+ if ( current == end )
+ {
+ /* Found a trailing or duplicate '/'. Remove it. */
+ *current = '\1';
+ }
+ else if ( ( end - current == 1 ) && ( *( current + 1 ) == '.' ) )
+ {
+ /* Found '/.'. Remove them all. */
+ *current = '\1';
+ *(current + 1) = '\1';
+ }
+ else if ( ( end - current == 2 ) && ( *( current + 1 ) == '.' ) &&
+ ( *( current + 2 ) == '.' ) )
+ {
+ /* Found '/..'. Remove them all. */
+ *current = '\1';
+ *(current + 1) = '\1';
+ *(current + 2) = '\1';
+ ++dotdots;
+ }
+ else if ( dotdots )
+ {
+ memset( current, '\1', end - current + 1 );
+ --dotdots;
+ }
+ end = current - 1;
+ }
+
+ string_new( out );
+
+ /* Now we know that we need to add exactly dotdots '..' path elements to the
+ * front and that our string is either empty or has a '/' as its first
+ * significant character. If we have any dotdots remaining then the passed
+ * path must not have been rooted or else it is invalid we return an empty
+ * list.
+ */
+ if ( dotdots )
+ {
+ if ( rooted )
+ {
+ string_free( out );
+ string_free( in );
+ return L0;
+ }
+ do
+ string_append( out, "/.." );
+ while ( --dotdots );
+ }
+
+ /* Now we actually remove all the path characters marked for removal. */
+ for ( current = in->value; *current; ++current )
+ if ( *current != '\1' )
+ string_push_back( out, *current );
+
+ /* Here we know that our string contains no '\1' characters and is either
+ * empty or has a '/' as its initial character. If the original path was not
+ * rooted and we have a non-empty path we need to drop the initial '/'. If
+ * the original path was rooted and we have an empty path we need to add
+ * back the '/'.
+ */
+ result = object_new( out->size
+ ? out->value + !rooted
+ : ( rooted ? "/" : "." ) );
+
+ string_free( out );
+ string_free( in );
+
+ return list_new( result );
+}
+
+
+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 );
+ 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 ) ) );
+
+ int current = strlen( object_str( string ) );
+ int desired = atoi( width_s );
+ if ( current >= desired )
+ return list_new( object_copy( string ) );
+ else
+ {
+ char * buffer = (char *)BJAM_MALLOC( desired + 1 );
+ int 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;
+ size_t bufsize = 256;
+ LIST * result = 0;
+ while (1) {
+ ssize_t len = readlink( path, buf, bufsize );
+ if ( len < 0 )
+ {
+ break;
+ }
+ else if ( size_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( &quoted_command );
+ string_append( &quoted_command, "\"" );
+ string_append( &quoted_command, command );
+ string_append( &quoted_command, "\"" );
+ command = quoted_command.value;
+ }
+
+ result = _popen( command, "r" );
+
+ if ( extra_command_quotes_needed )
+ string_free( &quoted_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;
+ int 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 = 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..177142288
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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_cxx11.cpp b/src/boost/tools/build/src/engine/check_cxx11.cpp
new file mode 100644
index 000000000..f01fcff71
--- /dev/null
+++ b/src/boost/tools/build/src/engine/check_cxx11.cpp
@@ -0,0 +1,21 @@
+/* Copyright 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)
+ */
+
+/*
+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 depend on..
+#include <thread>
+
+
+int main()
+{
+ // Check for basic thread calls.
+ { auto _ = std::thread::hardware_concurrency(); }
+}
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..2e41e12f8
--- /dev/null
+++ b/src/boost/tools/build/src/engine/class.cpp
@@ -0,0 +1,191 @@
+/*
+ * Copyright Vladimir Prus 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 "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 <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 ) )
+ );
+ abort();
+ }
+ }
+}
+
+
+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 ) )
+ );
+ abort();
+ }
+ 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..ee76e80c7
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.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..31141fc97
--- /dev/null
+++ b/src/boost/tools/build/src/engine/command.cpp
@@ -0,0 +1,121 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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 = (CMD *)BJAM_MALLOC( sizeof( 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 );
+ freetargets( cmd->unlock );
+ BJAM_FREE( (void *)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..0b968de58
--- /dev/null
+++ b/src/boost/tools/build/src/engine/command.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright 1994 Christopher Seiwald.
+ *
+ * This file is part of Jam - see jam.c for Copyright information.
+ */
+
+/*
+ * 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 "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 * lock; /* semaphores that are required by this cmd. */
+ TARGETS * 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..030d2e186
--- /dev/null
+++ b/src/boost/tools/build/src/engine/compile.cpp
@@ -0,0 +1,233 @@
+/*
+ * 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)
+ */
+
+/*
+ * 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 * t;
+
+ /* The action is associated with this instance of this rule. */
+ ACTION * const action = (ACTION *)BJAM_MALLOC( sizeof( ACTION ) );
+ memset( (char *)action, '\0', sizeof( *action ) );
+
+ action->rule = rule;
+ action->targets = targetlist( (TARGETS *)0, lol_get( frame->args, 0 ) );
+ action->sources = targetlist( (TARGETS *)0, 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; t; t = t->next )
+ {
+ t->target->rebuilds = targetentry( t->target->rebuilds, t0 );
+ t0->rebuilds = targetentry( t0->rebuilds, t->target );
+ }
+ }
+
+ /* Append this action to the actions of each target. */
+ for ( t = action->targets; t; t = t->next )
+ 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 )
+ {
+ FUNCTION * const function = rule->procedure;
+ function_refer( function );
+ result = function_run( function, frame, stack_global() );
+ function_free( function );
+ }
+
+ 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..97370a92d
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..9ff147d8e
--- /dev/null
+++ b/src/boost/tools/build/src/engine/config.h
@@ -0,0 +1,34 @@
+#ifndef B2_CONFIG_H
+#define B2_CONFIG_H
+
+/*
+Copyright 2002-2018 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)
+*/
+
+#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
+
+// 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
+
+#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..f3c2f1ebe
--- /dev/null
+++ b/src/boost/tools/build/src/engine/config_toolset.bat
@@ -0,0 +1,209 @@
+@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%_" == "_vc11_" call :Config_VC11
+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%_" == "_borland_" call :Config_BORLAND
+if "_%B2_TOOLSET%_" == "_como_" call :Config_COMO
+if "_%B2_TOOLSET%_" == "_gcc_" call :Config_GCC
+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 /Zi /MT /TP /Feb2 /wd4996 /Ox /GL"
+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 /Zi /MT /TP /Feb2 /wd4996 /Ox /GL"
+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=x86
+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 /Zi /MT /TP /Feb2 /wd4996 /Ox /GL"
+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=x86
+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 /Zi /MT /TP /Feb2 /wd4996 /Ox /GL"
+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=x86
+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 /Zi /MT /TP /Feb2 /wd4996 /Ox /GL"
+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=x86
+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 /Zi /MT /TP /Feb2 /wd4996 /Ox /GL"
+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=x86
+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 /Zi /MT /TP /Feb2 /wd4996 /Ox /GL"
+set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
+set "_known_=1"
+goto :eof
+
+:Config_BORLAND
+if not defined CXX ( set "CXX=bcc32" )
+if "_%B2_TOOLSET_ROOT%_" == "__" (
+ call guess_toolset.bat test_path bcc32.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" -Nd -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"
+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..ce4e3d7e4
--- /dev/null
+++ b/src/boost/tools/build/src/engine/constants.cpp
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2011 Steven Watanabe
+ *
+ * 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" );
+}
+
+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 * 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;
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..ec112080d
--- /dev/null
+++ b/src/boost/tools/build/src/engine/constants.h
@@ -0,0 +1,76 @@
+/*
+ * 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" */
+
+#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..1dac07ec2
--- /dev/null
+++ b/src/boost/tools/build/src/engine/cwd.cpp
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2002. Vladimir Prus
+ * Copyright 2005. 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)
+ */
+
+#include "cwd.h"
+
+#include "jam.h"
+#include "mem.h"
+#include "pathsys.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_;
+
+
+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 );
+ }
+ buffer_size *= 2;
+ BJAM_FREE_RAW( buffer );
+ }
+ while ( !cwd_ && error == ERANGE );
+
+ if ( !cwd_ )
+ {
+ perror( "can not get current working directory" );
+ exit( EXITBAD );
+ }
+}
+
+
+OBJECT * cwd( void )
+{
+ assert( cwd_ );
+ return cwd_;
+}
+
+
+void cwd_done( void )
+{
+ assert( cwd_ );
+ object_free( cwd_ );
+ cwd_ = NULL;
+}
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..39a66f843
--- /dev/null
+++ b/src/boost/tools/build/src/engine/cwd.h
@@ -0,0 +1,36 @@
+/*
+ * 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)
+ */
+
+/*
+ * cwd.h - manages the current working folder information
+ */
+
+#ifndef CWD_H
+#define CWD_H
+
+#include "config.h"
+#include "object.h"
+
+
+/* cwd() - returns the current working folder */
+OBJECT * cwd( void );
+
+/* 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</title>
+
+ <para>Jam is a program construction tool, like make(1).</para>
+
+ <para>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.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>OPTIONS</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><option/-a/</term>
+ <listitem>
+ <para>Build all targets anyway, even if they are up-to-date.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-d <replaceable/n/</option></term>
+ <listitem>
+ <para>Enable cumulative debugging levels from 1 to
+ <replaceable/n/. Interesting values are:
+
+ <glosslist>
+ <glossentry><glossterm/1/ <glossdef><simpara/Show
+ actions (the default)/</glossdef></glossentry>
+
+ <glossentry><glossterm/2/ <glossdef><simpara/Show
+ "quiet" actions and display all action
+ text/</glossdef></glossentry>
+
+ <glossentry><glossterm/3/ <glossdef><simpara>Show
+ dependency analysis, and target/source
+ timestamps/paths</simpara></glossdef></glossentry>
+
+ <glossentry><glossterm/4/ <glossdef><simpara/Show shell
+ arguments/</glossdef></glossentry>
+
+ <glossentry><glossterm/5/ <glossdef><simpara/Show rule
+ invocations and variable
+ expansions/</glossdef></glossentry>
+
+ <glossentry><glossterm/6/ <glossdef><simpara>Show
+ directory/header file/archive
+ scans</simpara></glossdef></glossentry>
+
+ <glossentry><glossterm/7/ <glossdef><simpara/Show
+ variable settings/</glossdef></glossentry>
+
+ <glossentry><glossterm/8/ <glossdef><simpara/Show
+ variable fetches/</glossdef></glossentry>
+
+ <glossentry><glossterm/9/ <glossdef><simpara/Show
+ variable manipulation, scanner
+ tokens/</glossdef></glossentry>
+ </glosslist>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-d +<replaceable/n/</option></term>
+ <listitem>
+ <para>Enable debugging level <replaceable/n/.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option/-d 0/</term>
+ <listitem>
+ <para>Turn off all debugging levels. Only errors are not
+ suppressed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-f <replaceable/jambase/</option></term>
+ <listitem>
+ <para>Read <replaceable/jambase/ instead of using the
+ built-in Jambase. Only one <option/-f/ flag is permitted,
+ but the <replaceable/jambase/ may explicitly include other
+ files.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-j <replaceable/n/</option></term>
+ <listitem>
+ <para>Run up to <replaceable/n/ shell commands concurrently
+ (UNIX and NT only). The default is 1.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option/-n/</term>
+ <listitem>
+ <para>Don't actually execute the updating actions, but do
+ everything else. This changes the debug level default to
+ <option/-d2/.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-o <replaceable/file/</option></term>
+ <listitem>
+ <para>Write the updating actions to the specified file
+ instead of running them (or outputting them, as on the
+ Mac).</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-s <replaceable/var/=<replaceable/value/</option></term>
+ <listitem>
+ <para>Set the variable <replaceable/var/ to
+ <replaceable/value/, overriding both internal variables and
+ variables imported from the environment. </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-t <replaceable/target/</option></term>
+ <listitem>
+ <para>Rebuild <replaceable/target/ and everything that
+ depends on it, even if it is up-to-date.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option/-v/</term>
+ <listitem>
+ <para>Print the version of jam and exit.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>SEE ALSO</title>
+
+ <para>Jam is documented fully in HTML pages available on Debian
+ systems from
+ <filename>/usr/share/doc/jam/Jam.html</filename>.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>AUTHOR</title>
+
+ <para>This manual page was created by &dhusername; &dhemail; from
+ the <filename/Jam.html/ documentation, for the &debian; system
+ (but may be used by others).</para>
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+sgml-omittag:t
+sgml-shorttag:t
+End:
+-->
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..2a19e072b
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include "jam.h"
+#include "debug.h"
+#include "output.h"
+#include "hash.h"
+#include <time.h>
+
+
+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( long 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..d61faf450
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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( long 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..051166699
--- /dev/null
+++ b/src/boost/tools/build/src/engine/debugger.cpp
@@ -0,0 +1,2738 @@
+/*
+ * Copyright 2015 Steven Watanabe
+ * 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 "debugger.h"
+#include "constants.h"
+#include "jam_strings.h"
+#include "pathsys.h"
+#include "cwd.h"
+#include "function.h"
+#include <assert.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <signal.h>
+#include <ctype.h>
+
+#ifdef NT
+#include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#else
+#include <errno.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#endif
+
+#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 char * debug_string_read( FILE * in )
+{
+ string buf[ 1 ];
+ int ch;
+ char * result;
+ string_new( buf );
+ while( ( ch = fgetc( in ) ) > 0 )
+ {
+ string_push_back( buf, (char)ch );
+ }
+ result = strdup( 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;
+ int ch;
+ LIST * result = L0;
+ fscanf( in, "%d", &len );
+ ch = fgetc( in );
+ 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;
+ int line;
+ OBJECT * fullname;
+ LOL args[ 1 ];
+ char * rulename;
+} FRAME_INFO;
+
+static void debug_frame_info_free( FRAME_INFO * frame )
+{
+ object_free( frame->file );
+ object_free( frame->fullname );
+ lol_free( frame->args );
+ free( frame->rulename );
+}
+
+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 = 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 );
+ if ( strcmp( frame->rulename, "module scope" ) != 0 )
+ {
+ 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,
+ 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 )
+{
+ 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, 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, 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, out->size ) ) == 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 );
+ }
+ exit( 0 );
+}
+
+static const char * const help_text[][2] =
+{
+ {
+ "run",
+ "run <args>\n"
+ "Creates a new b2 child process passing <args> 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 <location>\n"
+ "Sets a breakpoint at <location>. <location> can be either a the name of a\nfunction or <filename>:<lineno>\n"
+ },
+ {
+ "disable",
+ "disable <breakpoint>\nDisable a breakpoint\n"
+ },
+ {
+ "enable",
+ "enable <breakpoint>\nEnable a breakpoint\n"
+ },
+ {
+ "delete",
+ "delete <breakpoint>\nDelete a breakpoint\n"
+ },
+ {
+ "clear",
+ "clear <location>\nDelete the breakpoint at <location>\n"
+ },
+ {
+ "print",
+ "print <expression>\nDisplay the value of <expression>\n"
+ },
+ {
+ "backtrace",
+ "backtrace\nDisplay the call stack\n"
+ },
+ {
+ "kill",
+ "kill\nTerminate the child\n"
+ },
+ {
+ "quit",
+ "quit\nExit the debugger\n"
+ },
+ {
+ "help",
+ "help\nhelp <command>\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" );
+ 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 );
+ debug_frame_info_free( &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 );
+ debug_frame_info_free( &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 );
+ debug_frame_info_free( &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;
+ char * * buffer = (char **)malloc( capacity * sizeof( char * ) );
+ char * * current = buffer;
+ char * iter = line;
+ char * saved = iter;
+ *current = 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;
+ }
+ }
+ /* resize the buffer if necessary */
+ if ( current == buffer + capacity )
+ {
+ buffer = (char**)realloc( (void *)buffer, capacity * 2 * sizeof( char * ) );
+ current = buffer + capacity;
+ }
+ /* append the token to the buffer */
+ *current++ = saved;
+ /* null terminate the token */
+ if ( *iter )
+ {
+ *iter++ = '\0';
+ }
+ }
+ result = run_command( current - buffer, (const char **)buffer );
+ free( (void *)buffer );
+ return result;
+}
+
+static int read_command( void )
+{
+ int result;
+ int ch;
+ string line[ 1 ];
+ string_new( line );
+ /* 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 );
+ string_free( line );
+ return result;
+}
+
+static void debug_listen( void )
+{
+ debug_state = DEBUG_STOPPED;
+ while ( debug_state == DEBUG_STOPPED )
+ {
+ if ( feof( command_input ) )
+ 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..67956c76a
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef DEBUGGER_SW20150314_H
+#define DEBUGGER_SW20150314_H
+
+#include "config.h"
+#include <setjmp.h>
+#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..8e6ec4f50
--- /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 <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+
+/* 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,
+ int const slot )
+{
+ static char jobno[ 4 ];
+
+ 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, size_t max,
+ int * const error_length, int * const error_max_length )
+{
+ while ( *command )
+ {
+ size_t const l = 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..b39e8ae2d
--- /dev/null
+++ b/src/boost/tools/build/src/engine/execcmd.h
@@ -0,0 +1,115 @@
+/*
+ * 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,
+ int * error_length,
+ int * 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,
+ int 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, size_t max,
+ int * const error_length, int * const error_max_length );
+
+#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..f8934fd36
--- /dev/null
+++ b/src/boost/tools/build/src/engine/execnt.cpp
@@ -0,0 +1,1370 @@
+/*
+ * 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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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"
+#include "output.h"
+#ifdef USE_EXECNT
+#include "execcmd.h"
+
+#include "lists.h"
+#include "output.h"
+#include "pathsys.h"
+#include "string.h"
+
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <time.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <process.h>
+#include <tlhelp32.h>
+#include <versionhelpers.h>
+
+
+/* get the maximum shell command line length according to the OS */
+static int maxline();
+/* valid raw command string length */
+static long 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 int try_wait( int 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 int try_kill_one();
+/* is the first process a parent (direct or indirect) to the second one */
+static int 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, int slot );
+/* invoke the actual external process using the given command line */
+static void invoke_cmd( char const * const command, int const slot );
+/* find a free slot in the running commands table */
+static int 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, int 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( int 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 int 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;
+
+ 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;
+
+/* A thread-safe single element queue. Used by the worker threads
+ * to signal the main thread that a process is completed.
+ */
+struct
+{
+ int 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; int 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 );
+ }
+
+ {
+ int const length = maxline() + 9;
+ char * const cmd = (char *)BJAM_MALLOC_ATOMIC( length + 1 );
+ memset( cmd, 'x', 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
+ */
+
+int exec_check
+(
+ string const * command,
+ LIST * * pShell,
+ int * error_length,
+ int * 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 ) )
+ {
+ long 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, 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,
+ int flags,
+ ExecCmdCallback func,
+ void * closure,
+ LIST * shell
+)
+{
+ int const slot = get_free_cmdtab_slot();
+ int 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( long(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()
+{
+ int i = -1;
+ int 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;
+ int 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, int 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 int raw_maxline()
+{
+ if ( IsWindowsVersionOrGreater(5,0,0) ) return 8191; /* XP */
+ if ( IsWindowsVersionOrGreater(4,0,0) ) return 2047; /* NT 4.x */
+ return 996; /* NT 3.5.1 */
+}
+
+static int maxline()
+{
+ static int 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 long 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 ( 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,
+ int 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()
+{
+ int 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 = slot - cmdtab;
+ assert( !is_timeout );
+ SetEvent( process_queue.read_okay );
+ /* Okay. Non-blocking. */
+ UnregisterWait( slot->wait_handle );
+}
+
+static int try_wait_impl( DWORD timeout )
+{
+ int job_index;
+ int 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( int 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 int try_wait( int const timeoutMillis )
+{
+ if ( globs.jobs <= MAXIMUM_WAIT_OBJECTS )
+ {
+ int i;
+ HANDLE active_handles[ MAXIMUM_WAIT_OBJECTS ];
+ int 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 int try_kill_one()
+{
+ /* Only need to check if a timeout was specified with the -l option. */
+ if ( globs.timeout > 0 )
+ {
+ int 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 ) )
+ {
+ int 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( &current );
+ 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 int 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( int 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;
+ int 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 )
+ {
+ int 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, int slot )
+{
+ FILE * const f = open_command_file( slot );
+ if ( !f )
+ {
+ err_printf( "failed to write command file!\n" );
+ exit( EXITBAD );
+ }
+ fputs( command->value, f );
+ fclose( f );
+ return cmdtab[ slot ].command_file->value;
+}
+
+
+/*
+ * 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 ].pi.hProcess )
+ return slot;
+ err_printf( "no slots for child!\n" );
+ exit( EXITBAD );
+}
+
+
+/*
+ * 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, int 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 );
+}
+
+
+#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..2740743c7
--- /dev/null
+++ b/src/boost/tools/build/src/engine/execunix.cpp
@@ -0,0 +1,606 @@
+/*
+ * Copyright 1993, 1995 Christopher Seiwald.
+ * Copyright 2007 Noel Belcourt.
+ *
+ * This file is part of Jam - see jam.c for Copyright information.
+ */
+
+#include "jam.h"
+#include "execcmd.h"
+
+#include "lists.h"
+#include "output.h"
+#include "jam_strings.h"
+
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <time.h>
+#include <unistd.h> /* vfork(), _exit(), STDOUT_FILENO and such */
+#include <sys/resource.h>
+#include <sys/times.h>
+#include <sys/wait.h>
+#include <poll.h>
+
+#if defined(sun) || defined(__sun)
+ #include <wait.h>
+#endif
+
+#ifdef USE_EXECUNIX
+
+#include <sys/times.h>
+
+#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,
+ int * error_length,
+ int * 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, 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 ) )
+ {
+ perror( "pipe" );
+ 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 )
+ {
+ perror( "vfork" );
+ 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 )) {
+ perror("setpgid(child)");
+ /* exit( EXITBAD ); */
+ }
+ execvp( argv[ 0 ], (char * *)argv );
+ perror( "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 ] )
+ {
+ perror( "fdopen" );
+ 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 ] )
+ {
+ perror( "fdopen" );
+ 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 );
+ 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" );
+ exit( EXITBAD );
+}
+
+# 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..6c95011c6
--- /dev/null
+++ b/src/boost/tools/build/src/engine/execvms.cpp
@@ -0,0 +1,419 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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"
+
+#ifdef OS_VMS
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <times.h>
+#include <unistd.h>
+#include <errno.h>
+
+
+#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,
+ int * error_length,
+ int * 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, 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" ) ) )
+ {
+ printf( "can't open cmd_string file\n" );
+ 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 )
+ {
+ perror( "can not get current working directory" );
+ 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 <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <ssdef.h>
+#include <stsdef.h>
+#include <jpidef.h>
+#include <efndef.h>
+#include <iosbdef.h>
+#include <iledef.h>
+#include <lib$routines.h>
+#include <starlet.h>
+
+
+/*
+ * 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;
+}
+
+
+# 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..af89d5ef2
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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 <windows.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <direct.h>
+#include <io.h>
+
+
+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;
+ int d_length;
+
+ assert( d );
+ assert( d->is_dir );
+ assert( list_empty( d->files ) );
+
+ d_length = 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 = 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, 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 "!<arch>\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..c4b0756dc
--- /dev/null
+++ b/src/boost/tools/build/src/engine/filesys.cpp
@@ -0,0 +1,711 @@
+/*
+ * Copyright 2001-2004 David Abrahams.
+ * Copyright 2005 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)
+ */
+
+/*
+ * 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 <assert.h>
+#include <sys/stat.h>
+
+
+/* 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 = (FILELIST *)BJAM_MALLOC( sizeof( FILELIST ) );
+
+ 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 = (FILEITEM *)BJAM_MALLOC( sizeof( FILEITEM ) );
+ memset( item, 0, sizeof( *item ) );
+ item->value = (file_info_t *)BJAM_MALLOC( sizeof( file_info_t ) );
+
+ file = item->value;
+ memset( file, 0, sizeof( *file ) );
+
+ 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 = (FILEITEM *)BJAM_MALLOC( sizeof( FILEITEM ) );
+ memset( item, 0, sizeof( *item ) );
+ item->value = (file_info_t *)BJAM_MALLOC( sizeof( file_info_t ) );
+
+ 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 );
+
+ list->head = item->next;
+ list->size--;
+ if ( !list->size ) list->tail = list->head;
+
+#ifdef BJAM_NO_MEM_CACHE
+ BJAM_FREE( item );
+#endif
+ }
+
+ 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 );
+
+#ifdef BJAM_NO_MEM_CACHE
+ BJAM_FREE( list );
+#endif
+}
+
+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..48ea6d171
--- /dev/null
+++ b/src/boost/tools/build/src/engine/filesys.h
@@ -0,0 +1,111 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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"
+
+
+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 );
+
+
+/* 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..4c1b6adf3
--- /dev/null
+++ b/src/boost/tools/build/src/engine/fileunix.cpp
@@ -0,0 +1,527 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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 <assert.h>
+#include <stdio.h>
+#include <sys/stat.h> /* needed for mkdir() */
+
+#if defined( sun ) || defined( __sun ) || defined( linux )
+# include <unistd.h> /* 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 <sys/dir.h>
+# include <unistd.h> /* need unistd for rhapsody's proper lseek */
+# define STRUCT_DIRENT struct direct
+#else
+# include <dirent.h>
+# define STRUCT_DIRENT struct dirent
+#endif
+
+#ifdef OS_COHERENT
+# include <arcoff.h>
+# define HAVE_AR
+#endif
+
+#if defined( OS_MVS ) || defined( OS_INTERIX )
+#define ARMAG "!<arch>\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 <ar.h>
+#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 ) ) )
+ 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;
+
+ size_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..ab038d065
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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 <assert.h>
+#include <stdio.h>
+
+#include <sys/stat.h> /* needed for mkdir() */
+#include <unistd.h> /* needed for read and close prototype */
+
+#include <dirent.h>
+#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 <descrip.h>
+#include <lbrdef.h>
+#include <credef.h>
+#include <mhddef.h>
+#include <lhidef.h>
+#include <lib$routines.h>
+#include <starlet.h>
+
+/* 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 size_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..0491c5c32
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..c134d9c79
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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..71f9b119a
--- /dev/null
+++ b/src/boost/tools/build/src/engine/function.cpp
@@ -0,0 +1,5341 @@
+/*
+ * Copyright 2011 Steven Watanabe
+ * Copyright 2016 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)
+ */
+
+#include "jam.h"
+#include "function.h"
+
+#include "class.h"
+#include "compile.h"
+#include "constants.h"
+#include "debugger.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 <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/*
+#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
+
+int 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
+{
+ unsigned int op_code;
+ int arg;
+} instruction;
+
+typedef struct _subfunction
+{
+ OBJECT * name;
+ FUNCTION * code;
+ int local;
+} SUBFUNCTION;
+
+typedef struct _subaction
+{
+ OBJECT * name;
+ FUNCTION * command;
+ int flags;
+} SUBACTION;
+
+#define FUNCTION_BUILTIN 0
+#define FUNCTION_JAM 1
+
+struct argument
+{
+ int 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;
+ int index;
+};
+
+struct arg_list
+{
+ int size;
+ struct argument * args;
+};
+
+struct _function
+{
+ int type;
+ int reference_count;
+ OBJECT * rulename;
+ struct arg_list * formal_arguments;
+ int num_formal_arguments;
+};
+
+typedef struct _builtin_function
+{
+ FUNCTION base;
+ LIST * ( * func )( FRAME *, int flags );
+ int flags;
+} BUILTIN_FUNCTION;
+
+typedef struct _jam_function
+{
+ FUNCTION base;
+ int code_size;
+ instruction * code;
+ int num_constants;
+ OBJECT * * constants;
+ int num_subfunctions;
+ SUBFUNCTION * functions;
+ int num_subactions;
+ SUBACTION * actions;
+ FUNCTION * generic;
+ OBJECT * file;
+ int 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 )
+ {
+ int 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, int size )
+{
+ check_alignment( s );
+ s->data = (char *)s->data - size;
+ check_alignment( s );
+ return s->data;
+}
+
+void stack_deallocate( STACK * s, int 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, int n )
+{
+ check_alignment( s );
+ return *( (LIST * *)s->data + n );
+}
+
+void stack_set( STACK * s, int 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, int idx )
+{
+ /* The only local variables are the arguments. */
+ return list_copy( lol_get( frame->args, idx ) );
+}
+
+static OBJECT * function_get_constant( JAM_FUNCTION * function, int idx )
+{
+ return function->constants[ idx ];
+}
+
+static LIST * function_get_variable( JAM_FUNCTION * function, FRAME * frame,
+ int idx )
+{
+ return list_copy( var_get( frame->module, function->constants[ idx ] ) );
+}
+
+static void function_set_variable( JAM_FUNCTION * function, FRAME * frame,
+ int idx, LIST * value )
+{
+ var_set( frame->module, function->constants[ idx ], value, VAR_SET );
+}
+
+static LIST * function_swap_variable( JAM_FUNCTION * function, FRAME * frame,
+ int idx, LIST * value )
+{
+ return var_swap( frame->module, function->constants[ idx ], value );
+}
+
+static void function_append_variable( JAM_FUNCTION * function, FRAME * frame,
+ int idx, LIST * value )
+{
+ var_set( frame->module, function->constants[ idx ], value, VAR_APPEND );
+}
+
+static void function_default_variable( JAM_FUNCTION * function, FRAME * frame,
+ int 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, int 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, int 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 int 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 )
+{
+ int 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, int n_args, char const * unexpanded, OBJECT * file, int line )
+{
+ FRAME inner[ 1 ];
+ int 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(). */
+
+ 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, int n_args, OBJECT * rulename, OBJECT * file, int line )
+{
+ FRAME inner[ 1 ];
+ int 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. */
+
+ 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
+{
+ int sub1;
+ int sub2;
+} subscript_t;
+
+typedef struct
+{
+ PATHNAME f; /* :GDBSMR -- pieces */
+ char parent; /* :P -- go to parent directory */
+ char filemods; /* one of the above applied */
+ char downshift; /* :L -- downshift result */
+ char upshift; /* :U -- upshift result */
+ char to_slashes; /* :T -- convert "\" to "/" */
+ char to_windows; /* :W -- convert cygwin to native paths */
+ PATHPART empty; /* :E -- default for empties */
+ PATHPART join; /* :J -- join list with char */
+} VAR_EDITS;
+
+static LIST * apply_modifiers_impl( LIST * result, string * buf,
+ VAR_EDITS * edits, int n, LISTITER iter, LISTITER end );
+static void get_iters( subscript_t const subscript, LISTITER * const first,
+ LISTITER * const last, int 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 <grist>
+ * 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 int var_edit_parse( char const * mods, VAR_EDITS * edits, int havezeroed
+ )
+{
+ while ( *mods )
+ {
+ PATHPART * fp;
+
+ 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;
+ 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++ )
+ {
+ int i;
+ for ( i = 0; i < 6; ++i )
+ {
+ edits->f.part[ i ].len = 0;
+ edits->f.part[ i ].ptr = "";
+ }
+ }
+
+ fp->ptr = 0;
+ continue;
+ }
+
+ strval:
+ /* Handle :X=value, or :X */
+ if ( *mods != '=' )
+ {
+ fp->ptr = "";
+ fp->len = 0;
+ }
+ else
+ {
+ fp->ptr = ++mods;
+ fp->len = 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, size_t pos, VAR_EDITS * edits )
+{
+ if ( edits->to_windows )
+ {
+ string result[ 1 ];
+ int 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, size_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 int expand_modifiers( STACK * s, int n )
+{
+ int i;
+ int 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;
+ {
+ int 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 LIST * apply_modifiers( STACK * s, int n )
+{
+ LIST * value = stack_top( s );
+ LIST * result = L0;
+ VAR_EDITS * const edits = (VAR_EDITS *)( (LIST * *)stack_get( s ) + 1 );
+ string buf[ 1 ];
+ string_new( buf );
+ result = apply_modifiers_impl( result, buf, edits, n, list_begin( value ),
+ list_end( value ) );
+ string_free( buf );
+ 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;
+ int 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, int const length )
+{
+ int start;
+ int 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_empty( LIST * result, string * buf,
+ VAR_EDITS * edits, int n )
+{
+ int 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, int n, LISTITER begin, LISTITER end )
+{
+ int 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
+ ) )
+ {
+ size_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 LIST * apply_modifiers_impl( LIST * result, string * buf,
+ VAR_EDITS * edits, int n, LISTITER iter, LISTITER end )
+{
+ return iter == end
+ ? apply_modifiers_empty( result, buf, edits, n )
+ : apply_modifiers_non_empty( result, buf, edits, n, iter, end );
+}
+
+static LIST * apply_subscript_and_modifiers( STACK * s, int 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);
+ int 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 );
+ result = apply_modifiers_impl( result, buf, edits, n, iter, end );
+ }
+ 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. */
+ int size; /* Concatenated string length prior to concatenating the
+ * item's current value.
+ */
+} expansion_item;
+
+static LIST * expand( expansion_item * items, int const length )
+{
+ LIST * result = L0;
+ string buf[ 1 ];
+ int size = 0;
+ int 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.
+ */
+ {
+ int max = 0;
+ for ( ; iter != end; iter = list_next( iter ) )
+ {
+ int const len = 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, int n, string * out )
+{
+ int 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
+{
+ int size;
+ int capacity;
+ void * data;
+};
+
+static void dynamic_array_init( struct dynamic_array * array )
+{
+ array->size = 0;
+ array->capacity = 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, int const 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 ) (((type *)(array)->data)[idx])
+#define dynamic_array_pop( array ) (--(array)->size)
+
+/*
+ * struct compiler
+ */
+
+struct label_info
+{
+ int absolute_position;
+ struct dynamic_array uses[ 1 ];
+};
+
+#define LOOP_INFO_BREAK 0
+#define LOOP_INFO_CONTINUE 1
+
+struct loop_info
+{
+ int type;
+ int label;
+ int cleanup_depth;
+};
+
+struct stored_rule
+{
+ OBJECT * name;
+ PARSE * parse;
+ int num_arguments;
+ struct arg_list * arguments;
+ int 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 )
+{
+ int 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 int compile_new_label( compiler * c )
+{
+ int 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, int label )
+{
+ struct label_info * const l = &dynamic_array_at( struct label_info,
+ c->labels, label );
+ int const pos = c->code->size;
+ int i;
+ assert( l->absolute_position == -1 );
+ l->absolute_position = pos;
+ for ( i = 0; i < l->uses->size; ++i )
+ {
+ int id = dynamic_array_at( int, l->uses, i );
+ int offset = (int)( pos - id - 1 );
+ dynamic_array_at( instruction, c->code, id ).arg = offset;
+ }
+}
+
+static void compile_emit( compiler * c, unsigned int op_code, int arg )
+{
+ instruction instr;
+ instr.op_code = op_code;
+ instr.arg = arg;
+ compile_emit_instruction( c, instr );
+}
+
+static void compile_emit_branch( compiler * c, unsigned int op_code, int label )
+{
+ struct label_info * const l = &dynamic_array_at( struct label_info,
+ c->labels, label );
+ int 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 = (int)( l->absolute_position - pos - 1 );
+ compile_emit_instruction( c, instr );
+}
+
+static int 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, unsigned int op_code, int 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, int end )
+{
+ int 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, int type )
+{
+ struct loop_info * info = NULL;
+ int 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, int 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, int 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 int compile_emit_rule( compiler * c, OBJECT * name, PARSE * parse,
+ int num_arguments, struct arg_list * arguments, int 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 (int)( c->rules->size - 1 );
+}
+
+static int 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 (int)( c->actions->size - 1 );
+}
+
+static JAM_FUNCTION * compile_to_function( compiler * c )
+{
+ JAM_FUNCTION * const result = (JAM_FUNCTION*)BJAM_MALLOC( sizeof( JAM_FUNCTION ) );
+ int 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
+{
+ int 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;
+
+typedef struct
+{
+ VAR_PARSE base;
+ struct dynamic_array filename[ 1 ];
+ struct dynamic_array contents[ 1 ];
+} VAR_PARSE_FILE;
+
+static void var_parse_free( VAR_PARSE * );
+
+
+/*
+ * 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 )
+{
+ int 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 )
+{
+ int 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 )
+{
+ int 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;
+}
+
+
+/*
+ * VAR_PARSE_STRING
+ */
+
+static void var_parse_string_free( VAR_PARSE_STRING * string )
+{
+ object_free( string->s );
+ BJAM_FREE( string );
+}
+
+
+/*
+ * VAR_PARSE_FILE
+ */
+
+static VAR_PARSE_FILE * var_parse_file_new( void )
+{
+ VAR_PARSE_FILE * const result = (VAR_PARSE_FILE *)BJAM_MALLOC( sizeof(
+ VAR_PARSE_FILE ) );
+ result->base.type = VAR_PARSE_TYPE_FILE;
+ dynamic_array_init( result->filename );
+ dynamic_array_init( result->contents );
+ return result;
+}
+
+static void var_parse_file_free( VAR_PARSE_FILE * file )
+{
+ int i;
+ for ( i = 0; i < file->filename->size; ++i )
+ var_parse_group_free( dynamic_array_at( VAR_PARSE_GROUP *,
+ file->filename, i ) );
+ dynamic_array_free( file->filename );
+ for ( i = 0; i < file->contents->size; ++i )
+ var_parse_group_free( dynamic_array_at( VAR_PARSE_GROUP *,
+ file->contents, i ) );
+ dynamic_array_free( file->contents );
+ BJAM_FREE( file );
+}
+
+
+/*
+ * VAR_PARSE
+ */
+
+static void var_parse_free( VAR_PARSE * parse )
+{
+ switch ( parse->type )
+ {
+ case VAR_PARSE_TYPE_VAR:
+ var_parse_var_free( (VAR_PARSE_VAR *)parse );
+ break;
+
+ case VAR_PARSE_TYPE_STRING:
+ var_parse_string_free( (VAR_PARSE_STRING *)parse );
+ break;
+
+ case VAR_PARSE_TYPE_FILE:
+ var_parse_file_free( (VAR_PARSE_FILE *)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 )
+{
+ int expand_name = 0;
+ int is_get_grist = 0;
+ int 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 )
+ {
+ int 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;
+ int 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 var_parse_file_compile( VAR_PARSE_FILE const * parse, compiler * c )
+{
+ int i;
+ for ( i = 0; i < parse->filename->size; ++i )
+ var_parse_group_compile( dynamic_array_at( VAR_PARSE_GROUP *,
+ parse->filename, parse->filename->size - i - 1 ), c );
+ compile_emit( c, INSTR_APPEND_STRINGS, parse->filename->size );
+ for ( i = 0; i < parse->contents->size; ++i )
+ var_parse_group_compile( dynamic_array_at( VAR_PARSE_GROUP *,
+ parse->contents, parse->contents->size - i - 1 ), c );
+ compile_emit( c, INSTR_WRITE_FILE, parse->contents->size );
+}
+
+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_FILE 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. */
+ int 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 )
+{
+ int 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_at_file( char const * start, char const * mid,
+ char const * end );
+static VAR_PARSE * parse_variable( char const * * string );
+static int 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 int 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 ] == '(' )
+ {
+ int depth = 1;
+ char const * ine;
+ char const * split = 0;
+ var_parse_group_maybe_add_constant( out, *string, s );
+ s += 2;
+ ine = s;
+
+ /* Scan the content of the response file @() section. */
+ while ( *ine && ( depth > 0 ) )
+ {
+ switch ( *ine )
+ {
+ case '(': ++depth; break;
+ case ')': --depth; break;
+ case ':':
+ if ( ( depth == 1 ) && ( ine[ 1 ] == 'E' ) && ( ine[ 2 ] == '='
+ ) )
+ split = ine;
+ break;
+ }
+ ++ine;
+ }
+
+ if ( !split || depth )
+ return 0;
+
+ var_parse_group_add( out, parse_at_file( s, split, ine - 1 ) );
+ *string = ine;
+ *s_ = ine;
+ return 1;
+ }
+ return 0;
+}
+
+
+static char const * current_file = "";
+static int 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 );
+ }
+ }
+}
+
+/*
+ * start should point to the character immediately following the opening "@(",
+ * mid should point to the ":E=", and end should point to the closing ")".
+ */
+
+static VAR_PARSE * parse_at_file( char const * start, char const * mid,
+ char const * end )
+{
+ VAR_PARSE_FILE * result = var_parse_file_new();
+ parse_var_string( start, mid, result->filename );
+ parse_var_string( mid + 3, end, result->contents );
+ return (VAR_PARSE *)result;
+}
+
+/*
+ * 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)
+{
+ int 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, int result_location );
+static struct arg_list * arg_list_compile( PARSE * parse, int * num_arguments );
+
+static void compile_condition( PARSE * parse, compiler * c, int branch_true, int 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 )
+ {
+ int 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
+ {
+ int 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, int actual_location,
+ int 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, int line)
+{
+#ifdef JAM_DEBUGGER
+ if ( debug_is_debugging() )
+ compile_emit( c, INSTR_DEBUG_LINE, line );
+#endif
+}
+
+static void compile_parse( PARSE * parse, compiler * c, int 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
+ {
+ int f = compile_new_label( c );
+ int 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 )
+ {
+ int var = compile_emit_constant( c, parse->string );
+ int top = compile_new_label( c );
+ int end = compile_new_label( c );
+ int 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 )
+ {
+ int 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 */
+ int 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 )
+ {
+ int nested_result = result_location == RESULT_NONE
+ ? RESULT_NONE
+ : RESULT_RETURN;
+ int test = compile_new_label( c );
+ int top = compile_new_label( c );
+ int 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 )
+ {
+ int 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 )
+ {
+ int 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 )
+ {
+ int 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. */
+ int 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
+ {
+ int 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;
+ int 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;
+ unsigned int op_code;
+ unsigned int 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 )
+ {
+ int 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 )
+ {
+ int n_args;
+ struct arg_list * args = arg_list_compile( parse->right, &n_args );
+ int 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 )
+ {
+ int 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 )
+ {
+ int const switch_end = compile_new_label( c );
+ compile_parse( parse->left, c, RESULT_STACK );
+
+ for ( parse = parse->right; parse; parse = parse->right )
+ {
+ int const id = compile_emit_constant( c, parse->left->string );
+ int 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, int * 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,
+ int * num_arguments );
+
+FUNCTION * function_builtin( LIST * ( * func )( FRAME * frame, int flags ),
+ int 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,
+ int 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, int 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.
+ */
+
+int 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 );
+ 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, int formal_count,
+ FUNCTION * function, FRAME * frame )
+{
+ LOL * all_actual = frame->args;
+ int 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 );
+ int 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, int formal_count,
+ FUNCTION * function, FRAME * frame, STACK * s )
+{
+ LOL * all_actual = frame->args;
+ int 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 );
+ int j;
+ for ( j = 0; j < formal[ i ].size; ++j )
+ {
+ struct argument * formal_arg = &formal[ i ].args[ j ];
+ LIST * value;
+
+ 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, int formal_count,
+ FRAME * frame, STACK * s )
+{
+ int i;
+ for ( i = formal_count - 1; i >= 0; --i )
+ {
+ int 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;
+ int 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, int 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 ) );
+ 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, int 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 ) );
+ 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, int * 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,
+ int * 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, int num_args )
+{
+ if ( args )
+ {
+ int i;
+ for ( i = 0; i < num_args; ++i )
+ {
+ int 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,
+ int formal_count, module_t * module, int * counter )
+{
+ if ( formal )
+ {
+ struct arg_list * result = (struct arg_list *)BJAM_MALLOC( sizeof(
+ struct arg_list ) * formal_count );
+ int i;
+
+ for ( i = 0; i < formal_count; ++i )
+ {
+ int 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, int args_count )
+{
+ int i;
+ for ( i = 0; i < args_count; ++i )
+ {
+ int 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,
+ int * 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;
+ int 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;
+ int 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:
+ {
+ int 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;
+ int 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:
+ {
+ int 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_ )
+{
+ int 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 * ) );
+}
+
+/*
+ * 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;
+ void * saved_stack = s->data;
+
+ 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 );
+ }
+#endif
+ assert( saved_stack == s->data );
+ 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;
+ int 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);
+ int n;
+ int i;
+ l = stack_pop( s );
+ n = expand_modifiers( s, code->arg );
+ stack_push( s, l );
+ l = apply_modifiers( s, n );
+ 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);
+ int i;
+ int 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);
+ int i;
+ LIST * const vars = stack_pop( s );
+ int 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 ) ) );
+ result = list_append( result, apply_modifiers( s, n ) );
+ 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);
+ int i;
+ LIST * const vars = stack_pop( s );
+ LIST * const r = stack_pop( s );
+ int 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);
+ size_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;
+ int 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, 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;
+ }
+
+ case INSTR_WRITE_FILE:
+ {
+ PROFILE_ENTER_LOCAL(function_run_INSTR_WRITE_FILE);
+ string buf[ 1 ];
+ char const * out;
+ OBJECT * tmp_filename = 0;
+ int out_debug = DEBUG_EXEC ? 1 : 0;
+ FILE * out_file = 0;
+ string_new( buf );
+ combine_strings( s, code->arg, buf );
+ out = object_str( list_front( stack_top( s ) ) );
+
+ /* 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 ) )
+ {
+ int 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 is 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. */
+ list_free( stack_pop( s ) );
+ stack_push( s, 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 );
+ }
+
+ 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( "failed to write output file '%s'!\n",
+ out_name->value );
+ exit( EXITBAD );
+ }
+ string_free( out_name );
+ }
+
+ if ( out_debug ) out_printf( "\nfile %s\n", out );
+ if ( out_file ) fputs( buf->value, out_file );
+ if ( out_debug ) out_puts( buf->value );
+ if ( out_file )
+ {
+ fflush( out_file );
+ fclose( out_file );
+ }
+ string_free( buf );
+ if ( tmp_filename )
+ object_free( tmp_filename );
+
+ if ( out_debug ) out_putc( '\n' );
+ 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,
+ int * 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, int formal_count,
+ FUNCTION * function, FRAME * frame, PyObject * kw )
+{
+ LOL * all_actual = frame->args;
+ int 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 );
+ int 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;
+ int 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 ) )
+ {
+ int size = PyList_Size( py_result );
+ int 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..73c837f52
--- /dev/null
+++ b/src/boost/tools/build/src/engine/function.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2011 Steven Watanabe
+ * 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)
+ */
+
+#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;
+
+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, int flags ), int 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 * *, int * );
+LIST * function_run( FUNCTION * function, FRAME * frame, STACK * s );
+
+FUNCTION * function_compile_actions( const char * actions, OBJECT * file, int line );
+void function_run_actions( FUNCTION * function, FRAME * frame, STACK * s, string * out );
+
+FUNCTION * function_bind_variables( FUNCTION * f, module_t * module, int * 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..51d2d26c1
--- /dev/null
+++ b/src/boost/tools/build/src/engine/guess_toolset.bat
@@ -0,0 +1,115 @@
+@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
+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 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)
+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)
+if NOT "_%VS110COMNTOOLS%_" == "__" (
+ set "B2_TOOLSET=vc11"
+ set "B2_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
+ exit /b 0)
+if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio 11.0\VC\VCVARSALL.BAT" (
+ set "B2_TOOLSET=vc11"
+ set "B2_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio 11.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)
+if EXIST "C:\Borland\BCC55\Bin\bcc32.exe" (
+ set "B2_TOOLSET=borland"
+ set "B2_TOOLSET_ROOT=C:\Borland\BCC55\"
+ exit /b 0)
+call :Test_Path bcc32.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..f3dcef88a
--- /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 <assert.h>
+
+/*
+#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
+ {
+ int nel;
+ ITEM * * base;
+ } tab;
+
+ int bloat; /* tab.nel / items.nel */
+ int inel; /* initial number of elements */
+
+ /*
+ * the array of records, maintained by these routines - essentially a
+ * microallocator
+ */
+ struct
+ {
+ int 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 ] */
+ int size; /* sizeof( ITEM ) + aligned datalen */
+ int nel; /* total ITEMs held by all lists[] */
+ int list; /* index into lists[] */
+
+ struct
+ {
+ int 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 unsigned int 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( int 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, unsigned int 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, int * found )
+{
+ ITEM * i;
+ unsigned int 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;
+ unsigned int 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 )
+{
+ int 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 )
+ {
+ int 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
+ )
+{
+ int i;
+ for ( i = 0; i <= hp->items.list; ++i )
+ {
+ char * next = hp->items.lists[ i ].base;
+ int 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 )
+{
+ int 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..7ed633d73
--- /dev/null
+++ b/src/boost/tools/build/src/engine/hash.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright 1993, 1995 Christopher Seiwald.
+ *
+ * This file is part of Jam - see jam.c for Copyright information.
+ */
+
+/*
+ * 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( int datalen, char const * name );
+
+/*
+ * hash_free() - free a hash table, given its handle
+ */
+void hash_free( struct hash * );
+void hashdone( struct hash * );
+
+/*
+ * 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 );
+
+/*
+ * 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, int * 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..15ab12a35
--- /dev/null
+++ b/src/boost/tools/build/src/engine/hcache.cpp
@@ -0,0 +1,522 @@
+/*
+ * 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"
+
+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" ) ) )
+ 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 ) : "<null>" );
+ 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" ) ) )
+ 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..9b6507ec6
--- /dev/null
+++ b/src/boost/tools/build/src/engine/hdrmacro.cpp
@@ -0,0 +1,140 @@
+/*
+ * 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)
+ */
+
+/*
+ * 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) <target> : <resolved included files> ;
+ *
+ * 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"
+
+
+/* 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" ) ) )
+ 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 <filename> 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..e653abcfa
--- /dev/null
+++ b/src/boost/tools/build/src/engine/headers.cpp
@@ -0,0 +1,198 @@
+/*
+ * 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)
+ */
+
+/*
+ * 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) <target> : <include files> ;
+ *
+ * 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
+
+#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" ) ) )
+ 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..eab9bae2d
--- /dev/null
+++ b/src/boost/tools/build/src/engine/jam.cpp
@@ -0,0 +1,794 @@
+/*
+ * /+\
+ * +\ 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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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
+ * jambase.c - compilable copy of Jambase
+ * 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 "jam_strings.h"
+#include "timestamp.h"
+#include "variable.h"
+#include "execcmd.h"
+#include "sysinfo.h"
+
+/* Macintosh is "special" */
+#ifdef OS_MAC
+# include <QuickDraw.h>
+#endif
+
+/* And UNIX for this. */
+#ifdef unix
+# include <sys/utsname.h>
+# include <signal.h>
+#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 };
+
+
+/* Known for sure:
+ * mac needs arg_enviro
+ * OS2 needs extern environ
+ */
+
+#ifdef OS_MAC
+# define use_environ arg_environ
+# ifdef MPW
+ QDGlobals qd;
+# endif
+#endif
+
+
+#ifdef OS_VMS
+# define use_environ arg_environ
+#endif
+
+
+/* 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 Jambase.\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");
+
+ exit( EXITBAD );
+}
+
+int main( int argc, char * * argv, char * * arg_environ )
+{
+ int n;
+ char * s;
+ struct bjam_option optv[ N_OPTS ];
+ int status;
+ 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;
+
+ BJAM_MEM_INIT();
+
+#ifdef OS_MAC
+ InitGraf( &qd.thePort );
+#endif
+
+ cwd_init();
+ constants_init();
+
+#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 );
+ 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" );
+ 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( "Failed to write to '%s'\n", s );
+ 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( &current );
+ var_set( root_module(), constant_JAMDATE, list_new( outf_time(
+ &current ) ), 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();
+
+ /* 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 )
+ parse_file( constant_plus, frame );
+ }
+
+ /* FIXME: What shall we do if builtin_update_now,
+ * the sole place setting last_update_now_status,
+ * failed earlier?
+ */
+
+ status = yyanyerrors();
+ if ( !status )
+ {
+ /* 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 );
+ }
+
+ 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 status ? EXITBAD : EXITOK;
+}
+
+
+/*
+ * executable_path()
+ */
+
+#if defined(_WIN32)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+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 <mach-o/dyld.h>
+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 <stdlib.h>
+char * executable_path( char const * argv0 )
+{
+ const char * execname = getexecname();
+ return execname ? strdup( execname ) : NULL;
+}
+#elif defined(__FreeBSD__)
+# include <sys/sysctl.h>
+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__)
+# include <unistd.h>
+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 <unixlib.h>
+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 )
+{
+ /* If argv0 is an absolute path, assume it is the right absolute path. */
+ return argv0[ 0 ] == '/' ? strdup( argv0 ) : NULL;
+}
+#endif
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..984a4a41b
--- /dev/null
+++ b/src/boost/tools/build/src/engine/jam.h
@@ -0,0 +1,524 @@
+/*
+ * 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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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 <Python.h>
+#endif
+
+/* Assume popen support is available unless known otherwise. */
+#define HAVE_POPEN 1
+
+/*
+ * VMS, OPENVMS
+ */
+
+#ifdef VMS
+
+#include <types.h>
+#include <file.h>
+#include <stat.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <unixlib.h>
+
+#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 <ctype.h>
+#include <fcntl.h>
+#include <malloc.h>
+#ifndef __MWERKS__
+ #include <memory.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+
+#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 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 <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <malloc.h>
+#include <memory.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+
+#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 PATH_DELIM '\\'
+
+#endif /* #ifdef MINGW */
+
+
+/*
+ * God fearing UNIX.
+ */
+
+#ifndef OSMINOR
+
+#define OSMAJOR "UNIX=true"
+#define USE_EXECUNIX
+#define USE_FILEUNIX
+#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 __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
+ #define unix
+#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 <sys/types.h>
+
+#ifndef OS_MPEIX
+ #include <sys/file.h>
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#ifndef OS_QNX
+ #include <memory.h>
+#endif
+
+#ifndef OS_ULTRIX
+ #include <stdlib.h>
+#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 <malloc.h>
+#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 defined(_ABI64)
+ #define OSPLAT "OSPLAT=MIPS64"
+ #elif defined(_ABIO32)
+ #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..c9ed8a17f
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
+
+#include "jam.h"
+#include "jam_strings.h"
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#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 <= 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 ) <= 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, size_t capacity )
+{
+ if ( self->value == self->opt )
+ {
+ self->value = (char *)BJAM_MALLOC_ATOMIC( 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 ) <= self->capacity && "Regression test" );
+ }
+ else
+ {
+ self->value = (char *)BJAM_REALLOC( self->value, 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, size_t capacity )
+{
+ assert_invariants( self );
+ if ( capacity <= self->capacity )
+ return;
+ string_reserve_internal( self, capacity );
+ assert_invariants( self );
+}
+
+
+static void maybe_reserve( string * self, size_t new_size )
+{
+ size_t capacity = self->capacity;
+ if ( capacity <= new_size )
+ {
+ size_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 )
+{
+ size_t rhs_size = strlen( rhs );
+ size_t new_size = self->size + rhs_size;
+ assert_invariants( self );
+
+ maybe_reserve( self, new_size );
+
+ memcpy( self->value + self->size, rhs, rhs_size + 1 );
+ self->size = new_size;
+
+ assert_invariants( self );
+}
+
+
+void string_append_range( string * self, char const * start, char const * finish )
+{
+ size_t rhs_size = finish - start;
+ size_t new_size = self->size + rhs_size;
+ assert_invariants( self );
+
+ maybe_reserve( self, new_size );
+
+ if ( start != finish )
+ memcpy( self->value + self->size, start, 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, size_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 == i + 1 );
+ }
+ assert( s->size == 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 == 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..f47db10af
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef JAM_STRINGS_DWA20011024_H
+#define JAM_STRINGS_DWA20011024_H
+
+#include "config.h"
+#include <stddef.h>
+
+typedef struct string
+{
+ char * value;
+ unsigned long size;
+ unsigned long 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 *, size_t );
+void string_truncate( string *, size_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/jambase.cpp b/src/boost/tools/build/src/engine/jambase.cpp
new file mode 100644
index 000000000..055c8f1d8
--- /dev/null
+++ b/src/boost/tools/build/src/engine/jambase.cpp
@@ -0,0 +1,112 @@
+/* Generated by mkjambase from Jambase */
+const char *jambase[] = {
+/* src/engine/Jambase */
+"if $(NT)\n",
+"{\n",
+"SLASH ?= \\\\ ;\n",
+"}\n",
+"SLASH ?= / ;\n",
+"rule find-to-root ( dir : patterns + )\n",
+"{\n",
+"local globs = [ GLOB $(dir) : $(patterns) ] ;\n",
+"while ! $(globs) && $(dir:P) != $(dir)\n",
+"{\n",
+"dir = $(dir:P) ;\n",
+"globs = [ GLOB $(dir) : $(patterns) ] ;\n",
+"}\n",
+"return $(globs) ;\n",
+"}\n",
+".boost-build-file = ;\n",
+".bootstrap-file = ;\n",
+"BOOST_BUILD_PATH.user-value = $(BOOST_BUILD_PATH) ;\n",
+"if ! $(BOOST_BUILD_PATH) && $(UNIX)\n",
+"{\n",
+"BOOST_BUILD_PATH = /usr/share/boost-build ;\n",
+"}\n",
+"rule _poke ( module-name ? : variables + : value * )\n",
+"{\n",
+"module $(<)\n",
+"{\n",
+"$(>) = $(3) ;\n",
+"}\n",
+"}\n",
+"rule boost-build ( dir ? )\n",
+"{\n",
+"if $(.bootstrap-file)\n",
+"{\n",
+"ECHO \"Error: Illegal attempt to re-bootstrap the build system by invoking\" ;\n",
+"ECHO ;\n",
+"ECHO \" 'boost-build\" $(dir) \";'\" ;\n",
+"ECHO ;\n",
+"EXIT \"Please consult the documentation at 'http://www.boost.org'.\" ;\n",
+"}\n",
+"BOOST_BUILD_PATH = $(dir:R=$(.boost-build-file:D)) $(BOOST_BUILD_PATH) ;\n",
+"_poke .ENVIRON : BOOST_BUILD_PATH : $(BOOST_BUILD_PATH) ;\n",
+"local bootstrap-file = [ GLOB $(BOOST_BUILD_PATH) : bootstrap.jam ] ;\n",
+".bootstrap-file = $(bootstrap-file[1]) ;\n",
+"if ! $(.bootstrap-file)\n",
+"{\n",
+"ECHO \"Unable to load B2: could not find build system.\" ;\n",
+"ECHO --------------------------------------------------------- ;\n",
+"ECHO \"$(.boost-build-file) attempted to load the build system by invoking\" ;\n",
+"ECHO ;\n",
+"ECHO \" 'boost-build\" $(dir) \";'\" ;\n",
+"ECHO ;\n",
+"ECHO \"but we were unable to find \\\"bootstrap.jam\\\" in the specified directory\" ;\n",
+"ECHO \"or in BOOST_BUILD_PATH (searching \"$(BOOST_BUILD_PATH:J=\", \")\").\" ;\n",
+"ECHO ;\n",
+"EXIT \"Please consult the documentation at 'http://www.boost.org'.\" ;\n",
+"}\n",
+"if [ MATCH .*(--debug-configuration).* : $(ARGV) ]\n",
+"{\n",
+"ECHO \"notice: loading B2 from\"\n",
+"[ NORMALIZE_PATH $(.bootstrap-file:D) ] ;\n",
+"}\n",
+"include $(.bootstrap-file) ;\n",
+"}\n",
+"{\n",
+"local search-path = $(BOOST_BUILD_PATH) $(BOOST_ROOT) ;\n",
+"local self = [ SELF_PATH ] ;\n",
+"local boost-build-relative = ../../share/boost-build ;\n",
+"local self-based-path = [ NORMALIZE_PATH $(boost-build-relative:R=$(self)) ] ;\n",
+"local boost-build-files =\n",
+"[ find-to-root [ PWD ] : boost-build.jam ]\n",
+"[ GLOB $(self-based-path) : boost-build.jam ]\n",
+"[ GLOB $(search-path) : boost-build.jam ] ;\n",
+".boost-build-file = $(boost-build-files[1]) ;\n",
+"if ! $(.boost-build-file)\n",
+"{\n",
+"ECHO \"Unable to load B2: could not find \\\"boost-build.jam\\\"\" ;\n",
+"ECHO --------------------------------------------------------------- ;\n",
+"if ! [ MATCH .*(bjam).* : $(ARGV[1]:BL) ]\n",
+"{\n",
+"ECHO \"BOOST_ROOT must be set, either in the environment, or \" ;\n",
+"ECHO \"on the command-line with -sBOOST_ROOT=..., to the root\" ;\n",
+"ECHO \"of the boost installation.\" ;\n",
+"ECHO ;\n",
+"}\n",
+"ECHO \"Attempted search from\" [ PWD ] \"up to the root\" ;\n",
+"ECHO \"at\" $(self-based-path) ;\n",
+"ECHO \"and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: \"$(search-path:J=\", \")\".\" ;\n",
+"EXIT \"Please consult the documentation at 'http://www.boost.org'.\" ;\n",
+"}\n",
+"if [ MATCH .*(--debug-configuration).* : $(ARGV) ]\n",
+"{\n",
+"ECHO \"notice: found boost-build.jam at\"\n",
+"[ NORMALIZE_PATH $(.boost-build-file) ] ;\n",
+"}\n",
+"include $(.boost-build-file) ;\n",
+"if ! $(.bootstrap-file)\n",
+"{\n",
+"ECHO \"Unable to load B2\" ;\n",
+"ECHO -------------------------- ;\n",
+"ECHO \"\\\"$(.boost-build-file)\\\" was found by searching from\" [ PWD ] \"up to the root\" ;\n",
+"ECHO \"and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: \"$(search-path:J=\", \")\".\" ;\n",
+"ECHO ;\n",
+"ECHO \"However, it failed to call the \\\"boost-build\\\" rule to indicate\" ;\n",
+"ECHO \"the location of the build system.\" ;\n",
+"ECHO ;\n",
+"EXIT \"Please consult the documentation at 'http://www.boost.org'.\" ;\n",
+"}\n",
+"}\n",
+0 };
diff --git a/src/boost/tools/build/src/engine/jambase.h b/src/boost/tools/build/src/engine/jambase.h
new file mode 100644
index 000000000..c63d08311
--- /dev/null
+++ b/src/boost/tools/build/src/engine/jambase.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 1993, 1995 Christopher Seiwald.
+ *
+ * This file is part of Jam - see jam.c for Copyright information.
+ */
+
+/*
+ * jambase.h - declaration for the internal jambase
+ *
+ * The file Jambase is turned into a C array of strings in jambase.c
+ * so that it can be built in to the executable. This is the
+ * declaration for that array.
+ */
+
+extern const char *jambase[];
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..d4ccc8e4f
--- /dev/null
+++ b/src/boost/tools/build/src/engine/jamgram.cpp
@@ -0,0 +1,2548 @@
+/* A Bison parser, made by GNU Bison 3.5.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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 <http://www.gnu.org/licenses/>. */
+
+/* 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. */
+
+/* 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. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.5.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 115 "src/engine/jamgram.cpp"
+
+# ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (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
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Use api.header.include to #include this header
+ instead of duplicating it here. */
+#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 type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ _BANG_t = 258,
+ _BANG_EQUALS_t = 259,
+ _AMPER_t = 260,
+ _AMPERAMPER_t = 261,
+ _LPAREN_t = 262,
+ _RPAREN_t = 263,
+ _PLUS_EQUALS_t = 264,
+ _COLON_t = 265,
+ _SEMIC_t = 266,
+ _LANGLE_t = 267,
+ _LANGLE_EQUALS_t = 268,
+ _EQUALS_t = 269,
+ _RANGLE_t = 270,
+ _RANGLE_EQUALS_t = 271,
+ _QUESTION_EQUALS_t = 272,
+ _LBRACKET_t = 273,
+ _RBRACKET_t = 274,
+ ACTIONS_t = 275,
+ BIND_t = 276,
+ BREAK_t = 277,
+ CASE_t = 278,
+ CLASS_t = 279,
+ CONTINUE_t = 280,
+ DEFAULT_t = 281,
+ ELSE_t = 282,
+ EXISTING_t = 283,
+ FOR_t = 284,
+ IF_t = 285,
+ IGNORE_t = 286,
+ IN_t = 287,
+ INCLUDE_t = 288,
+ LOCAL_t = 289,
+ MODULE_t = 290,
+ ON_t = 291,
+ PIECEMEAL_t = 292,
+ QUIETLY_t = 293,
+ RETURN_t = 294,
+ RULE_t = 295,
+ SWITCH_t = 296,
+ TOGETHER_t = 297,
+ UPDATED_t = 298,
+ WHILE_t = 299,
+ _LBRACE_t = 300,
+ _BAR_t = 301,
+ _BARBAR_t = 302,
+ _RBRACE_t = 303,
+ ARG = 304,
+ STRING = 305
+ };
+#endif
+/* Tokens. */
+#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 */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+ <limits.h> and (if available) <stdint.h> are included
+ so that the code can choose integer types of a good width. */
+
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stdint.h> /* 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
+
+#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 <stddef.h> /* 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 <stddef.h> /* 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 <libintl.h> /* 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 YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# 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 || YYERROR_VERBOSE
+
+/* 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 <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* 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 <stdlib.h> /* 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 || YYERROR_VERBOSE */
+
+
+#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
+
+#define YYUNDEFTOK 2
+#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 ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* 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
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "_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
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_int16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305
+};
+# 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_int16 yydefgoto[] =
+{
+ -1, 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 (internal number 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[YYN] -- Symbol number of symbol that rule YYN derives. */
+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[YYN] -- Number of symbols on the right hand side of rule YYN. */
+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
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#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)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
+{
+ FILE *yyoutput = yyo;
+ YYUSE (yyoutput);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+# endif
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyo, yytype, 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,
+ yystos[+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)
+# define YY_SYMBOL_PRINT(Title, Type, 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
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
+# else
+/* Return the length of YYSTR. */
+static YYPTRDIFF_T
+yystrlen (const char *yystr)
+{
+ YYPTRDIFF_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYPTRDIFF_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYPTRDIFF_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ else
+ goto append;
+
+ append:
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (yyres)
+ return yystpcpy (yyres, yystr) - yyres;
+ else
+ return yystrlen (yystr);
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
+ yy_state_t *yyssp, int yytoken)
+{
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat: reported tokens (one for the "unexpected",
+ one per "expected"). */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Actual size of YYARG. */
+ int yycount = 0;
+ /* Cumulated lengths of YYARG. */
+ YYPTRDIFF_T yysize = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[+*yyssp];
+ YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ yysize = yysize0;
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYPTRDIFF_T yysize1
+ = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ default: /* Avoid compiler warnings. */
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ /* Don't count the "%s"s in the final size, but reserve room for
+ the terminator. */
+ YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ ++yyp;
+ ++yyformat;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+ YYUSE (yyvaluep);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+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;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yy_state_t yyssa[YYINITDEPTH];
+ yy_state_t *yyss;
+ yy_state_t *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYPTRDIFF_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#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;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ 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
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#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)
+ goto yyexhaustedlab;
+ 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)
+ goto yyexhaustedlab;
+ 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 YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ 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:
+#line 148 "src/engine/jamgram.y"
+ { parse_save( yyvsp[0].parse ); }
+#line 1606 "src/engine/jamgram.cpp"
+ break;
+
+ case 4:
+#line 159 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; }
+#line 1612 "src/engine/jamgram.cpp"
+ break;
+
+ case 5:
+#line 161 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; }
+#line 1618 "src/engine/jamgram.cpp"
+ break;
+
+ case 6:
+#line 165 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; }
+#line 1624 "src/engine/jamgram.cpp"
+ break;
+
+ case 7:
+#line 167 "src/engine/jamgram.y"
+ { yyval.parse = prules( yyvsp[-1].parse, yyvsp[0].parse ); }
+#line 1630 "src/engine/jamgram.cpp"
+ break;
+
+ case 8:
+#line 168 "src/engine/jamgram.y"
+ { yymode( SCAN_ASSIGN ); }
+#line 1636 "src/engine/jamgram.cpp"
+ break;
+
+ case 9:
+#line 168 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1642 "src/engine/jamgram.cpp"
+ break;
+
+ case 10:
+#line 169 "src/engine/jamgram.y"
+ { yyval.parse = plocal( yyvsp[-4].parse, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 1648 "src/engine/jamgram.cpp"
+ break;
+
+ case 11:
+#line 173 "src/engine/jamgram.y"
+ { yyval.parse = pnull(); }
+#line 1654 "src/engine/jamgram.cpp"
+ break;
+
+ case 12:
+#line 176 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1660 "src/engine/jamgram.cpp"
+ break;
+
+ case 13:
+#line 177 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_SET; }
+#line 1666 "src/engine/jamgram.cpp"
+ break;
+
+ case 14:
+#line 179 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_APPEND; }
+#line 1672 "src/engine/jamgram.cpp"
+ break;
+
+ case 15:
+#line 183 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[-1].parse; }
+#line 1678 "src/engine/jamgram.cpp"
+ break;
+
+ case 16:
+#line 185 "src/engine/jamgram.y"
+ { yyval.parse = P0; }
+#line 1684 "src/engine/jamgram.cpp"
+ break;
+
+ case 17:
+#line 189 "src/engine/jamgram.y"
+ { yyval.number = 1; }
+#line 1690 "src/engine/jamgram.cpp"
+ break;
+
+ case 18:
+#line 191 "src/engine/jamgram.y"
+ { yyval.number = 0; }
+#line 1696 "src/engine/jamgram.cpp"
+ break;
+
+ case 19:
+#line 195 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; }
+#line 1702 "src/engine/jamgram.cpp"
+ break;
+
+ case 20:
+#line 197 "src/engine/jamgram.y"
+ { yyval.parse = pnull(); }
+#line 1708 "src/engine/jamgram.cpp"
+ break;
+
+ case 21:
+#line 200 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[-1].parse; }
+#line 1714 "src/engine/jamgram.cpp"
+ break;
+
+ case 22:
+#line 201 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1720 "src/engine/jamgram.cpp"
+ break;
+
+ case 23:
+#line 202 "src/engine/jamgram.y"
+ { yyval.parse = pincl( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); }
+#line 1726 "src/engine/jamgram.cpp"
+ break;
+
+ case 24:
+#line 203 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1732 "src/engine/jamgram.cpp"
+ break;
+
+ case 25:
+#line 204 "src/engine/jamgram.y"
+ { yyval.parse = prule( yyvsp[-3].string, yyvsp[-1].parse ); yymode( SCAN_NORMAL ); }
+#line 1738 "src/engine/jamgram.cpp"
+ break;
+
+ case 26:
+#line 205 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1744 "src/engine/jamgram.cpp"
+ break;
+
+ case 27:
+#line 206 "src/engine/jamgram.y"
+ { yyval.parse = pset( yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-3].number ); yymode( SCAN_NORMAL ); }
+#line 1750 "src/engine/jamgram.cpp"
+ break;
+
+ case 28:
+#line 207 "src/engine/jamgram.y"
+ { yymode( SCAN_ASSIGN ); }
+#line 1756 "src/engine/jamgram.cpp"
+ break;
+
+ case 29:
+#line 207 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1762 "src/engine/jamgram.cpp"
+ break;
+
+ case 30:
+#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 1768 "src/engine/jamgram.cpp"
+ break;
+
+ case 31:
+#line 209 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1774 "src/engine/jamgram.cpp"
+ break;
+
+ case 32:
+#line 210 "src/engine/jamgram.y"
+ { yyval.parse = preturn( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); }
+#line 1780 "src/engine/jamgram.cpp"
+ break;
+
+ case 33:
+#line 212 "src/engine/jamgram.y"
+ { yyval.parse = pbreak(); }
+#line 1786 "src/engine/jamgram.cpp"
+ break;
+
+ case 34:
+#line 214 "src/engine/jamgram.y"
+ { yyval.parse = pcontinue(); }
+#line 1792 "src/engine/jamgram.cpp"
+ break;
+
+ case 35:
+#line 215 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1798 "src/engine/jamgram.cpp"
+ break;
+
+ case 36:
+#line 215 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1804 "src/engine/jamgram.cpp"
+ break;
+
+ case 37:
+#line 216 "src/engine/jamgram.y"
+ { yyval.parse = pfor( yyvsp[-7].string, yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-8].number ); }
+#line 1810 "src/engine/jamgram.cpp"
+ break;
+
+ case 38:
+#line 217 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1816 "src/engine/jamgram.cpp"
+ break;
+
+ case 39:
+#line 217 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1822 "src/engine/jamgram.cpp"
+ break;
+
+ case 40:
+#line 218 "src/engine/jamgram.y"
+ { yyval.parse = pswitch( yyvsp[-4].parse, yyvsp[-1].parse ); }
+#line 1828 "src/engine/jamgram.cpp"
+ break;
+
+ case 41:
+#line 219 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 1834 "src/engine/jamgram.cpp"
+ break;
+
+ case 42:
+#line 219 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1840 "src/engine/jamgram.cpp"
+ break;
+
+ case 43:
+#line 220 "src/engine/jamgram.y"
+ { yyval.parse = pif( yyvsp[-5].parse, yyvsp[-2].parse, yyvsp[0].parse ); }
+#line 1846 "src/engine/jamgram.cpp"
+ break;
+
+ case 44:
+#line 221 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1852 "src/engine/jamgram.cpp"
+ break;
+
+ case 45:
+#line 221 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1858 "src/engine/jamgram.cpp"
+ break;
+
+ case 46:
+#line 222 "src/engine/jamgram.y"
+ { yyval.parse = pmodule( yyvsp[-4].parse, yyvsp[-1].parse ); }
+#line 1864 "src/engine/jamgram.cpp"
+ break;
+
+ case 47:
+#line 223 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1870 "src/engine/jamgram.cpp"
+ break;
+
+ case 48:
+#line 223 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1876 "src/engine/jamgram.cpp"
+ break;
+
+ case 49:
+#line 224 "src/engine/jamgram.y"
+ { yyval.parse = pclass( yyvsp[-4].parse, yyvsp[-1].parse ); }
+#line 1882 "src/engine/jamgram.cpp"
+ break;
+
+ case 50:
+#line 225 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 1888 "src/engine/jamgram.cpp"
+ break;
+
+ case 51:
+#line 225 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1894 "src/engine/jamgram.cpp"
+ break;
+
+ case 52:
+#line 226 "src/engine/jamgram.y"
+ { yyval.parse = pwhile( yyvsp[-4].parse, yyvsp[-1].parse ); }
+#line 1900 "src/engine/jamgram.cpp"
+ break;
+
+ case 53:
+#line 227 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 1906 "src/engine/jamgram.cpp"
+ break;
+
+ case 54:
+#line 227 "src/engine/jamgram.y"
+ { yymode( SCAN_PARAMS ); }
+#line 1912 "src/engine/jamgram.cpp"
+ break;
+
+ case 55:
+#line 227 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1918 "src/engine/jamgram.cpp"
+ break;
+
+ case 56:
+#line 228 "src/engine/jamgram.y"
+ { yyval.parse = psetc( yyvsp[-4].string, yyvsp[0].parse, yyvsp[-2].parse, yyvsp[-7].number ); }
+#line 1924 "src/engine/jamgram.cpp"
+ break;
+
+ case 57:
+#line 230 "src/engine/jamgram.y"
+ { yyval.parse = pon( yyvsp[-1].parse, yyvsp[0].parse ); }
+#line 1930 "src/engine/jamgram.cpp"
+ break;
+
+ case 58:
+#line 232 "src/engine/jamgram.y"
+ { yymode( SCAN_STRING ); }
+#line 1936 "src/engine/jamgram.cpp"
+ break;
+
+ case 59:
+#line 234 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 1942 "src/engine/jamgram.cpp"
+ break;
+
+ case 60:
+#line 236 "src/engine/jamgram.y"
+ { yyval.parse = psete( yyvsp[-6].string,yyvsp[-5].parse,yyvsp[-2].string,yyvsp[-7].number ); }
+#line 1948 "src/engine/jamgram.cpp"
+ break;
+
+ case 61:
+#line 244 "src/engine/jamgram.y"
+ { yyval.number = ASSIGN_SET; }
+#line 1954 "src/engine/jamgram.cpp"
+ break;
+
+ case 62:
+#line 246 "src/engine/jamgram.y"
+ { yyval.number = ASSIGN_APPEND; }
+#line 1960 "src/engine/jamgram.cpp"
+ break;
+
+ case 63:
+#line 248 "src/engine/jamgram.y"
+ { yyval.number = ASSIGN_DEFAULT; }
+#line 1966 "src/engine/jamgram.cpp"
+ break;
+
+ case 64:
+#line 250 "src/engine/jamgram.y"
+ { yyval.number = ASSIGN_DEFAULT; }
+#line 1972 "src/engine/jamgram.cpp"
+ break;
+
+ case 65:
+#line 257 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_EXISTS, yyvsp[0].parse, pnull() ); yymode( SCAN_COND ); }
+#line 1978 "src/engine/jamgram.cpp"
+ break;
+
+ case 66:
+#line 258 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 1984 "src/engine/jamgram.cpp"
+ break;
+
+ case 67:
+#line 259 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_EQUALS, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 1990 "src/engine/jamgram.cpp"
+ break;
+
+ case 68:
+#line 260 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 1996 "src/engine/jamgram.cpp"
+ break;
+
+ case 69:
+#line 261 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_NOTEQ, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2002 "src/engine/jamgram.cpp"
+ break;
+
+ case 70:
+#line 262 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2008 "src/engine/jamgram.cpp"
+ break;
+
+ case 71:
+#line 263 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_LESS, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2014 "src/engine/jamgram.cpp"
+ break;
+
+ case 72:
+#line 264 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2020 "src/engine/jamgram.cpp"
+ break;
+
+ case 73:
+#line 265 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_LESSEQ, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2026 "src/engine/jamgram.cpp"
+ break;
+
+ case 74:
+#line 266 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2032 "src/engine/jamgram.cpp"
+ break;
+
+ case 75:
+#line 267 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_MORE, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2038 "src/engine/jamgram.cpp"
+ break;
+
+ case 76:
+#line 268 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2044 "src/engine/jamgram.cpp"
+ break;
+
+ case 77:
+#line 269 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_MOREEQ, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2050 "src/engine/jamgram.cpp"
+ break;
+
+ case 78:
+#line 270 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2056 "src/engine/jamgram.cpp"
+ break;
+
+ case 79:
+#line 271 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2062 "src/engine/jamgram.cpp"
+ break;
+
+ case 80:
+#line 272 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2068 "src/engine/jamgram.cpp"
+ break;
+
+ case 81:
+#line 273 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2074 "src/engine/jamgram.cpp"
+ break;
+
+ case 82:
+#line 274 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2080 "src/engine/jamgram.cpp"
+ break;
+
+ case 83:
+#line 275 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2086 "src/engine/jamgram.cpp"
+ break;
+
+ case 84:
+#line 276 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2092 "src/engine/jamgram.cpp"
+ break;
+
+ case 85:
+#line 277 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2098 "src/engine/jamgram.cpp"
+ break;
+
+ case 86:
+#line 278 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 2104 "src/engine/jamgram.cpp"
+ break;
+
+ case 87:
+#line 279 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_IN, yyvsp[-3].parse, yyvsp[0].parse ); yymode( SCAN_COND ); }
+#line 2110 "src/engine/jamgram.cpp"
+ break;
+
+ case 88:
+#line 280 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2116 "src/engine/jamgram.cpp"
+ break;
+
+ case 89:
+#line 281 "src/engine/jamgram.y"
+ { yyval.parse = peval( EXPR_NOT, yyvsp[0].parse, pnull() ); }
+#line 2122 "src/engine/jamgram.cpp"
+ break;
+
+ case 90:
+#line 282 "src/engine/jamgram.y"
+ { yymode( SCAN_CONDB ); }
+#line 2128 "src/engine/jamgram.cpp"
+ break;
+
+ case 91:
+#line 283 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[-1].parse; }
+#line 2134 "src/engine/jamgram.cpp"
+ break;
+
+ case 92:
+#line 294 "src/engine/jamgram.y"
+ { yyval.parse = P0; }
+#line 2140 "src/engine/jamgram.cpp"
+ break;
+
+ case 93:
+#line 296 "src/engine/jamgram.y"
+ { yyval.parse = pnode( yyvsp[-1].parse, yyvsp[0].parse ); }
+#line 2146 "src/engine/jamgram.cpp"
+ break;
+
+ case 94:
+#line 299 "src/engine/jamgram.y"
+ { yymode( SCAN_CASE ); }
+#line 2152 "src/engine/jamgram.cpp"
+ break;
+
+ case 95:
+#line 299 "src/engine/jamgram.y"
+ { yymode( SCAN_NORMAL ); }
+#line 2158 "src/engine/jamgram.cpp"
+ break;
+
+ case 96:
+#line 300 "src/engine/jamgram.y"
+ { yyval.parse = psnode( yyvsp[-3].string, yyvsp[0].parse ); }
+#line 2164 "src/engine/jamgram.cpp"
+ break;
+
+ case 97:
+#line 309 "src/engine/jamgram.y"
+ { yyval.parse = pnode( P0, yyvsp[0].parse ); }
+#line 2170 "src/engine/jamgram.cpp"
+ break;
+
+ case 98:
+#line 311 "src/engine/jamgram.y"
+ { yyval.parse = pnode( yyvsp[0].parse, yyvsp[-2].parse ); }
+#line 2176 "src/engine/jamgram.cpp"
+ break;
+
+ case 99:
+#line 321 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; }
+#line 2182 "src/engine/jamgram.cpp"
+ break;
+
+ case 100:
+#line 325 "src/engine/jamgram.y"
+ { yyval.parse = pnull(); }
+#line 2188 "src/engine/jamgram.cpp"
+ break;
+
+ case 101:
+#line 327 "src/engine/jamgram.y"
+ { yyval.parse = pappend( yyvsp[-1].parse, yyvsp[0].parse ); }
+#line 2194 "src/engine/jamgram.cpp"
+ break;
+
+ case 102:
+#line 331 "src/engine/jamgram.y"
+ { yyval.parse = plist( yyvsp[0].string ); }
+#line 2200 "src/engine/jamgram.cpp"
+ break;
+
+ case 103:
+#line 332 "src/engine/jamgram.y"
+ { yyval.number = yymode( SCAN_CALL ); }
+#line 2206 "src/engine/jamgram.cpp"
+ break;
+
+ case 104:
+#line 333 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[-1].parse; yymode( yyvsp[-2].number ); }
+#line 2212 "src/engine/jamgram.cpp"
+ break;
+
+ case 105:
+#line 341 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 2218 "src/engine/jamgram.cpp"
+ break;
+
+ case 106:
+#line 342 "src/engine/jamgram.y"
+ { yyval.parse = prule( yyvsp[-2].string, yyvsp[0].parse ); }
+#line 2224 "src/engine/jamgram.cpp"
+ break;
+
+ case 107:
+#line 343 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 2230 "src/engine/jamgram.cpp"
+ break;
+
+ case 108:
+#line 344 "src/engine/jamgram.y"
+ { yyval.parse = pon( yyvsp[-3].parse, prule( yyvsp[-2].string, yyvsp[0].parse ) ); }
+#line 2236 "src/engine/jamgram.cpp"
+ break;
+
+ case 109:
+#line 345 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 2242 "src/engine/jamgram.cpp"
+ break;
+
+ case 110:
+#line 346 "src/engine/jamgram.y"
+ { yyval.parse = pon( yyvsp[-3].parse, yyvsp[0].parse ); }
+#line 2248 "src/engine/jamgram.cpp"
+ break;
+
+ case 111:
+#line 356 "src/engine/jamgram.y"
+ { yyval.number = 0; }
+#line 2254 "src/engine/jamgram.cpp"
+ break;
+
+ case 112:
+#line 358 "src/engine/jamgram.y"
+ { yyval.number = yyvsp[-1].number | yyvsp[0].number; }
+#line 2260 "src/engine/jamgram.cpp"
+ break;
+
+ case 113:
+#line 362 "src/engine/jamgram.y"
+ { yyval.number = EXEC_UPDATED; }
+#line 2266 "src/engine/jamgram.cpp"
+ break;
+
+ case 114:
+#line 364 "src/engine/jamgram.y"
+ { yyval.number = EXEC_TOGETHER; }
+#line 2272 "src/engine/jamgram.cpp"
+ break;
+
+ case 115:
+#line 366 "src/engine/jamgram.y"
+ { yyval.number = EXEC_IGNORE; }
+#line 2278 "src/engine/jamgram.cpp"
+ break;
+
+ case 116:
+#line 368 "src/engine/jamgram.y"
+ { yyval.number = EXEC_QUIETLY; }
+#line 2284 "src/engine/jamgram.cpp"
+ break;
+
+ case 117:
+#line 370 "src/engine/jamgram.y"
+ { yyval.number = EXEC_PIECEMEAL; }
+#line 2290 "src/engine/jamgram.cpp"
+ break;
+
+ case 118:
+#line 372 "src/engine/jamgram.y"
+ { yyval.number = EXEC_EXISTING; }
+#line 2296 "src/engine/jamgram.cpp"
+ break;
+
+ case 119:
+#line 381 "src/engine/jamgram.y"
+ { yyval.parse = pnull(); }
+#line 2302 "src/engine/jamgram.cpp"
+ break;
+
+ case 120:
+#line 382 "src/engine/jamgram.y"
+ { yymode( SCAN_PUNCT ); }
+#line 2308 "src/engine/jamgram.cpp"
+ break;
+
+ case 121:
+#line 383 "src/engine/jamgram.y"
+ { yyval.parse = yyvsp[0].parse; }
+#line 2314 "src/engine/jamgram.cpp"
+ break;
+
+
+#line 2318 "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 ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++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 ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ 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;
+
+ /* 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. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ 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",
+ yystos[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", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+
+/*-----------------------------------------------------.
+| yyreturn -- parsing is finished, return the result. |
+`-----------------------------------------------------*/
+yyreturn:
+ 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",
+ yystos[+*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#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..984761939
--- /dev/null
+++ b/src/boost/tools/build/src/engine/jamgram.hpp
@@ -0,0 +1,164 @@
+/* A Bison parser, made by GNU Bison 3.5.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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 <http://www.gnu.org/licenses/>. */
+
+/* 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. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+#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 type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ _BANG_t = 258,
+ _BANG_EQUALS_t = 259,
+ _AMPER_t = 260,
+ _AMPERAMPER_t = 261,
+ _LPAREN_t = 262,
+ _RPAREN_t = 263,
+ _PLUS_EQUALS_t = 264,
+ _COLON_t = 265,
+ _SEMIC_t = 266,
+ _LANGLE_t = 267,
+ _LANGLE_EQUALS_t = 268,
+ _EQUALS_t = 269,
+ _RANGLE_t = 270,
+ _RANGLE_EQUALS_t = 271,
+ _QUESTION_EQUALS_t = 272,
+ _LBRACKET_t = 273,
+ _RBRACKET_t = 274,
+ ACTIONS_t = 275,
+ BIND_t = 276,
+ BREAK_t = 277,
+ CASE_t = 278,
+ CLASS_t = 279,
+ CONTINUE_t = 280,
+ DEFAULT_t = 281,
+ ELSE_t = 282,
+ EXISTING_t = 283,
+ FOR_t = 284,
+ IF_t = 285,
+ IGNORE_t = 286,
+ IN_t = 287,
+ INCLUDE_t = 288,
+ LOCAL_t = 289,
+ MODULE_t = 290,
+ ON_t = 291,
+ PIECEMEAL_t = 292,
+ QUIETLY_t = 293,
+ RETURN_t = 294,
+ RULE_t = 295,
+ SWITCH_t = 296,
+ TOGETHER_t = 297,
+ UPDATED_t = 298,
+ WHILE_t = 299,
+ _LBRACE_t = 300,
+ _BAR_t = 301,
+ _BARBAR_t = 302,
+ _RBRACE_t = 303,
+ ARG = 304,
+ STRING = 305
+ };
+#endif
+/* Tokens. */
+#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..af602b504
--- /dev/null
+++ b/src/boost/tools/build/src/engine/lists.cpp
@@ -0,0 +1,474 @@
+/*
+ * 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 "output.h"
+
+#include <assert.h>
+
+static LIST * freelist[ 32 ]; /* junkpile for list_dealloc() */
+
+static unsigned get_bucket( unsigned size )
+{
+ unsigned bucket = 0;
+ while ( size > ( 1u << bucket ) ) ++bucket;
+ return bucket;
+}
+
+static LIST * list_alloc( unsigned const size )
+{
+ unsigned const bucket = get_bucket( size );
+ if ( freelist[ bucket ] )
+ {
+ LIST * result = freelist[ bucket ];
+ freelist[ bucket ] = result->impl.next;
+ return result;
+ }
+ return (LIST *)BJAM_MALLOC( sizeof( LIST ) + ( 1u << bucket ) *
+ sizeof( OBJECT * ) );
+}
+
+static void list_dealloc( LIST * l )
+{
+ unsigned size = list_length( l );
+ unsigned bucket;
+ LIST * node = l;
+
+ if ( size == 0 ) return;
+
+ bucket = get_bucket( size );;
+
+#ifdef BJAM_NO_MEM_CACHE
+ BJAM_FREE( node );
+#else
+ node->impl.next = freelist[ bucket ];
+ freelist[ bucket ] = node;
+#endif
+}
+
+/*
+ * 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 ) )
+ {
+ unsigned int const l_size = list_length( l );
+ int const nl_size = list_length( nl );
+ int const size = l_size + nl_size;
+ unsigned const bucket = get_bucket( size );
+
+ /* Do we need to reallocate? */
+ if ( l_size <= ( 1u << ( 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 )
+{
+ unsigned int 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 )
+{
+ int size = list_length( l );
+ int 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
+ {
+ int size = 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, int start, int count )
+{
+ int end = start + count;
+ int 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 int 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 )
+{
+ int 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 )
+{
+ unsigned 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 )
+{
+ int size = list_length( l );
+ if ( size == 0 ) return L0;
+ {
+ LIST * const result = list_alloc( size );
+ int 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;
+ }
+}
+
+int list_cmp( LIST * t, LIST * s )
+{
+ int 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;
+}
+
+int 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
+ */
+
+int list_length( LIST * l )
+{
+ return l ? l->impl.size : 0;
+}
+
+
+int 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()
+{
+ unsigned int i;
+ for ( i = 0; i < sizeof( freelist ) / sizeof( freelist[ 0 ] ); ++i )
+ {
+ LIST * l = freelist[ i ];
+ while ( l )
+ {
+ LIST * const tmp = l;
+ l = l->impl.next;
+ BJAM_FREE( tmp );
+ }
+ }
+}
+
+
+/*
+ * 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;
+}
+
+
+/*
+ * lol_free() - free the LOL and its LISTs.
+ */
+
+void lol_free( LOL * lol )
+{
+ int 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, int i )
+{
+ return i < lol->count ? lol->list[ i ] : L0;
+}
+
+
+/*
+ * lol_print() - debug print LISTS separated by ":".
+ */
+
+void lol_print( LOL * lol )
+{
+ int 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..7ddb668a4
--- /dev/null
+++ b/src/boost/tools/build/src/engine/lists.h
@@ -0,0 +1,114 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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 <Python.h>
+#endif
+
+/*
+ * LIST - list of strings
+ */
+
+typedef struct _list {
+ union {
+ int size;
+ struct _list * next;
+ OBJECT * align;
+ } impl;
+} LIST;
+
+typedef OBJECT * * LISTITER;
+
+/*
+ * LOL - list of LISTs
+ */
+
+#define LOL_MAX 19
+typedef struct _lol {
+ int 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 * );
+int list_length( LIST * );
+LIST * list_sublist( LIST *, int start, int count );
+LIST * list_pop_front( LIST * );
+LIST * list_sort( LIST * );
+LIST * list_unique( LIST * sorted_list );
+int list_in( LIST *, OBJECT * value );
+LIST * list_reverse( LIST * );
+int list_cmp( LIST * lhs, LIST * rhs );
+int 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
+
+#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..470626e56
--- /dev/null
+++ b/src/boost/tools/build/src/engine/make.cpp
@@ -0,0 +1,941 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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 <assert.h>
+
+#ifndef max
+# define max(a,b) ((a)>(b)?(a):(b))
+#endif
+
+static TARGETS * make0sort( TARGETS * c );
+
+#ifdef OPT_GRAPH_DEBUG_EXT
+ static void dependGraphOutput( TARGET * t, int 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.
+ */
+
+int make( LIST * targets, int anyhow )
+{
+ COUNTS counts[ 1 ];
+ int 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 * q;
+
+ for ( q = t->dependants; q; q = q->next )
+ {
+ 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[ (int) fate0 ], target_fate[ (int) 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 * d;
+ for ( d = t->rebuilds; d; d = d->next )
+ {
+ 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[ (int) 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 );
+ }
+ }
+}
+
+
+int make0rescan( TARGET * t, TARGET * rescanning )
+{
+ int result = 0;
+ TARGETS * 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; c; c = c->next )
+ {
+ 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;
+ rescanning->depends = 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 */
+ int depth, /* for display purposes */
+ COUNTS * counts, /* for reporting */
+ int anyhow,
+ TARGET * rescanning
+) /* forcibly touch all (real) targets */
+{
+ TARGETS * c;
+ TARGET * ptime = t;
+ TARGET * located_target = 0;
+ timestamp last;
+ timestamp leaf;
+ timestamp hlast;
+ int fate;
+ char const * flag = "";
+ SETTINGS * s;
+
+#ifdef OPT_GRAPH_DEBUG_EXT
+ int savedFate;
+ int 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[ (int)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; c; c = c->next )
+ {
+ int 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 * incs = 0;
+ for ( c = t->depends; c; c = c->next )
+ if ( c->target->includes )
+ incs = targetentry( incs, c->target->includes );
+ t->depends = targetchain( t->depends, incs );
+ }
+
+ if ( located_target )
+ t->depends = targetentry( t->depends, located_target );
+
+ /* Step 3d: Detect cycles. */
+ {
+ int cycle_depth = depth;
+ for ( c = t->depends; c; c = c->next )
+ {
+ 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; c; c = c->next )
+ {
+ /* 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[ (int)fate ],
+ target_fate[ (int)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 * c;
+ for ( a = t->actions; a; a = a->next )
+ {
+ for ( c = a->action->targets; c; c = c->next )
+ {
+ 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( 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[ (int)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, int depth )
+{
+ TARGETS * 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; c; c = c->next )
+ {
+ out_printf( " %s : Depends on %s (%s)", spaces( depth ),
+ target_name( c->target ), target_fate[ (int)c->target->fate ] );
+ if ( !timestamp_cmp( &c->target->time, &t->time ) )
+ out_printf( " (max time)");
+ out_printf( "\n" );
+ }
+
+ for ( c = t->depends; c; c = c->next )
+ dependGraphOutput( c->target, depth + 1 );
+}
+#endif
+
+
+/*
+ * make0sort() - reorder TARGETS chain by their time (newest to oldest).
+ *
+ * We walk chain, taking each item and inserting it on the sorted result, with
+ * newest items at the front. This involves updating each of the TARGETS'
+ * c->next and c->tail. Note that we make c->tail a valid prev pointer for every
+ * entry. Normally, it is only valid at the head, where prev == tail. Note also
+ * that while tail is a loop, next ends at the end of the chain.
+ */
+
+static TARGETS * make0sort( TARGETS * chain )
+{
+ PROFILE_ENTER( MAKE_MAKE0SORT );
+
+ TARGETS * result = 0;
+
+ /* Walk the current target list. */
+ while ( chain )
+ {
+ TARGETS * c = chain;
+ TARGETS * s = result;
+
+ chain = chain->next;
+
+ /* Find point s in result for c. */
+ while ( s && timestamp_cmp( &s->target->time, &c->target->time ) > 0 )
+ s = s->next;
+
+ /* Insert c in front of s (might be 0). */
+ c->next = s; /* good even if s = 0 */
+ if ( result == s ) result = c; /* new head of chain? */
+ if ( !s ) s = result; /* wrap to ensure a next */
+ if ( result != c ) s->tail->next = c; /* not head? be prev's next */
+ c->tail = s->tail; /* take on next's prev */
+ s->tail = c; /* make next's prev us */
+ }
+
+ PROFILE_EXIT( MAKE_MAKE0SORT );
+ return result;
+}
+
+
+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..537b9e98f
--- /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"
+
+int make( LIST * targets, int anyhow );
+int make1( LIST * t );
+
+typedef struct {
+ int temp;
+ int updating;
+ int cantfind;
+ int cantmake;
+ int targets;
+ int made;
+} COUNTS ;
+
+
+void make0( TARGET * t, TARGET * p, int depth, COUNTS * counts, int 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..61f0614a1
--- /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 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)
+ */
+
+/*
+ * 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 <assert.h>
+#include <stdlib.h>
+
+#if !defined( NT ) || defined( __GNUC__ )
+ #include <unistd.h> /* for unlink */
+#endif
+
+static CMD * make1cmds ( TARGET * );
+static LIST * make1list ( LIST *, TARGETS *, int flags );
+static SETTINGS * make1settings ( struct module_t *, LIST * vars );
+static void make1bind ( TARGET * );
+static void push_cmds( CMDLIST * cmds, int status );
+static int cmd_sem_lock( TARGET * t );
+static void cmd_sem_unlock( TARGET * t );
+
+static int targets_contains( TARGETS * l, TARGET * t );
+static int targets_equal( TARGETS * l1, TARGETS * l2 );
+
+/* Ugly static - it is too hard to carry it through the callbacks. */
+
+static struct
+{
+ int failed;
+ int skipped;
+ int total;
+ int 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 */
+ int 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, int status,
+ timing_info const * const, char const * const cmd_stdout,
+ char const * const cmd_stderr, int 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 int 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, int 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 int intr = 0;
+static int quit = 0;
+
+int make1( LIST * targets )
+{
+ state * pState;
+ int 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 )
+ 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 )
+ {
+ t->parents = 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 * c;
+ for ( c = t->depends; c && !quit; c = c->next )
+ 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 * c;
+ for ( c = t->depends; c; c = c->next )
+ 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 );
+ abort();
+ }
+
+ /* 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;
+ int 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 * 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; c; c = c->next )
+ c->target->depends = 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; c; c = c->next )
+ 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; c; c = c->next )
+ {
+ if ( target_scc( c->target ) == scc_root )
+ push_state( &temp_stack, c->target, NULL, T_STATE_MAKE1B
+ );
+ else
+ scc_root->parents = targetentry( scc_root->parents,
+ c->target );
+ }
+ }
+ else
+ {
+ for ( c = t->parents; c; c = c->next )
+ 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,
+ int 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,
+ int status_orig,
+ timing_info const * const time,
+ char const * const cmd_stdout,
+ char const * const cmd_stderr,
+ int 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, int 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;
+ LIST * shell = L0;
+ module_t * settings_module = 0;
+ TARGET * settings_target = 0;
+ ACTIONS * a0;
+ int 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 * 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.
+ */
+ {
+ int const length = list_length( ns );
+ int start = 0;
+ int chunk = length;
+ int cmd_count = 0;
+ TARGETS * semaphores = NULL;
+ TARGETS * targets_iter;
+ int unique_targets;
+ do
+ {
+ CMD * cmd;
+ int cmd_check_result;
+ int cmd_error_length;
+ int cmd_error_max_length;
+ int retry = 0;
+ int 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 );
+ 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; targets_iter; targets_iter = targets_iter->next )
+ {
+ 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; targets_iter; targets_iter = targets_iter->next )
+ {
+ TARGET * sem = targets_iter->target->semaphore;
+ if ( sem )
+ {
+ if ( ! targets_contains( semaphores, sem ) )
+ semaphores = targetentry( semaphores, sem );
+ }
+ }
+ ( ( CMD * )a0->action->first_cmd )->lock = semaphores;
+ ( ( CMD * )a0->action->last_cmd )->unlock = 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, TARGETS * targets, int flags )
+{
+ for ( ; targets; targets = targets->next )
+ {
+ 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 int targets_contains( TARGETS * l, TARGET * t )
+{
+ for ( ; l; l = l->next )
+ {
+ if ( t == l->target )
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int targets_equal( TARGETS * l1, TARGETS * l2 )
+{
+ for ( ; l1 && l2; l1 = l1->next, l2 = l2->next )
+ {
+ if ( l1->target != l2->target )
+ return 0;
+ }
+ return !l1 && !l2;
+}
+
+
+#ifdef OPT_SEMAPHORE
+
+static int cmd_sem_lock( TARGET * t )
+{
+ CMD * cmd = (CMD *)t->cmds;
+ TARGETS * iter;
+ /* Check whether all the semaphores required for updating
+ * this target are free.
+ */
+ for ( iter = cmd->lock; iter; iter = iter->next )
+ {
+ 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 ) );
+ iter->target->parents = targetentry( iter->target->parents, t );
+ return 0;
+ }
+ }
+ /* Lock the semaphores. */
+ for ( iter = cmd->lock; iter; iter = iter->next )
+ {
+ ++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 * iter;
+ /* Release the semaphores. */
+ for ( iter = cmd->unlock; iter; iter = iter->next )
+ {
+ 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; iter; iter = iter->next )
+ {
+ /* Find a waiting target that's ready */
+ while ( iter->target->parents )
+ {
+ TARGETS * first = iter->target->parents;
+ TARGET * t1 = first->target;
+
+ /* Pop the first waiting CMD */
+ if ( first->next )
+ first->next->tail = first->tail;
+ iter->target->parents = first->next;
+ BJAM_FREE( first );
+
+ 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..c35d96c5e
--- /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
+ <ghost@aladdin.com>. 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 <string.h>
+ 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 <stdio.h> 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 <string.h>
+
+#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, int nbytes)
+{
+ const md5_byte_t *p = data;
+ int left = nbytes;
+ int 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] += nbytes >> 29;
+ pms->count[0] += nbits;
+ if (pms->count[0] < nbits)
+ pms->count[1]++;
+
+ /* Process an initial partial block. */
+ if (offset) {
+ int 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..698c995d8
--- /dev/null
+++ b/src/boost/tools/build/src/engine/md5.h
@@ -0,0 +1,91 @@
+/*
+ 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
+ <ghost@aladdin.com>. 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 <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+#ifndef md5_INCLUDED
+# define md5_INCLUDED
+
+/*
+ * 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, int 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..65c63f754
--- /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_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.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..076808504
--- /dev/null
+++ b/src/boost/tools/build/src/engine/mem.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2006. 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)
+ */
+
+#ifndef BJAM_MEM_H
+#define BJAM_MEM_H
+
+#include "config.h"
+
+/* Standard C memory allocation. */
+#include <stdlib.h>
+
+#define bjam_malloc_x(s) malloc(s)
+#define bjam_calloc_x(n,s) calloc(n,s)
+#define bjam_realloc_x(p,s) realloc(p,s)
+#define bjam_free_x(p) 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)
+
+#endif
diff --git a/src/boost/tools/build/src/engine/mkjambase.cpp b/src/boost/tools/build/src/engine/mkjambase.cpp
new file mode 100644
index 000000000..bc49a2b16
--- /dev/null
+++ b/src/boost/tools/build/src/engine/mkjambase.cpp
@@ -0,0 +1,123 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * mkjambase.c - turn Jambase into a big C structure
+ *
+ * Usage: mkjambase jambase.c Jambase ...
+ *
+ * Results look like this:
+ *
+ * char *jambase[] = {
+ * "...\n",
+ * ...
+ * 0 };
+ *
+ * Handles \'s and "'s specially; knows to delete blank and comment lines.
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+
+int main( int argc, char * * argv, char * * envp )
+{
+ char buf[ 1024 ];
+ FILE * fin;
+ FILE * fout;
+ char * p;
+ int doDotC = 0;
+
+ if ( argc < 3 )
+ {
+ fprintf( stderr, "usage: %s jambase.c Jambase ...\n", argv[ 0 ] );
+ return -1;
+ }
+
+ if ( !( fout = fopen( argv[1], "w" ) ) )
+ {
+ perror( argv[ 1 ] );
+ return -1;
+ }
+
+ /* If the file ends in .c generate a C source file. */
+ if ( ( p = strrchr( argv[1], '.' ) ) && ( !strcmp( p, ".c" ) || !strcmp( p, ".cpp" ) ) )
+ doDotC++;
+
+ /* Now process the files. */
+
+ argc -= 2;
+ argv += 2;
+
+ if ( doDotC )
+ {
+ fprintf( fout, "/* Generated by mkjambase from Jambase */\n" );
+ fprintf( fout, "const char *jambase[] = {\n" );
+ }
+
+ for ( ; argc--; ++argv )
+ {
+ if ( !( fin = fopen( *argv, "r" ) ) )
+ {
+ perror( *argv );
+ return -1;
+ }
+
+ if ( doDotC )
+ fprintf( fout, "/* %s */\n", *argv );
+ else
+ fprintf( fout, "### %s ###\n", *argv );
+
+ while ( fgets( buf, sizeof( buf ), fin ) )
+ {
+ if ( doDotC )
+ {
+ char * p = buf;
+
+ /* Strip leading whitespace. */
+ while ( ( *p == ' ' ) || ( *p == '\t' ) || ( *p == '\n' ) )
+ ++p;
+
+ /* Drop comments and empty lines. */
+ if ( ( *p == '#' ) || !*p )
+ continue;
+
+ /* Copy. */
+ putc( '"', fout );
+ for ( ; *p && ( *p != '\n' ); ++p )
+ switch ( *p )
+ {
+ case '\\': putc( '\\', fout ); putc( '\\', fout ); break;
+ case '"' : putc( '\\', fout ); putc( '"' , fout ); break;
+ case '\r': break;
+ default: putc( *p, fout ); break;
+ }
+
+ fprintf( fout, "\\n\",\n" );
+ }
+ else
+ {
+ fprintf( fout, "%s", buf );
+ }
+ }
+
+ fclose( fin );
+ }
+
+ if ( doDotC )
+ fprintf( fout, "0 };\n" );
+
+ fclose( fout );
+
+ return 0;
+}
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..d30c40bc4
--- /dev/null
+++ b/src/boost/tools/build/src/engine/modules.cpp
@@ -0,0 +1,431 @@
+/*
+ * Copyright 2001-2004 David Abrahams.
+ * 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 "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 <assert.h>
+#include <string.h>
+
+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 ( 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..acad633bf
--- /dev/null
+++ b/src/boost/tools/build/src/engine/modules.h
@@ -0,0 +1,53 @@
+/*
+ * 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)
+ */
+#ifndef MODULES_DWA10182001_H
+#define MODULES_DWA10182001_H
+
+#include "config.h"
+#include "lists.h"
+#include "object.h"
+
+typedef struct module_t module_t ;
+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..38209b889
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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, int 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.
+ */
+int list_index( LIST * list, OBJECT * value )
+{
+ int 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( int * * graph, int current_vertex, int * colors, int * * result_ptr
+ )
+{
+ int i;
+
+ colors[ current_vertex ] = gray;
+ for ( i = 0; graph[ current_vertex ][ i ] != -1; ++i )
+ {
+ int 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 )++;
+}
+
+
+void topological_sort( int * * graph, int num_vertices, int * result )
+{
+ int i;
+ int * colors = ( int * )BJAM_CALLOC( num_vertices, sizeof( int ) );
+ 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, int flags )
+{
+ LIST * arg = lol_get( frame->args, 0 );
+ LIST * result = L0;
+ int 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'.
+ */
+ int length = list_length( arg );
+ int * * graph = ( int * * )BJAM_CALLOC( length, sizeof( int * ) );
+ int * order = ( int * )BJAM_MALLOC( ( length + 1 ) * sizeof( int ) );
+
+ 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 ) );
+ int index = 0;
+ LISTITER dep_iter = list_begin( dependencies );
+ LISTITER const dep_end = list_end( dependencies );
+
+ graph[ src ] = ( int * )BJAM_CALLOC( list_length( dependencies ) + 1,
+ sizeof( int ) );
+ for ( ; dep_iter != dep_end; dep_iter = list_next( dep_iter ) )
+ {
+ int 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 );
+
+ {
+ int index = length - 1;
+ for ( ; index >= 0; --index )
+ {
+ int 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 */
+ {
+ int 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..8f7624839
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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..400859723
--- /dev/null
+++ b/src/boost/tools/build/src/engine/modules/property-set.cpp
@@ -0,0 +1,330 @@
+/*
+ * Copyright 2013 Steven Watanabe
+ * 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 "../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;
+ size_t table_size;
+ size_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 )
+{
+ size_t i;
+ map->table_size = 2;
+ map->num_elems = 0;
+ map->table = (struct ps_map_entry * *)BJAM_MALLOC( 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 )
+{
+ size_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;
+ size_t i;
+ map->table = (struct ps_map_entry * *)BJAM_MALLOC( 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, "'" );
+ rulename = object_new( "errors.error" );
+ call_rule( rulename, frame,
+ list_new( object_new( message->value ) ), 0 );
+ /* unreachable */
+ string_free( message );
+ 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..fa5355858
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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, 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..cece2cd5b
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include "../native.h"
+#include "../object.h"
+#include "../lists.h"
+#include "../compile.h"
+
+#include <stdlib.h>
+
+
+#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..77a314d57
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.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..68828aa31
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include "native.h"
+
+#include "hash.h"
+
+#include <assert.h>
+
+
+void declare_native_rule( char const * module, char const * rule,
+ char const * * args, LIST * (*f)( FRAME *, int ), int 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 );
+ int 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..f80b0e0f0
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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.
+ */
+ int 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 *, int ), int 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..07866baf4
--- /dev/null
+++ b/src/boost/tools/build/src/engine/object.cpp
@@ -0,0 +1,397 @@
+/*
+ * 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 <assert.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+
+#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
+{
+ unsigned int num;
+ unsigned int size;
+ struct hash_item * * data;
+} string_set;
+
+static string_set strhash;
+static int strtotal = 0;
+static int strcount_in = 0;
+static int 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;
+
+/* 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( size_t n )
+{
+#ifdef BJAM_NEWSTR_NO_ALLOCATE
+ return (char *)BJAM_MALLOC( n );
+#else
+ /* See if we can grab storage from an existing block. */
+ size_t remaining = 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;
+ size_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 ] ) +
+ 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
+}
+
+
+static unsigned int hash_keyval( char const * key, int const 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 );
+}
+
+
+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 )
+{
+ unsigned i;
+ 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 ( 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,
+ int 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;
+}
+
+
+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_new_range() - create an object from a string of given length
+ */
+
+OBJECT * object_new_range( char const * const string, int const 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, strlen( string ) );
+}
+
+
+#ifndef object_copy
+
+/*
+ * 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
+
+ string_set_done( &strhash );
+
+ 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..03fc0692b
--- /dev/null
+++ b/src/boost/tools/build/src/engine/object.h
@@ -0,0 +1,46 @@
+/*
+ * 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"
+
+typedef struct _object OBJECT;
+
+OBJECT * object_new( char const * const );
+OBJECT * object_new_range( char const * const, int const 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
+
+#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 <option.h>.
+ * 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..395d6c6df
--- /dev/null
+++ b/src/boost/tools/build/src/engine/output.cpp
@@ -0,0 +1,159 @@
+/*
+ Copyright 2007 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)
+*/
+
+#include "jam.h"
+#include "output.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+
+
+#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 );
+ }
+}
+
+
+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..a85edaaf2
--- /dev/null
+++ b/src/boost/tools/build/src/engine/output.h
@@ -0,0 +1,42 @@
+/*
+ Copyright 2007 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)
+*/
+
+#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, ...);
+
+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..42f64f06e
--- /dev/null
+++ b/src/boost/tools/build/src/engine/parse.cpp
@@ -0,0 +1,148 @@
+/*
+ * 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)
+ */
+
+#include "jam.h"
+#include "lists.h"
+#include "parse.h"
+#include "scan.h"
+#include "object.h"
+#include "modules.h"
+#include "frames.h"
+#include "function.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;
+ FUNCTION * func;
+
+ /* 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. */
+ func = function_compile( p );
+ parse_free( p );
+ list_free( function_run( func, frame, stack_global() ) );
+ function_free( func );
+ }
+
+ 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..7dc2e660d
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..494883da6
--- /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-2019 Rene Rivera
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+
+#define VERSION_MAJOR 4
+#define VERSION_MINOR 2
+#define VERSION_PATCH 0
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..5b0cc4659
--- /dev/null
+++ b/src/boost/tools/build/src/engine/pathnt.cpp
@@ -0,0 +1,409 @@
+/*
+ * 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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * pathnt.c - NT specific path manipulation support
+ */
+
+#include "jam.h"
+#include "pathsys.h"
+#include "hash.h"
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+#ifdef OS_CYGWIN
+# include <cygwin/version.h>
+# include <sys/cygwin.h>
+# ifdef CYGWIN_VERSION_CYGWIN_CONV
+# include <errno.h>
+# endif
+# include <windows.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+
+
+/* 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, int const path_length,
+ string * const out )
+{
+ char const * last_element;
+ unsigned long 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;
+ int const dir_length = 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;
+ int const n_length = 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;
+ int 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;
+ object_free( entry->path );
+ 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 );
+ }
+}
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..61bacd6b1
--- /dev/null
+++ b/src/boost/tools/build/src/engine/pathsys.cpp
@@ -0,0 +1,302 @@
+/*
+ * 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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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 "pathsys.h"
+
+#include "filesys.h"
+
+#include <stdlib.h>
+#include <time.h>
+
+
+/* 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 '<grist>'. */
+
+ if ( ( file[ 0 ] == '<' ) && ( p = strchr( file, '>' ) ) )
+ {
+ f->f_grist.ptr = file;
+ f->f_grist.len = 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 = 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 = 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 = end - p;
+ end = p;
+ }
+
+ /* Leaves base. */
+ f->f_base.ptr = file;
+ f->f_base.len = 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 );
+}
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..839476e94
--- /dev/null
+++ b/src/boost/tools/build/src/engine/pathsys.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
+ *
+ * This file is part of Jam - see jam.c for Copyright information.
+ */
+
+/*
+ * pathsys.h - PATHNAME struct
+ */
+
+/*
+ * PATHNAME - a name of a file, broken into <grist>dir/base/suffix(member)
+ *
+ * <grist> - 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() and the Jambase.
+ */
+
+#ifndef PATHSYS_VP_20020211_H
+#define PATHSYS_VP_20020211_H
+
+#include "config.h"
+#include "object.h"
+#include "jam_strings.h"
+
+
+typedef struct _pathpart
+{
+ char const * ptr;
+ int 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 );
+
+#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..2b2347c87
--- /dev/null
+++ b/src/boost/tools/build/src/engine/pathunix.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * pathunix.c - UNIX specific path manipulation support
+ */
+
+#include "pathsys.h"
+
+#include <stdlib.h>
+#include <unistd.h> /* 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 )
+{
+}
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..da6619777
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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 <assert.h>
+#include <stdlib.h>
+#include <unistd.h> /* needed for getpid() */
+#include <unixlib.h> /* 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..537bc828d
--- /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 <stdio.h>
+#include <ctype.h>
+#ifndef ultrix
+# include <stdlib.h>
+#endif
+#include <string.h>
+
+
+/*
+ * 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) ((int)*(const unsigned char *)(p))
+#else
+#define UCHARAT(p) ((int)*(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 int regnpar; /* () count. */
+static char regdummy;
+static char *regcode; /* Code-emit pointer; &regdummy = don't. */
+static long regsize; /* Code size. */
+
+/*
+ * Forward declarations for regcomp()'s friends.
+ */
+#ifndef STATIC
+#define STATIC static
+#endif
+STATIC char *reg( int paren, int *flagp );
+STATIC char *regbranch( int *flagp );
+STATIC char *regpiece( int *flagp );
+STATIC char *regatom( int *flagp );
+STATIC char *regnode( int op );
+STATIC char *regnext( char *p );
+STATIC void regc( int 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 int 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;
+ unsigned len;
+ int 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 = 0L;
+ regcode = &regdummy;
+ 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) + (unsigned)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 && strlen(OPERAND(scan)) >= len) {
+ longest = OPERAND(scan);
+ len = 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(
+ int paren, /* Parenthesized? */
+ int *flagp )
+{
+ char *ret;
+ char *br;
+ char *ender;
+ int parno = 0;
+ int 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( int *flagp )
+{
+ char *ret;
+ char *chain;
+ char *latest;
+ int 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( int *flagp )
+{
+ char *ret;
+ char op;
+ char *next;
+ int 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( int *flagp )
+{
+ char *ret;
+ int 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 '[': {
+ int classr;
+ int 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( int op )
+{
+ char *ret;
+ char *ptr;
+
+ ret = regcode;
+ if (ret == &regdummy) {
+ 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( int b )
+{
+ if (regcode != &regdummy)
+ *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 == &regdummy) {
+ 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;
+ int offset;
+
+ if (p == &regdummy)
+ 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 == &regdummy || 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 int regtry( regexp *prog, const char *string );
+STATIC int regmatch( char *prog );
+STATIC int regrepeat( char *p );
+
+#ifdef DEBUG
+int regnarrate = 0;
+void regdump();
+STATIC char *regprop();
+#endif
+
+/*
+ - regexec - match a regexp against a string
+ */
+int
+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 int /* 0 failure, 1 success */
+regtry(
+ regexp *prog,
+ const char *string )
+{
+ int 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 int /* 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: {
+ int 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: {
+ int 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: {
+ int 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;
+ int no;
+ const char *save;
+ int 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 int
+regrepeat( char *p )
+{
+ int count = 0;
+ const char *scan;
+ char *opnd;
+
+ scan = reginput;
+ opnd = OPERAND(p);
+ switch (OP(p)) {
+ case ANY:
+ count = 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 )
+{
+ int offset;
+
+ if (p == &regdummy)
+ 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 int
+strcspn(
+ char *s1,
+ char *s2 )
+{
+ char *scan1;
+ char *scan2;
+ int 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..3a52ba3d6
--- /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. */
+ int regmlen; /* Internal use only. */
+ char program[ 1 ]; /* Unwarranted chumminess with compiler. */
+} regexp;
+
+
+regexp * regcomp( char const * exp );
+int 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..3bbfc6574
--- /dev/null
+++ b/src/boost/tools/build/src/engine/rules.cpp
@@ -0,0 +1,739 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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 "parse.h"
+#include "pathsys.h"
+#include "search.h"
+#include "variable.h"
+
+
+static void set_rule_actions( RULE *, rule_actions * );
+static void set_rule_body ( RULE *, FUNCTION * );
+
+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 * get_target_includes( TARGET * const t )
+{
+ if ( !t->includes )
+ {
+ TARGET * const i = (TARGET *)BJAM_MALLOC( sizeof( *t ) );
+ memset( (char *)i, '\0', sizeof( *i ) );
+ 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 * const including, TARGET * const included )
+{
+ TARGET * const internal = get_target_includes( including );
+ internal->depends = targetentry( internal->depends, included );
+}
+
+void target_include_many( TARGET * const including, LIST * const included_names
+ )
+{
+ TARGET * const internal = get_target_includes( including );
+ internal->depends = targetlist( internal->depends, included_names );
+}
+
+
+/*
+ * enter_rule() - return pointer to RULE, creating it if necessary in
+ * target_module.
+ */
+
+static RULE * enter_rule( OBJECT * rulename, module_t * target_module )
+{
+ int found;
+ RULE * const r = (RULE *)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 * define_rule( module_t * src_module, OBJECT * rulename,
+ module_t * target_module )
+{
+ RULE * 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 * 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 * bindtarget( OBJECT * const target_name )
+{
+ int found;
+ TARGET * t;
+
+ if ( !targethash )
+ targethash = hashinit( sizeof( TARGET ), "targets" );
+
+ t = (TARGET *)hash_insert( targethash, target_name, &found );
+ if ( !found )
+ {
+ memset( (char *)t, '\0', sizeof( *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( void * xtarget, void * data )
+{
+ TARGET * t = (TARGET *)xtarget;
+ if ( !( t->flags & T_FLAG_NOTFILE ) )
+ {
+ /* Check if there is a setting for LOCATE. */
+ SETTINGS * 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 )
+ hashenumerate( targethash, bind_explicitly_located_target, (void *)0 );
+}
+
+
+/*
+ * touch_target() - mark a target to simulate being new.
+ */
+
+void touch_target( OBJECT * 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 * target_scc( TARGET * t )
+{
+ TARGET * result = t;
+ while ( result->scc_root )
+ result = result->scc_root;
+ while ( t->scc_root )
+ {
+ TARGET * 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
+ */
+
+TARGETS * targetlist( TARGETS * chain, LIST * target_names )
+{
+ LISTITER iter = list_begin( target_names );
+ LISTITER const end = list_end( target_names );
+ for ( ; iter != end; iter = list_next( iter ) )
+ chain = targetentry( chain, bindtarget( list_item( iter ) ) );
+ return chain;
+}
+
+
+/*
+ * targetentry() - add a TARGET to a chain of TARGETS.
+ *
+ * Inputs:
+ * chain existing TARGETS to append to
+ * target new target to append
+ */
+
+TARGETS * targetentry( TARGETS * chain, TARGET * target )
+{
+ TARGETS * const c = (TARGETS *)BJAM_MALLOC( sizeof( TARGETS ) );
+ c->target = target;
+
+ if ( !chain ) chain = c;
+ else chain->tail->next = c;
+ chain->tail = c;
+ c->next = 0;
+
+ return chain;
+}
+
+
+/*
+ * targetchain() - append two TARGET chains.
+ *
+ * Inputs:
+ * chain existing TARGETS to append to
+ * target new target to append
+ */
+
+TARGETS * targetchain( TARGETS * chain, TARGETS * targets )
+{
+ if ( !targets ) return chain;
+ if ( !chain ) return targets;
+
+ chain->tail->next = targets;
+ chain->tail = targets->tail;
+ return chain;
+}
+
+/*
+ * action_free - decrement the ACTIONs reference count and (maybe) free it.
+ */
+
+void action_free( ACTION * action )
+{
+ if ( --action->refs == 0 )
+ {
+ freetargets( action->targets );
+ freetargets( action->sources );
+ BJAM_FREE( action );
+ }
+}
+
+
+/*
+ * actionlist() - append to an ACTION chain.
+ */
+
+ACTIONS * actionlist( ACTIONS * chain, ACTION * action )
+{
+ ACTIONS * const actions = (ACTIONS *)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 * 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 * addsettings( SETTINGS * head, int flag, OBJECT * symbol,
+ LIST * value )
+{
+ SETTINGS * 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 *)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( struct module_t * module, SETTINGS * 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( struct module_t * module, SETTINGS * v )
+{
+ pushsettings( module, v ); /* just swap again */
+}
+
+
+/*
+ * copysettings() - duplicate a settings list, returning the new copy.
+ */
+
+SETTINGS * copysettings( SETTINGS * head )
+{
+ SETTINGS * copy = 0;
+ SETTINGS * v;
+ for ( v = head; v; v = v->next )
+ copy = addsettings( copy, VAR_SET, v->symbol, list_copy( v->value ) );
+ return copy;
+}
+
+
+/*
+ * freetargets() - delete a targets list.
+ */
+
+void freetargets( TARGETS * chain )
+{
+ while ( chain )
+ {
+ TARGETS * const n = chain->next;
+ BJAM_FREE( chain );
+ chain = n;
+ }
+}
+
+
+/*
+ * freeactions() - delete an action list.
+ */
+
+void freeactions( ACTIONS * chain )
+{
+ while ( chain )
+ {
+ ACTIONS * const n = chain->next;
+ action_free( chain->action );
+ BJAM_FREE( chain );
+ chain = n;
+ }
+}
+
+
+/*
+ * freesettings() - delete a settings list.
+ */
+
+void freesettings( SETTINGS * v )
+{
+ while ( v )
+ {
+ SETTINGS * const n = v->next;
+ object_free( v->symbol );
+ list_free( v->value );
+ v->next = settings_freelist;
+ settings_freelist = v;
+ v = n;
+ }
+}
+
+
+static void freetarget( void * xt, void * data )
+{
+ TARGET * const t = (TARGET *)xt;
+ if ( t->name ) object_free ( t->name );
+ if ( t->boundname ) object_free ( t->boundname );
+ if ( t->settings ) freesettings( t->settings );
+ if ( t->depends ) freetargets ( t->depends );
+ if ( t->dependants ) freetargets ( t->dependants );
+ if ( t->parents ) freetargets ( t->parents );
+ if ( t->actions ) freeactions ( t->actions );
+ if ( t->includes )
+ {
+ freetarget( t->includes, (void *)0 );
+ BJAM_FREE( t->includes );
+ }
+}
+
+
+/*
+ * rules_done() - free RULE and TARGET tables.
+ */
+
+void rules_done()
+{
+ if ( targethash )
+ {
+ hashenumerate( targethash, freetarget, 0 );
+ hashdone( targethash );
+ }
+ while ( settings_freelist )
+ {
+ SETTINGS * 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 * a )
+{
+ ++a->reference_count;
+}
+
+
+/*
+ * actions_free() - release a reference to given actions.
+ */
+
+void actions_free( rule_actions * 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 * rule, FUNCTION * 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 * global_rule_name( RULE * 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 * global_rule( RULE * r )
+{
+ if ( r->module == root_module() )
+ return r;
+
+ {
+ OBJECT * const name = global_rule_name( r );
+ RULE * 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 * new_rule_body( module_t * m, OBJECT * rulename, FUNCTION * procedure,
+ int exported )
+{
+ RULE * 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 * rule, rule_actions * actions )
+{
+ if ( actions )
+ actions_refer( actions );
+ if ( rule->actions )
+ actions_free( rule->actions );
+ rule->actions = actions;
+}
+
+
+static rule_actions * actions_new( FUNCTION * command, LIST * bindlist,
+ int flags )
+{
+ rule_actions * const result = (rule_actions *)BJAM_MALLOC( sizeof(
+ rule_actions ) );
+ function_refer( command );
+ result->command = command;
+ result->bindlist = bindlist;
+ result->flags = flags;
+ result->reference_count = 0;
+ return result;
+}
+
+
+RULE * new_rule_actions( module_t * m, OBJECT * rulename, FUNCTION * command,
+ LIST * bindlist, int flags )
+{
+ RULE * const local = define_rule( m, rulename, m );
+ RULE * 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 * lookup_rule( OBJECT * rulename, module_t * m, int local_only )
+{
+ RULE * r;
+ RULE * result = 0;
+ module_t * original_module = m;
+
+ if ( m->class_module )
+ m = m->class_module;
+
+ if ( m->rules && ( r = (RULE *)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 * rule_part = object_new( p + 1 );
+ OBJECT * 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 * bindrule( OBJECT * rulename, module_t * m )
+{
+ RULE * 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 * import_rule( RULE * source, module_t * m, OBJECT * name )
+{
+ RULE * 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 * rule, module_t * m )
+{
+ rule->module = m;
+ if ( rule->procedure )
+ {
+ FUNCTION * 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..29889511e
--- /dev/null
+++ b/src/boost/tools/build/src/engine/rules.h
@@ -0,0 +1,274 @@
+/*
+ * 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_1_0.txt or http://www.boost.org/LICENSE_1_0.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 "modules.h"
+#include "timestamp.h"
+
+
+typedef struct _rule RULE;
+typedef struct _target TARGET;
+typedef struct _targets TARGETS;
+typedef struct _action ACTION;
+typedef struct _actions ACTIONS;
+typedef struct _settings 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 * command; /* command string from ACTIONS */
+ LIST * 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-exisitng sources only */
+};
+
+typedef struct rule_actions rule_actions;
+typedef struct argument_list argument_list;
+
+struct _rule
+{
+ OBJECT * name;
+ FUNCTION * procedure;
+ rule_actions * actions; /* build actions, or NULL for no actions */
+ module_t * 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 * next;
+ ACTIONS * tail; /* valid only for head */
+ ACTION * action;
+};
+
+/* ACTION - a RULE instance with targets and sources. */
+struct _action
+{
+ RULE * rule;
+ TARGETS * targets;
+ TARGETS * 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 * next;
+ OBJECT * symbol; /* symbol name for var_set() */
+ LIST * value; /* symbol value for var_set() */
+};
+
+/* TARGETS - a chain of TARGETs. */
+struct _targets
+{
+ TARGETS * next;
+ TARGETS * tail; /* valid only for head */
+ TARGET * target;
+};
+
+/* TARGET - an entity (e.g. a file) that can be built. */
+struct _target
+{
+ OBJECT * name;
+ OBJECT * boundname; /* if search() relocates target */
+ ACTIONS * actions; /* rules to execute, if any */
+ SETTINGS * settings; /* variables to define */
+
+ TARGETS * depends; /* dependencies */
+ TARGETS * dependants; /* the inverse of dependencies */
+ TARGETS * rebuilds; /* targets that should be force-rebuilt
+ * whenever this one is
+ */
+ TARGET * 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 * semaphore; /* used in serialization */
+#endif
+
+ int asynccnt; /* child deps outstanding */
+ TARGETS * parents; /* used by make1() for completion */
+ TARGET * scc_root; /* used by make to resolve cyclic includes
+ */
+ TARGET * 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 * );
+ACTIONS * actionlist ( ACTIONS *, ACTION * );
+void freeactions ( ACTIONS * );
+SETTINGS * addsettings ( SETTINGS *, int flag, OBJECT * symbol, LIST * value );
+void pushsettings ( module_t *, SETTINGS * );
+void popsettings ( module_t *, SETTINGS * );
+SETTINGS * copysettings ( SETTINGS * );
+void freesettings ( SETTINGS * );
+void actions_refer( rule_actions * );
+void actions_free ( rule_actions * );
+
+/* Rule related functions. */
+RULE * bindrule ( OBJECT * rulename, module_t * );
+RULE * import_rule ( RULE * source, module_t *, OBJECT * name );
+void rule_localize ( RULE * rule, module_t * module );
+RULE * new_rule_body ( module_t *, OBJECT * rulename, FUNCTION * func, int exprt );
+RULE * new_rule_actions( module_t *, OBJECT * rulename, FUNCTION * command, LIST * bindlist, int flags );
+void rule_free ( RULE * );
+
+/* Target related functions. */
+void bind_explicitly_located_targets();
+TARGET * bindtarget ( OBJECT * const );
+void freetargets ( TARGETS * );
+TARGETS * targetchain ( TARGETS *, TARGETS * );
+TARGETS * targetentry ( TARGETS *, TARGET * );
+void target_include ( TARGET * const including,
+ TARGET * const included );
+void target_include_many ( TARGET * const including,
+ LIST * const included_names );
+TARGETS * targetlist ( TARGETS *, LIST * target_names );
+void touch_target ( OBJECT * const );
+void clear_includes ( TARGET * );
+TARGET * target_scc ( TARGET * );
+
+/* 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..37fc5a1dc
--- /dev/null
+++ b/src/boost/tools/build/src/engine/scan.cpp
@@ -0,0 +1,743 @@
+/*
+ * 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 "jambase.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;
+
+ /* If the filename is "+", it means use the internal jambase. */
+ if ( !strcmp( object_str( s ), "+" ) )
+ i->strings = (char**)jambase;
+}
+
+
+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" ) ) )
+ perror( 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 <x> 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..7529e02dc
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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 <string.h>
+
+
+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 = 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 = 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 = 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/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 <stddef.h>
+
+
+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..6e43aa024
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..c3257e71e
--- /dev/null
+++ b/src/boost/tools/build/src/engine/sysinfo.cpp
@@ -0,0 +1,137 @@
+/* Copyright 2019 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)
+ */
+
+#include "sysinfo.h"
+#include "jam.h"
+#include "output.h"
+
+#include <thread>
+
+#if defined(OS_MACOSX)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
+
+#if !defined(OS_NT)
+#include <unistd.h>
+#endif
+
+#if defined(OS_LINUX)
+// 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 <sched.h>
+#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()
+ {
+ return std::thread::hardware_concurrency();
+ }
+}
+
+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_ = 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..28c42558f
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..67090ca55
--- /dev/null
+++ b/src/boost/tools/build/src/engine/timestamp.cpp
@@ -0,0 +1,230 @@
+/*
+ * 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_1_0.txt or
+ * http://www.boost.org/LICENSE_1_0.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 ((b->secs*1000000.0+b->nsecs)-(a->secs*1000000.0+a->nsecs))/1000000.0;
+}
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 <windows.h>
+#endif
+
+#include <time.h>
+
+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..574c344ce
--- /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_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.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 <stdio.h>
+#include <stdlib.h>
+
+
+/*
+ * 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;
+ size_t const len = 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..948ac3432
--- /dev/null
+++ b/src/boost/tools/build/src/engine/variable.h
@@ -0,0 +1,35 @@
+/*
+ * 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"
+
+
+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 */
+
+#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..d642a578e
--- /dev/null
+++ b/src/boost/tools/build/src/engine/vswhere_usability_wrapper.cmd
@@ -0,0 +1,59 @@
+:: 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 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
+)
+
+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%
+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 Unknown Version, Beyond 2019
+set VSWHERE_LMT=-version "[17.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
+)
+
+:no-vswhere
+endlocal
+echo could not find "vswhere"
+exit /B 1 \ No newline at end of file
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..1ba06274b
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.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 <windows.h>
+
+# 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)
+ {
+ int 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:
+ {
+ unsigned long len;
+ string expanded[1];
+ string_new(expanded);
+
+ while (
+ (len = ExpandEnvironmentStringsA(
+ (LPCSTR)data, expanded->value, expanded->capacity))
+ > 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..1ff3223f0
--- /dev/null
+++ b/src/boost/tools/build/src/engine/yyacc.cpp
@@ -0,0 +1,268 @@
+/* Copyright 2002 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)
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+/*
+# 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)
+*/
+
+void print_usage();
+char * copy_string(char * s, int l);
+char * tokenize_string(char * s);
+int cmp_literal(const void * a, const void * b);
+
+typedef struct
+{
+ char * string;
+ char * token;
+} literal;
+
+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)
+ {
+ literal literals[1024];
+ int t = 0;
+ char l[2048];
+ 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)
+ {
+ literals[t].string = copy_string(c1+1,c2-c1-1);
+ literals[t].token = tokenize_string(literals[t].string);
+ t += 1;
+ c = c2+1;
+ }
+ else
+ break;
+ }
+ else
+ break;
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ literals[t].string = 0;
+ literals[t].token = 0;
+ qsort(literals,t,sizeof(literal),cmp_literal);
+ {
+ int p = 1;
+ int i = 1;
+ while (literals[i].string != 0)
+ {
+ if (strcmp(literals[p-1].string,literals[i].string) != 0)
+ {
+ literals[p] = literals[i];
+ p += 1;
+ }
+ i += 1;
+ }
+ literals[p].string = 0;
+ literals[p].token = 0;
+ t = p;
+ }
+ token_output_f = fopen(argv[2],"w");
+ if (token_output_f != 0)
+ {
+ int i = 0;
+ while (literals[i].string != 0)
+ {
+ fprintf(token_output_f," { \"%s\", %s },\n",literals[i].string,literals[i].token);
+ i += 1;
+ }
+ fclose(token_output_f);
+ }
+ else
+ result = 1;
+ if (result == 0)
+ {
+ grammar_output_f = fopen(argv[1],"w");
+ if (grammar_output_f != 0)
+ {
+ int i = 0;
+ while (literals[i].string != 0)
+ {
+ fprintf(grammar_output_f,"%%token %s\n",literals[i].token);
+ i += 1;
+ }
+ 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)
+ {
+ literal key;
+ literal * replacement = 0;
+ key.string = copy_string(c1+1,c2-c1-1);
+ key.token = 0;
+ replacement = (literal*)bsearch(
+ &key,literals,t,sizeof(literal),cmp_literal);
+ *c1 = 0;
+ fprintf(grammar_output_f,"%s%s",c,replacement->token);
+ c = c2+1;
+ }
+ else
+ {
+ fprintf(grammar_output_f,"%s",c);
+ break;
+ }
+ }
+ else
+ {
+ fprintf(grammar_output_f,"%s",c);
+ break;
+ }
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ fclose(grammar_output_f);
+ }
+ else
+ result = 1;
+ }
+ }
+ if (result != 0)
+ {
+ perror("yyacc");
+ }
+ }
+ return result;
+}
+
+static const char * usage[] = {
+ "yyacc <grammar output.y> <token table output.h> <grammar source.yy>",
+ 0 };
+
+void print_usage()
+{
+ const char ** u;
+ for (u = usage; *u != 0; ++u)
+ {
+ fputs(*u,stderr); putc('\n',stderr);
+ }
+}
+
+char * copy_string(char * s, int l)
+{
+ char * result = (char*)malloc(l+1);
+ strncpy(result,s,l);
+ result[l] = 0;
+ return result;
+}
+
+char * tokenize_string(char * s)
+{
+ char * result;
+ const char * literal = s;
+ int l;
+ int c;
+
+ if (strcmp(s,":") == 0) literal = "_colon";
+ else if (strcmp(s,"!") == 0) literal = "_bang";
+ else if (strcmp(s,"!=") == 0) literal = "_bang_equals";
+ else if (strcmp(s,"&&") == 0) literal = "_amperamper";
+ else if (strcmp(s,"&") == 0) literal = "_amper";
+ else if (strcmp(s,"+") == 0) literal = "_plus";
+ else if (strcmp(s,"+=") == 0) literal = "_plus_equals";
+ else if (strcmp(s,"||") == 0) literal = "_barbar";
+ else if (strcmp(s,"|") == 0) literal = "_bar";
+ else if (strcmp(s,";") == 0) literal = "_semic";
+ else if (strcmp(s,"-") == 0) literal = "_minus";
+ else if (strcmp(s,"<") == 0) literal = "_langle";
+ else if (strcmp(s,"<=") == 0) literal = "_langle_equals";
+ else if (strcmp(s,">") == 0) literal = "_rangle";
+ else if (strcmp(s,">=") == 0) literal = "_rangle_equals";
+ else if (strcmp(s,".") == 0) literal = "_period";
+ else if (strcmp(s,"?") == 0) literal = "_question";
+ else if (strcmp(s,"?=") == 0) literal = "_question_equals";
+ else if (strcmp(s,"=") == 0) literal = "_equals";
+ else if (strcmp(s,",") == 0) literal = "_comma";
+ else if (strcmp(s,"[") == 0) literal = "_lbracket";
+ else if (strcmp(s,"]") == 0) literal = "_rbracket";
+ else if (strcmp(s,"{") == 0) literal = "_lbrace";
+ else if (strcmp(s,"}") == 0) literal = "_rbrace";
+ else if (strcmp(s,"(") == 0) literal = "_lparen";
+ else if (strcmp(s,")") == 0) literal = "_rparen";
+ l = strlen(literal)+2;
+ result = (char*)malloc(l+1);
+ for (c = 0; literal[c] != 0; ++c)
+ {
+ result[c] = toupper(literal[c]);
+ }
+ result[l-2] = '_';
+ result[l-1] = 't';
+ result[l] = 0;
+ return result;
+}
+
+int cmp_literal(const void * a, const void * b)
+{
+ return strcmp(((const literal *)a)->string,((const literal *)b)->string);
+}
diff --git a/src/boost/tools/build/src/exceptions.py b/src/boost/tools/build/src/exceptions.py
new file mode 100644
index 000000000..70d4d9831
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.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..377f6ec02
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..25cc57a3d
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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 <module@>modules.jam = $(.bootstrap-file:D) ;
+module modules { include <module@>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..3746b5e66
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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..7c3786418
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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 <class> <args...> ]:
+#
+# 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..531f37f36
--- /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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.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..6915fa750
--- /dev/null
+++ b/src/boost/tools/build/src/kernel/modules.jam
@@ -0,0 +1,365 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2003, 2005 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)
+
+# 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) :
+ $(19) ] ;
+ }
+}
+
+
+# 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..9c1e05733
--- /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_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.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..cbd303776
--- /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_1_0.txt or http://www.boost.org/LICENSE_1_0.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-<option>
+# --help-doc-options
+# --help-enable-<option>
+# --help-internal
+# --help-options
+# --help-usage
+# --help-output <type>
+# --help-output-file <file>
+# --help [<module-or-class>]
+#
+rule process (
+ command # The option.
+ : values * # The values, starting after the "=".
+ )
+{
+ assert.result --help : MATCH ^(--help).* : $(command) ;
+ local did-help = ;
+ switch $(command)
+ {
+ case --help-internal :
+ local path-to-modules = [ modules.peek : BOOST_BUILD_PATH ] ;
+ path-to-modules += . ;
+ local possible-modules = [ GLOB $(path-to-modules) : *\\.jam ] ;
+ local not-modules = [ GLOB $(path-to-modules) : *$(.not-modules)\\.jam ] ;
+ local modules-to-list =
+ [ sequence.insertion-sort
+ [ set.difference $(possible-modules:D=:S=) : $(not-modules:D=:S=) ] ] ;
+ local modules-to-scan ;
+ for local m in $(modules-to-list)
+ {
+ local module-files = [ GLOB $(path-to-modules) : $(m)\\.jam ] ;
+ modules-to-scan += $(module-files[1]) ;
+ }
+ do-scan $(modules-to-scan) : print-help-all ;
+ did-help = true ;
+
+ case --help-enable-* :
+ local option = [ MATCH --help-enable-(.*) : $(command) ] ; option = $(option:L) ;
+ set-option $(option) : enabled ;
+ did-help = true ;
+
+ case --help-disable-* :
+ local option = [ MATCH --help-disable-(.*) : $(command) ] ; option = $(option:L) ;
+ set-option $(option) ;
+ did-help = true ;
+
+ case --help-output :
+ set-output $(values[1]) ;
+ did-help = true ;
+
+ case --help-output-file :
+ set-output-file $(values[1]) ;
+ did-help = true ;
+
+ case --help-doc-options :
+ local doc-module-spec = [ split-symbol doc ] ;
+ do-scan $(doc-module-spec[1]) : print-help-options ;
+ did-help = true ;
+
+ case --help-options :
+ print-help-usage ;
+ local BOOST_BUILD_PATH = [ modules.peek : BOOST_BUILD_PATH ] ;
+ local plugin-dir = options ;
+ local option-files = [ GLOB $(plugin-dir:D=$(BOOST_BUILD_PATH)) : *.jam ] ;
+ if $(option-files)
+ {
+ for local file in $(option-files)
+ {
+ do-scan $(file) : print-help-options ;
+ }
+ }
+ did-help = true ;
+
+ case --help :
+ local spec = $(values[1]) ;
+ if $(spec)
+ {
+ local spec-parts = [ split-symbol $(spec) ] ;
+ if $(spec-parts)
+ {
+ if $(spec-parts[2])
+ {
+ do-scan $(spec-parts[1]) : print-help-classes $(spec-parts[2]) ;
+ do-scan $(spec-parts[1]) : print-help-rules $(spec-parts[2]) ;
+ do-scan $(spec-parts[1]) : print-help-variables $(spec-parts[2]) ;
+ }
+ else
+ {
+ do-scan $(spec-parts[1]) : print-help-module ;
+ }
+ }
+ else
+ {
+ EXIT "Unrecognized help option '"$(command)" "$(spec)"'." ;
+ }
+ }
+ else
+ {
+ version.print ;
+ ECHO ;
+ # First print documentation from the current Jamfile, if any.
+ # FIXME: Generally, this duplication of project.jam logic is bad.
+ local names = [ modules.peek project : JAMROOT ]
+ [ modules.peek project : JAMFILE ] ;
+ local project-file = [ path.glob . : $(names) ] ;
+ if ! $(project-file)
+ {
+ project-file = [ path.glob-in-parents . : $(names) ] ;
+ }
+
+ for local p in $(project-file)
+ {
+ do-scan $(p) : print-help-project $(p) ;
+ }
+
+ # Next any user-config help.
+ local user-path = [ os.home-directories ] [ os.environ BOOST_BUILD_PATH ] ;
+ local user-config = [ GLOB $(user-path) : user-config.jam ] ;
+ if $(user-config)
+ {
+ do-scan $(user-config[1]) : print-help-config user $(user-config[1]) ;
+ }
+
+ # Next any site-config help.
+ local site-config = [ GLOB $(user-path) : site-config.jam ] ;
+ if $(site-config)
+ {
+ do-scan $(site-config[1]) : print-help-config site $(site-config[1]) ;
+ }
+
+ # Then the overall help.
+ print-help-top ;
+ }
+ did-help = true ;
+ }
+ if $(did-help)
+ {
+ UPDATE all ;
+ NOCARE all ;
+ }
+ return $(did-help) ;
+}
+
+# Split a reference to a symbol into module and symbol parts.
+#
+local rule split-symbol (
+ symbol # The symbol to split.
+ )
+{
+ local path-to-modules = [ modules.peek : BOOST_BUILD_PATH ] ;
+ path-to-modules += . ;
+ local module-name = $(symbol) ;
+ local symbol-name = ;
+ local result = ;
+ while ! $(result)
+ {
+ local module-path = [ GLOB $(path-to-modules) : $(module-name)\\.jam ] ;
+ if $(module-path)
+ {
+ # The 'module-name' in fact refers to module. Return the full
+ # module path and a symbol within it. If 'symbol' passed to this
+ # rule is already module, 'symbol-name' will be empty. Otherwise,
+ # it's initialized on the previous loop iteration.
+ # In case there are several modules by this name,
+ # use the first one.
+ result = $(module-path[1]) $(symbol-name) ;
+ }
+ else
+ {
+ if ! $(module-name:S)
+ {
+ result = - ;
+ }
+ else
+ {
+ local next-symbol-part = [ MATCH ^.(.*) : $(module-name:S) ] ;
+ if $(symbol-name)
+ {
+ symbol-name = $(next-symbol-part).$(symbol-name) ;
+ }
+ else
+ {
+ symbol-name = $(next-symbol-part) ;
+ }
+ module-name = $(module-name:B) ;
+ }
+ }
+ }
+ if $(result) != -
+ {
+ return $(result) ;
+ }
+}
diff --git a/src/boost/tools/build/src/tools/__init__.py b/src/boost/tools/build/src/tools/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/boost/tools/build/src/tools/__init__.py
diff --git a/src/boost/tools/build/src/tools/acc.jam b/src/boost/tools/build/src/tools/acc.jam
new file mode 100644
index 000000000..f7ecfe8c3
--- /dev/null
+++ b/src/boost/tools/build/src/tools/acc.jam
@@ -0,0 +1,160 @@
+# Copyright Vladimir Prus 2004.
+# Copyright Toon Knapen 2004.
+# Copyright Boris Gubenko 2007.
+# 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.acc]]
+= HP aC++ compiler
+
+The `acc` module supports the
+http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1740,00.html[HP
+aC++ compiler] for the HP-UX operating system.
+
+The module is initialized using the following syntax:
+
+----
+using acc : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the command is not specified, the `aCC` binary will be searched in
+PATH.
+
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+|# # end::doc[]
+
+#
+# B2 V2 toolset for the HP aC++ compiler.
+#
+
+import toolset : flags ;
+import feature ;
+import generators ;
+import common ;
+
+feature.extend toolset : acc ;
+toolset.inherit acc : unix ;
+generators.override builtin.lib-generator : acc.prebuilt ;
+generators.override acc.searched-lib-generator : searched-lib-generator ;
+
+# Configures the acc toolset.
+rule init ( version ? : user-provided-command * : options * )
+{
+ local condition = [ common.check-init-parameters acc
+ : version $(version) ] ;
+
+ local command = [ common.get-invocation-command acc : aCC
+ : $(user-provided-command) ] ;
+
+ common.handle-options acc : $(condition) : $(command) : $(options) ;
+}
+
+
+# Declare generators
+generators.register-c-compiler acc.compile.c : C : OBJ : <toolset>acc ;
+generators.register-c-compiler acc.compile.c++ : CPP : OBJ : <toolset>acc ;
+
+# Declare flags.
+flags acc CFLAGS <optimization>off : ;
+flags acc CFLAGS <optimization>speed : -O3 ;
+flags acc CFLAGS <optimization>space : -O2 ;
+
+flags acc CFLAGS <inlining>off : +d ;
+flags acc CFLAGS <inlining>on : ;
+flags acc CFLAGS <inlining>full : ;
+
+flags acc C++FLAGS <exception-handling>off : ;
+flags acc C++FLAGS <exception-handling>on : ;
+
+flags acc C++FLAGS <rtti>off : ;
+flags acc C++FLAGS <rtti>on : ;
+
+# We want the full path to the sources in the debug symbols because otherwise
+# the debugger won't find the sources when we use boost.build.
+flags acc CFLAGS <debug-symbols>on : -g ;
+flags acc LINKFLAGS <debug-symbols>on : -g ;
+flags acc LINKFLAGS <debug-symbols>off : -s ;
+
+# V2 does not have <shared-linkable>, not sure what this meant in V1.
+# flags acc CFLAGS <shared-linkable>true : +Z ;
+
+flags acc CFLAGS <profiling>on : -pg ;
+flags acc LINKFLAGS <profiling>on : -pg ;
+
+flags acc CFLAGS <address-model>64 : +DD64 ;
+flags acc LINKFLAGS <address-model>64 : +DD64 ;
+
+# It is unknown if there's separate option for rpath used only
+# at link time, similar to -rpath-link in GNU. We'll use -L.
+flags acc RPATH_LINK : <xdll-path> ;
+
+flags acc CFLAGS <cflags> ;
+flags acc C++FLAGS <cxxflags> ;
+flags acc DEFINES <define> ;
+flags acc UNDEFS <undef> ;
+flags acc HDRS <include> ;
+flags acc STDHDRS <sysinclude> ;
+flags acc LINKFLAGS <linkflags> ;
+flags acc ARFLAGS <arflags> ;
+
+flags acc LIBPATH <library-path> ;
+flags acc NEEDLIBS <library-file> ;
+flags acc FINDLIBS <find-shared-library> ;
+flags acc FINDLIBS <find-static-library> ;
+
+# Select the compiler name according to the threading model.
+flags acc CFLAGS <threading>multi : -mt ;
+flags acc LINKFLAGS <threading>multi : -mt ;
+
+flags acc.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
+
+
+actions acc.link bind NEEDLIBS
+{
+ $(CONFIG_COMMAND) -AA $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
+}
+
+SPACE = " " ;
+actions acc.link.dll bind NEEDLIBS
+{
+ $(CONFIG_COMMAND) -AA -b $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -Wl,+h$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
+}
+
+actions acc.compile.c
+{
+ cc -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS)
+}
+
+actions acc.compile.c++
+{
+ $(CONFIG_COMMAND) -AA -c -Wc,--pending_instantiations=$(TEMPLATE_DEPTH) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS)
+}
+
+actions updated together piecemeal acc.archive
+{
+ ar ru$(ARFLAGS:E="") "$(<)" "$(>)"
+}
diff --git a/src/boost/tools/build/src/tools/asciidoctor.jam b/src/boost/tools/build/src/tools/asciidoctor.jam
new file mode 100644
index 000000000..73d5c9348
--- /dev/null
+++ b/src/boost/tools/build/src/tools/asciidoctor.jam
@@ -0,0 +1,212 @@
+#|
+Copyright 2017 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)
+|#
+
+#| tag::doc[]
+= Asciidoctor
+
+The asciidoctor tool converts the ascidoc documentation format to various
+backend formats for either viewing or further processing by documentation
+tools. This tool supports the baseline asciidoctor distribution (i.e. the
+Ruby based tool).
+|# # end::doc[]
+
+import common ;
+import feature ;
+import generators ;
+import toolset ;
+import "class" : new ;
+
+feature.feature asciidoctor : : implicit propagated symmetric ;
+
+#| tag::doc[]
+
+== Feature: `asciidoctor-attribute`
+
+Defines arbitrary asciidoctor attributes. The value of the feature should be
+specified with the CLI syntax for attributes.
+For example to use as a target requirement:
+
+```
+html example : example.adoc :
+ <asciidoctor-attribute>idprefix=ex ;
+```
+
+This is a `free` feature and is not `propagated`. I.e. it applies only to the
+target it's specified on.
+
+|# # end::doc[]
+
+feature.subfeature asciidoctor : attribute : : free ;
+
+#| tag::doc[]
+
+== Feature: `asciidoctor-doctype`
+
+Specifies the `doctype` to use for generating the output format. Allowed
+`doctype` values are: `article`, `book`, `manpage`, and `inline`.
+
+|# # end::doc[]
+
+feature.subfeature asciidoctor : doctype
+ : article book manpage inline
+ : optional propagated ;
+
+#| tag::doc[]
+
+== Feature: `asciidoctor-backend`
+
+Specifies the `backend` to use to produce output from the source asciidoc.
+This feature is automatically applied to fit the build target type. For
+example, when specifying an `html` target for an `asciidoc` source:
+
+```
+html example : example.adoc ;
+```
+
+The target will by default acquire the `<asciidoctor-backend>html5`
+requirement. The default for each target type are:
+
+* `html`: `<asciidoctor-backend>html5`
+* `docbook`: `<asciidoctor-backend>docbook45`
+* `man`: `<asciidoctor-backend>manpage`
+* `pdf`: `<asciidoctor-backend>pdf`
+
+To override the defaults you specify it as a requirement on the target:
+
+```
+docbook example : example.adoc :
+ <asciidoctor-backend>docbook5 ;
+```
+
+Allowed `backend` values are: `html5`, `docbook45`, `docbook5`, `pdf`.
+
+|# # end::doc[]
+
+feature.subfeature asciidoctor : backend
+ : html5 docbook5 docbook45 manpage pdf
+ : propagated symmetric composite ;
+
+#| tag::doc[]
+
+== Initialization
+
+To use the `asciidoctor` tool you need to declare it in a configuration file
+with the `using` rule. The initialization takes the following arguments:
+
+* `command`: The command, with any extra arguments, to execute.
+
+For example you could insert the following in your `user-config.jam`:
+
+```
+using asciidoctor : "/usr/local/bin/asciidoctor" ;
+```
+
+If no `command` is given it defaults to just `asciidoctor` with assumption
+that the `asciidoctor` is available in the search `PATH`.
+
+|# # end::doc[]
+
+rule init ( command * )
+{
+ if ! $(.initialized)
+ {
+ # Setup only if we were called via "using .. ;"
+ .initialized = true ;
+
+ # Register generators.
+ for local target-type in HTML MANPAGE PDF DOCBOOK
+ {
+ generators.register
+ [ new asciidoctor-generator asciidoctor.convert
+ : ASCIIDOC : $(target-type) ] ;
+ }
+
+ # Seriously bad kludge to prevent docbook generators from being
+ # considered when we are generating html directly.
+ # TODO: Design and implement a mechanism to resolve generator conflicts.
+ generators.override asciidoctor.convert : boostbook.docbook-to-onehtml ;
+ }
+
+ # The command.. Default is bare asciidoctor.
+ command ?= asciidoctor ;
+ # We attempt to resolve each component of the command to account for
+ # script interpreter wrappers.
+ ASCIIDOCTOR = ;
+ for local c in $(command)
+ {
+ local t = [ common.find-tool $(c) ] ;
+ t ?= $(c) ;
+ ASCIIDOCTOR += $(t) ;
+ }
+}
+
+class asciidoctor-generator : generator
+{
+ import property-set ;
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ # ECHO *** asciidoctor-generator.run $(project) $(name) :: [ $(property-set).raw ] :: $(sources) ;
+
+ # We set a default backend based on the target type.
+ local backend = [ $(property-set).get <asciidoctor-backend> ] ;
+
+ # For now, we only accept a single adoc source.
+ if ( ! $(sources[2]) ) && ( [ $(sources[1]).type ] = ASCIIDOC )
+ {
+ # If no output name is specified, guess it from sources.
+ # NOTE: For some reason the "?=" conditional assign op doesn't
+ # work here. It assigns the value regardless, so work around it.
+ # TODO: Look into why that happens.
+ if ! $(name)
+ {
+ name = [ generator.determine-output-name $(sources) ] ;
+ }
+
+ # Depending on the kind of target we set up the backend, and
+ # and any other options.
+ if ! $(backend)
+ {
+ switch [ $(property-set).get <main-target-type> ]
+ {
+ case HTML : backend = html5 ;
+ case DOCBOOK : backend = docbook45 ;
+ case MANPAGE : backend = manpage ;
+ case PDF : backend = pdf ;
+ }
+ }
+ }
+
+ # We build a reduced property set so that we are not toolset dependent.
+ local raw-set = <asciidoctor-backend>$(backend) ;
+ for local p in [ $(property-set).raw ]
+ {
+ if $(p:G) in <asciidoctor-attribute> <asciidoctor-doctype>
+ <flags>
+ {
+ raw-set += $(p) ;
+ }
+ }
+ raw-set = [ feature.expand-composites $(raw-set) ] ;
+ raw-set += [ $(property-set).incidental ] ;
+ property-set = [ property-set.create $(raw-set) ] ;
+ return [ generator.run $(project) $(name) : $(property-set) : $(sources) ] ;
+ }
+}
+
+_ = " " ;
+toolset.flags asciidoctor ATTRIBUTE : <asciidoctor-attribute> ;
+toolset.flags asciidoctor DOCTYPE : <asciidoctor-doctype> ;
+toolset.flags asciidoctor BACKEND : <asciidoctor-backend> ;
+toolset.flags asciidoctor FLAGS : <flags> ;
+
+feature.compose <asciidoctor-backend>pdf : <flags>"-r asciidoctor-pdf" ;
+
+actions convert
+{
+ "$(ASCIIDOCTOR)" -o$(_)"$(<:D=)" -D$(_)"$(<:D)" -b$(_)"$(BACKEND)" -a$(_)"$(ATTRIBUTE)" -d$(_)"$(DOCTYPE)" $(FLAGS) "$(>)"
+}
diff --git a/src/boost/tools/build/src/tools/auto-index.jam b/src/boost/tools/build/src/tools/auto-index.jam
new file mode 100644
index 000000000..41d04828a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/auto-index.jam
@@ -0,0 +1,204 @@
+
+import feature ;
+import generators ;
+import "class" ;
+import toolset ;
+import targets ;
+import "class" : new ;
+import project ;
+
+feature.feature auto-index : off "on" ;
+feature.feature auto-index-internal : off "on" ;
+feature.feature auto-index-verbose : off "on" ;
+feature.feature auto-index-no-duplicates : off "on" ;
+feature.feature auto-index-script : : free path ;
+feature.feature auto-index-prefix : : free path ;
+feature.feature auto-index-type : : free ;
+feature.feature auto-index-section-names : "on" off ;
+
+toolset.flags auto-index.auto-index FLAGS <auto-index-internal>on : --internal-index ;
+toolset.flags auto-index.auto-index SCRIPT <auto-index-script> ;
+toolset.flags auto-index.auto-index PREFIX <auto-index-prefix> ;
+toolset.flags auto-index.auto-index INDEX_TYPE <auto-index-type> ;
+toolset.flags auto-index.auto-index FLAGS <auto-index-verbose>on : --verbose ;
+toolset.flags auto-index.auto-index FLAGS <auto-index-no-duplicates>on : --no-duplicates ;
+toolset.flags auto-index.auto-index FLAGS <auto-index-section-names>off : --no-section-names ;
+
+# <auto-index-binary> shell command to run AutoIndex
+# <auto-index-binary-dependencies> targets to build AutoIndex from sources.
+feature.feature <auto-index-binary> : : free ;
+feature.feature <auto-index-binary-dependencies> : : free dependency ;
+
+class auto-index-generator : generator
+{
+ import common modules path targets build-system ;
+ rule run ( project name ? : property-set : sources * )
+ {
+ # AutoIndex invocation command and dependencies.
+ local auto-index-binary = [ modules.peek auto-index : .command ] ;
+ local auto-index-binary-dependencies ;
+
+ if $(auto-index-binary)
+ {
+ # Use user-supplied command.
+ auto-index-binary = [ common.get-invocation-command auto-index : auto-index : $(auto-index-binary) ] ;
+ }
+ else
+ {
+ # Search for AutoIndex sources in sensible places, like
+ # $(BOOST_ROOT)/tools/auto_index
+ # $(BOOST_BUILD_PATH)/../../auto_index
+
+ # And build auto-index executable from sources.
+
+ local boost-root = [ modules.peek : BOOST_ROOT ] ;
+ local boost-build-path = [ build-system.location ] ;
+ local boost-build-path2 = [ modules.peek : BOOST_BUILD_PATH ] ;
+
+ local auto-index-dir ;
+
+ if $(boost-root)
+ {
+ auto-index-dir += [ path.join $(boost-root) tools ] ;
+ }
+
+ if $(boost-build-path)
+ {
+ auto-index-dir += $(boost-build-path)/../.. ;
+ }
+ if $(boost-build-path2)
+ {
+ auto-index-dir += $(boost-build-path2)/.. ;
+ }
+
+ #ECHO $(auto-index-dir) ;
+ auto-index-dir = [ path.glob $(auto-index-dir) : auto_index ] ;
+ #ECHO $(auto-index-dir) ;
+
+ # If the AutoIndex source directory was found, mark its main target
+ # as a dependency for the current project. Otherwise, try to find
+ # 'auto-index' in user's PATH
+ if $(auto-index-dir)
+ {
+ auto-index-dir = [ path.make $(auto-index-dir[1]) ] ;
+ auto-index-dir = $(auto-index-dir)/build ;
+
+ #ECHO $(auto-index-dir) ;
+
+ # Get the main-target in AutoIndex directory.
+ local auto-index-main-target = [ targets.resolve-reference $(auto-index-dir) : $(project) ] ;
+
+ #ECHO $(auto-index-main-target) ;
+
+ # The first element are actual targets, the second are
+ # properties found in target-id. We do not care about these
+ # since we have passed the id ourselves.
+ auto-index-main-target =
+ [ $(auto-index-main-target[1]).main-target auto_index ] ;
+
+ #ECHO $(auto-index-main-target) ;
+
+ auto-index-binary-dependencies =
+ [ $(auto-index-main-target).generate [ $(property-set).propagated ] ] ;
+
+ # Ignore usage-requirements returned as first element.
+ auto-index-binary-dependencies = $(auto-index-binary-dependencies[2-]) ;
+
+ # Some toolsets generate extra targets (e.g. RSP). We must mark
+ # all targets as dependencies for the project, but we will only
+ # use the EXE target for auto-index-to-boostbook translation.
+ for local target in $(auto-index-binary-dependencies)
+ {
+ if [ $(target).type ] = EXE
+ {
+ auto-index-binary =
+ [ path.native
+ [ path.join
+ [ $(target).path ]
+ [ $(target).name ]
+ ]
+ ] ;
+ }
+ }
+ }
+ else
+ {
+ ECHO "AutoIndex warning: The path to the auto-index executable was" ;
+ ECHO " not provided. Additionally, couldn't find AutoIndex" ;
+ ECHO " sources searching in" ;
+ ECHO " * BOOST_ROOT/tools/auto-index" ;
+ ECHO " * BOOST_BUILD_PATH/../../auto-index" ;
+ ECHO " Will now try to find a precompiled executable by searching" ;
+ ECHO " the PATH for 'auto-index'." ;
+ ECHO " To disable this warning in the future, or to completely" ;
+ ECHO " avoid compilation of auto-index, you can explicitly set the" ;
+ ECHO " path to a auto-index executable command in user-config.jam" ;
+ ECHO " or site-config.jam with the call" ;
+ ECHO " using auto-index : /path/to/auto-index ;" ;
+
+ # As a last resort, search for 'auto-index' command in path. Note
+ # that even if the 'auto-index' command is not found,
+ # get-invocation-command will still return 'auto-index' and might
+ # generate an error while generating the virtual-target.
+
+ auto-index-binary = [ common.get-invocation-command auto-index : auto-index ] ;
+ }
+ }
+
+ # Add $(auto-index-binary-dependencies) as a dependency of the current
+ # project and set it as the <auto-index-binary> feature for the
+ # auto-index-to-boostbook rule, below.
+ property-set = [ $(property-set).add-raw
+ <dependency>$(auto-index-binary-dependencies)
+ <auto-index-binary>$(auto-index-binary)
+ <auto-index-binary-dependencies>$(auto-index-binary-dependencies)
+ ] ;
+
+ #ECHO "binary = " $(auto-index-binary) ;
+ #ECHO "dependencies = " $(auto-index-binary-dependencies) ;
+
+ return [ generator.run $(project) $(name) : $(property-set) : $(sources) ] ;
+ }
+}
+
+# Initialization of toolset.
+#
+# Parameters:
+# command ? -> path to AutoIndex executable.
+#
+# When command is not supplied toolset will search for AutoIndex directory and
+# compile the executable from source. If that fails we still search the path for
+# 'auto_index'.
+#
+rule init (
+ command ? # path to the AutoIndex executable.
+ )
+{
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+ .command = $(command) ;
+ }
+}
+
+toolset.flags auto-index.auto-index AI-COMMAND <auto-index-binary> ;
+toolset.flags auto-index.auto-index AI-DEPENDENCIES <auto-index-binary-dependencies> ;
+
+generators.register [ class.new auto-index-generator auto-index.auto-index : DOCBOOK : DOCBOOK(%.auto_index) : <auto-index>on ] ;
+generators.override auto-index.auto-index : boostbook.boostbook-to-docbook ;
+
+rule auto-index ( target : source : properties * )
+{
+ # Signal dependency of auto-index sources on <auto-index-binary-dependencies>
+ # upon invocation of auto-index-to-boostbook.
+ #ECHO "AI-COMMAND= " $(AI-COMMAND) ;
+ DEPENDS $(target) : [ on $(target) return $(AI-DEPENDENCIES) ] ;
+ #DEPENDS $(target) : [ on $(target) return $(SCRIPT) ] ;
+}
+
+actions auto-index
+{
+ $(AI-COMMAND) $(FLAGS) "--prefix="$(PREFIX) "--script="$(SCRIPT) "--index-type="$(INDEX_TYPE) "--in="$(>) "--out="$(<)
+}
+
+
diff --git a/src/boost/tools/build/src/tools/bison.jam b/src/boost/tools/build/src/tools/bison.jam
new file mode 100644
index 000000000..96b86a327
--- /dev/null
+++ b/src/boost/tools/build/src/tools/bison.jam
@@ -0,0 +1,26 @@
+# 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)
+
+import generators ;
+import feature ;
+import toolset : flags ;
+import type ;
+
+feature.feature bison.prefix : : free ;
+type.register Y : y ;
+type.register YY : yy ;
+generators.register-standard bison.bison : Y : C H ;
+generators.register-standard bison.bison : YY : CPP HPP ;
+
+rule init ( )
+{
+}
+
+flags bison.bison PREFIX <bison.prefix> ;
+_ = " " ;
+
+actions bison
+{
+ bison -p$(_)$(PREFIX) -d -o $(<[1]) $(>)
+}
diff --git a/src/boost/tools/build/src/tools/boostbook-config.jam b/src/boost/tools/build/src/tools/boostbook-config.jam
new file mode 100644
index 000000000..6e3f3ddc1
--- /dev/null
+++ b/src/boost/tools/build/src/tools/boostbook-config.jam
@@ -0,0 +1,13 @@
+#~ Copyright 2005 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)
+
+# Automatic configuration for BoostBook tools. To use, just import this module.
+#
+# This module is deprecated.
+# using boostbook ;
+# with no arguments now suffices.
+
+import toolset : using ;
+
+using boostbook ;
diff --git a/src/boost/tools/build/src/tools/boostbook.jam b/src/boost/tools/build/src/tools/boostbook.jam
new file mode 100644
index 000000000..e78a7d951
--- /dev/null
+++ b/src/boost/tools/build/src/tools/boostbook.jam
@@ -0,0 +1,740 @@
+# Copyright 2003, 2004, 2005 Dave Abrahams
+# Copyright 2003, 2004, 2005 Douglas Gregor
+# Copyright 2005, 2006, 2007 Rene Rivera
+# Copyright 2003, 2004, 2005 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)
+
+# This module defines rules to handle generation of documentation from BoostBook
+# sources.
+#
+# The type of output is controlled by the <format> feature which can have the
+# following values:
+# * html: Generates html documentation. This is the default.
+# * xhtml: Generates xhtml documentation.
+# * htmlhelp: Generates html help output.
+# * onehtml: Generates a single html page.
+# * man: Generates man pages.
+# * pdf: Generates pdf documentation.
+# * ps: Generates postscript output.
+# * docbook: Generates docbook XML.
+# * fo: Generates XSL formatting objects.
+# * tests: Extracts test cases from the boostbook XML.
+#
+# <format> is an implicit feature, so for example, typing pdf on the command
+# line is a short-cut for format=pdf.
+
+import build-system ;
+import "class" : new ;
+import common ;
+import feature ;
+import generators ;
+import make ;
+import modules ;
+import os ;
+import param ;
+import path ;
+import print ;
+import project ;
+import property ;
+import property-set ;
+import regex ;
+import scanner ;
+import sequence ;
+import targets ;
+import type ;
+import virtual-target ;
+import xsltproc ;
+
+# Make this module into a project.
+project.initialize $(__name__) ;
+project boostbook ;
+
+.debug-configuration = [ MATCH ^(--debug-configuration)$ : [ modules.peek : ARGV
+ ] ] ;
+
+feature.feature format
+ : html xhtml htmlhelp onehtml man pdf ps docbook fo tests none
+ : implicit composite propagated ;
+
+type.register DTDXML : dtdxml ;
+type.register BOOSTBOOK : boostbook : XML ;
+type.register FO : fo : XML ;
+type.register PS : ps ;
+type.register XSLT : xsl xslt : XML ;
+type.register HTMLDIR ;
+type.register XHTMLDIR ;
+type.register HTMLHELP ;
+type.register MANPAGES ;
+type.register TESTS : tests ;
+
+
+# Initialize BoostBook support.
+#
+rule init (
+ docbook-xsl-dir ? # The DocBook XSL stylesheet directory. If not provided,
+ # we use DOCBOOK_XSL_DIR from the environment (if
+ # available) or look in standard locations. Otherwise,
+ # we let the XML processor load the stylesheets
+ # remotely.
+
+ : docbook-dtd-dir ? # The DocBook DTD directory. If not provided, we use
+ # DOCBOOK_DTD_DIR From the environment (if available) or
+ # look in standard locations. Otherwise, we let the XML
+ # processor load the DTD remotely.
+
+ : boostbook-dir ? # The BoostBook directory with the DTD and XSL subdirs.
+)
+{
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ check-boostbook-dir $(boostbook-dir) ;
+ find-tools $(docbook-xsl-dir) : $(docbook-dtd-dir) : $(boostbook-dir) ;
+
+ # Register generators only if we were called via "using boostbook ;"
+ local reg-gen = generators.register-xslt ;
+ $(reg-gen) boostbook.dtdxml-to-boostbook : DTDXML : XML ;
+ $(reg-gen) boostbook.boostbook-to-docbook : XML : DOCBOOK ;
+ $(reg-gen) boostbook.boostbook-to-tests : XML : TESTS ;
+ $(reg-gen) boostbook.docbook-to-onehtml : DOCBOOK : HTML ;
+ $(reg-gen) boostbook.docbook-to-htmldir : DOCBOOK : HTMLDIR ;
+ $(reg-gen) boostbook.docbook-to-xhtmldir : DOCBOOK : XHTMLDIR ;
+ $(reg-gen) boostbook.docbook-to-htmlhelp : DOCBOOK : HTMLHELP ;
+ $(reg-gen) boostbook.docbook-to-manpages : DOCBOOK : MANPAGES ;
+ $(reg-gen) boostbook.docbook-to-fo : DOCBOOK : FO ;
+
+ # The same about Jamfile main target rules.
+ IMPORT $(__name__) : boostbook : : boostbook ;
+ }
+ else
+ {
+ if $(docbook-xsl-dir)
+ {
+ modify-config ;
+ .docbook-xsl-dir = [ path.make $(docbook-xsl-dir) ] ;
+ check-docbook-xsl-dir ;
+ }
+ if $(docbook-dtd-dir)
+ {
+ modify-config ;
+ .docbook-dtd-dir = [ path.make $(docbook-dtd-dir) ] ;
+ check-docbook-dtd-dir ;
+ }
+ if $(boostbook-dir)
+ {
+ modify-config ;
+ check-boostbook-dir $(boostbook-dir) ;
+ local boostbook-xsl-dir = [ path.glob $(boostbook-dir) : xsl ] ;
+ local boostbook-dtd-dir = [ path.glob $(boostbook-dir) : dtd ] ;
+ .boostbook-xsl-dir = $(boostbook-xsl-dir[1]) ;
+ .boostbook-dtd-dir = $(boostbook-dtd-dir[1]) ;
+ check-boostbook-xsl-dir ;
+ check-boostbook-dtd-dir ;
+ }
+ }
+}
+
+
+local rule lock-config ( )
+{
+ if ! $(.initialized)
+ {
+ import errors ;
+ errors.user-error BoostBook has not been configured. ;
+ }
+ if ! $(.config-locked)
+ {
+ .config-locked = true ;
+
+ if $(.error-message)
+ {
+ print-error $(.error-message) ;
+ }
+ }
+}
+
+
+local rule modify-config ( )
+{
+ if $(.config-locked)
+ {
+ import errors ;
+ errors.user-error BoostBook configuration cannot be changed after it has
+ been used. ;
+ }
+}
+
+rule print-error ( location message * )
+{
+ ECHO "error:" at $(location) ;
+ ECHO "error:" $(message) ;
+ EXIT ;
+}
+
+rule make-error ( message * )
+{
+ import errors ;
+ return [ errors.nearest-user-location ] $(message) ;
+}
+
+
+rule find-boost-in-registry ( keys * )
+{
+ local boost-root ;
+ for local R in $(keys)
+ {
+ local installed-boost = [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\$(R)" : "InstallRoot" ] ;
+ if $(installed-boost)
+ {
+ boost-root += [ path.make $(installed-boost) ] ;
+ }
+ }
+ return $(boost-root) ;
+}
+
+
+rule check-docbook-xsl-dir ( )
+{
+ if $(.docbook-xsl-dir)
+ {
+ if ! [ path.glob $(.docbook-xsl-dir) : common/common.xsl ]
+ {
+ .error-message = [ make-error "BoostBook:" could not find docbook XSL stylesheets
+ "in:" [ path.native $(.docbook-xsl-dir) ] ] ;
+ }
+ else if $(.debug-configuration)
+ {
+ ECHO "notice:" "BoostBook:" found docbook XSL stylesheets "in:" [
+ path.native $(.docbook-xsl-dir) ] ;
+ }
+ }
+}
+
+
+rule check-docbook-dtd-dir ( )
+{
+ if $(.docbook-dtd-dir)
+ {
+ if ! [ path.glob $(.docbook-dtd-dir) : docbookx.dtd ]
+ {
+ .error-message = [ make-error "BoostBook:" could not find docbook DTD "in:" [
+ path.native $(.docbook-dtd-dir) ] ] ;
+ }
+ else if $(.debug-configuration)
+ {
+ ECHO "notice:" "BoostBook:" found docbook DTD "in:" [ path.native
+ $(.docbook-dtd-dir) ] ;
+ }
+ }
+}
+
+
+rule check-boostbook-xsl-dir ( )
+{
+ if ! $(.boostbook-xsl-dir)
+ {
+ .error-message = [ make-error "BoostBook:" could not find boostbook XSL "stylesheets." ] ;
+ }
+ else if ! [ path.glob $(.boostbook-xsl-dir) : docbook.xsl ]
+ {
+ .error-message = [ make-error "BoostBook:" could not find docbook XSL stylesheets "in:"
+ [ path.native $(.boostbook-xsl-dir) ] ] ;
+ }
+ else if $(.debug-configuration)
+ {
+ ECHO "notice:" "BoostBook:" found boostbook XSL stylesheets "in:" [
+ path.native $(.boostbook-xsl-dir) ] ;
+ }
+}
+
+
+rule check-boostbook-dtd-dir ( )
+{
+ if ! $(.boostbook-dtd-dir)
+ {
+ .error-message = [ make-error "BoostBook:" could not find boostbook DTD. ] ;
+ }
+ else if ! [ path.glob $(.boostbook-dtd-dir) : boostbook.dtd ]
+ {
+ .error-message = [ make-error "BoostBook:" could not find boostbook DTD "in:" [
+ path.native $(.boostbook-dtd-dir) ] ] ;
+ }
+ else if $(.debug-configuration)
+ {
+ ECHO "notice:" "BoostBook:" found boostbook DTD "in:" [ path.native
+ $(.boostbook-dtd-dir) ] ;
+ }
+}
+
+
+rule check-boostbook-dir ( boostbook-dir ? )
+{
+ if $(boostbook-dir) && ! [ path.glob $(boostbook-dir) : xsl ]
+ {
+ .error-message = [ make-error "BoostBook:" could not find boostbook "in:" [ path.native
+ $(boostbook-dir) ] ] ;
+ }
+}
+
+
+rule find-tools ( docbook-xsl-dir ? : docbook-dtd-dir ? : boostbook-dir ? )
+{
+ docbook-xsl-dir ?= [ modules.peek : DOCBOOK_XSL_DIR ] ;
+ docbook-dtd-dir ?= [ modules.peek : DOCBOOK_DTD_DIR ] ;
+ boostbook-dir ?= [ modules.peek : BOOSTBOOK_DIR ] ;
+
+ # Look for the boostbook stylesheets relative to BOOST_ROOT and B2.
+ local boost-build-root = [ path.make [ build-system.location ] ] ;
+ local boostbook-search-dirs = [ path.join $(boost-build-root) .. .. ] ;
+
+ local boost-root = [ modules.peek : BOOST_ROOT ] ;
+ if $(boost-root)
+ {
+ boostbook-search-dirs += [ path.join [ path.make $(boost-root) ] tools ]
+ ;
+ }
+ boostbook-dir ?= [ path.glob $(boostbook-search-dirs) : boostbook* ] ;
+
+ # Try to find the tools in platform specific locations.
+ if [ os.name ] = NT
+ {
+ # If installed by the Boost installer.
+ local boost-root = ;
+
+ local boost-installer-versions = snapshot cvs 1.33.0 ;
+ local boost-consulting-installer-versions = 1.33.1 1.34.0 1.34.1 ;
+ local boostpro-installer-versions =
+ 1.35.0 1.36.0 1.37.0 1.38.0 1.39.0 1.40.0 1.41.0 1.42.0
+ 1.43.0 1.44.0 1.45.0 1.46.0 1.47.0 1.48.0 1.49.0 1.50.0 ;
+
+ local old-installer-root = [ find-boost-in-registry
+ Boost.org\\$(boost-installer-versions) ] ;
+
+ # Make sure that the most recent version is searched for first.
+ boost-root += [ sequence.reverse [ find-boost-in-registry
+ Boost-Consulting.com\\$(boost-consulting-installer-versions)
+ boostpro.com\\$(boostpro-installer-versions) ] ] ;
+
+ # Plausible locations.
+ local root = [ PWD ] ;
+ while $(root) != $(root:D) { root = $(root:D) ; }
+ root = [ path.make $(root) ] ;
+ local search-dirs ;
+ local docbook-search-dirs ;
+ for local p in $(boost-root)
+ {
+ search-dirs += [ path.join $(p) tools ] ;
+ }
+ for local p in $(old-installer-root)
+ {
+ search-dirs += [ path.join $(p) share ] ;
+ docbook-search-dirs += [ path.join $(p) share ] ;
+ }
+ search-dirs += [ path.join $(root) Boost tools ] ;
+ search-dirs += [ path.join $(root) Boost share ] ;
+ docbook-search-dirs += [ path.join $(root) Boost share ] ;
+
+ docbook-xsl-dir ?= [ path.glob $(docbook-search-dirs) : docbook-xsl* ] ;
+ docbook-dtd-dir ?= [ path.glob $(docbook-search-dirs) : docbook-xml* ] ;
+ boostbook-dir ?= [ path.glob $(search-dirs) : boostbook* ] ;
+ }
+ else
+ {
+ # Plausible locations.
+
+ local share = /usr/local/share /usr/share /opt/share /opt/local/share ;
+ local dtd-versions = 4.2 ;
+
+ docbook-xsl-dir ?= [ path.glob $(share) : docbook-xsl* ] ;
+ docbook-xsl-dir ?= [ path.glob $(share)/sgml/docbook : xsl-stylesheets ]
+ ;
+ docbook-xsl-dir ?= [ path.glob $(share)/xsl : docbook* ] ;
+
+ docbook-dtd-dir ?= [ path.glob $(share) : docbook-xml* ] ;
+ docbook-dtd-dir ?= [ path.glob $(share)/sgml/docbook :
+ xml-dtd-$(dtd-versions)* ] ;
+ docbook-dtd-dir ?= [ path.glob $(share)/xml/docbook : $(dtd-versions) ]
+ ;
+
+ boostbook-dir ?= [ path.glob $(share) : boostbook* ] ;
+
+ # Ubuntu Linux.
+ docbook-xsl-dir ?= [ path.glob /usr/share/xml/docbook/stylesheet :
+ nwalsh ] ;
+ docbook-dtd-dir ?= [ path.glob /usr/share/xml/docbook/schema/dtd :
+ $(dtd-versions) ] ;
+
+ # SUSE.
+ docbook-xsl-dir ?= [ path.glob /usr/share/xml/docbook/stylesheet/nwalsh
+ : current ] ;
+ }
+
+ if $(docbook-xsl-dir)
+ {
+ .docbook-xsl-dir = [ path.make $(docbook-xsl-dir[1]) ] ;
+ }
+ if $(docbook-dtd-dir)
+ {
+ .docbook-dtd-dir = [ path.make $(docbook-dtd-dir[1]) ] ;
+ }
+
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" "Boost.Book:" searching XSL/DTD "in" ;
+ ECHO "notice:" [ sequence.transform path.native : $(boostbook-dir) ] ;
+ }
+ local boostbook-xsl-dir ;
+ for local dir in $(boostbook-dir)
+ {
+ boostbook-xsl-dir += [ path.glob $(dir) : xsl ] ;
+ }
+ local boostbook-dtd-dir ;
+ for local dir in $(boostbook-dir)
+ {
+ boostbook-dtd-dir += [ path.glob $(dir) : dtd ] ;
+ }
+ .boostbook-xsl-dir = $(boostbook-xsl-dir[1]) ;
+ .boostbook-dtd-dir = $(boostbook-dtd-dir[1]) ;
+
+ check-docbook-xsl-dir ;
+ check-docbook-dtd-dir ;
+ check-boostbook-xsl-dir ;
+ check-boostbook-dtd-dir ;
+}
+
+
+rule xsl-dir
+{
+ lock-config ;
+ return $(.boostbook-xsl-dir) ;
+}
+
+
+rule dtd-dir
+{
+ lock-config ;
+ return $(.boostbook-dtd-dir) ;
+}
+
+
+rule docbook-xsl-dir
+{
+ lock-config ;
+ return $(.docbook-xsl-dir) ;
+}
+
+
+rule docbook-dtd-dir
+{
+ lock-config ;
+ return $(.docbook-dtd-dir) ;
+}
+
+
+rule dtdxml-to-boostbook ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/dtd/dtd2boostbook.xsl ] ;
+ xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties) ;
+}
+
+
+rule boostbook-to-docbook ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/docbook.xsl ] ;
+ xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties) ;
+}
+
+
+rule docbook-to-onehtml ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/html-single.xsl ] ;
+ xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties) ;
+}
+
+
+rule docbook-to-htmldir ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/html.xsl ] ;
+ xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : html
+ ;
+}
+
+
+rule docbook-to-xhtmldir ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/xhtml.xsl ] ;
+ xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) :
+ xhtml ;
+}
+
+
+rule docbook-to-htmlhelp ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/html-help.xsl ] ;
+ xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) :
+ htmlhelp ;
+}
+
+
+rule docbook-to-manpages ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/manpages.xsl ] ;
+ xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : man
+ ;
+}
+
+
+rule docbook-to-fo ( target : source : properties * )
+{
+ lock-config ;
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/fo.xsl ] ;
+ xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties) ;
+}
+
+
+rule format-catalog-path ( path )
+{
+ local result = $(path) ;
+ if [ xsltproc.is-cygwin ]
+ {
+ if [ os.name ] = NT
+ {
+ drive = [ MATCH "^/(.):(.*)$" : $(path) ] ;
+ result = /cygdrive/$(drive[1])$(drive[2]) ;
+ }
+ }
+ else
+ {
+ if [ os.name ] = CYGWIN
+ {
+ local native-path = [ path.native $(path) ] ;
+ result = [ path.make $(native-path:W) ] ;
+ }
+ }
+ return [ regex.replace $(result) " " "%20" ] ;
+}
+
+
+rule generate-xml-catalog ( target : sources * : properties * )
+{
+ print.output $(target) ;
+
+ # BoostBook DTD catalog entry.
+ local boostbook-dtd-dir = [ boostbook.dtd-dir ] ;
+ if $(boostbook-dtd-dir)
+ {
+ boostbook-dtd-dir = [ format-catalog-path $(boostbook-dtd-dir) ] ;
+ }
+
+ print.text
+ "<?xml version=\"1.0\"?>"
+ "<!DOCTYPE catalog "
+ " PUBLIC \"-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN\""
+ " \"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd\">"
+ "<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">"
+ " <rewriteURI uriStartString=\"http://www.boost.org/tools/boostbook/dtd/\" rewritePrefix=\"file://$(boostbook-dtd-dir)/\"/>"
+ : true ;
+
+ local docbook-xsl-dir = [ boostbook.docbook-xsl-dir ] ;
+ if ! $(docbook-xsl-dir)
+ {
+ ECHO "BoostBook warning: no DocBook XSL directory specified." ;
+ ECHO " If you have the DocBook XSL stylesheets installed, please " ;
+ ECHO " set DOCBOOK_XSL_DIR to the stylesheet directory on either " ;
+ ECHO " the command line (via -sDOCBOOK_XSL_DIR=...) or in a " ;
+ ECHO " Boost.Jam configuration file. The DocBook XSL stylesheets " ;
+ ECHO " are available here: http://docbook.sourceforge.net/ " ;
+ ECHO " Stylesheets will be downloaded on-the-fly (very slow!) " ;
+ }
+ else
+ {
+ docbook-xsl-dir = [ format-catalog-path $(docbook-xsl-dir) ] ;
+ print.text " <rewriteURI uriStartString=\"http://docbook.sourceforge.net/release/xsl/current/\" rewritePrefix=\"file://$(docbook-xsl-dir)/\"/>" ;
+ }
+
+ local docbook-dtd-dir = [ boostbook.docbook-dtd-dir ] ;
+ if ! $(docbook-dtd-dir)
+ {
+ ECHO "BoostBook warning: no DocBook DTD directory specified." ;
+ ECHO " If you have the DocBook DTD installed, please set " ;
+ ECHO " DOCBOOK_DTD_DIR to the DTD directory on either " ;
+ ECHO " the command line (via -sDOCBOOK_DTD_DIR=...) or in a " ;
+ ECHO " Boost.Jam configuration file. The DocBook DTD is available " ;
+ ECHO " here: http://www.oasis-open.org/docbook/xml/4.2/index.shtml" ;
+ ECHO " The DTD will be downloaded on-the-fly (very slow!) " ;
+ }
+ else
+ {
+ docbook-dtd-dir = [ format-catalog-path $(docbook-dtd-dir) ] ;
+ print.text " <rewriteURI uriStartString=\"http://www.oasis-open.org/docbook/xml/4.2/\" rewritePrefix=\"file://$(docbook-dtd-dir)/\"/>" ;
+ }
+
+ print.text "</catalog>" ;
+}
+
+
+# Returns information about the global XML catalog target, creating it lazily if
+# needed. To get the global catalog generated only once we do not create it in
+# every project that requests it but instead only create it based on the first
+# project requesting it and then reuse it from there for any later requests.
+#
+# To get 'as close as possible' to having the global catalog stored in the same
+# location independent of which folder our build was run from, we assign its
+# target to the given project's base Jamroot project. This works correctly as
+# long as we know the passed project is not standalone or one of Boost Build's
+# configuration module projects, as those to not have a Jamroot project in their
+# parent chain. Note also that we can still get our targets generated in
+# different folders in case when one build project references a target from
+# another build project with its own separate Jamroot.
+#
+# FIXME: Ideally the catalog target should be created as part of the boostbook
+# project and stored in some central location for all used standalone pojects,
+# shared between all builds made on that system. This however would require much
+# more though to add the necessary changes to Boost Build's internal design.
+#
+local rule xml-catalog ( project )
+{
+ if ! $(.xml-catalog)
+ {
+ local project-module = [ $(project).project-module ] ;
+ local root-module = [ project.get-jamroot-module $(project-module) ] ;
+ if ! $(root-module)
+ {
+ import errors ;
+ if [ project.is-config-module $(project-module) ]
+ {
+ errors.user-error boostbook targets can not be declared in Boost
+ Build's configuration modules. ;
+ }
+ else
+ {
+ errors.user-error boostbook targets can not be declared in
+ standalone projects. : use a Jamfile/Jamroot project
+ instead. ;
+ }
+ }
+ local root-project = [ project.target $(root-module) ] ;
+
+ .xml-catalog = [ virtual-target.register [ new file-target
+ boostbook_catalog : XML : $(root-project) : [ new action :
+ boostbook.generate-xml-catalog ] ] ] ;
+ .xml-catalog-file = [ $(.xml-catalog).path ] [ $(.xml-catalog).name ] ;
+ .xml-catalog-file = $(.xml-catalog-file:J=/) ;
+ }
+ return $(.xml-catalog) $(.xml-catalog-file) ;
+}
+
+
+class boostbook-target-class : basic-target
+{
+ import generators ;
+ import property-set ;
+ import virtual-target ;
+ import path ;
+
+ rule construct ( name : sources * : property-set )
+ {
+ # Generate the catalog, but only once.
+ IMPORT boostbook : xml-catalog : $(__name__) : boostbook.xml-catalog ;
+ local global-catalog = [ boostbook.xml-catalog [ project ] ] ;
+ local catalog = $(global-catalog[1]) ;
+ local catalog-file = $(global-catalog[2]) ;
+ local targets ;
+
+ # Add the catalog to the property set.
+ property-set = [ $(property-set).add-raw <catalog>$(catalog-file) ] ;
+
+ local type = none ;
+ local manifest ;
+ local format = [ $(property-set).get <format> ] ;
+ switch $(format)
+ {
+ case html : type = HTMLDIR ; manifest = HTML.manifest ;
+ case xhtml : type = XHTMLDIR ; manifest = HTML.manifest ;
+ case htmlhelp : type = HTMLHELP ; manifest = HTML.manifest ;
+ case onehtml : type = HTML ;
+ case man : type = MANPAGES ; manifest = man.manifest ;
+ case docbook : type = DOCBOOK ;
+ case fo : type = FO ;
+ case pdf : type = PDF ;
+ case ps : type = PS ;
+ case tests : type = TESTS ;
+ }
+
+ local target ;
+ if $(manifest)
+ {
+ # Sources --> DOCBOOK.
+ local docbook-target = [ generators.construct [ project ] : DOCBOOK
+ : $(property-set) : $(sources) ] ;
+ docbook-target = $(docbook-target[2]) ;
+ $(docbook-target).depends $(catalog) ;
+
+ # DOCBOOK --> type.
+ target = [ generators.construct [ project ] $(name)_$(manifest) :
+ $(type) : [ $(property-set).add-raw
+ <xsl:param>manifest=$(name)_$(manifest) ] : $(docbook-target) ]
+ ;
+ target = $(target[2]) ;
+ local name = [ $(property-set).get <name> ] ;
+ name ?= $(format) ;
+ if ! [ path.is-rooted $(name) ]
+ {
+ local p = [ project ] ;
+ name = [ path.join [ $(p).location ] $(name) ] ;
+ }
+ $(target).set-path $(name) ;
+ }
+ else
+ {
+ # Sources --> type.
+ target = [ generators.construct [ project ] : $(type) :
+ $(property-set) : $(sources) ] ;
+ target = $(target[2]) ;
+ if ! $(target)
+ {
+ import errors ;
+ errors.error Cannot build documentation type '$(format)'. ;
+ }
+ }
+ $(target).depends $(catalog) ;
+
+ return [ property-set.empty ] $(target) ;
+ }
+}
+
+
+# Declare a boostbook target.
+#
+rule boostbook ( target-name : sources * : requirements * : default-build * :
+ usage-requirements * )
+{
+ param.handle-named-params
+ sources requirements default-build usage-requirements ;
+ return [ targets.create-metatarget boostbook-target-class :
+ [ project.current ] : $(target-name) : $(sources) : $(requirements) :
+ $(default-build) : $(usage-requirements) ] ;
+}
+
+
+rule boostbook-to-tests ( target : source : properties * )
+{
+ lock-config ;
+ local boost_root = [ modules.peek : BOOST_ROOT ] ;
+ local native-path = [ path.native [ path.join $(.boostbook-xsl-dir) testing
+ Jamfile ] ] ;
+ local stylesheet = $(native-path:S=.xsl) ;
+ xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties)
+ <xsl:param>boost.root=$(boost_root) ;
+}
diff --git a/src/boost/tools/build/src/tools/borland.jam b/src/boost/tools/build/src/tools/borland.jam
new file mode 100644
index 000000000..6ad52e0de
--- /dev/null
+++ b/src/boost/tools/build/src/tools/borland.jam
@@ -0,0 +1,270 @@
+# Copyright 2005 Dave Abrahams
+# Copyright 2003 Rene Rivera
+# Copyright 2003, 2004, 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.borland]]
+= Borland C++ Compiler
+
+The `borland` module supports the command line C++ compiler included in
+http://www.borland.com/us/products/cbuilder/index.html[C++ Builder 2006]
+product and earlier version of it, running on Microsoft Windows.
+
+The supported products are listed below. The version reported by the
+command lines tools is also listed for reference.:
+
+* C++ Builder 2006 -- 5.8.2
+* CBuilderX -- 5.6.5, 5.6.4 (depending on release)
+* CBuilder6 -- 5.6.4
+* Free command line tools -- 5.5.1
+
+The module is initialized using the following syntax:
+
+----
+using borland : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the command is not specified, B2 will search for a binary
+named `bcc32` in PATH.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+|# # end::doc[]
+
+# Support for the Borland's command line compiler
+
+import property ;
+import generators ;
+import os ;
+import toolset : flags ;
+import feature : get-values ;
+import type ;
+import common ;
+
+feature.extend toolset : borland ;
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters borland :
+ version $(version) ] ;
+
+ local command = [ common.get-invocation-command borland : bcc32.exe
+ : $(command) ] ;
+
+ common.handle-options borland : $(condition) : $(command) : $(options) ;
+
+ if $(command)
+ {
+ command = [ common.get-absolute-tool-path $(command[-1]) ] ;
+ }
+ root = $(command:D) ;
+
+ flags borland.compile STDHDRS $(condition) : $(root)/include/ ;
+ flags borland.link STDLIBPATH $(condition) : $(root)/lib ;
+ flags borland.link RUN_PATH $(condition) : $(root)/bin ;
+ flags borland .root $(condition) : $(root)/bin/ ;
+}
+
+
+# A borland-specific target type
+type.register BORLAND.TDS : tds ;
+
+# Declare generators
+
+generators.register-linker borland.link : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : <toolset>borland ;
+generators.register-linker borland.link.dll : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB : <toolset>borland ;
+
+generators.register-archiver borland.archive : OBJ : STATIC_LIB : <toolset>borland ;
+generators.register-c-compiler borland.compile.c++ : CPP : OBJ : <toolset>borland ;
+generators.register-c-compiler borland.compile.c : C : OBJ : <toolset>borland ;
+generators.register-standard borland.asm : ASM : OBJ : <toolset>borland ;
+
+# Declare flags
+
+flags borland.compile OPTIONS <debug-symbols>on : -v ;
+flags borland.link OPTIONS <debug-symbols>on : -v ;
+
+flags borland.compile OPTIONS <optimization>off : -Od ;
+flags borland.compile OPTIONS <optimization>speed : -O2 ;
+flags borland.compile OPTIONS <optimization>space : -O1 ;
+
+if $(.BORLAND_HAS_FIXED_INLINING_BUGS)
+{
+ flags borland CFLAGS <inlining>off : -vi- ;
+ flags borland CFLAGS <inlining>on : -vi -w-inl ;
+ flags borland CFLAGS <inlining>full : -vi -w-inl ;
+}
+else
+{
+ flags borland CFLAGS : -vi- ;
+}
+
+flags borland.compile OPTIONS <warnings>off : -w- ;
+flags borland.compile OPTIONS <warnings>all : -w ;
+flags borland.compile OPTIONS <warnings-as-errors>on : -w! ;
+
+
+# Deal with various runtime configs...
+
+# This should be not for DLL
+flags borland OPTIONS <user-interface>console : -tWC ;
+
+# -tWR sets -tW as well, so we turn it off here and then turn it
+# on again later if we need it:
+flags borland OPTIONS <runtime-link>shared : -tWR -tWC ;
+flags borland OPTIONS <user-interface>gui : -tW ;
+
+flags borland OPTIONS <main-target-type>LIB/<link>shared : -tWD ;
+# Hmm.. not sure what's going on here.
+flags borland OPTIONS : -WM- ;
+flags borland OPTIONS <threading>multi : -tWM ;
+
+
+
+flags borland.compile OPTIONS <cflags> ;
+flags borland.compile.c++ OPTIONS <cxxflags> ;
+flags borland.compile DEFINES <define> ;
+flags borland.compile INCLUDES <include> ;
+
+flags borland NEED_IMPLIB <main-target-type>LIB/<link>shared : "" ;
+
+#
+# for C++ compiles the following options are turned on by default:
+#
+# -j5 stops after 5 errors
+# -g255 allow an unlimited number of warnings
+# -q no banner
+# -c compile to object
+# -P C++ code regardless of file extension
+# -a8 8 byte alignment, this option is on in the IDE by default
+# and effects binary compatibility.
+#
+
+# -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
+
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -a8 -Vx- -Ve- -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
+}
+
+# For C, we don't pass -P flag
+actions compile.c
+{
+ "$(CONFIG_COMMAND)" -j5 -g255 -q -c -a8 -Vx- -Ve- -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
+}
+
+
+# Declare flags and action for linking
+toolset.flags borland.link OPTIONS <debug-symbols>on : -v ;
+toolset.flags borland.link LIBRARY_PATH <library-path> ;
+toolset.flags borland.link FINDLIBS_ST <find-static-library> ;
+toolset.flags borland.link FINDLIBS_SA <find-shared-library> ;
+toolset.flags borland.link LIBRARIES <library-file> ;
+
+flags borland.link OPTIONS <linkflags> ;
+flags borland.link OPTIONS <link>shared : -tWD ;
+
+flags borland.link LIBRARY_PATH_OPTION <toolset>borland : -L : unchecked ;
+flags borland.link LIBRARY_OPTION <toolset>borland : "" : unchecked ;
+
+
+
+# bcc32 needs to have ilink32 in the path in order to invoke it, so explicitly
+# specifying $(BCC_TOOL_PATH)bcc32 doesn't help. You need to add
+# $(BCC_TOOL_PATH) to the path
+# The NEED_IMPLIB variable controls whether we need to invoke implib.
+
+flags borland.archive AROPTIONS <archiveflags> ;
+
+# Declare action for archives. We don't use response file
+# since it's hard to get "+-" there.
+# The /P256 increases 'page' size -- with too low
+# values tlib fails when building large applications.
+# CONSIDER: don't know what 'together' is for...
+actions updated together piecemeal archive
+{
+ $(.set-path)$(.root:W)$(.old-path)
+ tlib $(AROPTIONS) /P256 /u /a /C "$(<:W)" +-"$(>:W)"
+}
+
+
+if [ os.name ] = CYGWIN
+{
+ .set-path = "cmd /S /C set \"PATH=" ;
+ .old-path = ";%PATH%\" \"&&\"" ;
+
+
+ # Couldn't get TLIB to stop being confused about pathnames
+ # containing dashes (it seemed to treat them as option separators
+ # when passed through from bash), so we explicitly write the
+ # command into a .bat file and execute that. TLIB is also finicky
+ # about pathname style! Forward slashes, too, are treated as
+ # options.
+ actions updated together piecemeal archive
+ {
+ chdir $(<:D)
+ echo +-$(>:BS) > $(<:BS).rsp
+ $(.set-path)$(.root)$(.old-path) "tlib.exe" $(AROPTIONS) /P256 /C $(<:BS) @$(<:BS).rsp && $(RM) $(<:BS).rsp
+ }
+}
+else if [ os.name ] = NT
+{
+ .set-path = "set \"PATH=" ;
+ .old-path = ";%PATH%\"
+ " ;
+}
+else
+{
+ .set-path = "PATH=\"" ;
+ .old-path = "\":$PATH
+ export PATH
+ " ;
+}
+
+RM = [ common.rm-command ] ;
+
+nl = "
+" ;
+
+actions link
+{
+ $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+}
+
+
+actions link.dll bind LIBRARIES RSP
+{
+ $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" && "$(.root)implib" "$(<[2]:W)" "$(<[1]:W)"
+}
+
+# It seems impossible to specify output file with directory when compiling
+# asm files using bcc32, so use tasm32 directly.
+# /ml makes all symbol names case-sensitive
+actions asm
+{
+ $(.set-path)$(.root:W)$(.old-path) tasm32.exe /ml "$(>)" "$(<)"
+}
+
diff --git a/src/boost/tools/build/src/tools/builtin.jam b/src/boost/tools/build/src/tools/builtin.jam
new file mode 100644
index 000000000..1c1614e2c
--- /dev/null
+++ b/src/boost/tools/build/src/tools/builtin.jam
@@ -0,0 +1,96 @@
+# Copyright 2002, 2003, 2004, 2005 Dave Abrahams
+# Copyright 2002, 2005, 2006, 2007, 2010 Rene Rivera
+# Copyright 2006 Juergen Hunold
+# Copyright 2005 Toon Knapen
+# Copyright 2002, 2003, 2004, 2005, 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)
+
+# Defines standard features and rules.
+
+import alias ;
+import "class" : new ;
+import errors ;
+import feature ;
+import features/__init_features__ ;
+import generators ;
+import numbers ;
+import os ;
+import path ;
+import print ;
+import project ;
+import property ;
+import regex ;
+import scanner ;
+import sequence ;
+import stage ;
+import symlink ;
+import toolset ;
+import type ;
+import targets ;
+import types/register ;
+import utility ;
+import virtual-target ;
+import message ;
+import convert ;
+
+# Generators need the target types registered first. So this import needs
+# to be after that.
+import generators/__init_generators__ ;
+
+# FIXME: the following generate module import is not needed here but removing it
+# too hastily will break using code (e.g. the main Boost library Jamroot file)
+# that forgot to import the generate module before calling the generate rule.
+import generate ;
+
+
+variant debug : <optimization>off <debug-symbols>on <inlining>off
+ <runtime-debugging>on ;
+variant release : <optimization>speed <debug-symbols>off <inlining>full
+ <runtime-debugging>off <define>NDEBUG ;
+variant profile : release : <profiling>on <debug-symbols>on ;
+
+
+class preprocessed-target-class : basic-target
+{
+ import generators ;
+ rule construct ( name : sources * : property-set )
+ {
+ local result = [ generators.construct [ project ]
+ $(name) : PREPROCESSED_CPP : $(property-set) : $(sources) ] ;
+ if ! $(result)
+ {
+ result = [ generators.construct [ project ]
+ $(name) : PREPROCESSED_C : $(property-set) : $(sources) ] ;
+ }
+ if ! $(result)
+ {
+ local s ;
+ for x in $(sources)
+ {
+ s += [ $(x).name ] ;
+ }
+ local p = [ project ] ;
+ errors.user-error
+ "In project" [ $(p).name ] :
+ "Could not construct preprocessed file \"$(name)\" from $(s:J=, )." ;
+ }
+ return $(result) ;
+ }
+}
+
+rule preprocessed ( name : sources * : requirements * : default-build * :
+ usage-requirements * )
+{
+ local project = [ project.current ] ;
+ return [ targets.main-target-alternative
+ [ new preprocessed-target-class $(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) ]
+ ] ] ;
+}
+
+IMPORT $(__name__) : preprocessed : : preprocessed ;
diff --git a/src/boost/tools/build/src/tools/builtin.py b/src/boost/tools/build/src/tools/builtin.py
new file mode 100644
index 000000000..6bd2a8720
--- /dev/null
+++ b/src/boost/tools/build/src/tools/builtin.py
@@ -0,0 +1,805 @@
+# Status: minor updates by Steven Watanabe to make gcc work
+#
+# 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.
+
+""" Defines standard features and rules.
+"""
+
+import b2.build.targets as targets
+
+import sys
+from b2.build import feature, property, virtual_target, generators, type, property_set, scanner
+from b2.util.utility import *
+from b2.util import path, regex, bjam_signature, is_iterable_typed
+import b2.tools.types
+from b2.manager import get_manager
+
+
+# Records explicit properties for a variant.
+# The key is the variant name.
+__variant_explicit_properties = {}
+
+def reset ():
+ """ Clear the module state. This is mainly for testing purposes.
+ """
+ global __variant_explicit_properties
+
+ __variant_explicit_properties = {}
+
+@bjam_signature((["name"], ["parents_or_properties", "*"], ["explicit_properties", "*"]))
+def variant (name, parents_or_properties, explicit_properties = []):
+ """ Declares a new variant.
+ First determines explicit properties for this variant, by
+ refining parents' explicit properties with the passed explicit
+ properties. The result is remembered and will be used if
+ this variant is used as parent.
+
+ Second, determines the full property set for this variant by
+ adding to the explicit properties default values for all properties
+ which neither present nor are symmetric.
+
+ Lastly, makes appropriate value of 'variant' property expand
+ to the full property set.
+ name: Name of the variant
+ parents_or_properties: Specifies parent variants, if
+ 'explicit_properties' are given,
+ and explicit_properties otherwise.
+ explicit_properties: Explicit properties.
+ """
+ parents = []
+ if not explicit_properties:
+ explicit_properties = parents_or_properties
+ else:
+ parents = parents_or_properties
+
+ inherited = property_set.empty()
+ if parents:
+
+ # If we allow multiple parents, we'd have to to check for conflicts
+ # between base variants, and there was no demand for so to bother.
+ if len (parents) > 1:
+ raise BaseException ("Multiple base variants are not yet supported")
+
+ p = parents[0]
+ # TODO: the check may be stricter
+ if not feature.is_implicit_value (p):
+ raise BaseException ("Invalid base variant '%s'" % p)
+
+ inherited = __variant_explicit_properties[p]
+
+ explicit_properties = property_set.create_with_validation(explicit_properties)
+ explicit_properties = inherited.refine(explicit_properties)
+
+ # Record explicitly specified properties for this variant
+ # We do this after inheriting parents' properties, so that
+ # they affect other variants, derived from this one.
+ __variant_explicit_properties[name] = explicit_properties
+
+ feature.extend('variant', [name])
+ feature.compose ("<variant>" + name, explicit_properties.all())
+
+__os_names = """
+ amiga aix appletv bsd cygwin darwin dos emx freebsd hpux iphone linux netbsd
+ openbsd osf qnx qnxnto sgi solaris sun sunos svr4 sysv ultrix unix unixware
+ vms windows
+""".split()
+
+# Translates from bjam current OS to the os tags used in host-os and target-os,
+# i.e. returns the running host-os.
+#
+def default_host_os():
+ host_os = os_name()
+ if host_os not in (x.upper() for x in __os_names):
+ if host_os == 'NT': host_os = 'windows'
+ elif host_os == 'AS400': host_os = 'unix'
+ elif host_os == 'MINGW': host_os = 'windows'
+ elif host_os == 'BSDI': host_os = 'bsd'
+ elif host_os == 'COHERENT': host_os = 'unix'
+ elif host_os == 'DRAGONFLYBSD': host_os = 'bsd'
+ elif host_os == 'IRIX': host_os = 'sgi'
+ elif host_os == 'MACOSX': host_os = 'darwin'
+ elif host_os == 'KFREEBSD': host_os = 'freebsd'
+ elif host_os == 'LINUX': host_os = 'linux'
+ elif host_os == 'HAIKU': host_os = 'haiku'
+ else: host_os = 'unix'
+ return host_os.lower()
+
+def register_globals ():
+ """ Registers all features and variants declared by this module.
+ """
+
+ # This feature is used to determine which OS we're on.
+ # In future, this may become <target-os> and <host-os>
+ # TODO: check this. Compatibility with bjam names? Subfeature for version?
+ os = sys.platform
+ feature.feature ('os', [os], ['propagated', 'link-incompatible'])
+
+
+ # The two OS features define a known set of abstract OS names. The host-os is
+ # the OS under which bjam is running. Even though this should really be a fixed
+ # property we need to list all the values to prevent unknown value errors. Both
+ # set the default value to the current OS to account for the default use case of
+ # building on the target OS.
+ feature.feature('host-os', __os_names)
+ feature.set_default('host-os', default_host_os())
+
+ feature.feature('target-os', __os_names, ['propagated', 'link-incompatible'])
+ feature.set_default('target-os', default_host_os())
+
+ feature.feature ('toolset', [], ['implicit', 'propagated' ,'symmetric'])
+
+ feature.feature ('stdlib', ['native'], ['propagated', 'composite'])
+
+ feature.feature ('link', ['shared', 'static'], ['propagated'])
+ feature.feature ('runtime-link', ['shared', 'static'], ['propagated'])
+ feature.feature ('runtime-debugging', ['on', 'off'], ['propagated'])
+
+
+ feature.feature ('optimization', ['off', 'speed', 'space'], ['propagated'])
+ feature.feature ('profiling', ['off', 'on'], ['propagated'])
+ feature.feature ('inlining', ['off', 'on', 'full'], ['propagated'])
+
+ feature.feature ('threading', ['single', 'multi'], ['propagated'])
+ feature.feature ('rtti', ['on', 'off'], ['propagated'])
+ feature.feature ('exception-handling', ['on', 'off'], ['propagated'])
+
+ # Whether there is support for asynchronous EH (e.g. catching SEGVs).
+ feature.feature ('asynch-exceptions', ['off', 'on'], ['propagated'])
+
+ # Whether all extern "C" functions are considered nothrow by default.
+ feature.feature ('extern-c-nothrow', ['off', 'on'], ['propagated'])
+
+ feature.feature ('debug-symbols', ['on', 'off'], ['propagated'])
+ feature.feature ('define', [], ['free'])
+ feature.feature ('undef', [], ['free'])
+ feature.feature ('include', [], ['free', 'path']) #order-sensitive
+ feature.feature ('cflags', [], ['free'])
+ feature.feature ('cxxflags', [], ['free'])
+ feature.feature ('asmflags', [], ['free'])
+ feature.feature ('linkflags', [], ['free'])
+ feature.feature ('archiveflags', [], ['free'])
+ feature.feature ('version', [], ['free'])
+
+ feature.feature ('location-prefix', [], ['free'])
+
+ feature.feature ('action', [], ['free'])
+
+
+ # The following features are incidental, since
+ # in themself they have no effect on build products.
+ # Not making them incidental will result in problems in corner
+ # cases, for example:
+ #
+ # unit-test a : a.cpp : <use>b ;
+ # lib b : a.cpp b ;
+ #
+ # Here, if <use> is not incidental, we'll decide we have two
+ # targets for a.obj with different properties, and will complain.
+ #
+ # Note that making feature incidental does not mean it's ignored. It may
+ # be ignored when creating the virtual target, but the rest of build process
+ # will use them.
+ feature.feature ('use', [], ['free', 'dependency', 'incidental'])
+ feature.feature ('dependency', [], ['free', 'dependency', 'incidental'])
+ feature.feature ('implicit-dependency', [], ['free', 'dependency', 'incidental'])
+
+ feature.feature('warnings', [
+ 'on', # Enable default/"reasonable" warning level for the tool.
+ 'all', # Enable all possible warnings issued by the tool.
+ 'off'], # Disable all warnings issued by the tool.
+ ['incidental', 'propagated'])
+
+ feature.feature('warnings-as-errors', [
+ 'off', # Do not fail the compilation if there are warnings.
+ 'on'], # Fail the compilation if there are warnings.
+ ['incidental', 'propagated'])
+
+ feature.feature('coverage', [
+ 'off', # Disable coverage generation for the tool.
+ 'on'], # Enable coverage generation for the tool.
+ ['incidental', 'propagated'])
+
+ feature.feature('c++-template-depth',
+ [str(i) for i in range(64,1024+1,64)] +
+ [str(i) for i in range(20,1000+1,10)] +
+ # Maximum template instantiation depth guaranteed for ANSI/ISO C++
+ # conforming programs.
+ ['17'],
+ ['incidental', 'optional', 'propagated'])
+
+ feature.feature ('source', [], ['free', 'dependency', 'incidental'])
+ feature.feature ('library', [], ['free', 'dependency', 'incidental'])
+ feature.feature ('file', [], ['free', 'dependency', 'incidental'])
+ feature.feature ('find-shared-library', [], ['free']) #order-sensitive ;
+ feature.feature ('find-static-library', [], ['free']) #order-sensitive ;
+ feature.feature ('library-path', [], ['free', 'path']) #order-sensitive ;
+ # Internal feature.
+ feature.feature ('library-file', [], ['free', 'dependency'])
+
+ feature.feature ('name', [], ['free'])
+ feature.feature ('tag', [], ['free'])
+ feature.feature ('search', [], ['free', 'path']) #order-sensitive ;
+ feature.feature ('location', [], ['free', 'path'])
+
+ feature.feature ('dll-path', [], ['free', 'path'])
+ feature.feature ('hardcode-dll-paths', ['true', 'false'], ['incidental'])
+
+
+ # This is internal feature which holds the paths of all dependency
+ # dynamic libraries. On Windows, it's needed so that we can all
+ # those paths to PATH, when running applications.
+ # On Linux, it's needed to add proper -rpath-link command line options.
+ feature.feature ('xdll-path', [], ['free', 'path'])
+
+ #provides means to specify def-file for windows dlls.
+ feature.feature ('def-file', [], ['free', 'dependency'])
+
+ # This feature is used to allow specific generators to run.
+ # For example, QT tools can only be invoked when QT library
+ # is used. In that case, <allow>qt will be in usage requirement
+ # of the library.
+ feature.feature ('allow', [], ['free'])
+
+ # The addressing model to generate code for. Currently a limited set only
+ # specifying the bit size of pointers.
+ feature.feature('address-model', ['16', '32', '64'], ['propagated', 'optional'])
+
+ # Type of CPU architecture to compile for.
+ feature.feature('architecture', [
+ # x86 and x86-64
+ 'x86',
+
+ # ia64
+ 'ia64',
+
+ # Sparc
+ 'sparc',
+
+ # RS/6000 & PowerPC
+ 'power',
+
+ # MIPS/SGI
+ 'mips1', 'mips2', 'mips3', 'mips4', 'mips32', 'mips32r2', 'mips64',
+
+ # HP/PA-RISC
+ 'parisc',
+
+ # Advanced RISC Machines
+ 'arm',
+
+ # z Systems (aka s390x)
+ 's390x',
+
+ # Combined architectures for platforms/toolsets that support building for
+ # multiple architectures at once. "combined" would be the default multi-arch
+ # for the toolset.
+ 'combined',
+ 'combined-x86-power'],
+
+ ['propagated', 'optional'])
+
+ # The specific instruction set in an architecture to compile.
+ feature.feature('instruction-set', [
+ # x86 and x86-64
+ 'native', 'i486', 'i586', 'i686', 'pentium', 'pentium-mmx', 'pentiumpro', 'pentium2', 'pentium3',
+ 'pentium3m', 'pentium-m', 'pentium4', 'pentium4m', 'prescott', 'nocona', 'core2', 'corei7', 'corei7-avx', 'core-avx-i',
+ 'conroe', 'conroe-xe', 'conroe-l', 'allendale', 'merom', 'merom-xe', 'kentsfield', 'kentsfield-xe', 'penryn', 'wolfdale',
+ 'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell', 'k6', 'k6-2', 'k6-3', 'athlon', 'athlon-tbird', 'athlon-4', 'athlon-xp',
+ 'athlon-mp', 'k8', 'opteron', 'athlon64', 'athlon-fx', 'k8-sse3', 'opteron-sse3', 'athlon64-sse3', 'amdfam10', 'barcelona',
+ 'bdver1', 'bdver2', 'bdver3', 'btver1', 'btver2', 'winchip-c6', 'winchip2', 'c3', 'c3-2', 'atom',
+
+ # ia64
+ 'itanium', 'itanium1', 'merced', 'itanium2', 'mckinley',
+
+ # Sparc
+ 'v7', 'cypress', 'v8', 'supersparc', 'sparclite', 'hypersparc', 'sparclite86x', 'f930', 'f934',
+ 'sparclet', 'tsc701', 'v9', 'ultrasparc', 'ultrasparc3',
+
+ # RS/6000 & PowerPC
+ '401', '403', '405', '405fp', '440', '440fp', '505', '601', '602',
+ '603', '603e', '604', '604e', '620', '630', '740', '7400',
+ '7450', '750', '801', '821', '823', '860', '970', '8540',
+ 'power-common', 'ec603e', 'g3', 'g4', 'g5', 'power', 'power2',
+ 'power3', 'power4', 'power5', 'powerpc', 'powerpc64', 'rios',
+ 'rios1', 'rsc', 'rios2', 'rs64a',
+
+ # MIPS
+ '4kc', '4kp', '5kc', '20kc', 'm4k', 'r2000', 'r3000', 'r3900', 'r4000',
+ 'r4100', 'r4300', 'r4400', 'r4600', 'r4650',
+ 'r6000', 'r8000', 'rm7000', 'rm9000', 'orion', 'sb1', 'vr4100',
+ 'vr4111', 'vr4120', 'vr4130', 'vr4300',
+ 'vr5000', 'vr5400', 'vr5500',
+
+ # HP/PA-RISC
+ '700', '7100', '7100lc', '7200', '7300', '8000',
+
+ # Advanced RISC Machines
+ 'armv2', 'armv2a', 'armv3', 'armv3m', 'armv4', 'armv4t', 'armv5',
+ 'armv5t', 'armv5te', 'armv6', 'armv6j', 'iwmmxt', 'ep9312',
+
+ # z Systems (aka s390x)
+ 'z196', 'zEC12', 'z13', 'z13', 'z14', 'z15'],
+
+ ['propagated', 'optional'])
+
+ feature.feature('conditional', [], ['incidental', 'free'])
+
+ # The value of 'no' prevents building of a target.
+ feature.feature('build', ['yes', 'no'], ['optional'])
+
+ # Windows-specific features
+ feature.feature ('user-interface', ['console', 'gui', 'wince', 'native', 'auto'], [])
+ feature.feature ('variant', [], ['implicit', 'composite', 'propagated', 'symmetric'])
+
+
+ variant ('debug', ['<optimization>off', '<debug-symbols>on', '<inlining>off', '<runtime-debugging>on'])
+ variant ('release', ['<optimization>speed', '<debug-symbols>off', '<inlining>full',
+ '<runtime-debugging>off', '<define>NDEBUG'])
+ variant ('profile', ['release'], ['<profiling>on', '<debug-symbols>on'])
+
+
+reset ()
+register_globals ()
+
+class SearchedLibTarget (virtual_target.AbstractFileTarget):
+ def __init__ (self, name, project, shared, search, action):
+ virtual_target.AbstractFileTarget.__init__ (self, name, 'SEARCHED_LIB', project, action)
+
+ self.shared_ = shared
+ self.search_ = search
+
+ def shared (self):
+ return self.shared_
+
+ def search (self):
+ return self.search_
+
+ def actualize_location (self, target):
+ bjam.call("NOTFILE", target)
+
+ def path (self):
+ #FIXME: several functions rely on this not being None
+ return ""
+
+
+class CScanner (scanner.Scanner):
+ def __init__ (self, includes):
+ scanner.Scanner.__init__ (self)
+
+ self.includes_ = []
+
+ for i in includes:
+ self.includes_.extend(i.split("&&"))
+
+ def pattern (self):
+ return r'#[ \t]*include[ ]*(<(.*)>|"(.*)")'
+
+ def process (self, target, matches, binding):
+ # since it's possible for this function to be called
+ # thousands to millions of times (depending on how many
+ # header files there are), as such, there are some
+ # optimizations that have been used here. Anything that
+ # is slightly out of the ordinary for Python code
+ # has been commented.
+ angle = []
+ quoted = []
+ for match in matches:
+ if '<' in match:
+ angle.append(match.strip('<>'))
+ elif '"' in match:
+ quoted.append(match.strip('"'))
+
+ g = id(self)
+ b = os.path.normpath(os.path.dirname(binding[0]))
+
+ # Attach binding of including file to included targets.
+ # When target is directly created from virtual target
+ # this extra information is unnecessary. But in other
+ # cases, it allows to distinguish between two headers of the
+ # same name included from different places.
+ # We don't need this extra information for angle includes,
+ # since they should not depend on including file (we can't
+ # get literal "." in include path).
+ # Note: string interpolation is slightly faster
+ # than .format()
+ g2 = '<%s#%s>' % (g, b)
+ g = "<%s>" % g
+
+ angle = [g + x for x in angle]
+ quoted = [g2 + x for x in quoted]
+
+ all = angle + quoted
+ bjam.call("mark-included", target, all)
+
+ # each include in self.includes_ looks something like this:
+ # <include>path/to/somewhere
+ # calling get_value(include) is super slow,
+ # calling .replace('<include>', '') is much faster
+ # however, i[9:] is the fastest way of stripping off the "<include>"
+ # substring.
+ include_paths = [i[9:] for i in self.includes_]
+
+ engine = get_manager().engine()
+ engine.set_target_variable(angle, "SEARCH", include_paths)
+ engine.set_target_variable(quoted, "SEARCH", [b] + include_paths)
+
+ # Just propagate current scanner to includes, in a hope
+ # that includes do not change scanners.
+ get_manager().scanners().propagate(self, all)
+
+scanner.register (CScanner, 'include')
+type.set_scanner ('CPP', CScanner)
+type.set_scanner ('C', CScanner)
+type.set_scanner('H', CScanner)
+type.set_scanner('HPP', CScanner)
+
+# Ported to trunk@47077
+class LibGenerator (generators.Generator):
+ """ The generator class for libraries (target type LIB). Depending on properties it will
+ request building of the approapriate specific type -- SHARED_LIB, STATIC_LIB or
+ SHARED_LIB.
+ """
+
+ def __init__(self, id, composing = True, source_types = [], target_types_and_names = ['LIB'], requirements = []):
+ generators.Generator.__init__(self, id, composing, source_types, target_types_and_names, requirements)
+
+ def run(self, project, name, prop_set, sources):
+ assert isinstance(project, targets.ProjectTarget)
+ assert isinstance(name, basestring) or name is None
+ assert isinstance(prop_set, property_set.PropertySet)
+ assert is_iterable_typed(sources, virtual_target.VirtualTarget)
+ # The lib generator is composing, and can be only invoked with
+ # explicit name. This check is present in generator.run (and so in
+ # builtin.LinkingGenerator), but duplicate it here to avoid doing
+ # extra work.
+ if name:
+ properties = prop_set.raw()
+ # Determine the needed target type
+ actual_type = None
+ properties_grist = get_grist(properties)
+ if '<source>' not in properties_grist and \
+ ('<search>' in properties_grist or '<name>' in properties_grist):
+ actual_type = 'SEARCHED_LIB'
+ elif '<file>' in properties_grist:
+ # The generator for
+ actual_type = 'LIB'
+ elif '<link>shared' in properties:
+ actual_type = 'SHARED_LIB'
+ else:
+ actual_type = 'STATIC_LIB'
+
+ prop_set = prop_set.add_raw(['<main-target-type>LIB'])
+
+ # Construct the target.
+ return generators.construct(project, name, actual_type, prop_set, sources)
+
+ def viable_source_types(self):
+ return ['*']
+
+generators.register(LibGenerator("builtin.lib-generator"))
+
+generators.override("builtin.prebuilt", "builtin.lib-generator")
+
+def lib(names, sources=[], requirements=[], default_build=[], usage_requirements=[]):
+ """The implementation of the 'lib' rule. Beyond standard syntax that rule allows
+ simplified: 'lib a b c ;'."""
+ assert is_iterable_typed(names, 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)
+ if len(names) > 1:
+ if any(r.startswith('<name>') for r in requirements):
+ get_manager().errors()("When several names are given to the 'lib' rule\n" +
+ "it is not allowed to specify the <name> feature.")
+
+ if sources:
+ get_manager().errors()("When several names are given to the 'lib' rule\n" +
+ "it is not allowed to specify sources.")
+
+ project = get_manager().projects().current()
+ result = []
+
+ for name in names:
+ r = requirements[:]
+
+ # Support " lib a ; " and " lib a b c ; " syntax.
+ if not sources and not any(r.startswith("<name>") for r in requirements) \
+ and not any(r.startswith("<file") for r in requirements):
+ r.append("<name>" + name)
+
+ result.append(targets.create_typed_metatarget(name, "LIB", sources,
+ r,
+ default_build,
+ usage_requirements))
+ return result
+
+get_manager().projects().add_rule("lib", lib)
+
+
+# Updated to trunk@47077
+class SearchedLibGenerator (generators.Generator):
+ def __init__ (self, id = 'SearchedLibGenerator', composing = False, source_types = [], target_types_and_names = ['SEARCHED_LIB'], requirements = []):
+ # TODO: the comment below looks strange. There are no requirements!
+ # The requirements cause the generators to be tried *only* when we're building
+ # lib target and there's 'search' feature. This seems ugly --- all we want
+ # is make sure SearchedLibGenerator is not invoked deep in transformation
+ # search.
+ generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+
+ def run(self, project, name, prop_set, sources):
+ assert isinstance(project, targets.ProjectTarget)
+ assert isinstance(name, basestring) or name is None
+ assert isinstance(prop_set, property_set.PropertySet)
+ assert is_iterable_typed(sources, virtual_target.VirtualTarget)
+
+ if not name:
+ return None
+
+ # If name is empty, it means we're called not from top-level.
+ # In this case, we just fail immediately, because SearchedLibGenerator
+ # cannot be used to produce intermediate targets.
+
+ properties = prop_set.raw ()
+ shared = '<link>shared' in properties
+
+ a = virtual_target.NullAction (project.manager(), prop_set)
+
+ real_name = feature.get_values ('<name>', properties)
+ if real_name:
+ real_name = real_name[0]
+ else:
+ real_name = name
+ search = feature.get_values('<search>', properties)
+ usage_requirements = property_set.create(['<xdll-path>' + p for p in search])
+ t = SearchedLibTarget(real_name, project, shared, search, a)
+
+ # We return sources for a simple reason. If there's
+ # lib png : z : <name>png ;
+ # the 'z' target should be returned, so that apps linking to
+ # 'png' will link to 'z', too.
+ return(usage_requirements, [b2.manager.get_manager().virtual_targets().register(t)] + sources)
+
+generators.register (SearchedLibGenerator ())
+
+class PrebuiltLibGenerator(generators.Generator):
+
+ def __init__(self, id, composing, source_types, target_types_and_names, requirements):
+ generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+
+ def run(self, project, name, properties, sources):
+ assert isinstance(project, targets.ProjectTarget)
+ assert isinstance(name, basestring)
+ assert isinstance(properties, property_set.PropertySet)
+ assert is_iterable_typed(sources, virtual_target.VirtualTarget)
+
+ f = properties.get("file")
+ return f + sources
+
+generators.register(PrebuiltLibGenerator("builtin.prebuilt", False, [],
+ ["LIB"], ["<file>"]))
+
+generators.override("builtin.prebuilt", "builtin.lib-generator")
+
+
+class CompileAction (virtual_target.Action):
+ def __init__ (self, manager, sources, action_name, prop_set):
+ virtual_target.Action.__init__ (self, manager, sources, action_name, prop_set)
+
+ def adjust_properties (self, prop_set):
+ """ For all virtual targets for the same dependency graph as self,
+ i.e. which belong to the same main target, add their directories
+ to include path.
+ """
+ assert isinstance(prop_set, property_set.PropertySet)
+ s = self.targets () [0].creating_subvariant ()
+
+ return prop_set.add_raw (s.implicit_includes ('include', 'H'))
+
+class CCompilingGenerator (generators.Generator):
+ """ Declare a special compiler generator.
+ The only thing it does is changing the type used to represent
+ 'action' in the constructed dependency graph to 'CompileAction'.
+ That class in turn adds additional include paths to handle a case
+ when a source file includes headers which are generated themselves.
+ """
+ def __init__ (self, id, composing, source_types, target_types_and_names, requirements):
+ # TODO: (PF) What to do with optional_properties? It seemed that, in the bjam version, the arguments are wrong.
+ generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+
+ def action_class (self):
+ return CompileAction
+
+def register_c_compiler (id, source_types, target_types, requirements, optional_properties = []):
+ g = CCompilingGenerator (id, False, source_types, target_types, requirements + optional_properties)
+ return generators.register (g)
+
+
+class LinkingGenerator (generators.Generator):
+ """ The generator class for handling EXE and SHARED_LIB creation.
+ """
+ def __init__ (self, id, composing, source_types, target_types_and_names, requirements):
+ generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+
+ def run (self, project, name, prop_set, sources):
+ assert isinstance(project, targets.ProjectTarget)
+ assert isinstance(name, basestring) or name is None
+ assert isinstance(prop_set, property_set.PropertySet)
+ assert is_iterable_typed(sources, virtual_target.VirtualTarget)
+
+ # create a copy since sources is being modified
+ sources = list(sources)
+ sources.extend(prop_set.get('<library>'))
+
+ # Add <library-path> properties for all searched libraries
+ extra = []
+ for s in sources:
+ if s.type () == 'SEARCHED_LIB':
+ search = s.search()
+ extra.extend(property.Property('<library-path>', sp) for sp in search)
+
+ # It's possible that we have libraries in sources which did not came
+ # from 'lib' target. For example, libraries which are specified
+ # just as filenames as sources. We don't have xdll-path properties
+ # for such target, but still need to add proper dll-path properties.
+ extra_xdll_path = []
+ for s in sources:
+ if type.is_derived (s.type (), 'SHARED_LIB') and not s.action ():
+ # Unfortunately, we don't have a good way to find the path
+ # to a file, so use this nasty approach.
+ p = s.project()
+ location = path.root(s.name(), p.get('source-location')[0])
+ extra_xdll_path.append(os.path.dirname(location))
+
+ # Hardcode DLL paths only when linking executables.
+ # Pros: do not need to relink libraries when installing.
+ # Cons: "standalone" libraries (plugins, python extensions) can not
+ # hardcode paths to dependent libraries.
+ if prop_set.get('<hardcode-dll-paths>') == ['true'] \
+ and type.is_derived(self.target_types_ [0], 'EXE'):
+ xdll_path = prop_set.get('<xdll-path>')
+ extra.extend(property.Property('<dll-path>', sp) \
+ for sp in extra_xdll_path)
+ extra.extend(property.Property('<dll-path>', sp) \
+ for sp in xdll_path)
+
+ if extra:
+ prop_set = prop_set.add_raw (extra)
+ result = generators.Generator.run(self, project, name, prop_set, sources)
+
+ if result:
+ ur = self.extra_usage_requirements(result, prop_set)
+ ur = ur.add(property_set.create(['<xdll-path>' + p for p in extra_xdll_path]))
+ else:
+ return None
+ return (ur, result)
+
+ def extra_usage_requirements (self, created_targets, prop_set):
+ assert is_iterable_typed(created_targets, virtual_target.VirtualTarget)
+ assert isinstance(prop_set, property_set.PropertySet)
+
+ result = property_set.empty ()
+ extra = []
+
+ # Add appropriate <xdll-path> usage requirements.
+ raw = prop_set.raw ()
+ if '<link>shared' in raw:
+ paths = []
+
+ # TODO: is it safe to use the current directory? I think we should use
+ # another mechanism to allow this to be run from anywhere.
+ pwd = os.getcwd()
+
+ for t in created_targets:
+ if type.is_derived(t.type(), 'SHARED_LIB'):
+ paths.append(path.root(path.make(t.path()), pwd))
+
+ extra += replace_grist(paths, '<xdll-path>')
+
+ # We need to pass <xdll-path> features that we've got from sources,
+ # because if shared library is built, exe which uses it must know paths
+ # to other shared libraries this one depends on, to be able to find them
+ # all at runtime.
+
+ # Just pass all features in property_set, it's theorically possible
+ # that we'll propagate <xdll-path> features explicitly specified by
+ # the user, but then the user's to blame for using internal feature.
+ values = prop_set.get('<xdll-path>')
+ extra += replace_grist(values, '<xdll-path>')
+
+ if extra:
+ result = property_set.create(extra)
+
+ return result
+
+ def generated_targets (self, sources, prop_set, project, name):
+ assert is_iterable_typed(sources, virtual_target.VirtualTarget)
+ assert isinstance(prop_set, property_set.PropertySet)
+ assert isinstance(project, targets.ProjectTarget)
+ assert isinstance(name, basestring)
+ # sources to pass to inherited rule
+ sources2 = []
+ # sources which are libraries
+ libraries = []
+
+ # Searched libraries are not passed as argument to linker
+ # but via some option. So, we pass them to the action
+ # via property.
+ fsa = []
+ fst = []
+ for s in sources:
+ if type.is_derived(s.type(), 'SEARCHED_LIB'):
+ n = s.name()
+ if s.shared():
+ fsa.append(n)
+
+ else:
+ fst.append(n)
+
+ else:
+ sources2.append(s)
+
+ add = []
+ if fsa:
+ add.append("<find-shared-library>" + '&&'.join(fsa))
+ if fst:
+ add.append("<find-static-library>" + '&&'.join(fst))
+
+ spawn = generators.Generator.generated_targets(self, sources2, prop_set.add_raw(add), project, name)
+ return spawn
+
+
+def register_linker(id, source_types, target_types, requirements):
+ g = LinkingGenerator(id, True, source_types, target_types, requirements)
+ generators.register(g)
+
+class ArchiveGenerator (generators.Generator):
+ """ The generator class for handling STATIC_LIB creation.
+ """
+ def __init__ (self, id, composing, source_types, target_types_and_names, requirements):
+ generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+
+ def run (self, project, name, prop_set, sources):
+ assert isinstance(project, targets.ProjectTarget)
+ assert isinstance(name, basestring) or name is None
+ assert isinstance(prop_set, property_set.PropertySet)
+ assert is_iterable_typed(sources, virtual_target.VirtualTarget)
+
+ # create a copy since this modifies the sources list
+ sources = list(sources)
+ sources.extend(prop_set.get('<library>'))
+
+ result = generators.Generator.run (self, project, name, prop_set, sources)
+
+ usage_requirements = []
+ link = prop_set.get('<link>')
+ if 'static' in link:
+ for t in sources:
+ if type.is_derived(t.type(), 'LIB'):
+ usage_requirements.append(property.Property('<library>', t))
+
+ usage_requirements = property_set.create(usage_requirements)
+
+ return usage_requirements, result
+
+
+def register_archiver(id, source_types, target_types, requirements):
+ g = ArchiveGenerator(id, True, source_types, target_types, requirements)
+ generators.register(g)
+
+class DummyGenerator(generators.Generator):
+ """Generator that accepts everything and produces nothing. Useful as a general
+ fallback for toolset-specific actions like PCH generation.
+ """
+ def run (self, project, name, prop_set, sources):
+ return (property_set.empty(), [])
+
+
+get_manager().projects().add_rule("variant", variant)
+
+import stage
+import symlink
+import message
diff --git a/src/boost/tools/build/src/tools/bzip2.jam b/src/boost/tools/build/src/tools/bzip2.jam
new file mode 100644
index 000000000..a6f8ee460
--- /dev/null
+++ b/src/boost/tools/build/src/tools/bzip2.jam
@@ -0,0 +1,279 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the bzip library
+#
+# After 'using bzip2', the following targets are available:
+#
+# /bzip2//bzip2 -- The bzip library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import make ;
+import os ;
+import print ;
+import property ;
+import property-set ;
+
+header = bzlib.h ;
+names = bz2 ;
+
+sources = blocksort.c bzlib.c compress.c crctable.c
+ decompress.c huffman.c randtable.c ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+# Initializes the bzip library.
+#
+# bzip can be configured either to use pre-existing binaries
+# or to build the library from source.
+#
+# Options for configuring a prebuilt bzip::
+#
+# <search>
+# The directory containing the bzip binaries.
+# <name>
+# Overrides the default library name.
+# <include>
+# The directory containing the bzip headers.
+#
+# If none of these options is specified, then the environmental
+# variables BZIP2_LIBRARY_PATH, BZIP2_NAME, and BZIP2_INCLUDE will
+# be used instead.
+#
+# Options for building bzip from source::
+#
+# <source>
+# The bzip source directory. Defaults to the environmental variable
+# BZIP2_SOURCE.
+# <tag>
+# A rule which computes the actual name of the compiled
+# libraries based on the build properties. Ignored
+# when using precompiled binaries.
+# <build-name>
+# The base name to use for the compiled library. Ignored
+# when using precompiled binaries.
+#
+# Examples::
+#
+# # Find bzip in the default system location
+# using bzip2 ;
+# # Build bzip from source
+# using bzip2 : 1.0.6 : <source>/home/sergey/src/bzip2-1.0.6 ;
+# # Find bzip in /usr/local
+# using bzip2 : 1.0.6
+# : <include>/usr/local/include <search>/usr/local/lib ;
+# # Build bzip from source for msvc and find
+# # prebuilt binaries for gcc.
+# using bzip2 : 1.0.6 : <source>C:/Devel/src/bzip2-1.0.6 : <toolset>msvc ;
+# using bzip2 : 1.0.6 : : <toolset>gcc ;
+#
+rule init (
+ version ?
+ # The bzip version (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the bzip target
+
+ : is-default ?
+ # Default configurations are only used when bzip
+ # has not yet been configured. This option is
+ # deprecated. A configuration will be treated
+ # as a default when none of <include>, <search>,
+ # <name>, and <source> are present.
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project bzip2 ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local source-path = [ feature.get-values <source> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+ local tag = [ feature.get-values <tag> : $(options) ] ;
+ local build-name = [ feature.get-values <build-name> : $(options) ] ;
+
+ if ! $(library-path) && ! $(include-path) && ! $(source-path) && ! $(library-name)
+ {
+ is-default = true ;
+ }
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ local no-build-from-source ;
+ # Ignore environmental BZIP2_SOURCE if this initialization
+ # requested to search for a specific pre-built library.
+ if $(library-path) || $(include-path) || $(library-name)
+ {
+ if $(source-path) || $(tag) || $(build-name)
+ {
+ errors.user-error "incompatible options for bzip2:"
+ [ property.select <search> <include> <name> : $(options) ] "and"
+ [ property.select <source> <tag> <build-name> : $(options) ] ;
+ }
+ }
+ else
+ {
+ source-path ?= [ os.environ BZIP2_SOURCE ] ;
+ if $(source-path)
+ {
+ source-path = [ path.root [ path.make $(source-path) ]
+ [ path.pwd ] ] ;
+ }
+ }
+
+ if $(.configured.$(condition))
+ {
+ if $(is-default)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [bzip2] bzip is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "bzip is already configured" ;
+ }
+ return ;
+ }
+ else if $(source-path)
+ {
+ build-name ?= bz2 ;
+ library-id = [ CALC $(library-id) + 1 ] ;
+ tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
+ if $(tag)
+ {
+ tag = [ indirect.make $(tag) : [ $(caller).project-module ] ] ;
+ }
+ sources = [ path.glob $(source-path) : $(sources) ] ;
+ def-file = [ path.glob $(source-path) : libbz2.def ] ;
+ if $(.debug)
+ {
+ ECHO "notice: [bzip2] Building bzip from source as $(build-name)" ;
+ if $(condition)
+ {
+ ECHO "notice: [bzip2] Condition" [ $(condition).raw ] ;
+ }
+ if $(sources)
+ {
+ ECHO "notice: [bzip2] found bzip source in $(source-path)" ;
+ }
+ else
+ {
+ ECHO "warning: [bzip2] could not find bzip source in $(source-path)" ;
+ }
+ }
+ local target ;
+ if $(sources)
+ {
+ if ! $(.def-file-target)
+ {
+ .def-file-target = [ targets.create-metatarget make-target-class
+ : $(.project) : libbz2.def : $(def-file)
+ : <action>@bzip2.make-bz2-def-file ]
+ ;
+ }
+ target = [ targets.create-typed-target LIB : $(.project)
+ : $(build-name).$(library-id)
+ : $(sources)
+ : $(requirements)
+ <tag>@$(tag)
+ <include>$(source-path)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <link>shared:<def-file>libbz2.def
+ :
+ : <include>$(source-path) ] ;
+ }
+
+ local mt = [ new ac-library bzip2 : $(.project) : $(condition) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ if $(target)
+ {
+ $(mt).set-target $(target) ;
+ }
+ targets.main-target-alternative $(mt) ;
+ }
+ else
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [bzip2] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [bzip2] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local mt = [ new ac-library bzip2 : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
+ }
+ .configured.$(condition) = true ;
+}
+
+if [ os.name ] = NT
+{
+ local rule read-file ( file )
+ {
+ return [ SPLIT_BY_CHARACTERS [ SHELL "type \"$(file:G=)\" 2>nul" ] : "\n" ] ;
+ }
+}
+else if [ os.name ] = VMS
+{
+ local rule read-file ( file )
+ {
+ return [ SPLIT_BY_CHARACTERS [ SHELL "PIPE TYPE $(file:W) 2>NL:" ] : "\n" ] ;
+ }
+}
+else
+{
+ local rule read-file ( file )
+ {
+ return [ SPLIT_BY_CHARACTERS [ SHELL "cat \"$(file:G=)\" 2>/dev/null" ] : "\n" ] ;
+ }
+}
+
+rule make-bz2-def-file ( target : source : properties * )
+{
+ print.output $(target) ;
+ for local line in [ read-file $(source) ]
+ {
+ if ! [ MATCH "(LIBRARY[ \t]+LIBBZ2)" : $(line) ]
+ {
+ print.text $(line) : yes ;
+ }
+ }
+}
diff --git a/src/boost/tools/build/src/tools/cast.jam b/src/boost/tools/build/src/tools/cast.jam
new file mode 100644
index 000000000..77a7710dd
--- /dev/null
+++ b/src/boost/tools/build/src/tools/cast.jam
@@ -0,0 +1,91 @@
+# Copyright 2005 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)
+
+# Defines main target 'cast', used to change type for target. For example, in Qt
+# library one wants two kinds of CPP files -- those that just compiled and those
+# that are passed via the MOC tool.
+#
+# This is done with:
+#
+# exe main : main.cpp [ cast _ moccable-cpp : widget.cpp ] ;
+#
+# B2 will assign target type CPP to both main.cpp and widget.cpp. Then,
+# the cast rule will change target type of widget.cpp to MOCCABLE-CPP, and Qt
+# support will run the MOC tool as part of the build process.
+#
+# At the moment, the 'cast' rule only works for non-derived (source) targets.
+#
+# TODO: The following comment is unclear or incorrect. Clean it up.
+# > Another solution would be to add a separate main target 'moc-them' that
+# > would moc all the passed sources, no matter what their type is, but I prefer
+# > cast, as defining a new target type + generator for that type is somewhat
+# > simpler than defining a main target rule.
+
+import "class" : new ;
+import project ;
+import property-set ;
+import targets ;
+import type ;
+
+
+class cast-target-class : typed-target
+{
+ import type ;
+
+ rule __init__ ( name : project : type : sources * : requirements * :
+ default-build * : usage-requirements * )
+ {
+ typed-target.__init__ $(name) : $(project) : $(type) : $(sources) :
+ $(requirements) : $(default-build) : $(usage-requirements) ;
+ }
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ local result ;
+ for local s in $(source-targets)
+ {
+ if ! [ class.is-a $(s) : file-target ]
+ {
+ import errors : user-error : errors.user-error ;
+ errors.user-error Source to the 'cast' rule is not a file! ;
+ }
+ if [ $(s).action ]
+ {
+ import errors : user-error : errors.user-error ;
+ errors.user-error Only non-derived target are allowed for
+ 'cast'. : when building [ full-name ] ;
+ }
+ local r = [ $(s).clone-with-different-type $(self.type) ] ;
+ result += [ virtual-target.register $(r) ] ;
+ }
+ return [ property-set.empty ] $(result) ;
+ }
+}
+
+
+rule cast ( name type : sources * : requirements * : default-build * :
+ usage-requirements * )
+{
+ local project = [ project.current ] ;
+
+ local real-type = [ type.type-from-rule-name $(type) ] ;
+ if ! $(real-type)
+ {
+ import errors ;
+ errors.user-error No type corresponds to the main target rule name
+ '$(type)' : "Hint: try a lowercase name" ;
+ }
+
+ targets.main-target-alternative [ new cast-target-class $(name) : $(project)
+ : $(real-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) ] ] ;
+}
+
+
+IMPORT $(__name__) : cast : : cast ;
diff --git a/src/boost/tools/build/src/tools/cast.py b/src/boost/tools/build/src/tools/cast.py
new file mode 100644
index 000000000..562ba7911
--- /dev/null
+++ b/src/boost/tools/build/src/tools/cast.py
@@ -0,0 +1,76 @@
+# Status: ported
+# Base revision: 64432.
+# Copyright 2005-2010 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)
+
+# Defines main target 'cast', used to change type for target. For example, in Qt
+# library one wants two kinds of CPP files -- those that just compiled and those
+# that are passed via the MOC tool.
+#
+# This is done with:
+#
+# exe main : main.cpp [ cast _ moccable-cpp : widget.cpp ] ;
+#
+# Boost.Build will assign target type CPP to both main.cpp and widget.cpp. Then,
+# the cast rule will change target type of widget.cpp to MOCCABLE-CPP, and Qt
+# support will run the MOC tool as part of the build process.
+#
+# At the moment, the 'cast' rule only works for non-derived (source) targets.
+#
+# TODO: The following comment is unclear or incorrect. Clean it up.
+# > Another solution would be to add a separate main target 'moc-them' that
+# > would moc all the passed sources, no matter what their type is, but I prefer
+# > cast, as defining a new target type + generator for that type is somewhat
+# > simpler than defining a main target rule.
+
+from b2.build import targets, virtual_target, property_set, type as type_
+
+from b2.manager import get_manager
+from b2.util import bjam_signature, is_iterable_typed
+
+
+class CastTargetClass(targets.TypedTarget):
+
+ def construct(self, name, source_targets, ps):
+ assert isinstance(name, basestring)
+ assert is_iterable_typed(source_targets, virtual_target.VirtualTarget)
+ assert isinstance(ps, property_set.PropertySet)
+
+ result = []
+ for s in source_targets:
+ if not isinstance(s, virtual_target.FileTarget):
+ get_manager().errors()("Source to the 'cast' metatager is not a file")
+
+ if s.action():
+ get_manager().errors()("Only non-derived targets allowed as sources for 'cast'.")
+
+
+ r = s.clone_with_different_type(self.type())
+ result.append(get_manager().virtual_targets().register(r))
+
+ return property_set.empty(), result
+
+
+@bjam_signature((["name", "type"], ["sources", "*"], ["requirements", "*"],
+ ["default_build", "*"], ["usage_requirements", "*"]))
+def cast(name, type, sources, requirements, default_build, usage_requirements):
+
+ from b2.manager import get_manager
+ t = get_manager().targets()
+
+ project = get_manager().projects().current()
+
+ real_type = type_.type_from_rule_name(type)
+ if not real_type:
+ real_type = type
+ return t.main_target_alternative(
+ CastTargetClass(name, project, real_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)))
+
+
+get_manager().projects().add_rule("cast", cast)
diff --git a/src/boost/tools/build/src/tools/clang-darwin.jam b/src/boost/tools/build/src/tools/clang-darwin.jam
new file mode 100644
index 000000000..11f62d298
--- /dev/null
+++ b/src/boost/tools/build/src/tools/clang-darwin.jam
@@ -0,0 +1,189 @@
+# Copyright Vladimir Prus 2004.
+# Copyright Noel Belcourt 2007.
+# 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 clang ;
+import feature : feature ;
+import os ;
+import toolset ;
+import toolset : flags ;
+import gcc ;
+import common ;
+import errors ;
+import generators ;
+
+feature.extend-subfeature toolset clang : platform : darwin ;
+
+toolset.inherit-generators clang-darwin
+ <toolset>clang <toolset-clang:platform>darwin
+ : gcc
+ # Don't inherit PCH generators. They were not tested, and probably
+ # don't work for this compiler.
+ : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
+ ;
+
+generators.override clang-darwin.prebuilt : builtin.lib-generator ;
+generators.override clang-darwin.prebuilt : builtin.prebuilt ;
+generators.override clang-darwin.searched-lib-generator : searched-lib-generator ;
+
+generators.register-c-compiler clang-darwin.compile.m : OBJECTIVE_C : OBJ : <toolset>clang <toolset-clang:platform>darwin ;
+generators.register-c-compiler clang-darwin.compile.mm : OBJECTIVE_CPP : OBJ : <toolset>clang <toolset-clang:platform>darwin ;
+
+toolset.inherit-rules clang-darwin : gcc ;
+toolset.inherit-flags clang-darwin : gcc
+ : <inlining>full
+ <architecture>x86/<address-model>32
+ <architecture>x86/<address-model>64
+ <lto>on/<lto-mode>full
+ <lto>on/<lto-mode>fat
+ ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Initializes the clang-darwin toolset
+# version in optional
+# name (default clang++) is used to invoke the specified clang compiler
+# compile and link options allow you to specify addition command line options for each version
+rule init ( version ? : command * : options * )
+{
+ command = [ common.get-invocation-command clang-darwin : clang++
+ : $(command) : /usr/bin /usr/local/bin ] ;
+
+ # Determine the version
+ local command-string = $(command:J=" ") ;
+ if $(command)
+ {
+ version ?= [ MATCH "version ([0-9]+[.][0-9]+)"
+ : [ SHELL "$(command-string) --version" ] ] ;
+ }
+
+ local condition = [ common.check-init-parameters clang
+ : version $(version) ] ;
+
+ common.handle-options clang-darwin : $(condition) : $(command) : $(options) ;
+ clang.init-cxxstd-flags clang-darwin : $(condition) : $(version) ;
+
+ # - Ranlib.
+ local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
+ toolset.flags clang-darwin.archive .RANLIB $(condition) : $(ranlib[1]) ;
+
+ # - Archive builder.
+ local archiver = [ feature.get-values <archiver> : $(options) ] ;
+ toolset.flags clang-darwin.archive .AR $(condition) : $(archiver[1]) ;
+}
+
+SPACE = " " ;
+
+toolset.flags clang-darwin.compile.m OPTIONS <mflags> ;
+toolset.flags clang-darwin.compile.mm OPTIONS <mflags> ;
+toolset.flags clang-darwin.compile.mm OPTIONS <mmflags> ;
+
+# Declare flags and action for compilation.
+
+# For clang, 'on' and 'full' are identical
+toolset.flags clang-darwin.compile OPTIONS <inlining>full : -Wno-inline ;
+
+# SJW 12/2017: Support for <flags> is widely inconsistent.
+# shouldn't this be handled by the common gcc?
+toolset.flags clang-darwin.compile OPTIONS <flags> ;
+
+# LTO
+toolset.flags clang-darwin.compile OPTIONS <lto>on/<lto-mode>thin : -flto=thin ;
+toolset.flags clang-darwin.link OPTIONS <lto>on/<lto-mode>thin : -flto=thin ;
+
+toolset.flags clang-darwin.compile OPTIONS <lto>on/<lto-mode>full : -flto=full ;
+toolset.flags clang-darwin.link OPTIONS <lto>on/<lto-mode>full : -flto=full ;
+
+# stdlib selection
+toolset.flags clang-darwin.compile OPTIONS <stdlib>gnu <stdlib>gnu11 : -stdlib=libstdc++ ;
+toolset.flags clang-darwin.link OPTIONS <stdlib>gnu <stdlib>gnu11 : -stdlib=libstdc++ ;
+
+toolset.flags clang-darwin.compile OPTIONS <stdlib>libc++ : -stdlib=libc++ ;
+toolset.flags clang-darwin.link OPTIONS <stdlib>libc++ : -stdlib=libc++ ;
+
+actions compile.c
+{
+ "$(CONFIG_COMMAND)" -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.m
+{
+ "$(CONFIG_COMMAND)" -x objective-c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.mm
+{
+ "$(CONFIG_COMMAND)" -x objective-c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+# Default value. Mostly for the sake of clang-linux
+# that inherits from gcc, but does not has the same
+# logic to set the .AR variable. We can put the same
+# logic in clang-linux, but that's hardly worth the trouble
+# as on Linux, 'ar' is always available.
+.AR = ar ;
+.RANLIB = ranlib -cs ;
+
+rule archive ( targets * : sources * : properties * )
+{
+ # Always remove archive and start again. Here's rationale from
+ # Andre Hentz:
+ #
+ # I had a file, say a1.c, that was included into liba.a.
+ # I moved a1.c to a2.c, updated my Jamfiles and rebuilt.
+ # My program was crashing with absurd errors.
+ # After some debugging I traced it back to the fact that a1.o was *still*
+ # in liba.a
+ #
+ # Rene Rivera:
+ #
+ # Originally removing the archive was done by splicing an RM
+ # onto the archive action. That makes archives fail to build on NT
+ # when they have many files because it will no longer execute the
+ # action directly and blow the line length limit. Instead we
+ # remove the file in a different action, just before the building
+ # of the archive.
+ #
+ local clean.a = $(targets[1])(clean) ;
+ TEMPORARY $(clean.a) ;
+ NOCARE $(clean.a) ;
+ LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
+ DEPENDS $(clean.a) : $(sources) ;
+ DEPENDS $(targets) : $(clean.a) ;
+ common.RmTemps $(clean.a) : $(targets) ;
+}
+
+actions piecemeal archive
+{
+ "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
+ "$(.RANLIB)" "$(<)"
+}
+
+# Declare actions for linking
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the 'link' action, since
+ # running N links in parallel is just slower.
+ JAM_SEMAPHORE on $(targets) = <s>clang-darwin-link-semaphore ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS)
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -single_module -dynamiclib -install_name "@rpath/$(<[1]:D=)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS)
+}
diff --git a/src/boost/tools/build/src/tools/clang-linux.jam b/src/boost/tools/build/src/tools/clang-linux.jam
new file mode 100644
index 000000000..13b34552c
--- /dev/null
+++ b/src/boost/tools/build/src/tools/clang-linux.jam
@@ -0,0 +1,223 @@
+# Copyright (c) 2003 Michael Stevens
+# Copyright (c) 2010-2011 Bryce Lelbach (blelbach@cct.lsu.edu, maintainer)
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import common ;
+import toolset ;
+import feature ;
+import toolset : flags ;
+
+import clang ;
+import gcc ;
+import common ;
+import errors ;
+import generators ;
+import type ;
+import numbers ;
+
+feature.extend-subfeature toolset clang : platform : linux ;
+
+toolset.inherit-generators clang-linux
+ <toolset>clang <toolset-clang:platform>linux : gcc
+ : gcc.mingw.link gcc.mingw.link.dll gcc.cygwin.link gcc.cygwin.link.dll ;
+generators.override clang-linux.prebuilt : builtin.lib-generator ;
+generators.override clang-linux.prebuilt : builtin.prebuilt ;
+generators.override clang-linux.searched-lib-generator : searched-lib-generator ;
+
+# Override default do-nothing generators.
+generators.override clang-linux.compile.c.pch : pch.default-c-pch-generator ;
+generators.override clang-linux.compile.c++.pch : pch.default-cpp-pch-generator ;
+
+type.set-generated-target-suffix PCH
+ : <toolset>clang <toolset-clang:platform>linux : pth ;
+
+toolset.inherit-rules clang-linux : gcc ;
+toolset.inherit-flags clang-linux : gcc
+ : <inlining>full
+ <threading>multi/<target-os>windows
+ <lto>on/<lto-mode>full
+ <lto>on/<lto-mode>fat
+ ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] {
+ .debug-configuration = true ;
+}
+
+rule init ( version ? : command * : options * ) {
+ command = [ common.get-invocation-command clang-linux : clang++
+ : $(command) ] ;
+
+ # Determine the version
+ if $(command) {
+ local command-string = \"$(command)\" ;
+ command-string = $(command-string:J=" ") ;
+ version ?= [ MATCH "version ([0-9.]+)"
+ : [ SHELL "$(command-string) --version" ] ] ;
+ }
+
+ local condition = [ common.check-init-parameters clang-linux
+ : version $(version) ] ;
+
+ common.handle-options clang-linux : $(condition) : $(command) : $(options) ;
+ clang.init-cxxstd-flags clang-linux : $(condition) : $(version) ;
+
+ # Support for gcc root as the backend, this is mainly useful for clang/gcc on Windows
+ # since on Linux gcc will be the default compiler already located on the PATH.
+ # On Windows it is possible to have multiple versions of mingw(-64)/gcc installed
+ # in different directories. The <root>option can be given so that the gcc backend
+ # can be found at runtime, while the $(command) can be a script that sets the
+ # PATH for both the clang directory and the backende gcc directory
+ # before calling clang++ when compiling/linking.
+
+ local root = [ feature.get-values <root> : $(options) ] ;
+
+ if $(root)
+ {
+ # On multilib 64-bit boxes, there are both 32-bit and 64-bit libraries
+ # and all must be added to LD_LIBRARY_PATH. The linker will pick the
+ # right onces. Note that we do not provide a clean way to build a 32-bit
+ # binary using a 64-bit compiler, but user can always pass -m32
+ # manually.
+ local lib_path = $(root)/bin $(root)/lib $(root)/lib32 $(root)/lib64 ;
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" using gcc libraries with clang"::" $(condition) "::" $(lib_path) ;
+ }
+ toolset.flags clang-linux.link RUN_PATH $(condition) : $(lib_path) ;
+ }
+
+ # - Ranlib.
+ local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
+ if ( ! $(ranlib) ) && $(root)
+ {
+ ranlib = $(root)/bin/ranlib ;
+ }
+ toolset.flags clang-linux.archive .RANLIB $(condition) : $(ranlib[1]) ;
+
+ # - Archive builder.
+ local archiver = [ feature.get-values <archiver> : $(options) ] ;
+ if ( ! $(archiver) ) && $(root)
+ {
+ archiver = $(root)/bin/ar ;
+ }
+ toolset.flags clang-linux.archive .AR $(condition) : $(archiver[1]) ;
+}
+
+###############################################################################
+# Flags
+
+# note: clang silently ignores some of these inlining options
+# For clang, 'on' and 'full' are identical.
+toolset.flags clang-linux.compile OPTIONS <inlining>full : -Wno-inline ;
+
+toolset.flags clang-linux.compile OPTIONS <threading>multi/<target-os>windows : -pthread ;
+toolset.flags clang-linux.link OPTIONS <threading>multi/<target-os>windows : -pthread ;
+
+# LTO
+toolset.flags clang-linux.compile OPTIONS <lto>on/<lto-mode>thin : -flto=thin ;
+toolset.flags clang-linux.link OPTIONS <lto>on/<lto-mode>thin : -flto=thin ;
+
+toolset.flags clang-linux.compile OPTIONS <lto>on/<lto-mode>full : -flto=full ;
+toolset.flags clang-linux.link OPTIONS <lto>on/<lto-mode>full : -flto=full ;
+
+# stdlib selection
+toolset.flags clang-linux.compile OPTIONS <stdlib>gnu <stdlib>gnu11 : -stdlib=libstdc++ ;
+toolset.flags clang-linux.link OPTIONS <stdlib>gnu <stdlib>gnu11 : -stdlib=libstdc++ ;
+
+toolset.flags clang-linux.compile OPTIONS <stdlib>libc++ : -stdlib=libc++ ;
+toolset.flags clang-linux.link OPTIONS <stdlib>libc++ : -stdlib=libc++ ;
+
+###############################################################################
+# C and C++ compilation
+
+rule compile.c++ ( targets * : sources * : properties * ) {
+ local pch-file = [ on $(<) return $(PCH_FILE) ] ;
+
+ if $(pch-file) {
+ DEPENDS $(<) : $(pch-file) ;
+ clang-linux.compile.c++.with-pch $(targets) : $(sources) ;
+ }
+ else {
+ clang-linux.compile.c++.without-pch $(targets) : $(sources) ;
+ }
+}
+
+actions compile.c++.without-pch {
+ "$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
+}
+
+actions compile.c++.with-pch bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pch -Xclang "$(PCH_FILE)" -o "$(<)" "$(>)"
+}
+
+rule compile.c ( targets * : sources * : properties * )
+{
+ local pch-file = [ on $(<) return $(PCH_FILE) ] ;
+
+ if $(pch-file) {
+ DEPENDS $(<) : $(pch-file) ;
+ clang-linux.compile.c.with-pch $(targets) : $(sources) ;
+ }
+ else {
+ clang-linux.compile.c.without-pch $(targets) : $(sources) ;
+ }
+}
+
+actions compile.c.without-pch
+{
+ "$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c.with-pch bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pch -Xclang "$(PCH_FILE)" -c -o "$(<)" "$(>)"
+}
+
+###############################################################################
+# PCH emission
+
+RM = [ common.rm-command ] ;
+
+rule compile.c++.pch ( targets * : sources * : properties * ) {
+}
+
+actions compile.c++.pch {
+ $(RM) -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pch -o "$(<)" "$(>)"
+}
+
+rule compile.c.pch ( targets * : sources * : properties * ) {
+}
+
+actions compile.c.pch
+{
+ $(RM) -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pch -o "$(<)" "$(>)"
+}
+
+###############################################################################
+# Linking
+
+SPACE = " " ;
+
+rule link ( targets * : sources * : properties * ) {
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>clang-linux-link-semaphore ;
+}
+
+actions link bind LIBRARIES {
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+}
+
+rule link.dll ( targets * : sources * : properties * ) {
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>clang-linux-link-semaphore ;
+}
+
+# Differ from 'link' above only by -shared.
+actions link.dll bind LIBRARIES {
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+}
+
diff --git a/src/boost/tools/build/src/tools/clang-vxworks.jam b/src/boost/tools/build/src/tools/clang-vxworks.jam
new file mode 100644
index 000000000..053f4fb55
--- /dev/null
+++ b/src/boost/tools/build/src/tools/clang-vxworks.jam
@@ -0,0 +1,128 @@
+# Copyright Brian Kuhl 2017.
+# 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 clang ;
+import feature : feature get-values ;
+import os ;
+import toolset ;
+import toolset : flags ;
+import gcc ;
+import common ;
+import errors ;
+import generators ;
+
+
+feature.extend-subfeature toolset clang : platform : vxworks ;
+
+toolset.inherit-generators clang-vxworks
+ <toolset>clang <toolset-clang:platform>vxworks
+ : gcc
+ # Don't inherit PCH generators. They were not tested, and probably
+ # don't work for this compiler.
+ : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
+ ;
+
+generators.override clang-vxworks.prebuilt : builtin.lib-generator ;
+generators.override clang-vxworks.prebuilt : builtin.prebuilt ;
+generators.override clang-vxworks.searched-lib-generator : searched-lib-generator ;
+
+
+toolset.inherit-rules clang-vxworks : gcc ;
+toolset.inherit-flags clang-vxworks : gcc
+ : <inlining>full
+ <architecture>x86/<address-model>32
+ <architecture>x86/<address-model>64
+ ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+# Initializes the clang-vxworks toolset
+# version in optional
+# compile and link options allow you to specify addition command line options for each version
+rule init ( version ? : command * : options * )
+{
+ command = [ common.get-invocation-command clang-vxworks : ccllvm
+ : $(command) ] ;
+
+ linker = [ get-values <linker> : $(options) ] ;
+ linker ?= ld ;
+
+ # Determine the version
+ local command-string = $(command:J=" ") ;
+ if $(command)
+ {
+ version ?= [ MATCH "^([0-9.]+)"
+ : [ SHELL "$(command-string) -dumpversion" ] ] ;
+ }
+
+ local condition = [ common.check-init-parameters clang-vxworks
+ : version $(version) ] ;
+
+ common.handle-options clang-vxworks : $(condition) : $(command) : $(options) ;
+
+ toolset.flags clang-vxworks.link .LD : $(linker) ;
+
+ # - Archive builder.
+ local archiver = [ feature.get-values <archiver> : $(options) ] ;
+ toolset.flags clang-vxworks.archive .AR $(condition) : $(archiver[1]) ;
+}
+
+SPACE = " " ;
+
+toolset.flags clang-vxworks.compile OPTIONS <cflags> ;
+toolset.flags clang-vxworks.compile.c++ OPTIONS <cxxflags> ;
+toolset.flags clang-vxworks.compile INCLUDES <include> ;
+
+# For clang, 'on' and 'full' are identical
+toolset.flags clang-vxworks.compile OPTIONS <inlining>full : -Wno-inline ;
+
+toolset.flags clang-vxworks.compile OPTIONS <flags> ;
+
+
+actions compile.c
+{
+ "$(CONFIG_COMMAND)" -x c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+
+
+# Default value. Mostly for the sake of clang-linux
+# that inherits from gcc, but does not has the same
+# logic to set the .AR variable. We can put the same
+# logic in clang-linux, but that's hardly worth the trouble
+# as on Linux, 'ar' is always available.
+.AR = ar ;
+
+
+actions piecemeal archive
+{
+ "$(.AR)" $(AROPTIONS) rcu "$(<)" "$(>)"
+}
+
+# Declare actions for linking
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the 'link' action, since
+ # running N links in parallel is just slower.
+ JAM_SEMAPHORE on $(targets) = <s>clang-vxworks-link-semaphore ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(.LD)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS)
+ }
+
+actions link.dll bind LIBRARIES
+{
+ "$(.LD)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) -fpic -shared -non-static
+}
diff --git a/src/boost/tools/build/src/tools/clang-win.jam b/src/boost/tools/build/src/tools/clang-win.jam
new file mode 100644
index 000000000..0e7a90332
--- /dev/null
+++ b/src/boost/tools/build/src/tools/clang-win.jam
@@ -0,0 +1,183 @@
+# Copyright Vladimir Prus 2004.
+# Copyright Peter Dimov 2018
+#
+# 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 common ;
+import errors ;
+import feature ;
+import clang ;
+import msvc ;
+import os ;
+import toolset ;
+import generators ;
+import path ;
+import regex ;
+
+feature.extend-subfeature toolset clang : platform : win ;
+
+toolset.inherit-generators clang-win <toolset>clang <toolset-clang:platform>win : msvc : msvc.compile.c.pch msvc.compile.c++.pch ;
+toolset.inherit-flags clang-win : msvc ;
+toolset.inherit-rules clang-win : msvc ;
+
+# Override default do-nothing generators.
+generators.override clang-win.compile.rc : rc.compile.resource ;
+generators.override clang-win.compile.mc : mc.compile ;
+
+if [ MATCH (--debug-(clang-(win-)?)?configuration) : [ modules.peek : ARGV ] ]
+{
+ local rule .notice ( messages * )
+ {
+ ECHO "notice: [clang-win]" $(messages) ;
+ }
+}
+else
+{
+ local rule .notice ( messages * )
+ {
+ }
+}
+
+# [ get-option archiver : 32 : $(options) ]
+#
+# returns <archiver-32>, or <archiver>
+
+local rule get-option ( option : addr : options * )
+{
+ local r = [ feature.get-values "<$(option)-$(addr)>" : $(options) ] ;
+ r ?= [ feature.get-values "<$(option)>" : $(options) ] ;
+ return $(r) ;
+}
+
+# init
+#
+# options:
+#
+# <assembler>ml.exe (or <assembler-32>, or <assembler-64>)
+# <archiver>lib.exe
+# <manifest-tool>mt.exe
+# <resource-compiler>rc.exe
+# <mc-compiler>mc.exe
+# <idl-compiler>midl.exe
+
+rule init ( version ? : command * : options * )
+{
+ command = [ common.get-invocation-command-nodefault clang-win : clang-cl.exe : $(command) ] ;
+
+ if ! $(command)
+ {
+ errors.error "Cannot configure toolset clang-win: no 'clang-cl.exe' command found or given" ;
+ }
+
+ local compiler = "\"$(command)\"" ;
+ compiler = "$(compiler:J= )" ;
+
+ version ?= [ MATCH "version ([0-9.]+)" : [ SHELL "$(compiler) -v 2>&1" ] ] ;
+
+ .notice "using compiler '$(compiler)', version '$(version)'" ;
+
+ local condition = [ common.check-init-parameters clang-win : version $(version) ] ;
+
+ common.handle-options clang-win : $(condition) : $(command) : $(options) ;
+
+ for local addr in 32 64
+ {
+ local config = [ SPLIT_BY_CHARACTERS [ SHELL "$(compiler) -m$(addr) -### foo.obj /link 2>&1" ] : "\n" ] ;
+
+ local match = 1 ;
+ local items ;
+
+ while $(match)
+ {
+ match = [ MATCH "^ *(\"[^\"]*\")(.*)" : $(config) ] ;
+
+ if $(match)
+ {
+ items += $(match[1]) ;
+ config = $(match[2]) ;
+ }
+ }
+
+ local ml ;
+
+ if $(items)
+ {
+ ml = [ regex.replace $(items[1]) "x64\\\\+link\\.exe" "x64\\ml64.exe" ] ;
+ ml = [ regex.replace $(ml) "x86\\\\+link\\.exe" "x86\\ml.exe" ] ;
+
+ if ! [ MATCH "(ml\\.exe)" "(ml64\\.exe)" : $(ml) ]
+ {
+ ml = ;
+ }
+ }
+
+ local assembler = [ get-option "assembler" : $(addr) : $(options) ] ;
+ assembler ?= $(ml) ;
+ if $(addr) = 32 { assembler ?= ml.exe ; } else { assembler ?= ml64.exe ; }
+
+ local link ;
+
+ if $(items)
+ {
+ link = [ regex.replace $(items[1]) "\\\\+HostX64\\\\+x86\\\\+" "\\HostX86\\x86\\" ] ;
+ }
+
+ local archiver = [ get-option "archiver" : $(addr) : $(options) ] ;
+
+ if $(link)
+ {
+ archiver ?= "$(link) /lib" ;
+ }
+ archiver ?= lib.exe ;
+
+ .notice "$(addr):" "using assembler '$(assembler)'" ;
+ .notice "$(addr):" "using archiver '$(archiver)'" ;
+
+ local manifest-tool = [ get-option "manifest-tool" : $(addr) : $(options) ] ;
+ local resource-compiler = [ get-option "resource-compiler" : $(addr) : $(options) ] ;
+ local mc-compiler = [ get-option "mc-compiler" : $(addr) : $(options) ] ;
+ local idl-compiler = [ get-option "idl-compiler" : $(addr) : $(options) ] ;
+
+ for local item in $(items)
+ {
+ match = [ MATCH "\"-libpath:(.*)\\\\+Lib\\\\.*\\\\um\\\\+x(.*)\"" : $(item) ] ;
+
+ if $(match)
+ {
+ local sdk-path = "$(match[1])\\bin\\x$(match[2])" ;
+ .notice "$(addr):" "using SDK path '$(sdk-path)'" ;
+
+ manifest-tool ?= "\"$(sdk-path)\\mt.exe\"" ;
+ resource-compiler ?= "\"$(sdk-path)\\rc.exe\"" ;
+ mc-compiler ?= "\"$(sdk-path)\\mc.exe\"" ;
+ idl-compiler ?= "\"$(sdk-path)\\midl.exe\"" ;
+ }
+ }
+
+ manifest-tool ?= mt.exe ;
+ resource-compiler ?= rc.exe ;
+ mc-compiler ?= mc.exe ;
+ idl-compiler ?= midl.exe ;
+
+ .notice "$(addr):" "using manifest-tool '$(manifest-tool)'" ;
+ .notice "$(addr):" "using resource-compiler '$(resource-compiler)'" ;
+ .notice "$(addr):" "using mc-compiler '$(mc-compiler)'" ;
+ .notice "$(addr):" "using idl-compiler '$(idl-compiler)'" ;
+
+ local cond = "$(condition)/<architecture>/<address-model>$(addr)" "$(condition)/<architecture>x86/<address-model>$(addr)" ;
+ if $(addr) = 32 { cond += "$(condition)/<architecture>/<address-model>" ; }
+
+ toolset.flags clang-win.compile .CC $(cond) : $(compiler) -m$(addr) ;
+ toolset.flags clang-win.link .LD $(cond) : $(compiler) -m$(addr) /link "/incremental:no" "/manifest" ;
+ toolset.flags clang-win.compile .ASM $(cond) : $(assembler) -nologo ;
+ toolset.flags clang-win.archive .LD $(cond) : $(archiver) /nologo ;
+ toolset.flags clang-win.link .MT $(cond) : $(manifest-tool) -nologo ;
+ toolset.flags clang-win.compile .MC $(cond) : $(mc-compiler) ;
+ toolset.flags clang-win.compile .RC $(cond) : $(resource-compiler) /nologo ;
+ toolset.flags clang-win.compile .IDL $(cond) : $(idl-compiler) ;
+ }
+
+ toolset.flags clang-win.link LIBRARY_OPTION <toolset>clang-win : "" : unchecked ;
+}
diff --git a/src/boost/tools/build/src/tools/clang.jam b/src/boost/tools/build/src/tools/clang.jam
new file mode 100644
index 000000000..bcb383703
--- /dev/null
+++ b/src/boost/tools/build/src/tools/clang.jam
@@ -0,0 +1,65 @@
+# 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 generic 'clang' toolset. Depending on the current system, it
+# forwards either to 'clang-linux' or 'clang-darwin' modules.
+
+import feature ;
+import os ;
+import toolset ;
+import sequence ;
+import regex ;
+import set ;
+
+feature.extend toolset : clang ;
+feature.subfeature toolset clang : platform : : propagated link-incompatible ;
+
+rule init ( * : * )
+{
+ if $(1) = win
+ {
+ toolset.using clang-win :
+ $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+ else if [ os.name ] = MACOSX
+ {
+ toolset.using clang-darwin :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+ else
+ {
+ toolset.using clang-linux :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+}
+
+
+local rule cxxstd-flags ( toolset : condition * : options * )
+{
+ toolset.flags $(toolset).compile.c++ OPTIONS $(condition) : $(options) : unchecked ;
+ toolset.flags $(toolset).link OPTIONS $(condition) : $(options) : unchecked ;
+}
+
+local rule version-ge ( lhs : rhs )
+{
+ lhs = [ regex.split $(lhs) "[.]" ] ;
+ rhs = [ regex.split $(rhs) "[.]" ] ;
+ return [ sequence.compare $(rhs) : $(lhs) : numbers.less ] ;
+}
+
+# Version specific flags
+rule init-cxxstd-flags ( toolset : condition * : version )
+{
+ local cxxstd = [ feature.values <cxxstd> ] ;
+ local dialects = [ feature.values <cxxstd-dialect> ] ;
+ dialects = [ set.difference $(dialects) : gnu iso ] ;
+ local std ;
+ if [ version-ge $(version) : 3.5 ] { std = 1z ; }
+ else if [ version-ge $(version) : 3.4 ] { std = 14 ; }
+ else if [ version-ge $(version) : 3.3 ] { std = 11 ; }
+ else { std = 03 ; }
+ cxxstd-flags $(toolset) : $(condition)/<cxxstd>latest/<cxxstd-dialect>iso : -std=c++$(std) ;
+ cxxstd-flags $(toolset) : $(condition)/<cxxstd>latest/<cxxstd-dialect>gnu : -std=gnu++$(std) ;
+ cxxstd-flags $(toolset) : $(condition)/<cxxstd>latest/<cxxstd-dialect>$(dialects) : -std=c++$(std) ;
+}
diff --git a/src/boost/tools/build/src/tools/common.jam b/src/boost/tools/build/src/tools/common.jam
new file mode 100644
index 000000000..005ac9c5d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/common.jam
@@ -0,0 +1,1095 @@
+# Copyright 2003, 2005 Dave Abrahams
+# Copyright 2005, 2006 Rene Rivera
+# Copyright 2005 Toon Knapen
+# Copyright 2002, 2003, 2004, 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)
+
+# Provides actions common to all toolsets, such as creating directories and
+# removing files.
+
+import os ;
+import modules ;
+import utility ;
+import print ;
+import type ;
+import feature ;
+import errors ;
+import path ;
+import sequence ;
+import toolset ;
+import virtual-target ;
+import numbers ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+if [ MATCH (--show-configuration) : [ modules.peek : ARGV ] ]
+{
+ .show-configuration = true ;
+}
+
+# Configurations
+#
+# The following class helps to manage toolset configurations. Each configuration
+# has a unique ID and one or more parameters. A typical example of a unique ID
+# is a condition generated by 'common.check-init-parameters' rule. Other kinds
+# of IDs can be used. Parameters may include any details about the configuration
+# like 'command', 'path', etc.
+#
+# A toolset configuration may be in one of the following states:
+#
+# - registered
+# Configuration has been registered (e.g. explicitly or by auto-detection
+# code) but has not yet been marked as used, i.e. 'toolset.using' rule has
+# not yet been called for it.
+# - used
+# Once called 'toolset.using' rule marks the configuration as 'used'.
+#
+# The main difference between the states above is that while a configuration is
+# 'registered' its options can be freely changed. This is useful in particular
+# for autodetection code - all detected configurations may be safely overwritten
+# by user code.
+
+class configurations
+{
+ import errors ;
+
+ rule __init__ ( )
+ {
+ }
+
+ # Registers a configuration.
+ #
+ # Returns 'true' if the configuration has been added and an empty value if
+ # it already exists. Reports an error if the configuration is 'used'.
+ #
+ rule register ( id )
+ {
+ if $(id) in $(self.used)
+ {
+ errors.error "common: the configuration '$(id)' is in use" ;
+ }
+
+ local retval ;
+
+ if ! $(id) in $(self.all)
+ {
+ self.all += $(id) ;
+
+ # Indicate that a new configuration has been added.
+ retval = true ;
+ }
+
+ return $(retval) ;
+ }
+
+ # Mark a configuration as 'used'.
+ #
+ # Returns 'true' if the state of the configuration has been changed to
+ # 'used' and an empty value if it the state has not been changed. Reports an
+ # error if the configuration is not known.
+ #
+ rule use ( id )
+ {
+ if ! $(id) in $(self.all)
+ {
+ errors.error "common: the configuration '$(id)' is not known" ;
+ }
+
+ local retval ;
+
+ if ! $(id) in $(self.used)
+ {
+ self.used += $(id) ;
+
+ # Indicate that the configuration has been marked as 'used'.
+ retval = true ;
+ }
+
+ return $(retval) ;
+ }
+
+ # Return all registered configurations.
+ #
+ rule all ( )
+ {
+ return $(self.all) ;
+ }
+
+ # Return all used configurations.
+ #
+ rule used ( )
+ {
+ return $(self.used) ;
+ }
+
+ # Returns the value of a configuration parameter.
+ #
+ rule get ( id : param )
+ {
+ return $(self.$(param).$(id)) ;
+ }
+
+ # Sets the value of a configuration parameter.
+ #
+ rule set ( id : param : value * )
+ {
+ self.$(param).$(id) = $(value) ;
+ }
+}
+
+
+# The rule for checking toolset parameters. Trailing parameters should all be
+# parameter name/value pairs. The rule will check that each parameter either has
+# a value in each invocation or has no value in each invocation. Also, the rule
+# will check that the combination of all parameter values is unique in all
+# invocations.
+#
+# Each parameter name corresponds to a subfeature. This rule will declare a
+# subfeature the first time a non-empty parameter value is passed and will
+# extend it with all the values.
+#
+# The return value from this rule is a condition to be used for flags settings.
+#
+rule check-init-parameters ( toolset requirement * : * )
+{
+ local sig = $(toolset) ;
+ local condition = <toolset>$(toolset) ;
+ local subcondition ;
+ for local index in 2 3 4 5 6 7 8 9
+ {
+ local name = $($(index)[1]) ;
+ local value = $($(index)[2]) ;
+
+ if $(value)-is-not-empty
+ {
+ condition = $(condition)-$(value) ;
+ if $(.had-unspecified-value.$(toolset).$(name))
+ {
+ errors.user-error
+ "$(toolset) initialization: parameter '$(name)'"
+ "inconsistent" : "no value was specified in earlier"
+ "initialization" : "an explicit value is specified now" ;
+ }
+ # The below logic is for intel compiler. It calls this rule with
+ # 'intel-linux' and 'intel-win' as toolset, so we need to get the
+ # base part of toolset name. We can not pass 'intel' as toolset
+ # because in that case it will be impossible to register versionless
+ # intel-linux and intel-win toolsets of a specific version.
+ local t = $(toolset) ;
+ local m = [ MATCH "([^-]*)-" : $(toolset) ] ;
+ if $(m)
+ {
+ t = $(m[1]) ;
+ }
+ if ! $(.had-value.$(toolset).$(name))
+ {
+ if ! $(.declared-subfeature.$(t).$(name))
+ {
+ feature.subfeature toolset $(t) : $(name) : : propagated ;
+ .declared-subfeature.$(t).$(name) = true ;
+ }
+ .had-value.$(toolset).$(name) = true ;
+ }
+ feature.extend-subfeature toolset $(t) : $(name) : $(value) ;
+ subcondition += <toolset-$(t):$(name)>$(value) ;
+ }
+ else
+ {
+ if $(.had-value.$(toolset).$(name))
+ {
+ errors.user-error
+ "$(toolset) initialization: parameter '$(name)'"
+ "inconsistent" : "an explicit value was specified in an"
+ "earlier initialization" : "no value is specified now" ;
+ }
+ .had-unspecified-value.$(toolset).$(name) = true ;
+ }
+ sig = $(sig)$(value:E="")- ;
+ }
+ # We also need to consider requirements on the toolset as we can
+ # configure the same toolset multiple times with different options that
+ # are selected with the requirements.
+ if $(requirement)
+ {
+ sig = $(sig)$(requirement:J=,) ;
+ }
+ if $(sig) in $(.all-signatures)
+ {
+ local message =
+ "duplicate initialization of $(toolset) with the following parameters: " ;
+ for local index in 2 3 4 5 6 7 8 9
+ {
+ local p = $($(index)) ;
+ if $(p)
+ {
+ message += "$(p[1]) = $(p[2]:E=<unspecified>)" ;
+ }
+ }
+ message += "previous initialization at $(.init-loc.$(sig))" ;
+ errors.user-error
+ $(message[1]) : $(message[2]) : $(message[3]) : $(message[4]) :
+ $(message[5]) : $(message[6]) : $(message[7]) : $(message[8]) ;
+ }
+ .all-signatures += $(sig) ;
+ .init-loc.$(sig) = [ errors.nearest-user-location ] ;
+
+ # If we have a requirement, this version should only be applied under that
+ # condition. To accomplish this we add a toolset requirement that imposes
+ # the toolset subcondition, which encodes the version.
+ if $(requirement)
+ {
+ local r = <toolset>$(toolset) $(requirement) ;
+ r = $(r:J=,) ;
+ toolset.add-requirements "$(r):$(subcondition)" ;
+ }
+
+ # We add the requirements, if any, to the condition to scope the toolset
+ # variables and options to this specific version.
+ condition += $(requirement) ;
+
+ if $(.show-configuration)
+ {
+ ECHO "notice:" $(condition) ;
+ }
+ return $(condition:J=/) ;
+}
+
+
+# A helper rule to get the command to invoke some tool. If
+# 'user-provided-command' is not given, tries to find binary named 'tool' in
+# PATH and in the passed 'additional-path'. Otherwise, verifies that the first
+# element of 'user-provided-command' is an existing program.
+#
+# This rule returns the command to be used when invoking the tool. If we can not
+# find the tool, a warning is issued. If 'path-last' is specified, PATH is
+# checked after 'additional-paths' when searching for 'tool'.
+#
+rule get-invocation-command-nodefault ( toolset : tool :
+ user-provided-command * : additional-paths * : path-last ? )
+{
+ local command ;
+ if ! $(user-provided-command)
+ {
+ command = [ find-tool $(tool) : $(additional-paths) : $(path-last) ] ;
+ if ! $(command) && $(.debug-configuration)
+ {
+ ECHO "warning:" toolset $(toolset) "initialization:" can not find tool
+ $(tool) ;
+ ECHO "warning:" initialized from [ errors.nearest-user-location ] ;
+ }
+ }
+ else
+ {
+ command = [ check-tool $(user-provided-command) ] ;
+ if ! $(command) && $(.debug-configuration)
+ {
+ ECHO "warning:" toolset $(toolset) "initialization:" ;
+ ECHO "warning:" can not find user-provided command
+ '$(user-provided-command)' ;
+ ECHO "warning:" initialized from [ errors.nearest-user-location ] ;
+ }
+ }
+
+ return $(command) ;
+}
+
+
+# Same as get-invocation-command-nodefault, except that if no tool is found,
+# returns either the user-provided-command, if present, or the 'tool' parameter.
+#
+rule get-invocation-command ( toolset : tool : user-provided-command * :
+ additional-paths * : path-last ? )
+{
+ local result = [ get-invocation-command-nodefault $(toolset) : $(tool) :
+ $(user-provided-command) : $(additional-paths) : $(path-last) ] ;
+
+ if ! $(result)
+ {
+ if $(user-provided-command)
+ {
+ result = $(user-provided-command) ;
+ }
+ else
+ {
+ result = $(tool) ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# Given an invocation command return the absolute path to the command. This
+# works even if command has no path element and was found on the PATH.
+#
+rule get-absolute-tool-path ( command )
+{
+ if $(command:D)
+ {
+ return $(command:D) ;
+ }
+ else
+ {
+ local m = [ GLOB [ modules.peek : PATH Path path ] : $(command)
+ $(command).exe ] ;
+ return $(m[1]:D) ;
+ }
+}
+
+
+# Attempts to find tool (binary) named 'name' in PATH and in 'additional-paths'.
+# If found in PATH, returns 'name' and if found in additional paths, returns
+# absolute name. If the tool is found in several directories, returns the first
+# path found. Otherwise, returns an empty string. If 'path-last' is specified,
+# PATH is searched after 'additional-paths'.
+#
+rule find-tool ( name : additional-paths * : path-last ? )
+{
+ if $(name:D)
+ {
+ return [ check-tool-aux $(name) ] ;
+ }
+ local path = [ path.programs-path ] ;
+ local match = [ path.glob $(path) : $(name) $(name).exe ] ;
+ local additional-match = [ path.glob $(additional-paths) : $(name)
+ $(name).exe ] ;
+
+ local result ;
+ if $(path-last)
+ {
+ result = $(additional-match) ;
+ if ! $(result) && $(match)
+ {
+ result = $(name) ;
+ }
+ }
+ else
+ {
+ if $(match)
+ {
+ result = $(name) ;
+ }
+ else
+ {
+ result = $(additional-match) ;
+ }
+ }
+ if $(result)
+ {
+ return [ path.native $(result[1]) ] ;
+ }
+}
+
+# Checks if 'command' can be found either in path or is a full name to an
+# existing file.
+#
+local rule check-tool-aux ( command )
+{
+ if $(command:D)
+ {
+ if [ path.exists $(command) ]
+ # Both NT and Cygwin will run .exe files by their unqualified names.
+ || ( [ os.on-windows ] && [ path.exists $(command).exe ] )
+ # Only NT will run .bat & .cmd files by their unqualified names.
+ || ( ( [ os.name ] = NT ) && ( [ path.exists $(command).bat ] ||
+ [ path.exists $(command).cmd ] ) )
+ {
+ return $(command) ;
+ }
+ }
+ else
+ {
+ if [ GLOB [ modules.peek : PATH Path path ] : $(command) ]
+ {
+ return $(command) ;
+ }
+ }
+}
+
+
+# Checks that a tool can be invoked by 'command'. If command is not an absolute
+# path, checks if it can be found in 'path'. If command is an absolute path,
+# check that it exists. Returns 'command' if ok or empty string otherwise.
+#
+local rule check-tool ( xcommand + )
+{
+ if [ check-tool-aux $(xcommand[1]) ] ||
+ [ check-tool-aux $(xcommand[-1]) ]
+ {
+ return $(xcommand) ;
+ }
+}
+
+
+# Handle common options for toolset, specifically sets the following flag
+# variables:
+# - CONFIG_COMMAND to $(command)
+# - OPTIONS for compile to the value of <compileflags> in $(options)
+# - OPTIONS for compile.c to the value of <cflags> in $(options)
+# - OPTIONS for compile.c++ to the value of <cxxflags> in $(options)
+# - OPTIONS for compile.asm to the value of <asmflags> in $(options)
+# - OPTIONS for compile.fortran to the value of <fflags> in $(options)
+# - OPTIONS for link to the value of <linkflags> in $(options)
+#
+rule handle-options ( toolset : condition * : command * : options * )
+{
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" will use '$(command)' for $(toolset), condition
+ $(condition:E=(empty)) ;
+ }
+
+ # The last parameter ('unchecked') says it is OK to set flags for another
+ # module.
+ toolset.flags $(toolset) CONFIG_COMMAND $(condition) : $(command)
+ : unchecked ;
+
+ toolset.flags $(toolset).compile OPTIONS $(condition) :
+ [ feature.get-values <compileflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.c OPTIONS $(condition) :
+ [ feature.get-values <cflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.c++ OPTIONS $(condition) :
+ [ feature.get-values <cxxflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.asm OPTIONS $(condition) :
+ [ feature.get-values <asmflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.fortran OPTIONS $(condition) :
+ [ feature.get-values <fflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).link OPTIONS $(condition) :
+ [ feature.get-values <linkflags> : $(options) ] : unchecked ;
+}
+
+
+# Returns the location of the "program files" directory on a Windows platform.
+#
+rule get-program-files-dir ( )
+{
+ local ProgramFiles = [ modules.peek : ProgramFiles ] ;
+ if $(ProgramFiles)
+ {
+ ProgramFiles = "$(ProgramFiles:J= )" ;
+ }
+ else
+ {
+ ProgramFiles = "c:\\Program Files" ;
+ }
+ return $(ProgramFiles) ;
+}
+
+
+if [ os.name ] = NT
+{
+ NULL_DEVICE = "NUL" ;
+ IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE) & setlocal" ;
+ RM = del /f /q ;
+ CP = copy /b ;
+ LN ?= $(CP) ;
+ # Ugly hack to convince copy to set the timestamp of the destination to the
+ # current time by concatenating the source with a nonexistent file. Note
+ # that this requires /b (binary) as the default when concatenating files is
+ # /a (ascii).
+ WINDOWS-CP-HACK = "+ this-file-does-not-exist-A698EE7806899E69" ;
+}
+else if [ os.name ] = VMS
+{
+ NULL_DEVICE = "NL:" ;
+ PIPE = PIPE ;
+ IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE)" ;
+ RM = DELETE /NOCONF ;
+ CP = COPY /OVERWRITE ;
+ LN = $(CP) ;
+}
+else
+{
+ NULL_DEVICE = "/dev/null" ;
+ IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE)" ;
+ RM = rm -f ;
+ CP = cp ;
+ LN = ln ;
+}
+
+NULL_OUT = ">$(NULL_DEVICE)" ;
+
+rule null-device ( )
+{
+ return $(NULL_DEVICE) ;
+}
+
+
+rule rm-command ( )
+{
+ return $(RM) ;
+}
+
+
+rule copy-command ( )
+{
+ return $(CP) ;
+}
+
+
+if "\n" = "n"
+{
+ # Escape characters not supported so use ugly hacks. Will not work on Cygwin
+ # - see below.
+ nl = "
+" ;
+ q = "" ;
+}
+else
+{
+ nl = "\n" ;
+ q = "\"" ;
+}
+
+
+rule newline-char ( )
+{
+ return $(nl) ;
+}
+
+
+# Returns the command needed to set an environment variable on the current
+# platform. The variable setting persists through all following commands and is
+# visible in the environment seen by subsequently executed commands. In other
+# words, on Unix systems, the variable is exported, which is consistent with the
+# only possible behavior on Windows systems.
+#
+rule variable-setting-command ( variable : value )
+{
+ if [ os.name ] = NT
+ {
+ return "set $(variable)=$(value)$(nl)" ;
+ }
+ else if [ os.name ] = VMS
+ {
+ return "$(variable) == $(q)$(value)$(q)$(nl)" ;
+ }
+ else
+ {
+ # If we do not have escape character support in bjam, the cod below
+ # blows up on CYGWIN, since the $(nl) variable holds a Windows new-line
+ # \r\n sequence that messes up the executed export command which then
+ # reports that the passed variable name is incorrect.
+ # But we have a check for cygwin in kernel/bootstrap.jam already.
+ return "$(variable)=$(q)$(value)$(q)$(nl)export $(variable)$(nl)" ;
+ }
+}
+
+
+# Returns a command to sets a named shell path variable to the given NATIVE
+# paths on the current platform.
+#
+rule path-variable-setting-command ( variable : paths * )
+{
+ local sep = [ os.path-separator ] ;
+ return [ variable-setting-command $(variable) : $(paths:J=$(sep)) ] ;
+}
+
+
+# Returns a command that prepends the given paths to the named path variable on
+# the current platform.
+#
+rule prepend-path-variable-command ( variable : paths * )
+{
+ return [ path-variable-setting-command $(variable)
+ : $(paths) [ os.expand-variable $(variable) ] ] ;
+}
+
+
+# Return a command which can create a file. If 'r' is result of invocation, then
+# 'r foobar' will create foobar with unspecified content. What happens if file
+# already exists is unspecified.
+#
+rule file-creation-command ( )
+{
+ if [ os.name ] = NT
+ {
+ # A few alternative implementations on Windows:
+ #
+ # 'type NUL >> '
+ # That would construct an empty file instead of a file containing
+ # a space and an end-of-line marker but it would also not change
+ # the target's timestamp in case the file already exists.
+ #
+ # 'type NUL > '
+ # That would construct an empty file instead of a file containing
+ # a space and an end-of-line marker but it would also destroy an
+ # already existing file by overwriting it with an empty one.
+ #
+ # I guess the best solution would be to allow Boost Jam to define
+ # built-in functions such as 'create a file', 'touch a file' or 'copy a
+ # file' which could be used from inside action code. That would allow
+ # completely portable operations without this kind of kludge.
+ # (22.02.2009.) (Jurko)
+ return "echo. > " ;
+ }
+ else if [ os.name ] = VMS
+ {
+ return "APPEND /NEW NL: " ;
+ }
+ else
+ {
+ return "touch " ;
+ }
+}
+
+
+# Returns a command that may be used for 'touching' files. It is not a real
+# 'touch' command on NT because it adds an empty line at the end of file but it
+# works with source files.
+#
+rule file-touch-command ( )
+{
+ if [ os.name ] = NT
+ {
+ return "echo. >> " ;
+ }
+ else if [ os.name ] = VMS
+ {
+ return "APPEND /NEW NL: " ;
+ }
+ else
+ {
+ return "touch " ;
+ }
+}
+
+
+rule MkDir
+{
+ # If dir exists, do not update it. Do this even for $(DOT).
+ NOUPDATE $(<) ;
+
+ if $(<) != $(DOT) && ! $($(<)-mkdir)
+ {
+ # Cheesy gate to prevent multiple invocations on same dir.
+ $(<)-mkdir = true ;
+
+ # Schedule the mkdir build action.
+ common.mkdir $(<) ;
+
+ # Prepare a Jam 'dirs' target that can be used to make the build only
+ # construct all the target directories.
+ DEPENDS dirs : $(<) ;
+
+ # Recursively create parent directories. $(<:P) = $(<)'s parent & we
+ # recurse until root.
+
+ local s = $(<:P) ;
+ if [ os.name ] = NT
+ {
+ switch $(s)
+ {
+ case "*:" : s = ;
+ case "*:\\" : s = ;
+ }
+ }
+
+ if $(s)
+ {
+ if $(s) != $(<)
+ {
+ DEPENDS $(<) : $(s) ;
+ MkDir $(s) ;
+ }
+ else
+ {
+ NOTFILE $(s) ;
+ }
+ }
+ }
+}
+
+
+#actions MkDir1
+#{
+# mkdir "$(<)"
+#}
+
+# The following quick-fix actions should be replaced using the original MkDir1
+# action once Boost Jam gets updated to correctly detect different paths leading
+# up to the same filesystem target and triggers their build action only once.
+# (todo) (04.07.2008.) (Jurko)
+
+if [ os.name ] = NT
+{
+ actions quietly mkdir
+ {
+ if not exist "$(<)\\" mkdir "$(<)"
+ }
+}
+else
+{
+ actions quietly mkdir
+ {
+ mkdir -p "$(<)"
+ }
+}
+
+
+actions piecemeal together existing Clean
+{
+ $(RM) "$(>)"
+}
+
+
+rule copy
+{
+}
+
+
+actions copy
+{
+ $(CP) "$(>)" $(WINDOWS-CP-HACK) "$(<)"
+}
+
+
+rule RmTemps
+{
+}
+
+
+actions quietly updated piecemeal together RmTemps
+{
+ $(RM) "$(>)" $(IGNORE)
+}
+
+
+actions hard-link
+{
+ $(RM) "$(<)" 2$(NULL_OUT) $(NULL_OUT)
+ $(LN) "$(>)" "$(<)" $(NULL_OUT)
+}
+
+
+if [ os.name ] = VMS
+{
+ actions mkdir
+ {
+ IF F$PARSE("$(<:W)") .EQS. "" THEN CREATE /DIR $(<:W)
+ }
+
+ actions piecemeal together existing Clean
+ {
+ $(RM) $(>:WJ=;*,);*
+ }
+
+ actions copy
+ {
+ $(CP) $(>:WJ=,) $(<:W)
+ }
+
+ actions quietly updated piecemeal together RmTemps
+ {
+ $(PIPE) $(RM) $(>:WJ=;*,);* $(IGNORE)
+ }
+
+ actions hard-link
+ {
+ $(PIPE) $(RM) $(>[1]:W);* $(IGNORE)
+ $(PIPE) $(LN) $(>[1]:W) $(<:W) $(NULL_OUT)
+ }
+}
+
+# Given a target, as given to a custom tag rule, returns a string formatted
+# according to the passed format. Format is a list of properties that is
+# represented in the result. For each element of format the corresponding target
+# information is obtained and added to the result string. For all, but the
+# literal, the format value is taken as the as string to prepend to the output
+# to join the item to the rest of the result. If not given "-" is used as a
+# joiner.
+#
+# The format options can be:
+#
+# <base>[joiner]
+# :: The basename of the target name.
+# <toolset>[joiner]
+# :: The abbreviated toolset tag being used to build the target.
+# <threading>[joiner]
+# :: Indication of a multi-threaded build.
+# <runtime>[joiner]
+# :: Collective tag of the build runtime.
+# <version:/version-feature | X.Y[.Z]/>[joiner]
+# :: Short version tag taken from the given "version-feature" in the
+# build properties. Or if not present, the literal value as the
+# version number.
+# <property:/property-name/>[joiner]
+# :: Direct lookup of the given property-name value in the build
+# properties. /property-name/ is a regular expression. E.g.
+# <property:toolset-.*:flavor> will match every toolset.
+# /otherwise/
+# :: The literal value of the format argument.
+#
+# For example this format:
+#
+# boost_ <base> <toolset> <threading> <runtime> <version:boost-version>
+#
+# Might return:
+#
+# boost_thread-vc80-mt-gd-1_33.dll, or
+# boost_regex-vc80-gd-1_33.dll
+#
+# The returned name also has the target type specific prefix and suffix which
+# puts it in a ready form to use as the value from a custom tag rule.
+#
+rule format-name ( format * : name : type ? : property-set )
+{
+ local result = "" ;
+ for local f in $(format)
+ {
+ switch $(f:G)
+ {
+ case <base> :
+ result += $(name:B) ;
+
+ case <toolset> :
+ result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) :
+ $(property-set) ] ] ;
+
+ case <threading> :
+ result += [ join-tag $(f:G=) : [ threading-tag $(name) : $(type)
+ : $(property-set) ] ] ;
+
+ case <runtime> :
+ result += [ join-tag $(f:G=) : [ runtime-tag $(name) : $(type) :
+ $(property-set) ] ] ;
+
+ case <qt> :
+ result += [ join-tag $(f:G=) : [ qt-tag $(name) : $(type) :
+ $(property-set) ] ] ;
+
+ case <address-model> :
+ result += [ join-tag $(f:G=) : [ address-model-tag $(name) :
+ $(type) : $(property-set) ] ] ;
+
+ case <arch-and-model> :
+ result += [ join-tag $(f:G=) : [ arch-and-model-tag $(name) :
+ $(type) : $(property-set) ] ] ;
+
+ case <version:*> :
+ local key = [ MATCH <version:(.*)> : $(f:G) ] ;
+ local version = [ $(property-set).get <$(key)> ] ;
+ version ?= $(key) ;
+ version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ] ;
+ result += [ join-tag $(f:G=) : $(version[1])_$(version[2]) ] ;
+
+ case <property:*> :
+ local key = [ MATCH <property:(.*)> : $(f:G) ] ;
+ local p0 = [ MATCH <($(key))> : [ $(property-set).raw ] ] ;
+ if $(p0)
+ {
+ local p = [ $(property-set).get <$(p0)> ] ;
+ if $(p)
+ {
+ result += [ join-tag $(f:G=) : $(p) ] ;
+ }
+ }
+
+ case * :
+ result += $(f:G=) ;
+ }
+ }
+ return [ virtual-target.add-prefix-and-suffix $(result:J=) : $(type) :
+ $(property-set) ] ;
+}
+
+
+local rule join-tag ( joiner ? : tag ? )
+{
+ if ! $(joiner) { joiner = - ; }
+ return $(joiner)$(tag) ;
+}
+
+
+local rule toolset-tag ( name : type ? : property-set )
+{
+ local tag = ;
+
+ local properties = [ $(property-set).raw ] ;
+ switch [ $(property-set).get <toolset> ]
+ {
+ case borland* : tag += bcb ;
+ case clang* :
+ {
+ switch [ $(property-set).get <toolset-clang:platform> ]
+ {
+ case darwin : tag += clang-darwin ;
+ case linux : tag += clang ;
+ case win : tag += clangw ;
+ }
+ }
+ case como* : tag += como ;
+ case cw : tag += cw ;
+ case darwin* : tag += xgcc ;
+ case edg* : tag += edg ;
+ case gcc* :
+ {
+ switch [ $(property-set).get <target-os> ]
+ {
+ case *windows* : tag += mgw ;
+ case * : tag += gcc ;
+ }
+ }
+ case intel :
+ if [ $(property-set).get <toolset-intel:platform> ] = win
+ {
+ tag += iw ;
+ }
+ else
+ {
+ tag += il ;
+ }
+ case kcc* : tag += kcc ;
+ case kylix* : tag += bck ;
+ #case metrowerks* : tag += cw ;
+ #case mingw* : tag += mgw ;
+ case mipspro* : tag += mp ;
+ case msvc* : tag += vc ;
+ case qcc* : tag += qcc ;
+ case sun* : tag += sw ;
+ case tru64cxx* : tag += tru ;
+ case vacpp* : tag += xlc ;
+ }
+ local version = [ MATCH "<toolset.*version>([0123456789]+)[.]?([0123456789]*)"
+ : $(properties) ] ;
+ # For historical reasons, vc6.0 and vc7.0 use different naming.
+ if $(tag) = vc
+ {
+ if $(version[1]) = 6
+ {
+ # Cancel minor version.
+ version = 6 ;
+ }
+ else if $(version[1]) = 7 && $(version[2]) = 0
+ {
+ version = 7 ;
+ }
+ }
+
+ # From GCC 5, versioning changes and minor becomes patch
+ if ( $(tag) = gcc || $(tag) = mgw ) && $(version[1]) && [ numbers.less 4 $(version[1]) ]
+ {
+ version = $(version[1]) ;
+ }
+
+ # Ditto, from Clang 4
+ if ( $(tag) = clang || $(tag) = clangw ) && $(version[1]) && [ numbers.less 3 $(version[1]) ]
+ {
+ version = $(version[1]) ;
+ }
+
+ # On intel, version is not added, because it does not matter and it is the
+ # version of vc used as backend that matters. Ideally, we should encode the
+ # backend version but that would break compatibility with V1.
+ if $(tag) = iw
+ {
+ version = ;
+ }
+
+ # On borland, version is not added for compatibility with V1.
+ if $(tag) = bcb
+ {
+ version = ;
+ }
+
+ tag += $(version) ;
+
+ return $(tag:J=) ;
+}
+
+
+local rule threading-tag ( name : type ? : property-set )
+{
+ if <threading>multi in [ $(property-set).raw ]
+ {
+ return mt ;
+ }
+}
+
+
+local rule runtime-tag ( name : type ? : property-set )
+{
+ local tag = ;
+
+ local properties = [ $(property-set).raw ] ;
+ if <runtime-link>static in $(properties) { tag += s ; }
+
+ # This is an ugly thing. In V1, there is code to automatically detect which
+ # properties affect a target. So, if <runtime-debugging> does not affect gcc
+ # toolset, the tag rules will not even see <runtime-debugging>. Similar
+ # functionality in V2 is not implemented yet, so we just check for toolsets
+ # known to care about runtime debugging.
+ if ( <toolset>msvc in $(properties) ) ||
+ ( <stdlib>stlport in $(properties) ) ||
+ ( <toolset-intel:platform>win in $(properties) )
+ {
+ if <runtime-debugging>on in $(properties) { tag += g ; }
+ }
+
+ if <python-debugging>on in $(properties) { tag += y ; }
+ if <variant>debug in $(properties) { tag += d ; }
+ if <stdlib>stlport in $(properties) { tag += p ; }
+ if <stdlib-stlport:iostream>hostios in $(properties) { tag += n ; }
+
+ return $(tag:J=) ;
+}
+
+
+# Create a tag for the Qt library version
+# "<qt>4.6.0" will result in tag "qt460"
+local rule qt-tag ( name : type ? : property-set )
+{
+ local v = [ MATCH "([0123456789]+)[.]?([0123456789]*)[.]?([0123456789]*)" :
+ [ $(property-set).get <qt> ] ] ;
+ return qt$(v:J=) ;
+}
+
+
+# Create a tag for the address-model
+# <address-model>64 will simply generate "64"
+local rule address-model-tag ( name : type ? : property-set )
+{
+ return [ $(property-set).get <address-model> ] ;
+}
+
+# Create a tag for the architecture and model
+# <architecture>x86 <address-model>32 would generate "x32"
+# This relies on the fact that all architectures start with
+# unique letters.
+local rule arch-and-model-tag ( name : type ? : property-set )
+{
+ local architecture = [ $(property-set).get <architecture> ] ;
+ local address-model = [ $(property-set).get <address-model> ] ;
+
+ local arch = [ MATCH ^(.) : $(architecture) ] ;
+
+ return $(arch)$(address-model) ;
+}
+
+rule __test__ ( )
+{
+ import assert ;
+
+ local save-os = [ modules.peek os : .name ] ;
+
+ modules.poke os : .name : LINUX ;
+ assert.result "PATH=\"foo:bar:baz\"\nexport PATH\n"
+ : path-variable-setting-command PATH : foo bar baz ;
+ assert.result "PATH=\"foo:bar:$PATH\"\nexport PATH\n"
+ : prepend-path-variable-command PATH : foo bar ;
+
+ modules.poke os : .name : NT ;
+ assert.result "set PATH=foo;bar;baz\n"
+ : path-variable-setting-command PATH : foo bar baz ;
+ assert.result "set PATH=foo;bar;%PATH%\n"
+ : prepend-path-variable-command PATH : foo bar ;
+
+ modules.poke os : .name : $(save-os) ;
+}
diff --git a/src/boost/tools/build/src/tools/common.py b/src/boost/tools/build/src/tools/common.py
new file mode 100644
index 000000000..8f6cbfff1
--- /dev/null
+++ b/src/boost/tools/build/src/tools/common.py
@@ -0,0 +1,860 @@
+# Status: being ported by Steven Watanabe
+# Base revision: 47174
+#
+# 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.
+
+""" Provides actions common to all toolsets, such as creating directories and
+ removing files.
+"""
+
+import re
+import bjam
+import os
+import os.path
+import sys
+
+# for some reason this fails on Python 2.7(r27:82525)
+# from b2.build import virtual_target
+import b2.build.virtual_target
+from b2.build import feature, type
+from b2.util.utility import *
+from b2.util import path, is_iterable_typed
+
+__re__before_first_dash = re.compile ('([^-]*)-')
+
+def reset ():
+ """ Clear the module state. This is mainly for testing purposes.
+ Note that this must be called _after_ resetting the module 'feature'.
+ """
+ global __had_unspecified_value, __had_value, __declared_subfeature
+ global __init_loc
+ global __all_signatures, __debug_configuration, __show_configuration
+
+ # Stores toolsets without specified initialization values.
+ __had_unspecified_value = {}
+
+ # Stores toolsets with specified initialization values.
+ __had_value = {}
+
+ # Stores toolsets with declared subfeatures.
+ __declared_subfeature = {}
+
+ # Stores all signatures of the toolsets.
+ __all_signatures = {}
+
+ # Stores the initialization locations of each toolset
+ __init_loc = {}
+
+ __debug_configuration = '--debug-configuration' in bjam.variable('ARGV')
+ __show_configuration = '--show-configuration' in bjam.variable('ARGV')
+
+ global __executable_path_variable
+ OS = bjam.call("peek", [], "OS")[0]
+ if OS == "NT":
+ # On Windows the case and capitalization of PATH is not always predictable, so
+ # let's find out what variable name was really set.
+ for n in os.environ:
+ if n.lower() == "path":
+ __executable_path_variable = n
+ break
+ else:
+ __executable_path_variable = "PATH"
+
+ m = {"NT": __executable_path_variable,
+ "CYGWIN": "PATH",
+ "MACOSX": "DYLD_LIBRARY_PATH",
+ "AIX": "LIBPATH",
+ "HAIKU": "LIBRARY_PATH"}
+ global __shared_library_path_variable
+ __shared_library_path_variable = m.get(OS, "LD_LIBRARY_PATH")
+
+reset()
+
+def shared_library_path_variable():
+ return __shared_library_path_variable
+
+# ported from trunk@47174
+class Configurations(object):
+ """
+ This class helps to manage toolset configurations. Each configuration
+ has a unique ID and one or more parameters. A typical example of a unique ID
+ is a condition generated by 'common.check-init-parameters' rule. Other kinds
+ of IDs can be used. Parameters may include any details about the configuration
+ like 'command', 'path', etc.
+
+ A toolset configuration may be in one of the following states:
+
+ - registered
+ Configuration has been registered (e.g. by autodetection code) but has
+ not yet been marked as used, i.e. 'toolset.using' rule has not yet been
+ called for it.
+ - used
+ Once called 'toolset.using' rule marks the configuration as 'used'.
+
+ The main difference between the states above is that while a configuration is
+ 'registered' its options can be freely changed. This is useful in particular
+ for autodetection code - all detected configurations may be safely overwritten
+ by user code.
+ """
+
+ def __init__(self):
+ self.used_ = set()
+ self.all_ = set()
+ self.params_ = {}
+
+ def register(self, id):
+ """
+ Registers a configuration.
+
+ Returns True if the configuration has been added and False if
+ it already exists. Reports an error if the configuration is 'used'.
+ """
+ assert isinstance(id, basestring)
+ if id in self.used_:
+ #FIXME
+ errors.error("common: the configuration '$(id)' is in use")
+
+ if id not in self.all_:
+ self.all_.add(id)
+
+ # Indicate that a new configuration has been added.
+ return True
+ else:
+ return False
+
+ def use(self, id):
+ """
+ Mark a configuration as 'used'.
+
+ Returns True if the state of the configuration has been changed to
+ 'used' and False if it the state wasn't changed. Reports an error
+ if the configuration isn't known.
+ """
+ assert isinstance(id, basestring)
+ if id not in self.all_:
+ #FIXME:
+ errors.error("common: the configuration '$(id)' is not known")
+
+ if id not in self.used_:
+ self.used_.add(id)
+
+ # indicate that the configuration has been marked as 'used'
+ return True
+ else:
+ return False
+
+ def all(self):
+ """ Return all registered configurations. """
+ return self.all_
+
+ def used(self):
+ """ Return all used configurations. """
+ return self.used_
+
+ def get(self, id, param):
+ """ Returns the value of a configuration parameter. """
+ assert isinstance(id, basestring)
+ assert isinstance(param, basestring)
+ return self.params_.get(param, {}).get(id)
+
+ def set (self, id, param, value):
+ """ Sets the value of a configuration parameter. """
+ assert isinstance(id, basestring)
+ assert isinstance(param, basestring)
+ assert is_iterable_typed(value, basestring)
+ self.params_.setdefault(param, {})[id] = value
+
+# Ported from trunk@47174
+def check_init_parameters(toolset, requirement, *args):
+ """ The rule for checking toolset parameters. Trailing parameters should all be
+ parameter name/value pairs. The rule will check that each parameter either has
+ a value in each invocation or has no value in each invocation. Also, the rule
+ will check that the combination of all parameter values is unique in all
+ invocations.
+
+ Each parameter name corresponds to a subfeature. This rule will declare a
+ subfeature the first time a non-empty parameter value is passed and will
+ extend it with all the values.
+
+ The return value from this rule is a condition to be used for flags settings.
+ """
+ assert isinstance(toolset, basestring)
+ assert is_iterable_typed(requirement, basestring) or requirement is None
+ from b2.build import toolset as b2_toolset
+ if requirement is None:
+ requirement = []
+ sig = toolset
+ condition = replace_grist(toolset, '<toolset>')
+ subcondition = []
+
+ for arg in args:
+ assert(isinstance(arg, tuple))
+ assert(len(arg) == 2)
+ name = arg[0]
+ value = arg[1]
+ assert(isinstance(name, str))
+ assert(isinstance(value, str) or value is None)
+
+ str_toolset_name = str((toolset, name))
+
+ # FIXME: is this the correct translation?
+ ### if $(value)-is-not-empty
+ if value is not None:
+ condition = condition + '-' + value
+ if str_toolset_name in __had_unspecified_value:
+ raise BaseException("'%s' initialization: parameter '%s' inconsistent\n" \
+ "no value was specified in earlier initialization\n" \
+ "an explicit value is specified now" % (toolset, name))
+
+ # The logic below is for intel compiler. It calls this rule
+ # with 'intel-linux' and 'intel-win' as toolset, so we need to
+ # get the base part of toolset name.
+ # We can't pass 'intel' as toolset, because it that case it will
+ # be impossible to register versionles intel-linux and
+ # intel-win of specific version.
+ t = toolset
+ m = __re__before_first_dash.match(toolset)
+ if m:
+ t = m.group(1)
+
+ if str_toolset_name not in __had_value:
+ if str((t, name)) not in __declared_subfeature:
+ feature.subfeature('toolset', t, name, [], ['propagated'])
+ __declared_subfeature[str((t, name))] = True
+
+ __had_value[str_toolset_name] = True
+
+ feature.extend_subfeature('toolset', t, name, [value])
+ subcondition += ['<toolset-' + t + ':' + name + '>' + value ]
+
+ else:
+ if str_toolset_name in __had_value:
+ raise BaseException ("'%s' initialization: parameter '%s' inconsistent\n" \
+ "an explicit value was specified in an earlier initialization\n" \
+ "no value is specified now" % (toolset, name))
+
+ __had_unspecified_value[str_toolset_name] = True
+
+ if value == None: value = ''
+
+ sig = sig + value + '-'
+
+ # if a requirement is specified, the signature should be unique
+ # with that requirement
+ if requirement:
+ sig += '-' + '-'.join(requirement)
+
+ if sig in __all_signatures:
+ message = "duplicate initialization of '%s' with the following parameters: " % toolset
+
+ for arg in args:
+ name = arg[0]
+ value = arg[1]
+ if value == None: value = '<unspecified>'
+
+ message += "'%s' = '%s'\n" % (name, value)
+
+ raise BaseException(message)
+
+ __all_signatures[sig] = True
+ # FIXME
+ __init_loc[sig] = "User location unknown" #[ errors.nearest-user-location ] ;
+
+ # If we have a requirement, this version should only be applied under that
+ # condition. To accomplish this we add a toolset requirement that imposes
+ # the toolset subcondition, which encodes the version.
+ if requirement:
+ r = ['<toolset>' + toolset] + requirement
+ r = ','.join(r)
+ b2_toolset.add_requirements([r + ':' + c for c in subcondition])
+
+ # We add the requirements, if any, to the condition to scope the toolset
+ # variables and options to this specific version.
+ condition = [condition]
+ if requirement:
+ condition += requirement
+
+ if __show_configuration:
+ print "notice:", condition
+ return ['/'.join(condition)]
+
+# Ported from trunk@47077
+def get_invocation_command_nodefault(
+ toolset, tool, user_provided_command=[], additional_paths=[], path_last=False):
+ """
+ A helper rule to get the command to invoke some tool. If
+ 'user-provided-command' is not given, tries to find binary named 'tool' in
+ PATH and in the passed 'additional-path'. Otherwise, verifies that the first
+ element of 'user-provided-command' is an existing program.
+
+ This rule returns the command to be used when invoking the tool. If we can't
+ find the tool, a warning is issued. If 'path-last' is specified, PATH is
+ checked after 'additional-paths' when searching for 'tool'.
+ """
+ assert isinstance(toolset, basestring)
+ assert isinstance(tool, basestring)
+ assert is_iterable_typed(user_provided_command, basestring)
+ assert is_iterable_typed(additional_paths, basestring) or additional_paths is None
+ assert isinstance(path_last, (int, bool))
+
+ if not user_provided_command:
+ command = find_tool(tool, additional_paths, path_last)
+ if not command and __debug_configuration:
+ print "warning: toolset", toolset, "initialization: can't find tool, tool"
+ #FIXME
+ #print "warning: initialized from" [ errors.nearest-user-location ] ;
+ else:
+ command = check_tool(user_provided_command)
+ if not command and __debug_configuration:
+ print "warning: toolset", toolset, "initialization:"
+ print "warning: can't find user-provided command", user_provided_command
+ #FIXME
+ #ECHO "warning: initialized from" [ errors.nearest-user-location ]
+ command = []
+ if command:
+ command = ' '.join(command)
+
+ return command
+
+# ported from trunk@47174
+def get_invocation_command(toolset, tool, user_provided_command = [],
+ additional_paths = [], path_last = False):
+ """ Same as get_invocation_command_nodefault, except that if no tool is found,
+ returns either the user-provided-command, if present, or the 'tool' parameter.
+ """
+ assert isinstance(toolset, basestring)
+ assert isinstance(tool, basestring)
+ assert is_iterable_typed(user_provided_command, basestring)
+ assert is_iterable_typed(additional_paths, basestring) or additional_paths is None
+ assert isinstance(path_last, (int, bool))
+
+ result = get_invocation_command_nodefault(toolset, tool,
+ user_provided_command,
+ additional_paths,
+ path_last)
+
+ if not result:
+ if user_provided_command:
+ result = user_provided_command[0]
+ else:
+ result = tool
+
+ assert(isinstance(result, str))
+
+ return result
+
+# ported from trunk@47281
+def get_absolute_tool_path(command):
+ """
+ Given an invocation command,
+ return the absolute path to the command. This works even if command
+ has not path element and is present in PATH.
+ """
+ assert isinstance(command, basestring)
+ if os.path.dirname(command):
+ return os.path.dirname(command)
+ else:
+ programs = path.programs_path()
+ m = path.glob(programs, [command, command + '.exe' ])
+ if not len(m):
+ if __debug_configuration:
+ print "Could not find:", command, "in", programs
+ return None
+ return os.path.dirname(m[0])
+
+# ported from trunk@47174
+def find_tool(name, additional_paths = [], path_last = False):
+ """ Attempts to find tool (binary) named 'name' in PATH and in
+ 'additional-paths'. If found in path, returns 'name'. If
+ found in additional paths, returns full name. If the tool
+ is found in several directories, returns the first path found.
+ Otherwise, returns the empty string. If 'path_last' is specified,
+ path is checked after 'additional_paths'.
+ """
+ assert isinstance(name, basestring)
+ assert is_iterable_typed(additional_paths, basestring)
+ assert isinstance(path_last, (int, bool))
+
+ programs = path.programs_path()
+ match = path.glob(programs, [name, name + '.exe'])
+ additional_match = path.glob(additional_paths, [name, name + '.exe'])
+
+ result = []
+ if path_last:
+ result = additional_match
+ if not result and match:
+ result = match
+
+ else:
+ if match:
+ result = match
+
+ elif additional_match:
+ result = additional_match
+
+ if result:
+ return path.native(result[0])
+ else:
+ return ''
+
+#ported from trunk@47281
+def check_tool_aux(command):
+ """ Checks if 'command' can be found either in path
+ or is a full name to an existing file.
+ """
+ assert isinstance(command, basestring)
+ dirname = os.path.dirname(command)
+ if dirname:
+ if os.path.exists(command):
+ return command
+ # Both NT and Cygwin will run .exe files by their unqualified names.
+ elif on_windows() and os.path.exists(command + '.exe'):
+ return command
+ # Only NT will run .bat files by their unqualified names.
+ elif os_name() == 'NT' and os.path.exists(command + '.bat'):
+ return command
+ else:
+ paths = path.programs_path()
+ if path.glob(paths, [command]):
+ return command
+
+# ported from trunk@47281
+def check_tool(command):
+ """ Checks that a tool can be invoked by 'command'.
+ If command is not an absolute path, checks if it can be found in 'path'.
+ If command is absolute path, check that it exists. Returns 'command'
+ if ok and empty string otherwise.
+ """
+ assert is_iterable_typed(command, basestring)
+ #FIXME: why do we check the first and last elements????
+ if check_tool_aux(command[0]) or check_tool_aux(command[-1]):
+ return command
+
+# ported from trunk@47281
+def handle_options(tool, condition, command, options):
+ """ Handle common options for toolset, specifically sets the following
+ flag variables:
+ - CONFIG_COMMAND to 'command'
+ - OPTIOns for compile to the value of <compileflags> in options
+ - OPTIONS for compile.c to the value of <cflags> in options
+ - OPTIONS for compile.c++ to the value of <cxxflags> in options
+ - OPTIONS for compile.asm to the value of <asmflags> in options
+ - OPTIONS for compile.fortran to the value of <fflags> in options
+ - OPTIONs for link to the value of <linkflags> in options
+ """
+ from b2.build import toolset
+
+ assert isinstance(tool, basestring)
+ assert is_iterable_typed(condition, basestring)
+ assert command and isinstance(command, basestring)
+ assert is_iterable_typed(options, basestring)
+ toolset.flags(tool, 'CONFIG_COMMAND', condition, [command])
+ toolset.flags(tool + '.compile', 'OPTIONS', condition, feature.get_values('<compileflags>', options))
+ toolset.flags(tool + '.compile.c', 'OPTIONS', condition, feature.get_values('<cflags>', options))
+ toolset.flags(tool + '.compile.c++', 'OPTIONS', condition, feature.get_values('<cxxflags>', options))
+ toolset.flags(tool + '.compile.asm', 'OPTIONS', condition, feature.get_values('<asmflags>', options))
+ toolset.flags(tool + '.compile.fortran', 'OPTIONS', condition, feature.get_values('<fflags>', options))
+ toolset.flags(tool + '.link', 'OPTIONS', condition, feature.get_values('<linkflags>', options))
+
+# ported from trunk@47281
+def get_program_files_dir():
+ """ returns the location of the "program files" directory on a windows
+ platform
+ """
+ ProgramFiles = bjam.variable("ProgramFiles")
+ if ProgramFiles:
+ ProgramFiles = ' '.join(ProgramFiles)
+ else:
+ ProgramFiles = "c:\\Program Files"
+ return ProgramFiles
+
+# ported from trunk@47281
+def rm_command():
+ return __RM
+
+# ported from trunk@47281
+def copy_command():
+ return __CP
+
+# ported from trunk@47281
+def variable_setting_command(variable, value):
+ """
+ Returns the command needed to set an environment variable on the current
+ platform. The variable setting persists through all following commands and is
+ visible in the environment seen by subsequently executed commands. In other
+ words, on Unix systems, the variable is exported, which is consistent with the
+ only possible behavior on Windows systems.
+ """
+ assert isinstance(variable, basestring)
+ assert isinstance(value, basestring)
+
+ if os_name() == 'NT':
+ return "set " + variable + "=" + value + os.linesep
+ else:
+ # (todo)
+ # The following does not work on CYGWIN and needs to be fixed. On
+ # CYGWIN the $(nl) variable holds a Windows new-line \r\n sequence that
+ # messes up the executed export command which then reports that the
+ # passed variable name is incorrect. This is most likely due to the
+ # extra \r character getting interpreted as a part of the variable name.
+ #
+ # Several ideas pop to mind on how to fix this:
+ # * One way would be to separate the commands using the ; shell
+ # command separator. This seems like the quickest possible
+ # solution but I do not know whether this would break code on any
+ # platforms I I have no access to.
+ # * Another would be to not use the terminating $(nl) but that would
+ # require updating all the using code so it does not simply
+ # prepend this variable to its own commands.
+ # * I guess the cleanest solution would be to update Boost Jam to
+ # allow explicitly specifying \n & \r characters in its scripts
+ # instead of always relying only on the 'current OS native newline
+ # sequence'.
+ #
+ # Some code found to depend on this behaviour:
+ # * This Boost Build module.
+ # * __test__ rule.
+ # * path-variable-setting-command rule.
+ # * python.jam toolset.
+ # * xsltproc.jam toolset.
+ # * fop.jam toolset.
+ # (todo) (07.07.2008.) (Jurko)
+ #
+ # I think that this works correctly in python -- Steven Watanabe
+ return variable + "=" + value + os.linesep + "export " + variable + os.linesep
+
+def path_variable_setting_command(variable, paths):
+ """
+ Returns a command to sets a named shell path variable to the given NATIVE
+ paths on the current platform.
+ """
+ assert isinstance(variable, basestring)
+ assert is_iterable_typed(paths, basestring)
+ sep = os.path.pathsep
+ return variable_setting_command(variable, sep.join(paths))
+
+def prepend_path_variable_command(variable, paths):
+ """
+ Returns a command that prepends the given paths to the named path variable on
+ the current platform.
+ """
+ assert isinstance(variable, basestring)
+ assert is_iterable_typed(paths, basestring)
+ return path_variable_setting_command(
+ variable, paths + [expand_variable(variable)])
+
+
+def expand_variable(variable):
+ """Produce a string that expands the shell variable."""
+ if os.name == 'nt':
+ return '%{}%'.format(variable)
+ return '${%s}' % variable
+
+
+def file_creation_command():
+ """
+ Return a command which can create a file. If 'r' is result of invocation, then
+ 'r foobar' will create foobar with unspecified content. What happens if file
+ already exists is unspecified.
+ """
+ if os_name() == 'NT':
+ return "echo. > "
+ else:
+ return "touch "
+
+#FIXME: global variable
+__mkdir_set = set()
+__re_windows_drive = re.compile(r'^.*:\$')
+
+def mkdir(engine, target):
+ assert isinstance(target, basestring)
+ # If dir exists, do not update it. Do this even for $(DOT).
+ bjam.call('NOUPDATE', target)
+
+ global __mkdir_set
+
+ # FIXME: Where is DOT defined?
+ #if $(<) != $(DOT) && ! $($(<)-mkdir):
+ if target != '.' and target not in __mkdir_set:
+ # Cheesy gate to prevent multiple invocations on same dir.
+ __mkdir_set.add(target)
+
+ # Schedule the mkdir build action.
+ engine.set_update_action("common.MkDir", target, [])
+
+ # Prepare a Jam 'dirs' target that can be used to make the build only
+ # construct all the target directories.
+ engine.add_dependency('dirs', target)
+
+ # Recursively create parent directories. $(<:P) = $(<)'s parent & we
+ # recurse until root.
+
+ s = os.path.dirname(target)
+ if os_name() == 'NT':
+ if(__re_windows_drive.match(s)):
+ s = ''
+
+ if s:
+ if s != target:
+ engine.add_dependency(target, s)
+ mkdir(engine, s)
+ else:
+ bjam.call('NOTFILE', s)
+
+__re_version = re.compile(r'^([^.]+)[.]([^.]+)[.]?([^.]*)')
+
+def format_name(format, name, target_type, prop_set):
+ """ Given a target, as given to a custom tag rule, returns a string formatted
+ according to the passed format. Format is a list of properties that is
+ represented in the result. For each element of format the corresponding target
+ information is obtained and added to the result string. For all, but the
+ literal, the format value is taken as the as string to prepend to the output
+ to join the item to the rest of the result. If not given "-" is used as a
+ joiner.
+
+ The format options can be:
+
+ <base>[joiner]
+ :: The basename of the target name.
+ <toolset>[joiner]
+ :: The abbreviated toolset tag being used to build the target.
+ <threading>[joiner]
+ :: Indication of a multi-threaded build.
+ <runtime>[joiner]
+ :: Collective tag of the build runtime.
+ <version:/version-feature | X.Y[.Z]/>[joiner]
+ :: Short version tag taken from the given "version-feature"
+ in the build properties. Or if not present, the literal
+ value as the version number.
+ <property:/property-name/>[joiner]
+ :: Direct lookup of the given property-name value in the
+ build properties. /property-name/ is a regular expression.
+ e.g. <property:toolset-.*:flavor> will match every toolset.
+ /otherwise/
+ :: The literal value of the format argument.
+
+ For example this format:
+
+ boost_ <base> <toolset> <threading> <runtime> <version:boost-version>
+
+ Might return:
+
+ boost_thread-vc80-mt-gd-1_33.dll, or
+ boost_regex-vc80-gd-1_33.dll
+
+ The returned name also has the target type specific prefix and suffix which
+ puts it in a ready form to use as the value from a custom tag rule.
+ """
+ if __debug__:
+ from ..build.property_set import PropertySet
+ assert is_iterable_typed(format, basestring)
+ assert isinstance(name, basestring)
+ assert isinstance(target_type, basestring)
+ assert isinstance(prop_set, PropertySet)
+ # assert(isinstance(prop_set, property_set.PropertySet))
+ if type.is_derived(target_type, 'LIB'):
+ result = "" ;
+ for f in format:
+ grist = get_grist(f)
+ if grist == '<base>':
+ result += os.path.basename(name)
+ elif grist == '<toolset>':
+ result += join_tag(get_value(f),
+ toolset_tag(name, target_type, prop_set))
+ elif grist == '<threading>':
+ result += join_tag(get_value(f),
+ threading_tag(name, target_type, prop_set))
+ elif grist == '<runtime>':
+ result += join_tag(get_value(f),
+ runtime_tag(name, target_type, prop_set))
+ elif grist.startswith('<version:'):
+ key = grist[len('<version:'):-1]
+ version = prop_set.get('<' + key + '>')
+ if not version:
+ version = key
+ version = __re_version.match(version)
+ result += join_tag(get_value(f), version[1] + '_' + version[2])
+ elif grist.startswith('<property:'):
+ key = grist[len('<property:'):-1]
+ property_re = re.compile('<(' + key + ')>')
+ p0 = None
+ for prop in prop_set.raw():
+ match = property_re.match(prop)
+ if match:
+ p0 = match[1]
+ break
+ if p0:
+ p = prop_set.get('<' + p0 + '>')
+ if p:
+ assert(len(p) == 1)
+ result += join_tag(ungrist(f), p)
+ else:
+ result += f
+
+ result = b2.build.virtual_target.add_prefix_and_suffix(
+ ''.join(result), target_type, prop_set)
+ return result
+
+def join_tag(joiner, tag):
+ assert isinstance(joiner, basestring)
+ assert isinstance(tag, basestring)
+ if tag:
+ if not joiner: joiner = '-'
+ return joiner + tag
+ return ''
+
+__re_toolset_version = re.compile(r"<toolset.*version>(\d+)[.](\d*)")
+
+def toolset_tag(name, target_type, prop_set):
+ if __debug__:
+ from ..build.property_set import PropertySet
+ assert isinstance(name, basestring)
+ assert isinstance(target_type, basestring)
+ assert isinstance(prop_set, PropertySet)
+ tag = ''
+
+ properties = prop_set.raw()
+ tools = prop_set.get('<toolset>')
+ assert(len(tools) == 1)
+ tools = tools[0]
+ if tools.startswith('borland'): tag += 'bcb'
+ elif tools.startswith('como'): tag += 'como'
+ elif tools.startswith('cw'): tag += 'cw'
+ elif tools.startswith('darwin'): tag += 'xgcc'
+ elif tools.startswith('edg'): tag += 'edg'
+ elif tools.startswith('gcc'):
+ flavor = prop_set.get('<toolset-gcc:flavor>')
+ ''.find
+ if flavor.find('mingw') != -1:
+ tag += 'mgw'
+ else:
+ tag += 'gcc'
+ elif tools == 'intel':
+ if prop_set.get('<toolset-intel:platform>') == ['win']:
+ tag += 'iw'
+ else:
+ tag += 'il'
+ elif tools.startswith('kcc'): tag += 'kcc'
+ elif tools.startswith('kylix'): tag += 'bck'
+ #case metrowerks* : tag += cw ;
+ #case mingw* : tag += mgw ;
+ elif tools.startswith('mipspro'): tag += 'mp'
+ elif tools.startswith('msvc'): tag += 'vc'
+ elif tools.startswith('sun'): tag += 'sw'
+ elif tools.startswith('tru64cxx'): tag += 'tru'
+ elif tools.startswith('vacpp'): tag += 'xlc'
+
+ for prop in properties:
+ match = __re_toolset_version.match(prop)
+ if(match):
+ version = match
+ break
+ version_string = None
+ # For historical reasons, vc6.0 and vc7.0 use different naming.
+ if tag == 'vc':
+ if version.group(1) == '6':
+ # Cancel minor version.
+ version_string = '6'
+ elif version.group(1) == '7' and version.group(2) == '0':
+ version_string = '7'
+
+ # On intel, version is not added, because it does not matter and it's the
+ # version of vc used as backend that matters. Ideally, we'd encode the
+ # backend version but that would break compatibility with V1.
+ elif tag == 'iw':
+ version_string = ''
+
+ # On borland, version is not added for compatibility with V1.
+ elif tag == 'bcb':
+ version_string = ''
+
+ if version_string is None:
+ version = version.group(1) + version.group(2)
+
+ tag += version
+
+ return tag
+
+
+def threading_tag(name, target_type, prop_set):
+ if __debug__:
+ from ..build.property_set import PropertySet
+ assert isinstance(name, basestring)
+ assert isinstance(target_type, basestring)
+ assert isinstance(prop_set, PropertySet)
+ tag = ''
+ properties = prop_set.raw()
+ if '<threading>multi' in properties: tag = 'mt'
+
+ return tag
+
+
+def runtime_tag(name, target_type, prop_set ):
+ if __debug__:
+ from ..build.property_set import PropertySet
+ assert isinstance(name, basestring)
+ assert isinstance(target_type, basestring)
+ assert isinstance(prop_set, PropertySet)
+ tag = ''
+
+ properties = prop_set.raw()
+ if '<runtime-link>static' in properties: tag += 's'
+
+ # This is an ugly thing. In V1, there's a code to automatically detect which
+ # properties affect a target. So, if <runtime-debugging> does not affect gcc
+ # toolset, the tag rules won't even see <runtime-debugging>. Similar
+ # functionality in V2 is not implemented yet, so we just check for toolsets
+ # which are known to care about runtime debug.
+ if '<toolset>msvc' in properties \
+ or '<stdlib>stlport' in properties \
+ or '<toolset-intel:platform>win' in properties:
+ if '<runtime-debugging>on' in properties: tag += 'g'
+
+ if '<python-debugging>on' in properties: tag += 'y'
+ if '<variant>debug' in properties: tag += 'd'
+ if '<stdlib>stlport' in properties: tag += 'p'
+ if '<stdlib-stlport:iostream>hostios' in properties: tag += 'n'
+
+ return tag
+
+
+def init(manager):
+ global __RM, __CP, __IGNORE, __LN
+ engine = manager.engine()
+
+ # register the make() and alias() rules globally
+ import b2.tools.make
+ import b2.build.alias
+
+ windows_hack = ''
+ # ported from trunk@47281
+ if os_name() == 'NT':
+ __RM = 'del /f /q'
+ __CP = 'copy /b'
+ windows_hack = '+ this-file-does-not-exist-A698EE7806899E69'
+ __IGNORE = '2>nul >nul & setlocal'
+ __LN = __CP
+ #if not __LN:
+ # __LN = CP
+ MKDIR = 'if not exist "$(<)\\" mkdir "$(<)"'
+ else:
+ __RM = 'rm -f'
+ __CP = 'cp'
+ __IGNORE = ''
+ __LN = 'ln'
+ MKDIR = 'mkdir -p "$(<)"'
+
+ engine.register_action("common.MkDir", MKDIR + __IGNORE)
+
+ engine.register_action(
+ "common.Clean", __RM + ' "$(>)"', flags=['piecemeal', 'together', 'existing'])
+ engine.register_action("common.copy", '{} "$(>)" {} "$(<)"'.format(__CP, windows_hack))
+ engine.register_action("common.RmTemps", __RM + ' "$(>)" ' + __IGNORE,
+ flags=['quietly', 'updated', 'piecemeal', 'together'])
+
+ engine.register_action("common.hard-link",
+ __RM + ' "$(<)" 2$(NULL_OUT) $(NULL_OUT)' + os.linesep +
+ __LN + ' "$(>)" "$(<)" $(NULL_OUT)')
diff --git a/src/boost/tools/build/src/tools/como-linux.jam b/src/boost/tools/build/src/tools/como-linux.jam
new file mode 100644
index 000000000..5c554c8f8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/como-linux.jam
@@ -0,0 +1,103 @@
+# Copyright 2004, 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)
+
+# The following #// line will be used by the regression test table generation
+# program as the column heading for HTML tables. Must not include a version
+# number.
+#//<a href="http://www.comeaucomputing.com/">Comeau<br>C++</a>
+
+import toolset ;
+import feature ;
+import toolset : flags ;
+import common ;
+import generators ;
+
+import unix ;
+import como ;
+
+feature.extend-subfeature toolset como : platform : linux ;
+
+toolset.inherit-generators como-linux
+ <toolset>como <toolset-como:platform>linux : unix ;
+generators.override como-linux.prebuilt : builtin.lib-generator ;
+generators.override como-linux.searched-lib-generator : searched-lib-generator ;
+toolset.inherit-flags como-linux : unix ;
+toolset.inherit-rules como-linux : gcc ;
+
+generators.register-c-compiler como-linux.compile.c++ : CPP : OBJ
+ : <toolset>como <toolset-como:platform>linux ;
+generators.register-c-compiler como-linux.compile.c : C : OBJ
+ : <toolset>como <toolset-como:platform>linux ;
+
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters como-linux
+ : version $(version) ] ;
+
+ command = [ common.get-invocation-command como-linux : como
+ : $(command) ] ;
+
+ common.handle-options como-linux : $(condition) : $(command) : $(options) ;
+}
+
+
+flags como-linux C++FLAGS <exception-handling>off : --no_exceptions ;
+flags como-linux C++FLAGS <exception-handling>on : --exceptions ;
+
+flags como-linux CFLAGS <inlining>off : --no_inlining ;
+flags como-linux CFLAGS <inlining>on <inlining>full : --inlining ;
+
+flags como-linux CFLAGS <optimization>off : -O0 ;
+flags como-linux CFLAGS <optimization>speed : -O3 ;
+flags como-linux CFLAGS <optimization>space : -Os ;
+
+flags como-linux CFLAGS <debug-symbols>on : -g ;
+flags como-linux LINKFLAGS <debug-symbols>on : -g ;
+
+flags como-linux FINDLIBS : m ;
+flags como-linux FINDLIBS : rt ;
+
+flags como-linux CFLAGS <cflags> ;
+flags como-linux C++FLAGS <cxxflags> ;
+flags como-linux DEFINES <define> ;
+flags como-linux UNDEFS <undef> ;
+flags como-linux HDRS <include> ;
+flags como-linux STDHDRS <sysinclude> ;
+flags como-linux LINKFLAGS <linkflags> ;
+flags como-linux ARFLAGS <arflags> ;
+
+flags como-linux.link LIBRARIES <library-file> ;
+flags como-linux.link LINKPATH <library-path> ;
+flags como-linux.link FINDLIBS-ST <find-static-library> ;
+flags como-linux.link FINDLIBS-SA <find-shared-library> ;
+
+flags como-linux.link RPATH <dll-path> ;
+flags como-linux.link RPATH_LINK <xdll-path> ;
+
+
+actions link bind LIBRARIES
+{
+ $(CONFIG_COMMAND) $(LINKFLAGS) -o "$(<[1])" "$(>)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" "$(LIBRARIES)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) 2>&1
+}
+
+actions link.dll bind LIBRARIES
+{
+ $(CONFIG_COMMAND) $(LINKFLAGS) -shared -o "$(<[1])" "$(>)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" "$(LIBRARIES)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) 2>&1
+}
+
+actions compile.c
+{
+ $(CONFIG_COMMAND) -c --c99 --long_long -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" 2>&1
+}
+
+actions compile.c++
+{
+ $(CONFIG_COMMAND) -tused -c --long_long -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" 2>&1
+}
+
+actions archive
+{
+ ar rcu $(<) $(>)
+}
diff --git a/src/boost/tools/build/src/tools/como-win.jam b/src/boost/tools/build/src/tools/como-win.jam
new file mode 100644
index 000000000..d21a70d6f
--- /dev/null
+++ b/src/boost/tools/build/src/tools/como-win.jam
@@ -0,0 +1,117 @@
+# (C) Copyright David Abrahams 2001.
+# (C) Copyright MetaCommunications, Inc. 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)
+
+# The following #// line will be used by the regression test table generation
+# program as the column heading for HTML tables. Must not include a version
+# number.
+#//<a href="http://www.comeaucomputing.com/">Comeau<br>C++</a>
+
+import common ;
+import como ;
+import feature ;
+import generators ;
+import toolset : flags ;
+
+feature.extend-subfeature toolset como : platform : win ;
+
+
+# Initializes the Comeau toolset for windows. The command is the command which
+# invokes the compiler. You should either set environment variable
+# COMO_XXX_INCLUDE where XXX is the used backend (as described in the
+# documentation), or pass that as part of command, e.g:
+#
+# using como-win : 4.3 : "set COMO_BCC_INCLUDE=C:/include &&" como.exe ;
+#
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters como-win
+ : version $(version) ] ;
+
+ command = [ common.get-invocation-command como-win : como.exe :
+ $(command) ] ;
+
+ common.handle-options como-win : $(condition) : $(command) : $(options) ;
+}
+
+generators.register-c-compiler como-win.compile.c++ : CPP : OBJ
+ : <toolset>como <toolset-como:platform>win ;
+generators.register-c-compiler como-win.compile.c : C : OBJ
+ : <toolset>como <toolset-como:platform>win ;
+
+
+generators.register-linker como-win.link
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : EXE
+ : <toolset>como <toolset-como:platform>win ;
+
+# Note that status of shared libraries support is not clear, so we do not define
+# the link.dll generator.
+generators.register-archiver como-win.archive
+ : OBJ : STATIC_LIB
+ : <toolset>como <toolset-como:platform>win ;
+
+
+flags como-win C++FLAGS <exception-handling>off : --no_exceptions ;
+flags como-win C++FLAGS <exception-handling>on : --exceptions ;
+
+flags como-win CFLAGS <inlining>off : --no_inlining ;
+flags como-win CFLAGS <inlining>on <inlining>full : --inlining ;
+
+
+# The following seems to be VC-specific options. At least, when I uncomment
+# then, Comeau with bcc as backend reports that bcc32 invocation failed.
+#
+#flags como-win CFLAGS <debug-symbols>on : /Zi ;
+#flags como-win CFLAGS <optimization>off : /Od ;
+
+
+flags como-win CFLAGS <cflags> ;
+flags como-win CFLAGS : -D_WIN32 ; # Make sure that we get the Boost Win32 platform config header.
+flags como-win CFLAGS <threading>multi : -D_MT ; # Make sure that our config knows that threading is on.
+flags como-win C++FLAGS <cxxflags> ;
+flags como-win DEFINES <define> ;
+flags como-win UNDEFS <undef> ;
+flags como-win HDRS <include> ;
+flags como-win SYSHDRS <sysinclude> ;
+flags como-win LINKFLAGS <linkflags> ;
+flags como-win ARFLAGS <arflags> ;
+flags como-win NO_WARN <no-warn> ;
+
+#flags como-win STDHDRS : $(COMO_INCLUDE_PATH) ;
+#flags como-win STDLIB_PATH : $(COMO_STDLIB_PATH)$(SLASH) ;
+
+flags como-win LIBPATH <library-path> ;
+flags como-win LIBRARIES <library-file> ;
+flags como-win FINDLIBS <find-shared-library> ;
+flags como-win FINDLIBS <find-static-library> ;
+
+nl = "
+" ;
+
+
+# For como, we repeat all libraries so that dependencies are always resolved.
+#
+actions link bind LIBRARIES
+{
+ $(CONFIG_COMMAND) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")" "$(LIBRARIES)" "$(FINDLIBS:S=.lib)"
+}
+
+actions compile.c
+{
+ $(CONFIG_COMMAND) -c --c99 -e5 --no_version --display_error_number --diag_suppress=9,21,161,748,940,962 -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<:D=)" "$(>)"
+}
+
+actions compile.c++
+{
+ $(CONFIG_COMMAND) -c -e5 --no_version --no_prelink_verbose --display_error_number --long_long --diag_suppress=9,21,161,748,940,962 --diag_error=461 -D__STL_LONG_LONG -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
+}
+
+actions archive
+{
+ $(CONFIG_COMMAND) --no_version --no_prelink_verbose --prelink_object @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+}
diff --git a/src/boost/tools/build/src/tools/como.jam b/src/boost/tools/build/src/tools/como.jam
new file mode 100644
index 000000000..3e6051c1f
--- /dev/null
+++ b/src/boost/tools/build/src/tools/como.jam
@@ -0,0 +1,75 @@
+# Copyright Vladimir Prus 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.como]]
+= Comeau C/C++ Compiler
+
+The `como-linux` and the `como-win` modules supports the
+http://www.comeaucomputing.com/[Comeau C/C++ Compiler] on Linux and
+Windows respectively.
+
+The module is initialized using the following syntax:
+
+----
+using como : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the command is not specified, B2 will search for a binary
+named `como` in PATH.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+Before using the Windows version of the compiler, you need to setup
+necessary environment variables per compiler's documentation. In
+particular, the COMO_XXX_INCLUDE variable should be set, where XXX
+corresponds to the used backend C compiler.
+
+|# # end::doc[]
+
+# This is a generic 'como' toolset. Depending on the current system, it
+# forwards either to 'como-linux' or 'como-win' modules.
+
+import feature ;
+import os ;
+import toolset ;
+
+feature.extend toolset : como ;
+feature.subfeature toolset como : platform : : propagated link-incompatible ;
+
+rule init ( * : * )
+{
+ if [ os.name ] = LINUX
+ {
+ toolset.using como-linux :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+ else
+ {
+ toolset.using como-win :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+
+ }
+}
diff --git a/src/boost/tools/build/src/tools/convert.jam b/src/boost/tools/build/src/tools/convert.jam
new file mode 100644
index 000000000..ac1d70101
--- /dev/null
+++ b/src/boost/tools/build/src/tools/convert.jam
@@ -0,0 +1,62 @@
+# Copyright (c) 2009 Vladimir Prus
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Implements 'convert' target that takes a bunch of source and
+# tries to convert each one to the specified type.
+#
+# For example:
+#
+# convert objects obj : a.cpp b.cpp ;
+#
+
+import targets ;
+import generators ;
+import project ;
+import type ;
+import "class" : new ;
+
+class convert-target-class : typed-target
+{
+ rule __init__ ( name : project : type
+ : sources * : requirements * : default-build * : usage-requirements * )
+ {
+ typed-target.__init__ $(name) : $(project) : $(type)
+ : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ;
+ }
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ local r = [ generators.construct $(self.project) : $(self.type)
+ : [ property-set.create [ $(property-set).raw ] # [ feature.expand
+ <main-target-type>$(self.type) ]
+ # ]
+ : $(source-targets) ] ;
+ if ! $(r)
+ {
+ errors.error "unable to construct" [ full-name ] ;
+ }
+
+ return $(r) ;
+ }
+
+}
+
+rule convert ( name type : sources * : requirements * : default-build *
+ : usage-requirements * )
+{
+ local project = [ project.current ] ;
+
+ # This is a circular module dependency, so it must be imported here
+ modules.import targets ;
+ targets.main-target-alternative
+ [ new convert-target-class $(name) : $(project) : [ type.type-from-rule-name $(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) ]
+ ] ;
+}
+IMPORT $(__name__) : convert : : convert ;
diff --git a/src/boost/tools/build/src/tools/cray.jam b/src/boost/tools/build/src/tools/cray.jam
new file mode 100644
index 000000000..107b3dbbc
--- /dev/null
+++ b/src/boost/tools/build/src/tools/cray.jam
@@ -0,0 +1,1169 @@
+# Copyright 2001 David Abrahams
+# Copyright 2004, 2005 Markus Schoepflin
+# Copyright 2011 John Maddock
+# Copyright 2013, 2017-2018 Cray, Inc.
+#
+# 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)
+
+# README.md
+#
+# This toolset is for the Cray Compiling Environment (CCE).
+#
+# The assembler, linker, and archiver are the same as those used in the
+# `gcc` toolset. Therefore, there is some duplication of code between the
+# `gcc` toolset and this toolset.
+#
+# # CCE Introduction
+#
+# Users want to compile and run massively parallel applications on Cray
+# supercomputers. Typically, the user compiles code on a login node of the
+# supercomputer and then runs the compiled program on multiple compute
+# nodes using a batch control system. This means the user is almost always
+# cross compiling.
+#
+# But, they're not just cross compiling. In order for a program to run on
+# a Cray supercomputer it has to link to particular libraries. There are
+# three general categories of libraries that user programs must link to:
+#
+# - Network libraries: Enable communication between processes on different
+# compute nodes. Depends on the network hardware in the supercomputer.
+# - Compute node libraries: Depends on the hardware on the targeted
+# compute nodes.
+# - Language extension libraries: Depends on the language extensions used
+# by the program (e.g. OpenMP, Unified Parallel C, et cetera).
+#
+# Instead of forcing users to invoke the compiler with a bunch of
+# libraries listed on the command line, CCE decides what libraries to link
+# based on the environment. This is primarily controlled by loading and
+# unloading modules (with the `module` command) to create a cross
+# compiling and linking environment suitable for the particular hardware
+# on the targeted Cray supercomputer.
+#
+# CCE compilers come in two parts: the compiler itself, and the compiler
+# driver. Invoking a compiler directly is not supported. We must always
+# invoke the compiler through a compiler driver: either `cc` for C code,
+# `CC` for C++ code, or `ftn` for Fortran code. The compiler driver is
+# responsible for gathering information from the environment and invoking
+# the selected compiler with the appropriate command line options.
+#
+# For more information on CCE, search for Cray publication S-2529 on the
+# Cray publications website (https://pubs.cray.com).
+
+import "class" : new ;
+import common ;
+import feature ;
+import gcc ;
+import generators ;
+import os ;
+import regex ;
+import set ;
+import toolset ;
+import type ;
+import unix ;
+
+###
+### 'init'
+###
+
+rule init ( : : options * : requirements * )
+{
+
+ # User cannot specify a 'version' in their 'using' statement. Compiler
+ # version is always controlled by loading and unloading modules in the
+ # user's environment.
+
+ # User cannot specify a 'command' in their 'using' statement. Using a
+ # single 'command' argument only makes sense when a single executable can
+ # compile different types of code (e.g. gcc will compile C or C++ based on
+ # the file name extensions). In CCE, you have to invoke one of the three
+ # compiler drivers: cc for C code, CC for C++ code, or ftn for Fortran
+ # code. Each compiler driver compiles a single type of source code. It is
+ # possible to let the user pass in three 'command' arguments, one for each
+ # driver, but that seems like more effort that it's worth.
+
+ local toolset = cray ;
+
+ check-prgenv-module $(toolset) ;
+
+ local command-c = [ validate-command $(toolset) cc ] ;
+ local command-cxx = [ validate-command $(toolset) CC ] ;
+ local command-fortran = [ validate-command $(toolset) ftn ] ;
+
+ # Archive builder.
+ local command-ar = [ validate-command $(toolset) ar ] ;
+
+ # Archive indexer.
+ local command-ranlib = [ validate-command $(toolset) ranlib ] ;
+
+ # The 'command' variables always have one element, but they may contain
+ # spaces (e.g. if 'command' is an absolute path and some path components
+ # have spaces).
+
+ local version = ;
+ local developer-build = ;
+ {
+ local version-string = [ SHELL "\"$(command-cxx)\" -VV 2>&1" ] ;
+ local version-components = [ MATCH "Version ([0-9]+).([0-9]+).([a-zA-Z0-9]+)" : $(version-string) ] ;
+ if ! [ MATCH "([0-9]+)" : $(version-components[3]) ]
+ {
+
+ # The last component of the version is not a series of digits. This means
+ # we're probably using a developer build of CCE (i.e. a compiler built by
+ # a Cray employee). Developer builds report versions like '8.7.x'.
+
+ developer-build = true ;
+
+ # We want to treat developer builds as though they are the highest
+ # possible patch version of the release. Effectively, we want to turn
+ # '8.7.x' into '8.7.99'.
+
+ version-components = $(version-components[1]) $(version-components[2]) 99 ;
+
+ }
+
+ version = $(version-components:J=.) ;
+ }
+
+ local build = ;
+ if $(developer-build)
+ {
+
+ # If this is a developer build, we want to add the build subfeature to the
+ # compiler.
+
+ local version-string = [ SHELL "\"$(command-cxx)\" -VV 2>&1" ] ;
+ build = [ MATCH "[(][0-9]+_([0-9a-fA-F]+)[)]" : $(version-string) ] ;
+
+ # Truncate build hash to 7 characters
+ build = [ MATCH "(.......)................................." : $(build) ] ;
+ }
+
+ # IMPORTANT: 'set-cray-feature-defaults' causes the B2 tests to
+ # fail. I tried using an 'init' argument called 'ignore-cray-defaults' and
+ # setting up 'test-config.jam' to pass 'ignore-cray-defaults' during
+ # testing, but I couldn't get the test to read my 'test-config.jam' file
+ # when running tests individually. So, I just comment out
+ # 'set-cray-feature-defaults' during testing.
+
+ set-cray-feature-defaults ;
+
+ {
+
+ # 'check-init-parameters' ensures that each time a toolset is initialized,
+ # it is initialized with a unique configuration. The return value is a
+ # B2 property condition which uniquely identifies this
+ # configured instance of this toolset. Typically, toolsets use the
+ # returned condition as the conditional in a 'toolset.flags' call to set
+ # flags specific to this configuration of this toolset.
+
+ local identifying-condition = [ common.check-init-parameters $(toolset) $(requirements) : version $(version) : build $(build) ] ;
+
+ # 'handle-options' uses 'toolset.flags' to set 'CONFIG_COMMAND' variables
+ # on targets when this toolset is used. The 'CONFIG_COMMAND' variables
+ # specify the commands to call for compiling. This would be more relevant
+ # if our 'init' rule had arguments that might affect the command that is
+ # invoked (e.g. in many toolsets 'version' affects the name of the
+ # compiler command). For now, we'll do this because it is a common pattern
+ # in toolsets, and we may need it in the future.
+
+ handle-options
+ $(toolset)
+ : $(identifying-condition)
+ : $(command-c) $(command-cxx) $(command-fortran) $(command-ar) $(command-ranlib)
+ : $(options) ;
+
+ # Add compiler version to 'VERSION' variable on all targets. 'VERSION' is
+ # not used in any actions, but it is used in some updating rule
+ # procedures.
+
+ toolset.flags $(toolset) VERSION $(identifying-condition) : [ numeric-version $(version) ] ;
+ }
+}
+
+rule check-prgenv-module ( toolset )
+{
+
+ local compiler = [ os.environ PE_ENV ] ;
+ compiler = $(compiler:L) ;
+
+ # We could check that environment variable CRAY_PRGENV$PE_ENV is set to
+ # "loaded", but this seems unnecessary and redundant.
+
+ local default-compiler = cray ;
+
+ if ! $(compiler)
+ {
+ log-warning $(toolset) : no PrgEnv module loaded
+ : falling back to PrgEnv-$(default-compiler)
+ : please load the PrgEnv-$(default-compiler) module next time ;
+ compiler = $(default-compiler) ;
+ }
+
+ if $(compiler) != $(default-compiler)
+ {
+ log-error $(toolset) : compiler '$(compiler)' not supported
+ : toolset initialization failed
+ : please load the PrgEnv-$(default-compiler) module next time ;
+ # Do not abort, as suggested by:
+ # http://www.boost.org/build/doc/html/bbv2/extending/toolset_modules.html.
+ }
+}
+
+rule set-cray-feature-defaults ( )
+{
+
+ # CCE users expect that using the 'cray' toolset without any explicit
+ # options will give them the same result as invoking CCE without any
+ # explicit options. So, we set feature defaults to match the default CCE
+ # options.
+ #
+ # The decision to turn off <debug-symbols> by default was a tough one.
+ # When CCE produces debugging symbols, it disables all inlining. This
+ # causes a decrease in performance, which the user probably was not
+ # expecting since they thought they were compiling with default CCE
+ # options.
+
+ feature.set-default cxxstd-dialect : gnu ;
+ feature.set-default debug-symbols : off ;
+ feature.set-default optimization : default ;
+ feature.set-default inlining : default ;
+ feature.set-default vectorize : default ;
+}
+
+###
+### Command line options
+###
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+
+ # Check if '--debug-configuration' was passed on the command line. This is
+ # inspired by 'common.jam' and other modules.
+
+ # Variable names with a '.' prefix are intended to be globals.
+ #
+ # Refer to:
+ # https://github.com/boostorg/build/blob/develop/CONTRIBUTING.rst
+
+ # The Jam language uses dynamic scoping. Setting '.debug-configuration' in
+ # this module influences the behavior of methods called from this module.
+
+ .debug-configuration = true ;
+}
+
+if [ MATCH (--debug-driver) : [ modules.peek : ARGV ] ]
+{
+
+ .debug-driver = true ;
+}
+
+###
+### Features
+###
+
+feature.extend toolset : cray ;
+
+# Typically, extending '<toolset>' with the value 'cray' would cause
+# 'cray' to be the default '<toolset>' as long as it is the first value
+# added to '<toolset>'. However, we already imported the 'gcc' toolset, so
+# 'cray' is not the first value added to '<toolset>'. Therefore, we need
+# to call 'feature.set-default'.
+#
+# If the build request specifies a '<toolset>' (e.g. on the command line),
+# then the '<toolset>' feature default is ignored. However, if the 'cray'
+# toolset is selected in 'user-config.jam' (e.g. with 'using cray ;'),
+# then the build request will use the '<toolset>' feature default.
+# Therefore, we must use 'feature.set-default' so that selecting the
+# 'cray' toolset in 'user-config.jam' works correctly.
+
+feature.set-default toolset : cray ;
+
+# CCE is different from other compilers in that it optimizes, inlines, and
+# vectorizes by default. B2 assumes that 'off' is the default for
+# all compilers. However, for CCE, 'off' and 'default' have different
+# meanings. For CCE, 'off' requires an additional command line argument to
+# turn the feature off. 'default' will not include an additional command
+# line argument, but will do optimization, inlining, and vectorizing at
+# whatever default level CCE uses.
+
+feature.extend optimization : default ;
+feature.extend inlining : default ;
+feature.extend vectorize : default ;
+
+###
+### Flags
+###
+
+# Updating rules are named in a dotted hierarchy. For example:
+#
+# compile
+# \_ compile.c++
+# \_ compile.c++.preprocess
+# \_ compile.c
+# \_ compile.c.preprocess
+#
+# This naming convention allows us to apply flags to multiple children in
+# the hierarchy. For example, if we apply a flag to 'compile.c++', that
+# flag is also applied to its child 'compile.c++.preprocess'. If we apply
+# a flag to 'compile', then that flag is applied to all children under
+# 'compile'.
+
+toolset.flags cray.compile OPTIONS <link>shared : -h pic ;
+
+toolset.flags cray.compile OPTIONS <optimization>default ; # Blank.
+toolset.flags cray.compile OPTIONS <optimization>off : -O 0 ;
+toolset.flags cray.compile OPTIONS <optimization>speed : -O 3 ;
+toolset.flags cray.compile OPTIONS <optimization>space ; # Blank. CCE does not optimize for space.
+
+toolset.flags cray.compile OPTIONS <inlining>default ; # Blank.
+toolset.flags cray.compile OPTIONS <inlining>off : -h ipa0 ;
+toolset.flags cray.compile OPTIONS <inlining>on ; # Blank. CCE does inlining by default.
+toolset.flags cray.compile OPTIONS <inlining>full : -h ipa5 ;
+
+toolset.flags cray.compile OPTIONS <vectorize>default ; # Blank.
+toolset.flags cray.compile OPTIONS <vectorize>off : -h vector0 ;
+toolset.flags cray.compile OPTIONS <vectorize>on ; # Blank. CCE vectorizes by default.
+toolset.flags cray.compile OPTIONS <vectorize>full : -h vector3 ;
+
+toolset.flags cray.link FINDLIBS-SA <threading>multi : rt ; # Not sure if this is correct.
+
+toolset.flags cray.link OPTIONS <link>shared : -h pic ;
+
+{
+ #
+ # Link flags copied from 'gcc.jam'.
+ #
+
+ local toolset = cray ;
+ local generic-os = [ set.difference [ feature.values <target-os> ] : aix darwin vxworks solaris osf hpux ] ;
+ # Strip the binary when no debugging is needed. We use --strip-all flag
+ # as opposed to -s since icc (intel's compiler) is generally
+ # option-compatible with and inherits from the gcc toolset, but does not
+ # support -s.
+ toolset.flags $(toolset).link OPTIONS <target-os>$(generic-os)/<strip>on : -Wl,--strip-all ;
+ toolset.flags $(toolset).link RPATH <target-os>$(generic-os) : <dll-path> ;
+ toolset.flags $(toolset).link RPATH_OPTION <target-os>$(generic-os) : -rpath ;
+ toolset.flags $(toolset).link RPATH_LINK <target-os>$(generic-os) : <xdll-path> ;
+ toolset.flags $(toolset).link START-GROUP <target-os>$(generic-os) : -Wl,--start-group ;
+ toolset.flags $(toolset).link END-GROUP <target-os>$(generic-os) : -Wl,--end-group ;
+
+ # gnu ld has the ability to change the search behaviour for libraries
+ # referenced by the -l switch. These modifiers are -Bstatic and
+ # -Bdynamic and change search for -l switches that follow them. The
+ # following list shows the tried variants. Search stops at the first
+ # variant that has a match.
+ #
+ # *nix: -Bstatic -lxxx
+ # libxxx.a
+ #
+ # *nix: -Bdynamic -lxxx
+ # libxxx.so
+ # libxxx.a
+ #
+ # windows (mingw, cygwin) -Bstatic -lxxx
+ # libxxx.a
+ # xxx.lib
+ #
+ # windows (mingw, cygwin) -Bdynamic -lxxx
+ # libxxx.dll.a
+ # xxx.dll.a
+ # libxxx.a
+ # xxx.lib
+ # cygxxx.dll (*)
+ # libxxx.dll
+ # xxx.dll
+ # libxxx.a
+ #
+ # (*) This is for cygwin
+ # Please note that -Bstatic and -Bdynamic are not a guarantee that a
+ # static or dynamic lib indeed gets linked in. The switches only change
+ # search patterns!
+
+ # On *nix mixing shared libs with static runtime is not a good idea.
+ toolset.flags $(toolset).link FINDLIBS-ST-PFX <target-os>$(generic-os)/<runtime-link>shared : -Wl,-Bstatic ;
+ toolset.flags $(toolset).link FINDLIBS-SA-PFX <target-os>$(generic-os)/<runtime-link>shared : -Wl,-Bdynamic ;
+
+ toolset.flags $(toolset).link HAVE_SONAME <target-os>$(generic-os) : "" ;
+ toolset.flags $(toolset).link SONAME_OPTION <target-os>$(generic-os) : -h ;
+
+ # See note [1]
+ toolset.flags $(toolset).link OPTIONS <target-os>$(generic-os)/<runtime-link>static : -static ;
+
+ # [1]
+ # For <runtime-link>static we made sure there are no dynamic libraries in the
+ # link. On HP-UX not all system libraries exist as archived libraries (for
+ # example, there is no libunwind.a), so, on this platform, the -static option
+ # cannot be specified.
+}
+
+# Flags for 'free' features ('free' features are features that do not have
+# a pre-defined set of values).
+
+toolset.flags cray.compile USER_OPTIONS <cflags> ;
+toolset.flags cray.compile.c++ USER_OPTIONS <cxxflags> ;
+toolset.flags cray.compile.asm USER_OPTIONS <asmflags> ;
+toolset.flags cray.compile DEFINES <define> ;
+toolset.flags cray.compile INCLUDES <include> ;
+
+toolset.flags cray.link USER_OPTIONS <linkflags> ;
+toolset.flags cray.link LINKPATH <library-path> ;
+toolset.flags cray.link FINDLIBS-ST <find-static-library> ;
+toolset.flags cray.link FINDLIBS-SA <find-shared-library> ;
+toolset.flags cray.link LIBRARIES <library-file> ;
+
+toolset.flags cray.archive AROPTIONS <archiveflags> ;
+
+###
+### Actions
+###
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND_CXX)" $(OPTIONS) $(USER_OPTIONS) -D$(SPACE)$(DEFINES) -I$(SPACE)"$(INCLUDES)" -c -o "$(<)" "$(>)" $(DRIVER_OPTIONS)
+}
+
+actions compile.c
+{
+ "$(CONFIG_COMMAND_C)" $(OPTIONS) $(USER_OPTIONS) -D$(SPACE)$(DEFINES) -I$(SPACE)"$(INCLUDES)" -c -o "$(<)" "$(>)" $(DRIVER_OPTIONS)
+}
+
+actions compile.asm
+{
+ "$(CONFIG_COMMAND_CXX)" $(OPTIONS) $(USER_OPTIONS) -D$(SPACE)$(DEFINES) -I$(SPACE)"$(INCLUDES)" -c -o "$(<)" "$(>)" $(DRIVER_OPTIONS)
+}
+
+actions compile.c++.preprocess
+{
+ "$(CONFIG_COMMAND_CXX)" $(OPTIONS) $(USER_OPTIONS) -D$(SPACE)$(DEFINES) -I$(SPACE)"$(INCLUDES)" -E "$(>)" >"$(<)" $(DRIVER_OPTIONS)
+}
+
+actions compile.c.preprocess
+{
+ "$(CONFIG_COMMAND_C)" $(OPTIONS) $(USER_OPTIONS) -D$(SPACE)$(DEFINES) -I$(SPACE)"$(INCLUDES)" -E "$(>)" >"$(<)" $(DRIVER_OPTIONS)
+}
+
+# We don't want to invoke 'ld' (the linker) directly for 'link', since we
+# want to give the CCE compiler driver a chance to modify the command line
+# it passes to 'ld'.
+#
+# The question is: which CCE compiler driver do we use? The driver for C,
+# the driver for C++, or the driver for Fortran?
+#
+# Here are things that definitely do not work:
+#
+# - Using the driver for C doesn't work when linking C++ programs, because
+# things like 'std::cout' are not available in C, they are only
+# available in C++.
+#
+# We use the driver for C++ below since we are primarily interested in
+# compiling Boost, which is written in C++. Also, the C++ driver will
+# properly link C code as well.
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND_CXX)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) $(DRIVER_OPTIONS)
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND_CXX)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) $(DRIVER_OPTIONS)
+}
+
+actions piecemeal archive
+{
+ "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
+ "$(.RANLIB)" "$(<)"
+}
+
+###
+### Updating rules
+###
+
+# These are the actual updating rules that apply the associated actions
+# when called.
+
+rule compile.c++ ( targets * : sources * : properties * )
+{
+ compile-c++-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile.c ( targets * : sources * : properties * )
+{
+ compile-c-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile.asm ( targets * : sources * : properties * )
+{
+ compile-asm-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile.c++.preprocess ( targets * : sources * : properties * )
+{
+ compile-c++-preprocess-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile.c.preprocess ( targets * : sources * : properties * )
+{
+ compile-c-preprocess-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule link ( targets * : sources * : properties * )
+{
+ link-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule link.dll ( targets * : sources * : properties * )
+{
+ link-dll-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule archive ( targets * : sources * : properties * )
+{
+ archive-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+# These are the procedure portions of the updating rules. Calling the
+# procedure portion may modify the targets, but it will not apply actions
+# to the targets. This allows us to reuse the procedure portions of the
+# updating rules without applying the same actions to targets.
+
+rule compile-c++-procedure ( targets * : sources * : properties * )
+{
+ set-cxxstd-procedure $(targets) : $(sources) : $(properties) ;
+ set-cxxstd-dialect-procedure $(targets) : $(sources) : $(properties) ;
+ set-debug-symbols-procedure $(targets) : $(sources) : $(properties) ;
+ add-space-procedure $(targets) : $(sources) : $(properties) ;
+ debug-driver-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile-c-procedure ( targets * : sources * : properties * )
+{
+ set-debug-symbols-procedure $(targets) : $(sources) : $(properties) ;
+ add-space-procedure $(targets) : $(sources) : $(properties) ;
+ debug-driver-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile-asm-procedure ( targets * : sources * : properties * )
+{
+ compile-c++-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile-c++-preprocess-procedure ( targets * : sources * : properties * )
+{
+ compile-c++-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule compile-c-preprocess-procedure ( targets * : sources * : properties * )
+{
+ compile-c-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+rule link-procedure ( targets * : sources * : properties * )
+{
+ set-cxxstd-procedure $(targets) : $(sources) : $(properties) ;
+ set-cxxstd-dialect-procedure $(targets) : $(sources) : $(properties) ;
+ gcc-link-procedure $(targets) : $(sources) : $(properties) ;
+ debug-driver-procedure $(targets) : $(sources) : $(properties) ;
+
+ # CCE driver command line flags for linking executables.
+
+ local link = [ feature.get-values <link> : $(properties) ] ;
+ switch $(link)
+ {
+ case shared :
+ DRIVER_OPTIONS on $(<) += -dynamic ;
+ case static :
+ DRIVER_OPTIONS on $(<) += -static ;
+ }
+
+ # The link command line from the 'gcc' toolset includes:
+ #
+ # '$(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA)'
+ #
+ # The 'FINDLIBS-ST' and 'FINDLIBS-SA' variables are the libraries
+ # specified by the '<find-static-library>' and '<find-shared-library>'
+ # features, respectively. The 'FINDLIBS-ST-PFX' is typically
+ # '-Wl,-Bstatic'. The 'FINDLIBS-SA-PFX' is typically '-Wl,-Bdynamic'.
+ #
+ # The '-Bstatic' and '-Bdynamic' flags passed to the linker tell the
+ # linker how to link all of the following libraries. The flag is in effect
+ # until it is overridden by another '-B' flag on the command line.
+ #
+ # So, it makes sense that the 'gcc' toolset includes these flags, so the
+ # '<find-static-library>' and '<find-shared-library>' libraries are linked
+ # properly.
+ #
+ # The last flag that is set ('-Bdynamic') affects the link type for any
+ # other libraries on the command line. In the 'gcc' toolset, this is okay,
+ # since there are no other libraries specified on the command line after
+ # these flags. However, when the CCE compiler driver invokes the linker,
+ # it adds additional libraries to the command line based on what modules
+ # are loaded in the environment. So, the last '-B' flag on the CCE driver
+ # command line affects the link type for all libraries that CCE
+ # automatically appends.
+ #
+ # Therefore, we have to set the final '-B' flag to the link type we want
+ # the CCE libraries to be linked with. Appending to the 'OPTIONS' variable
+ # seems reasonable.
+
+ local link = [ feature.get-values <link> : $(properties) ] ;
+ switch $(link)
+ {
+ case shared :
+ OPTIONS on $(<) += -Wl,-Bdynamic ;
+ case static :
+ OPTIONS on $(<) += -Wl,-Bstatic ;
+ }
+}
+
+rule link-dll-procedure ( targets * : sources * : properties * )
+{
+ set-cxxstd-procedure $(targets) : $(sources) : $(properties) ;
+ set-cxxstd-dialect-procedure $(targets) : $(sources) : $(properties) ;
+ gcc-link-dll-procedure $(targets) : $(sources) : $(properties) ;
+ debug-driver-procedure $(targets) : $(sources) : $(properties) ;
+
+ # CCE driver command line flags for linking shared libraries.
+
+ DRIVER_OPTIONS on $(<) += -shared ;
+}
+
+rule archive-procedure ( targets * : sources * : properties * )
+{
+ gcc-archive-procedure $(targets) : $(sources) : $(properties) ;
+ debug-driver-procedure $(targets) : $(sources) : $(properties) ;
+}
+
+# Utility procedure rules intended to be called from updating rules.
+
+rule gcc-link-procedure ( targets * : sources * : properties * )
+{
+
+ # Copied from 'gcc.jam'.
+
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the 'link' action, since running N links in
+ # parallel is just slower. For now, serialize only gcc links, it might be a
+ # good idea to serialize all links.
+ JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
+ gcc.quote-rpath $(targets) ;
+}
+
+rule gcc-link-dll-procedure ( targets * : sources * : properties * )
+{
+
+ # Copied from 'gcc.jam'.
+
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
+ gcc.quote-rpath $(targets) ;
+}
+
+rule gcc-archive-procedure ( targets * : sources * : properties * )
+{
+
+ # Copied from 'gcc.jam'.
+
+ # Always remove archive and start again. Here is the rationale from
+ #
+ # Andre Hentz:
+ #
+ # I had a file, say a1.c, that was included into liba.a. I moved a1.c to
+ # a2.c, updated my Jamfiles and rebuilt. My program was crashing with absurd
+ # errors. After some debugging I traced it back to the fact that a1.o was
+ # *still* in liba.a
+ #
+ # Rene Rivera:
+ #
+ # Originally removing the archive was done by splicing an RM onto the
+ # archive action. That makes archives fail to build on NT when they have
+ # many files because it will no longer execute the action directly and blow
+ # the line length limit. Instead we remove the file in a different action,
+ # just before building the archive.
+ #
+ local clean.a = $(targets[1])(clean) ;
+ TEMPORARY $(clean.a) ;
+ NOCARE $(clean.a) ;
+ LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
+ DEPENDS $(clean.a) : $(sources) ;
+ DEPENDS $(targets) : $(clean.a) ;
+ common.RmTemps $(clean.a) : $(targets) ;
+}
+
+rule add-space-procedure ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+rule set-cxxstd-procedure ( targets * : sources * : properties * )
+{
+
+ # Translate '<cxxstd>' into a standard recognized by CCE.
+
+ local version = [ on $(targets[1]) return $(VERSION) ] ;
+
+ local cxxstd = [ feature.get-values cxxstd : $(properties) ] ;
+ local cray-cxxstd = ;
+
+ local unsupported-values = 2a ; # I don't know what '2a' means.
+ if $(cxxstd) && $(cxxstd) in $(unsupported-values)
+ {
+
+ log-warning cray : ignoring unsupported property '<cxxstd>$(cxxstd)' ;
+
+ # Set to default value, or blank if default is unsupported.
+
+ local default-value = [ get-default-feature-value cxxstd ] ;
+ if $(default-value) in $(unsupported-values)
+ {
+ cxxstd = ;
+ }
+ else
+ {
+ cxxstd = $(default-value) ;
+ }
+ }
+
+ switch $(cxxstd)
+ {
+ case 98 : cray-cxxstd = 03 ;
+ case 03 : cray-cxxstd = 03 ;
+ case 0x : cray-cxxstd = 11 ;
+ case 11 : cray-cxxstd = 11 ;
+ case 1y : cray-cxxstd = 14 ;
+ case 14 : cray-cxxstd = 14 ;
+ case 1z : cray-cxxstd = 17 ;
+ case 17 : cray-cxxstd = 17 ;
+ case latest :
+ cray-cxxstd = [ latest-cray-cxxstd $(version) ] ;
+ }
+
+ # If the 'cray-cxxstd' is not supported by this compiler version, we just
+ # let the command line fail.
+
+ # If 'cxxstd' was blank, then 'cray-cxxstd' is also blank, and nothing is
+ # added to the command line. The compiler just uses it's default C++
+ # standard.
+
+ # Apply final options.
+ local space = " " ;
+ OPTIONS on $(targets) += -h$(space)std=c++$(cray-cxxstd) ;
+}
+
+rule set-cxxstd-dialect-procedure ( targets * : sources * : properties * )
+{
+
+ # Translate '<cxxstd-dialect>' into '-h [no]conform' and '-h [no]gnu'
+ # options.
+
+ local version = [ on $(targets[1]) return $(VERSION) ] ;
+
+ local cxxstd-dialect = [ feature.get-values cxxstd-dialect : $(properties) ] ;
+ local cray-conform = ;
+ local cray-gnu = ;
+
+ local unsupported-values = ms ;
+ if $(cxxstd-dialect) && $(cxxstd-dialect) in $(unsupported-values)
+ {
+
+ log-warning cray : ignoring unsupported property '<cxxstd-dialect>$(cxxstd-dialect)' ;
+
+ # Set to default value, or blank if default is unsupported.
+
+ local default-value = [ get-default-feature-value cxxstd-dialect ] ;
+ if $(default-value) in $(unsupported-values)
+ {
+ cxxstd-dialect = ;
+ }
+ else
+ {
+ cxxstd-dialect = $(default-value) ;
+ }
+ }
+
+ switch $(cxxstd-dialect)
+ {
+ case gnu : cray-conform = noconform ;
+ cray-gnu = gnu ;
+ case iso : cray-conform = conform ;
+ cray-gnu = nognu ;
+ }
+
+ if [ has-conform-option $(version) ] = false
+ {
+ # The '-h [no]conform' option is ignored in recent versions of CCE.
+ cray-conform = ;
+ }
+
+ # If 'cxxstd-dialect' was blank, then 'cray-conform' and 'cray-gnu' are
+ # also blank, and nothing is added to the command line. The compiler just
+ # uses it's default C++ dialect.
+
+ # Apply final options.
+ local space = " " ;
+ OPTIONS on $(targets) += -h$(space)$(cray-conform)
+ -h$(space)$(cray-gnu) ;
+}
+
+rule set-debug-symbols-procedure ( targets * : sources * : properties * )
+{
+
+ local debug-symbols = [ feature.get-values <debug-symbols> : $(properties) ] ;
+ if $(debug-symbols) = "on"
+ {
+ local optimization = [ feature.get-values <optimization> : $(properties) ] ;
+ local debug-option = ;
+ if $(optimization) = off
+ {
+ debug-option = 0 ;
+ }
+ else
+ {
+ debug-option = 3 ;
+ }
+
+ local space = " " ;
+ OPTIONS on $(targets) += -G$(space)$(debug-option) ;
+ }
+}
+
+rule debug-driver-procedure ( targets * : sources * : properties * )
+{
+ if $(.debug-driver)
+ {
+
+ # Passing '-vv' to the CCE driver causes it to output the command lines
+ # for the underlying tools that it invokes.
+
+ DRIVER_OPTIONS on $(<) += -vv ;
+ }
+}
+
+###
+### Generators
+###
+
+class cray-linking-generator : gcc-linking-generator
+{
+ rule action-class ( )
+ {
+ return action ;
+ }
+}
+
+# We reuse some generator classes from the 'unix' toolset. Specifically,
+# we are reusing generators for the following updating actions:
+#
+# - 'archive'
+# - 'searched-lib-generator'
+# - 'prebuilt'
+#
+# Inheriting these generators is like using the same generator classes as
+# the 'unix' toolset, but pointing them to the 'cray' updating rules.
+
+toolset.inherit-generators cray : unix : unix.link unix.link.dll ;
+
+# The 'C-compiling-generator' class adds source paths to the '<include>'
+# property.
+
+generators.register [ new C-compiling-generator
+ cray.compile.c++
+ : CPP
+ : OBJ
+ : <toolset>cray ] ;
+generators.register [ new C-compiling-generator
+ cray.compile.c
+ : C
+ : OBJ
+ : <toolset>cray ] ;
+generators.register [ new C-compiling-generator
+ cray.compile.asm
+ : ASM
+ : OBJ
+ : <toolset>cray ] ;
+generators.register [ new C-compiling-generator
+ cray.compile.c++.preprocess
+ : CPP
+ : PREPROCESSED_CPP
+ : <toolset>cray ] ;
+generators.register [ new C-compiling-generator
+ cray.compile.c.preprocess
+ : C
+ : PREPROCESSED_C
+ : <toolset>cray ] ;
+generators.register [ new cray-linking-generator
+ cray.link
+ : LIB OBJ
+ : EXE
+ : <toolset>cray ] ;
+generators.register [ new cray-linking-generator
+ cray.link.dll
+ : LIB OBJ
+ : SHARED_LIB
+ : <toolset>cray ] ;
+
+# Tell B2 to prefer 'cray' generators over other valid
+# generators. This is used to resolve a tie when B2 finds that
+# there is more than one viable generator for a particular build request.
+
+generators.override cray.prebuilt : builtin.prebuilt ;
+generators.override cray.searched-lib-generator : searched-lib-generator ;
+
+type.set-generated-target-suffix PREPROCESSED_CPP : <toolset>cray : i ;
+type.set-generated-target-suffix PREPROCESSED_C : <toolset>cray : i ;
+
+###
+### Utility rules
+###
+
+rule validate-command ( toolset command )
+{
+ local found-command = [ common.find-tool $(command) ] ;
+ if $(found-command) && $(.debug-configuration)
+ {
+ log-notice $(toolset) : command '$(command)' found at [ common.get-absolute-tool-path $(found-command) ] ;
+ }
+ if ! $(found-command)
+ {
+ log-warning $(toolset) : command '$(command)' not found ;
+ found-command = $(command) ;
+ }
+ return $(found-command) ;
+}
+
+local rule options-helper ( rule-or-module variable-name condition * : feature options * )
+{
+ toolset.flags $(rule-or-module) $(variable-name) $(condition) : [ feature.get-values $(feature) : $(options) ] : unchecked ;
+}
+
+rule handle-options (
+ toolset
+ : toolset-condition *
+ : command-c command-cxx command-fortran command-ar command-ranlib
+ : options *
+)
+{
+
+ # Configures some common 'toolset.flags' options. In particular, this rule
+ # sets the compiler command name to invoke. Inspired by
+ # 'common.handle-options'.
+
+ # We cannot use a single 'CONFIG_COMMAND' variable because each CCE driver
+ # can only handle a single source code language. Therefore, we have to
+ # give actions a way to specify which driver they intend to use, and we
+ # accomplish this by providing multiple 'CONFIG_COMMAND' variables to the
+ # action. We cannot set the language through a flag in the 'OPTIONS'
+ # variable the way the 'gcc' toolset does.
+
+ toolset.flags $(toolset) CONFIG_COMMAND_C $(toolset-condition) : $(command-c) : unchecked ;
+ toolset.flags $(toolset) CONFIG_COMMAND_CXX $(toolset-condition) : $(command-cxx) : unchecked ;
+ toolset.flags $(toolset) CONFIG_COMMAND_FORTRAN $(toolset-condition) : $(command-fortran) : unchecked ;
+ toolset.flags $(toolset).archive .AR $(toolset-condition) : $(command-ar) : unchecked ;
+ toolset.flags $(toolset).archive .RANLIB $(toolset-condition) : $(command-ranlib) : unchecked ;
+
+ # The following flags are applied to all targets built by this
+ # configuration of this toolset. This particular configuration of this
+ # toolset is identified by '$(toolset-condition)'. This allows the user to
+ # specify 'options' in their 'using' statement, and those options will be
+ # applied to all targets built by this configuration of this toolset.
+
+ options-helper $(toolset).compile USER_OPTIONS $(toolset-condition) : <compileflags> $(options) ;
+ options-helper $(toolset).compile USER_OPTIONS $(toolset-condition) : <cflags> $(options) ;
+ options-helper $(toolset).compile.c++ USER_OPTIONS $(toolset-condition) : <cxxflags> $(options) ;
+ options-helper $(toolset).compile.fortran USER_OPTIONS $(toolset-condition) : <fflags> $(options) ;
+ options-helper $(toolset).compile.asm USER_OPTIONS $(toolset-condition) : <asmflags> $(options) ;
+ options-helper $(toolset).compile DEFINES $(toolset-condition) : <define> $(options) ;
+ options-helper $(toolset).compile INCLUDES $(toolset-condition) : <include> $(options) ;
+
+ options-helper $(toolset).link USER_OPTIONS $(toolset-condition) : <linkflags> $(options) ;
+ options-helper $(toolset).link LINKPATH $(toolset-condition) : <library-path> $(options) ;
+ options-helper $(toolset).link FINDLIBS-ST $(toolset-condition) : <find-static-library> $(options) ;
+ options-helper $(toolset).link FINDLIBS-SA $(toolset-condition) : <find-shared-library> $(options) ;
+ options-helper $(toolset).link LIBRARIES $(toolset-condition) : <library-file> $(options) ;
+
+ options-helper $(toolset).archive AROPTIONS $(toolset-condition) : <archiveflags> $(options) ;
+}
+
+rule latest-cray-cxxstd ( compiler-version )
+{
+ # Select latest 'cray-cxxstd' based on compiler version.
+
+ local cray-cxxstd = 03 ;
+
+ if $(compiler-version) >= [ numeric-version 8.6 ]
+ {
+ cray-cxxstd = 14 ;
+ }
+
+ return $(cray-cxxstd) ;
+}
+
+rule has-conform-option ( compiler-version )
+{
+
+ # Returns 'true' or 'false'. Returns empty list if the 'compiler-version'
+ # is not supported.
+
+ local result = true ;
+
+ if $(compiler-version) >= [ numeric-version 8.6 ]
+ {
+ result = false ;
+ }
+
+ return $(result) ;
+}
+
+local rule justify-right ( pad-char elements * )
+{
+
+ # Returns a list of 'elements' where each 'element' is at least 2
+ # characters long. If an 'element' is less than two characters long, pads
+ # 'element' with 'pad-char' to make it 2 characters long.
+
+ local result = ;
+ local p = $(pad-char) ;
+ for local e in $(elements)
+ {
+ switch $(e)
+ {
+ case ?? : result += $(e) ;
+ case ? : result += $(p)$(e) ;
+ case * : result += $(p)$(p) ;
+ }
+ }
+ return $(result) ;
+}
+
+local rule list-justify-left ( pad-elem elements * )
+{
+
+ # Add 'pad-elem' to 'elements' list until it has 4 elements. If 'elements'
+ # list already had 4 or more elements, returns the first 4 elements in
+ # 'elements' list.
+
+ local tally = x ;
+ local result = ;
+ for local e in $(elements)
+ {
+ if $(tally) != xxxxx
+ {
+ result += $(e) ;
+ tally = $(tally)x ;
+ }
+ }
+
+ while $(tally) != xxxxx
+ {
+ result += $(pad-elem) ;
+ tally = $(tally)x ;
+ }
+
+ return $(result) ;
+}
+
+local rule numeric-version ( dotted-version )
+{
+
+ # Returns a numeric representation of version that can be compared
+ # directly with comparison operators.
+
+ local result = [ regex.split $(dotted-version) "[.]" ] ;
+ result = [ list-justify-left 0 $(result) ] ;
+ result = [ justify-right 0 $(result) ] ;
+ result = $(result:J="") ;
+
+ return $(result) ;
+}
+
+local rule get-default-feature-value ( feature-name )
+{
+ local default-property = [ feature.defaults $(feature-name) ] ;
+ local default-value = [ feature.get-values $(feature-name) : $(default-property) ] ;
+ return $(default-value) ;
+}
+
+rule log ( log-level prefix ? : * )
+{
+ for local message-arg in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+ {
+ local message = $($(message-arg)) ;
+ if $(message)
+ {
+ ECHO "$(log-level):" "$(prefix):" $(message) ;
+ }
+ }
+}
+
+rule log-error ( prefix ? : * )
+{
+ log error $(prefix) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) : $(19) : $(20) : $(21) : $(22) : $(23) : $(24) ;
+}
+
+rule log-warning ( prefix ? : * )
+{
+ log warning $(prefix) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) : $(19) : $(20) : $(21) : $(22) : $(23) : $(24) ;
+}
+
+rule log-notice ( prefix ? : * )
+{
+ log notice $(prefix) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) : $(19) : $(20) : $(21) : $(22) : $(23) : $(24) ;
+}
+
+rule __test__ ( )
+{
+ import assert ;
+
+ assert.result 08060000 : numeric-version 8.6 ;
+ assert.result 08061500 : numeric-version 8.6.15 ;
+ assert.result 08061501 : numeric-version 8.6.15.1 ;
+ assert.result 08061501 : numeric-version 8.6.15.1.2 ;
+
+ local a = [ numeric-version 8.6 ] ;
+ local b = [ numeric-version 8.5.9 ] ;
+
+ # 'assert.equal x : y' forces the test to fail. It's like saying 'assert
+ # false'.
+
+ if ! ( $(a) > $(b) )
+ {
+ assert.equal x : y ;
+ }
+
+ if ! ( $(b) < $(a) )
+ {
+ assert.equal x : y ;
+ }
+
+ if ! ( $(a) >= $(b) )
+ {
+ assert.equal x : y ;
+ }
+
+ if ! ( $(a) >= $(a) )
+ {
+ assert.equal x : y ;
+ }
+
+ if ! ( $(b) <= $(a) )
+ {
+ assert.equal x : y ;
+ }
+
+ if ! ( $(b) <= $(b) )
+ {
+ assert.equal x : y ;
+ }
+
+ if ! ( $(a) = $(a) )
+ {
+ assert.equal x : y ;
+ }
+
+ if ! ( $(a) != $(b) )
+ {
+ assert.equal x : y ;
+ }
+}
diff --git a/src/boost/tools/build/src/tools/cw-config.jam b/src/boost/tools/build/src/tools/cw-config.jam
new file mode 100644
index 000000000..1211b7c04
--- /dev/null
+++ b/src/boost/tools/build/src/tools/cw-config.jam
@@ -0,0 +1,34 @@
+#~ Copyright 2005 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)
+
+# Automatic configuration for CodeWarrior toolset. To use, just import this module.
+
+import os ;
+import toolset : using ;
+
+if [ os.name ] = NT
+{
+ for local R in 9 8 7
+ {
+ local cw-path = [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Metrowerks\\CodeWarrior\\Product Versions\\CodeWarrior for Windows R$(R)"
+ : "PATH" ] ;
+ local cw-version = [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Metrowerks\\CodeWarrior\\Product Versions\\CodeWarrior for Windows R$(R)"
+ : "VERSION" ] ;
+ cw-path ?= [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Metrowerks\\CodeWarrior for Windows\\$(R).0"
+ : "PATH" ] ;
+ cw-version ?= $(R).0 ;
+
+ if $(cw-path)
+ {
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice:" using cw ":" $(cw-version) ":" "$(cw-path)\\Other Metrowerks Tools\\Command Line Tools\\mwcc.exe" ;
+ }
+ using cw : $(cw-version) : "$(cw-path)\\Other Metrowerks Tools\\Command Line Tools\\mwcc.exe" ;
+ }
+ }
+}
diff --git a/src/boost/tools/build/src/tools/cw.jam b/src/boost/tools/build/src/tools/cw.jam
new file mode 100644
index 000000000..531c9c9fa
--- /dev/null
+++ b/src/boost/tools/build/src/tools/cw.jam
@@ -0,0 +1,302 @@
+# Copyright (C) Reece H Dunn 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.cw]]
+= Code Warrior
+
+The `cw` module support CodeWarrior compiler, originally produced by
+Metrowerks and presently developed by Freescale. B2 supports
+only the versions of the compiler that target x86 processors. All such
+versions were released by Metrowerks before acquisition and are not sold
+any longer. The last version known to work is 9.4.
+
+The module is initialized using the following syntax:
+
+----
+using cw : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the command is not specified, B2 will search for a binary
+named `mwcc` in default installation paths and in PATH.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+`setup`::
+ The command that sets up environment variables prior to invoking the
+ compiler. If not specified, `cwenv.bat` alongside the compiler binary
+ will be used.
+`compiler`::
+ The command that compiles C and C++ sources. If not specified, `mwcc`
+ will be used. The command will be invoked after the setup script was
+ executed and adjusted the PATH variable.
+`linker`::
+ The command that links executables and dynamic libraries. If not
+ specified, `mwld` will be used. The command will be invoked after the
+ setup script was executed and adjusted the PATH variable.
+
+|# # end::doc[]
+
+# based on the msvc.jam toolset
+
+import property ;
+import generators ;
+import os ;
+import type ;
+import toolset : flags ;
+import errors : error ;
+import feature : feature get-values ;
+import path ;
+import sequence : unique ;
+import common ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+feature.extend toolset : cw ;
+
+toolset.add-requirements <toolset>cw,<runtime-link>shared:<threading>multi ;
+
+nl = "
+" ;
+
+rule init ( version ? : command * : options * )
+{
+ # TODO: fix the $(command[1]) = $(compiler) issue
+
+ setup = [ get-values <setup> : $(options) ] ;
+ setup ?= cwenv.bat ;
+ compiler = [ get-values <compiler> : $(options) ] ;
+ compiler ?= mwcc ;
+ linker = [ get-values <linker> : $(options) ] ;
+ linker ?= mwld ;
+
+ local condition = [ common.check-init-parameters cw :
+ version $(version) ] ;
+
+ command = [ common.get-invocation-command cw : mwcc.exe : $(command) :
+ [ default-paths $(version) ] ] ;
+
+ common.handle-options cw : $(condition) : $(command) : $(options) ;
+
+ local root = [ feature.get-values <root> : $(options) ] ;
+ if $(command)
+ {
+ command = [ common.get-absolute-tool-path $(command[-1]) ] ;
+ }
+ local tool-root = $(command) ;
+
+ setup = $(tool-root)\\$(setup) ;
+
+ # map the batch file in setup so it can be executed
+
+ other-tools = $(tool-root:D) ;
+ root ?= $(other-tools:D) ;
+
+ flags cw.link RUN_PATH $(condition) :
+ "$(root)\\Win32-x86 Support\\Libraries\\Runtime"
+ "$(root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ;
+
+ setup = "set \"CWFOLDER="$(root)"\" && call \""$(setup)"\" > nul " ;
+
+ if [ os.name ] = NT
+ {
+ setup = $(setup)"
+" ;
+ }
+ else
+ {
+ setup = "cmd /S /C "$(setup)" \"&&\" " ;
+ }
+
+ # bind the setup command to the tool so it can be executed before the
+ # command
+
+ local prefix = $(setup) ;
+
+ flags cw.compile .CC $(condition) : $(prefix)$(compiler) ;
+ flags cw.link .LD $(condition) : $(prefix)$(linker) ;
+ flags cw.archive .LD $(condition) : $(prefix)$(linker) ;
+
+ if [ MATCH "^([89]\\.)" : $(version) ]
+ {
+ if [ os.name ] = NT
+ {
+ # The runtime libraries
+ flags cw.compile CFLAGS <runtime-link>static/<threading>single/<runtime-debugging>off : -runtime ss ;
+ flags cw.compile CFLAGS <runtime-link>static/<threading>single/<runtime-debugging>on : -runtime ssd ;
+
+ flags cw.compile CFLAGS <runtime-link>static/<threading>multi/<runtime-debugging>off : -runtime sm ;
+ flags cw.compile CFLAGS <runtime-link>static/<threading>multi/<runtime-debugging>on : -runtime smd ;
+
+ flags cw.compile CFLAGS <runtime-link>shared/<runtime-debugging>off : -runtime dm ;
+ flags cw.compile CFLAGS <runtime-link>shared/<runtime-debugging>on : -runtime dmd ;
+ }
+ }
+}
+
+
+local rule default-paths ( version ? ) # FIXME
+{
+ local possible-paths ;
+ local ProgramFiles = [ common.get-program-files-dir ] ;
+
+ # TODO: add support for cw8 and cw9 detection
+
+ local version-6-path = $(ProgramFiles)"\\Metrowerks\\CodeWarrior" ;
+ possible-paths += $(version-6-path) ;
+
+ # perform post-processing
+
+ possible-paths
+ = $(possible-paths)"\\Other Metrowerks Tools\\Command Line Tools" ;
+
+ possible-paths += [ modules.peek : PATH Path path ] ;
+
+ return $(possible-paths) ;
+}
+
+
+
+
+## declare generators
+
+generators.register-c-compiler cw.compile.c++ : CPP : OBJ : <toolset>cw ;
+generators.register-c-compiler cw.compile.c : C : OBJ : <toolset>cw ;
+
+generators.register-linker cw.link
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : EXE
+ : <toolset>cw
+ ;
+generators.register-linker cw.link.dll
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : SHARED_LIB IMPORT_LIB
+ : <toolset>cw
+ ;
+
+generators.register-archiver cw.archive
+ : OBJ
+ : STATIC_LIB
+ : <toolset>cw
+ ;
+
+## compilation phase
+
+flags cw WHATEVER <toolset-cw:version> ;
+
+flags cw.compile CFLAGS <debug-symbols>on : -g ;
+flags cw.compile CFLAGS <optimization>off : -O0 ;
+flags cw.compile CFLAGS <optimization>speed : -O4,p ;
+flags cw.compile CFLAGS <optimization>space : -O4,s ;
+flags cw.compile CFLAGS <inlining>off : -inline off ;
+flags cw.compile CFLAGS <inlining>on : -inline on ;
+flags cw.compile CFLAGS <inlining>full : -inline all ;
+flags cw.compile CFLAGS <exception-handling>off : -Cpp_exceptions off ;
+
+
+flags cw.compile CFLAGS <rtti>on : -RTTI on ;
+flags cw.compile CFLAGS <rtti>off : -RTTI off ;
+
+flags cw.compile CFLAGS <warnings>on : -w on ;
+flags cw.compile CFLAGS <warnings>off : -w off ;
+flags cw.compile CFLAGS <warnings>all : -w all ;
+flags cw.compile CFLAGS <warnings-as-errors>on : -w error ;
+
+flags cw.compile USER_CFLAGS <cflags> : ;
+flags cw.compile.c++ USER_CFLAGS <cxxflags> : ;
+
+flags cw.compile DEFINES <define> ;
+flags cw.compile UNDEFS <undef> ;
+flags cw.compile INCLUDES <include> ;
+
+actions compile.c
+{
+ $(.CC) -c -cwd include -lang c -U$(UNDEFS) $(CFLAGS) $(USER_CFLAGS) -I- -o "$(<)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")"
+}
+actions compile.c++
+{
+ $(.CC) -c -cwd include -lang c++ -U$(UNDEFS) $(CFLAGS) $(USER_CFLAGS) -I- -o "$(<)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")"
+}
+
+## linking phase
+
+flags cw.link DEF_FILE <def-file> ;
+
+flags cw LINKFLAGS : -search ;
+flags cw LINKFLAGS <debug-symbols>on : -g ;
+flags cw LINKFLAGS <user-interface>console : -subsystem console ;
+flags cw LINKFLAGS <user-interface>gui : -subsystem windows ;
+flags cw LINKFLAGS <user-interface>wince : -subsystem wince ;
+flags cw LINKFLAGS <user-interface>native : -subsystem native ;
+flags cw LINKFLAGS <user-interface>auto : -subsystem auto ;
+
+flags cw LINKFLAGS <main-target-type>LIB/<link>static : -library ;
+
+flags cw.link USER_LINKFLAGS <linkflags> ;
+flags cw.link LINKPATH <library-path> ;
+
+flags cw.link FINDLIBS_ST <find-static-library> ;
+flags cw.link FINDLIBS_SA <find-shared-library> ;
+flags cw.link LIBRARY_OPTION <toolset>cw : "" : unchecked ;
+flags cw.link LIBRARIES_MENTIONED_BY_FILE : <library-file> ;
+
+rule link.dll ( targets + : sources * : properties * )
+{
+ DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ;
+}
+
+if [ os.name ] in NT
+{
+ actions archive
+ {
+ if exist "$(<[1])" DEL "$(<[1])"
+ $(.LD) -library -o "$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ }
+}
+else # cygwin
+{
+ actions archive
+ {
+ _bbv2_out_="$(<)"
+ if test -f "$_bbv2_out_" ; then
+ _bbv2_existing_="$(<:W)"
+ fi
+ $(.LD) -library -o "$(<:W)" $_bbv2_existing_ @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ }
+}
+
+actions link bind DEF_FILE
+{
+ $(.LD) -o "$(<[1]:W)" -L"$(LINKPATH)" $(LINKFLAGS) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+}
+
+actions link.dll bind DEF_FILE
+{
+ $(.LD) -shared -o "$(<[1]:W)" -implib "$(<[2]:W)" -L"$(LINKPATH)" $(LINKFLAGS) -f"$(DEF_FILE)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+}
+
diff --git a/src/boost/tools/build/src/tools/cygwin.jam b/src/boost/tools/build/src/tools/cygwin.jam
new file mode 100644
index 000000000..92adf6d45
--- /dev/null
+++ b/src/boost/tools/build/src/tools/cygwin.jam
@@ -0,0 +1,12 @@
+# Copyright 2004 Vladimir Prus.
+# Copyright 2016 Steven Watanabe
+# 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)
+
+# Provides utility functions for handling cygwin paths
+
+rule cygwin-to-windows-path ( path )
+{
+ return [ MATCH "(.*)[\n]+" : [ SHELL "cygpath -w $(path)" ] ] ;
+}
diff --git a/src/boost/tools/build/src/tools/darwin.jam b/src/boost/tools/build/src/tools/darwin.jam
new file mode 100644
index 000000000..8d477410b
--- /dev/null
+++ b/src/boost/tools/build/src/tools/darwin.jam
@@ -0,0 +1,620 @@
+# Copyright 2003 Christopher Currie
+# Copyright 2006 Dave Abrahams
+# Copyright 2003, 2004, 2005, 2006 Vladimir Prus
+# Copyright 2005-2007 Mat Marcus
+# Copyright 2005-2007 Adobe Systems Incorporated
+# Copyright 2007-2010 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)
+
+# Please see http://article.gmane.org/gmane.comp.lib.boost.build/3389/
+# for explanation why it's a separate toolset.
+
+import feature : feature ;
+import toolset : flags ;
+import type ;
+import common ;
+import generators ;
+import path : basename ;
+import version ;
+import property-set ;
+import regex ;
+import errors ;
+
+## Use a framework.
+feature framework : : free ;
+
+## The MacOSX version to compile for, which maps to the SDK to use (sysroot).
+feature macosx-version : : propagated link-incompatible symmetric optional ;
+
+## The minimal MacOSX version to target.
+feature macosx-version-min : : propagated optional ;
+
+## A dependency, that is forced to be included in the link.
+feature force-load : : free dependency incidental ;
+
+#############################################################################
+
+_ = " " ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+feature.extend toolset : darwin ;
+import gcc ;
+toolset.inherit-generators darwin : gcc : gcc.mingw.link gcc.mingw.link.dll ;
+
+generators.override darwin.prebuilt : builtin.prebuilt ;
+generators.override darwin.searched-lib-generator : searched-lib-generator ;
+
+# Override default do-nothing generators.
+generators.override darwin.compile.c.pch : pch.default-c-pch-generator ;
+generators.override darwin.compile.c++.pch : pch.default-cpp-pch-generator ;
+
+type.set-generated-target-suffix PCH : <toolset>darwin : gch ;
+
+toolset.inherit-rules darwin : gcc : localize ;
+toolset.inherit-flags darwin : gcc
+ : <runtime-link>static
+ <architecture>arm/<address-model>32
+ <architecture>arm/<address-model>64
+ <architecture>arm/<instruction-set>
+ <architecture>x86/<address-model>32
+ <architecture>x86/<address-model>64
+ <architecture>x86/<instruction-set>
+ <architecture>power/<address-model>32
+ <architecture>power/<address-model>64
+ <architecture>power/<instruction-set>
+ <inlining>full ;
+
+# Options:
+#
+# <root>PATH
+# Platform root path. The common autodetection will set this to
+# "/Developer". And when a command is given it will be set to
+# the corresponding "*.platform/Developer" directory.
+#
+rule init ( version ? : command * : options * : requirement * )
+{
+ # First time around, figure what is host OSX version
+ if ! $(.host-osx-version)
+ {
+ .host-osx-version = [ MATCH "^([0-9.]+)"
+ : [ SHELL "/usr/bin/sw_vers -productVersion" ] ] ;
+ if $(.debug-configuration)
+ {
+ ECHO notice\: OSX version on this machine is $(.host-osx-version) ;
+ }
+ }
+
+ # - The root directory of the tool install.
+ local root = [ feature.get-values <root> : $(options) ] ;
+
+ # - The bin directory where to find the commands to execute.
+ local bin ;
+
+ # - The configured compile driver command.
+ local command = [ common.get-invocation-command darwin : g++ : $(command) ] ;
+
+ # The version as reported by the compiler
+ local real-version ;
+
+ # - Autodetect the root and bin dir if not given.
+ if $(command)
+ {
+ bin ?= [ common.get-absolute-tool-path $(command[1]) ] ;
+ if $(bin) = "/usr/bin"
+ {
+ root ?= /Developer ;
+ }
+ else
+ {
+ local r = $(bin:D) ;
+ r = $(r:D) ;
+ root ?= $(r) ;
+ }
+ }
+
+ # - Autodetect the version if not given.
+ if $(command)
+ {
+ # - The 'command' variable can have multiple elements. When calling
+ # the SHELL builtin we need a single string.
+ local command-string = $(command:J=" ") ;
+ real-version = [ MATCH "^([0-9.]+)"
+ : [ SHELL "$(command-string) -dumpversion" ] ] ;
+ version ?= $(real-version) ;
+ }
+
+ .real-version.$(version) = $(real-version) ;
+
+ # - Define the condition for this toolset instance.
+ local condition =
+ [ common.check-init-parameters darwin $(requirement) : version $(version) ] ;
+
+ # - Set the toolset generic common options.
+ common.handle-options darwin : $(condition) : $(command) : $(options) ;
+
+ # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
+ if $(real-version) < "4.0.0"
+ {
+ flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
+ }
+ # - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
+ if $(real-version) < "4.2.0"
+ {
+ flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
+ }
+ # - GCC on Darwin with -pedantic, suppress unsupported long long warning
+ flags darwin.compile OPTIONS $(condition)/<warnings>all : -Wno-long-long ;
+
+ # - GCC on El Capitan (10.11) does not support -finline-functions
+ if "10.11.0" <= $(.host-osx-version)
+ {
+ flags darwin.compile OPTIONS $(condition)/<inlining>full : -Wno-inline ;
+ }
+
+ # - The symbol strip program.
+ local strip ;
+ if <striper> in $(options)
+ {
+ # We can turn off strip by specifying it as empty. In which
+ # case we switch to using the linker to do the strip.
+ flags darwin.link.dll OPTIONS
+ $(condition)/<main-target-type>LIB/<link>shared/<address-model>32/<strip>on : -Wl,-x ;
+ flags darwin.link.dll OPTIONS
+ $(condition)/<main-target-type>LIB/<link>shared/<address-model>/<strip>on : -Wl,-x ;
+ flags darwin.link OPTIONS
+ $(condition)/<main-target-type>EXE/<address-model>32/<strip>on : -s ;
+ flags darwin.link OPTIONS
+ $(condition)/<main-target-type>EXE/<address-model>/<strip>on : -s ;
+ }
+ else
+ {
+ # Otherwise we need to find a strip program to use. And hence
+ # also tell the link action that we need to use a strip
+ # post-process.
+ flags darwin.link NEED_STRIP $(condition)/<strip>on : "" ;
+ strip =
+ [ common.get-invocation-command darwin
+ : strip : [ feature.get-values <striper> : $(options) ] : $(bin) : search-path ] ;
+ flags darwin.link .STRIP $(condition) : $(strip[1]) ;
+ if $(.debug-configuration)
+ {
+ ECHO notice\: using strip for $(condition) at $(strip[1]) ;
+ }
+ }
+
+ # - The archive builder (libtool is the default as creating
+ # archives in darwin is complicated.
+ local archiver =
+ [ common.get-invocation-command darwin
+ : libtool : [ feature.get-values <archiver> : $(options) ] : $(bin) : search-path ] ;
+ flags darwin.archive .LIBTOOL $(condition) : $(archiver[1]) ;
+ if $(.debug-configuration)
+ {
+ ECHO notice\: using archiver for $(condition) at $(archiver[1]) ;
+ }
+
+ # - Initialize the SDKs available in the root for this tool.
+ local sdks = [ init-available-sdk-versions $(condition) : $(root) ] ;
+
+ #~ ECHO --- ;
+ #~ ECHO --- bin :: $(bin) ;
+ #~ ECHO --- root :: $(root) ;
+ #~ ECHO --- version :: $(version) ;
+ #~ ECHO --- condition :: $(condition) ;
+ #~ ECHO --- strip :: $(strip) ;
+ #~ ECHO --- archiver :: $(archiver) ;
+ #~ ECHO --- sdks :: $(sdks) ;
+ #~ ECHO --- ;
+ #~ EXIT ;
+}
+
+# Add and set options for a discovered SDK version.
+local rule init-sdk ( condition * : root ? : version + : version-feature ? )
+{
+ local rule version-to-feature ( version + )
+ {
+ switch $(version[1])
+ {
+ case appletv* :
+ {
+ return $(version[1])-$(version[2-]:J=.) ;
+ }
+ case iphone* :
+ {
+ return $(version[1])-$(version[2-]:J=.) ;
+ }
+ case mac* :
+ {
+ return $(version[2-]:J=.) ;
+ }
+ case * :
+ {
+ return $(version:J=.) ;
+ }
+ }
+ }
+
+ if $(version-feature)
+ {
+ if $(.debug-configuration)
+ {
+ ECHO notice\: available sdk for $(condition)/<macosx-version>$(version-feature) at $(root) ;
+ }
+
+ # Add the version to the features for specifying them.
+ if ! $(version-feature) in [ feature.values macosx-version ]
+ {
+ feature.extend macosx-version : $(version-feature) ;
+ }
+ if ! $(version-feature) in [ feature.values macosx-version-min ]
+ {
+ feature.extend macosx-version-min : $(version-feature) ;
+ }
+
+ # Set the flags the version needs to compile with, first
+ # generic options.
+ flags darwin.compile OPTIONS $(condition)/<macosx-version>$(version-feature)
+ : -isysroot $(root) ;
+ flags darwin.link OPTIONS $(condition)/<macosx-version>$(version-feature)
+ : -isysroot $(root) ;
+
+ # Then device variation options.
+ switch $(version[1])
+ {
+ case appletvsim* :
+ {
+ local N = $(version[2]) ;
+ if ! $(version[3]) { N += 00 ; }
+ else if [ regex.match (..) : $(version[3]) ] { N += $(version[3]) ; }
+ else { N += 0$(version[3]) ; }
+ if ! $(version[4]) { N += 00 ; }
+ else if [ regex.match (..) : $(version[4]) ] { N += $(version[4]) ; }
+ else { N += 0$(version[4]) ; }
+ N = $(N:J=) ;
+ flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+ : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+ flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+ : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+ }
+
+ case appletv* :
+ {
+ flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+ : -mtvos-version-min=$(version[2-]:J=.) ;
+ flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+ : -mtvos-version-min=$(version[2-]:J=.) ;
+ }
+
+ case iphonesim* :
+ {
+ local N = $(version[2]) ;
+ if ! $(version[3]) { N += 00 ; }
+ else if [ regex.match (..) : $(version[3]) ] { N += $(version[3]) ; }
+ else { N += 0$(version[3]) ; }
+ if ! $(version[4]) { N += 00 ; }
+ else if [ regex.match (..) : $(version[4]) ] { N += $(version[4]) ; }
+ else { N += 0$(version[4]) ; }
+ N = $(N:J=) ;
+ flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+ : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+ flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+ : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+ }
+
+ case iphone* :
+ {
+ flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+ : -miphoneos-version-min=$(version[2-]:J=.) ;
+ flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+ : -miphoneos-version-min=$(version[2-]:J=.) ;
+ }
+
+ case mac* :
+ {
+ flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+ : -mmacosx-version-min=$(version[2-]:J=.) ;
+ flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+ : -mmacosx-version-min=$(version[2-]:J=.) ;
+ }
+ }
+
+ if $(version[3]) > 0
+ {
+ # We have a minor version of an SDK. We want to set up
+ # previous minor versions, plus the current minor version.
+ # So we recurse to set up the previous minor versions, up to
+ # the current version.
+ local minor-minus-1 = [ CALC $(version[3]) - 1 ] ;
+ return
+ [ init-sdk $(condition) : $(root)
+ : $(version[1-2]) $(minor-minus-1) : [ version-to-feature $(version[1-2]) $(minor-minus-1) ] ]
+ $(version-feature) ;
+ }
+ else
+ {
+ return $(version-feature) ;
+ }
+ }
+ else if $(version[4])
+ {
+ # We have a patch version of an SDK. We want to set up
+ # both the specific patch version, and the minor version.
+ # So we recurse to set up the patch version. Plus the minor version.
+ return
+ [ init-sdk $(condition) : $(root)
+ : $(version[1-3]) : [ version-to-feature $(version[1-3]) ] ]
+ [ init-sdk $(condition) : $(root)
+ : $(version) : [ version-to-feature $(version) ] ] ;
+ }
+ else
+ {
+ # Yes, this is intentionally recursive.
+ return
+ [ init-sdk $(condition) : $(root)
+ : $(version) : [ version-to-feature $(version) ] ] ;
+ }
+}
+
+# Determine the MacOSX SDK versions installed and their locations.
+local rule init-available-sdk-versions ( condition * : root ? )
+{
+ root ?= /Developer ;
+ local sdks-root = $(root)/SDKs ;
+ local sdks = [ GLOB $(sdks-root) : MacOSX*.sdk AppleTVOS*.sdk AppleTVSimulator*.sdk iPhoneOS*.sdk iPhoneSimulator*.sdk ] ;
+ local result ;
+ for local sdk in $(sdks)
+ {
+ local sdk-match = [ MATCH "([^0-9]+)([0-9]+)[.]([0-9x]+)[.]?([0-9x]+)?" : $(sdk:D=) ] ;
+ local sdk-platform = $(sdk-match[1]:L) ;
+ local sdk-version = $(sdk-match[2-]) ;
+ if $(sdk-version)
+ {
+ switch $(sdk-platform)
+ {
+ case macosx :
+ {
+ sdk-version = mac $(sdk-version) ;
+ }
+ case appletvos :
+ {
+ sdk-version = appletv $(sdk-version) ;
+ }
+ case appletvsimulator :
+ {
+ sdk-version = appletvsim $(sdk-version) ;
+ }
+ case iphoneos :
+ {
+ sdk-version = iphone $(sdk-version) ;
+ }
+ case iphonesimulator :
+ {
+ sdk-version = iphonesim $(sdk-version) ;
+ }
+ case * :
+ {
+ sdk-version = $(sdk-version:J=-) ;
+ }
+ }
+ result += [ init-sdk $(condition) : $(sdk) : $(sdk-version) ] ;
+ }
+ }
+ return $(result) ;
+}
+
+# Generic options.
+flags darwin.compile OPTIONS <flags> ;
+
+# The following adds objective-c support to darwin.
+# Thanks to http://thread.gmane.org/gmane.comp.lib.boost.build/13759
+
+generators.register-c-compiler darwin.compile.m : OBJECTIVE_C : OBJ : <toolset>darwin ;
+generators.register-c-compiler darwin.compile.mm : OBJECTIVE_CPP : OBJ : <toolset>darwin ;
+
+rule setup-address-model ( targets * : sources * : properties * )
+{
+ local ps = [ property-set.create $(properties) ] ;
+ local arch = [ $(ps).get <architecture> ] ;
+ local instruction-set = [ $(ps).get <instruction-set> ] ;
+ local address-model = [ $(ps).get <address-model> ] ;
+ local osx-version = [ $(ps).get <macosx-version> ] ;
+ local gcc-version = [ $(ps).get <toolset-darwin:version> ] ;
+ gcc-version = $(.real-version.$(gcc-version)) ;
+ local options ;
+
+ local support-ppc64 = 1 ;
+
+ osx-version ?= $(.host-osx-version) ;
+
+ switch $(osx-version)
+ {
+ case iphone* :
+ {
+ support-ppc64 = ;
+ }
+
+ case * :
+ if $(osx-version) && ! [ version.version-less [ regex.split $(osx-version) \\. ] : 10 6 ]
+ {
+ # When targeting 10.6:
+ # - gcc 4.2 will give a compiler errir if ppc64 compilation is requested
+ # - gcc 4.0 will compile fine, somehow, but then fail at link time
+ support-ppc64 = ;
+ }
+ }
+ switch $(arch)
+ {
+ case combined :
+ {
+ if $(address-model) = 32_64 {
+ if $(support-ppc64) {
+ options = -arch i386 -arch ppc -arch x86_64 -arch ppc64 ;
+ } else {
+ # Build 3-way binary
+ options = -arch i386 -arch ppc -arch x86_64 ;
+ }
+ } else if $(address-model) = 64 {
+ if $(support-ppc64) {
+ options = -arch x86_64 -arch ppc64 ;
+ } else {
+ errors.user-error "64-bit PPC compilation is not supported when targeting OSX 10.6 or later" ;
+ }
+ } else {
+ options = -arch i386 -arch ppc ;
+ }
+ }
+
+ case x86 :
+ {
+ if $(address-model) = 32_64 {
+ options = -arch i386 -arch x86_64 ;
+ } else if $(address-model) = 64 {
+ options = -arch x86_64 ;
+ } else {
+ options = -arch i386 ;
+ }
+ }
+
+ case power :
+ {
+ if ! $(support-ppc64)
+ && ( $(address-model) = 32_64 || $(address-model) = 64 )
+ {
+ errors.user-error "64-bit PPC compilation is not supported when targeting OSX 10.6 or later" ;
+ }
+
+ if $(address-model) = 32_64 {
+ options = -arch ppc -arch ppc64 ;
+ } else if $(address-model) = 64 {
+ options = -arch ppc64 ;
+ } else {
+ options = -arch ppc ;
+ }
+ }
+
+ case arm :
+ {
+ if $(instruction-set) {
+ options = -arch$(_)$(instruction-set) ;
+ } else {
+ options = -arch arm ;
+ }
+ }
+ }
+
+ if $(options)
+ {
+ OPTIONS on $(targets) += $(options) ;
+ }
+}
+
+rule compile.m ( targets * : sources * : properties * )
+{
+ LANG on $(<) = "-x objective-c" ;
+ gcc.set-fpic-options $(targets) : $(sources) : $(properties) ;
+ setup-address-model $(targets) : $(sources) : $(properties) ;
+}
+
+actions compile.m
+{
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+rule compile.mm ( targets * : sources * : properties * )
+{
+ LANG on $(<) = "-x objective-c++" ;
+ gcc.set-fpic-options $(targets) : $(sources) : $(properties) ;
+ setup-address-model $(targets) : $(sources) : $(properties) ;
+}
+
+actions compile.mm
+{
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+# Set the max header padding to allow renaming of libs for installation.
+flags darwin.link.dll OPTIONS : -headerpad_max_install_names ;
+
+# To link the static runtime we need to link to all the core runtime libraries.
+flags darwin.link OPTIONS <runtime-link>static
+ : -nodefaultlibs -shared-libgcc -lstdc++-static -lgcc_eh -lgcc -lSystem ;
+
+# Strip as much as possible when optimizing.
+flags darwin.link OPTIONS <optimization>speed : -Wl,-dead_strip -no_dead_strip_inits_and_terms ;
+flags darwin.link OPTIONS <optimization>space : -Wl,-dead_strip -no_dead_strip_inits_and_terms ;
+
+# Dynamic/shared linking.
+flags darwin.compile OPTIONS <link>shared : -dynamic ;
+
+# Misc options.
+flags darwin.compile OPTIONS : -gdwarf-2 -fexceptions ;
+#~ flags darwin.link OPTIONS : -fexceptions ;
+
+# Add the framework names to use.
+flags darwin.link FRAMEWORK <framework> ;
+
+#
+flags darwin.link FORCE_LOAD <force-load> ;
+
+# This is flag is useful for debugging the link step
+# uncomment to see what libtool is doing under the hood
+#~ flags darwin.link.dll OPTIONS : -Wl,-v ;
+
+# set up the -F option to include the paths to any frameworks used.
+local rule prepare-framework-path ( target + )
+{
+ # The -framework option only takes basename of the framework.
+ # The -F option specifies the directories where a framework
+ # is searched for. So, if we find <framework> feature
+ # with some path, we need to generate property -F option.
+ local framework-paths = [ on $(target) return $(FRAMEWORK:D) ] ;
+
+ # Be sure to generate no -F if there's no path.
+ for local framework-path in $(framework-paths)
+ {
+ if $(framework-path) != ""
+ {
+ FRAMEWORK_PATH on $(target) += -F$(framework-path) ;
+ }
+ }
+}
+
+rule link ( targets * : sources * : properties * )
+{
+ DEPENDS $(targets) : [ on $(targets) return $(FORCE_LOAD) ] ;
+ setup-address-model $(targets) : $(sources) : $(properties) ;
+ prepare-framework-path $(<) ;
+}
+
+# Note that using strip without any options was reported to result in broken
+# binaries, at least on OS X 10.5.5, see:
+# http://svn.boost.org/trac/boost/ticket/2347
+# So we pass -S -x.
+actions link bind LIBRARIES FORCE_LOAD
+{
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" "$(>)" -Wl,-force_load$(_)"$(FORCE_LOAD)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS)
+ $(NEED_STRIP)"$(.STRIP)" $(NEED_STRIP)-S $(NEED_STRIP)-x $(NEED_STRIP)"$(<)"
+}
+
+rule link.dll ( targets * : sources * : properties * )
+{
+ setup-address-model $(targets) : $(sources) : $(properties) ;
+ prepare-framework-path $(<) ;
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -dynamiclib -Wl,-single_module -install_name "$(<:B)$(<:S)" -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS)
+}
+
+# We use libtool instead of ar to support universal binary linking
+# TODO: Find a way to use the underlying tools, i.e. lipo, to do this.
+actions piecemeal archive
+{
+ "$(.LIBTOOL)" -static -o "$(<:T)" $(ARFLAGS) "$(>:T)"
+}
diff --git a/src/boost/tools/build/src/tools/darwin.py b/src/boost/tools/build/src/tools/darwin.py
new file mode 100644
index 000000000..f03d63f35
--- /dev/null
+++ b/src/boost/tools/build/src/tools/darwin.py
@@ -0,0 +1,57 @@
+# Copyright (C) Christopher Currie 2003. 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.
+
+# Please see http://article.gmane.org/gmane.comp.lib.boost.build/3389/
+# for explanation why it's a separate toolset.
+
+import common, gcc, builtin
+from b2.build import feature, toolset, type, action, generators
+from b2.util.utility import *
+
+toolset.register ('darwin')
+
+toolset.inherit_generators ('darwin', [], 'gcc')
+toolset.inherit_flags ('darwin', 'gcc')
+toolset.inherit_rules ('darwin', 'gcc')
+
+def init (version = None, command = None, options = None):
+ options = to_seq (options)
+
+ condition = common.check_init_parameters ('darwin', None, ('version', version))
+
+ command = common.get_invocation_command ('darwin', 'g++', command)
+
+ common.handle_options ('darwin', condition, command, options)
+
+ gcc.init_link_flags ('darwin', 'darwin', condition)
+
+# Darwin has a different shared library suffix
+type.set_generated_target_suffix ('SHARED_LIB', ['<toolset>darwin'], 'dylib')
+
+# we need to be able to tell the type of .dylib files
+type.register_suffixes ('dylib', 'SHARED_LIB')
+
+feature.feature ('framework', [], ['free'])
+
+toolset.flags ('darwin.compile', 'OPTIONS', '<link>shared', ['-dynamic'])
+toolset.flags ('darwin.compile', 'OPTIONS', None, ['-Wno-long-double', '-no-cpp-precomp'])
+toolset.flags ('darwin.compile.c++', 'OPTIONS', None, ['-fcoalesce-templates'])
+
+toolset.flags ('darwin.link', 'FRAMEWORK', '<framework>')
+
+# This is flag is useful for debugging the link step
+# uncomment to see what libtool is doing under the hood
+# toolset.flags ('darwin.link.dll', 'OPTIONS', None, '[-Wl,-v'])
+
+action.register ('darwin.compile.cpp', None, ['$(CONFIG_COMMAND) $(ST_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK) $(OPTIONS)'])
+
+# TODO: how to set 'bind LIBRARIES'?
+action.register ('darwin.link.dll', None, ['$(CONFIG_COMMAND) -dynamiclib -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK) $(OPTIONS)'])
+
+def darwin_archive (manager, targets, sources, properties):
+ pass
+
+action.register ('darwin.archive', darwin_archive, ['ar -c -r -s $(ARFLAGS) "$(<:T)" "$(>:T)"'])
diff --git a/src/boost/tools/build/src/tools/diab.jam b/src/boost/tools/build/src/tools/diab.jam
new file mode 100644
index 000000000..60953b677
--- /dev/null
+++ b/src/boost/tools/build/src/tools/diab.jam
@@ -0,0 +1,131 @@
+# Copyright 2015, Wind River Inc.
+# 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)
+
+#
+# Diab C++ Compiler
+#
+
+import feature generators common ;
+import toolset : flags ;
+import os ;
+
+feature.extend toolset : diab ;
+
+# Inherit from Unix toolset to get library ordering magic.
+toolset.inherit diab : unix ;
+
+generators.override diab.prebuilt : builtin.lib-generator ;
+generators.override diab.prebuilt : builtin.prebuilt ;
+generators.override diab.searched-lib-generator : searched-lib-generator ;
+
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters diab : version $(version) ] ;
+
+ local command = [ common.get-invocation-command diab : dcc : $(command) ] ;
+
+ if $(command)
+ {
+ local root = [ common.get-absolute-tool-path $(command[-1]) ] ;
+
+ if $(root)
+ {
+ flags diab .root <host-os>linux : "\"$(root)\"/" ;
+ flags diab .root <host-os>windows : $(root:T)/ ;
+ }
+ }
+ # If we can't find 'CC' anyway, at least show 'CC' in the commands
+ command ?= CC ;
+
+ common.handle-options diab : $(condition) : $(command) : $(options) ;
+}
+
+generators.register-c-compiler diab.compile.c++ : CPP : OBJ : <toolset>diab ;
+generators.register-c-compiler diab.compile.c : C : OBJ : <toolset>diab ;
+
+
+# unlike most compilers, Diab defaults to static linking.
+# flags cxx LINKFLAGS <runtime-link>static : ;
+flags diab.compile OPTIONS <debug-symbols>on : -g ;
+flags diab.link OPTIONS <debug-symbols>on : -g ;
+
+flags diab.compile OPTIONS <optimization>off : ;
+flags diab.compile OPTIONS <optimization>speed : -speed ;
+flags diab.compile OPTIONS <optimization>space : -size ;
+
+# flags diab.compile OPTIONS <inlining>off : -Xinline=0 ;
+# flags diab.compile OPTIONS <inlining>on : -Xinline=10 ;
+# flags diab.compile OPTIONS <inlining>full : -Xinline=50 ;
+
+flags diab.compile OPTIONS <cflags> ;
+flags diab.compile.c++ OPTIONS <cxxflags> ;
+flags diab.compile DEFINES <define> ;
+
+flags diab.compile.c++ OPTIONS <exception-handling>off : -Xno-exceptions ;
+# So Dinkum STL knows when exceptions are disabled
+flags diab.compile.c++ DEFINES <exception-handling>off : _NO_EX=1 ;
+flags diab.compile.c++ DEFINES <rtti>off : _NO_RTTI ;
+flags diab.compile INCLUDES <include> ;
+flags diab.link OPTIONS <linkflags> ;
+
+flags diab.compile OPTIONS <link>shared : -Xpic ;
+#flags diab.compile OPTIONS <link>static : ;
+# get VxWorks link options from shell environment
+flags diab.link OPTIONS <link>static : [ os.environ LDFLAGS_STATIC ] ;
+flags diab.link.dll OPTIONS : [ os.environ LDFLAGS_SO ] ;
+flags diab.link OPTIONS <link>shared : [ os.environ LDFLAGS_DYNAMIC ] ;
+
+flags diab.link LOPTIONS <link>shared : -Xdynamic -Xshared -Xpic ;
+
+flags diab.link LIBPATH <library-path> ;
+flags diab.link LIBRARIES <library-file> ;
+flags diab.link FINDLIBS-ST <find-static-library> ;
+flags diab.link FINDLIBS-SA <find-shared-library> ;
+
+actions link bind LIBRARIES
+{
+ $(CONFIG_COMMAND) $(OPTIONS) $(LOPTIONS) -o "$(<)" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
+}
+
+# When creating dynamic libraries, we don't want to be warned about unresolved
+# symbols, therefore all unresolved symbols are marked as expected by
+# '-expect_unresolved *'. This also mirrors the behaviour of the GNU tool
+# chain.
+
+actions link.dll bind LIBRARIES
+{
+ $(.root:E=)dplus $(OPTIONS) $(LOPTIONS) "$(LIBRARIES)" -o "$(<[1])" -L$(LIBPATH) "$(>)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
+}
+
+#rule compile.asm ( targets * : sources * : properties * )
+#{
+# setup-fpic $(targets) : $(sources) : $(properties) ;
+# setup-address-model $(targets) : $(sources) : $(properties) ;
+#}
+
+actions compile.asm
+{
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+
+
+actions compile.c
+{
+ $(.root:E=)dcc -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ $(.root:E=)dplus -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
+}
+
+# Always create archive from scratch. See the gcc toolet for rationale.
+RM = [ common.rm-command ] ;
+actions together piecemeal archive
+{
+ $(RM) "$(<)"
+ dar rc $(<) $(>)
+}
diff --git a/src/boost/tools/build/src/tools/dmc.jam b/src/boost/tools/build/src/tools/dmc.jam
new file mode 100644
index 000000000..cebeefa54
--- /dev/null
+++ b/src/boost/tools/build/src/tools/dmc.jam
@@ -0,0 +1,174 @@
+# Digital Mars C++
+
+# (C) Copyright Christof Meerwald 2003.
+# (C) Copyright Aleksey Gurtovoy 2004.
+# (C) Copyright Arjan Knepper 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.dmc]]
+= Digital Mars C/C++ Compiler
+
+The `dmc` module supports the http://www.digitalmars.com/[Digital Mars
+C++ compiler.]
+
+The module is initialized using the following syntax:
+
+----
+using dmc : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the command is not specified, B2 will search for a binary
+named `dmc` in PATH.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+|# # end::doc[]
+
+# The following #// line will be used by the regression test table generation
+# program as the column heading for HTML tables. Must not include version number.
+#//<a href="http://www.digitalmars.com/">Digital<br>Mars C++</a>
+
+import feature generators common ;
+import toolset : flags ;
+import sequence regex ;
+
+feature.extend toolset : dmc ;
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters dmc : version $(version) ] ;
+
+ local command = [ common.get-invocation-command dmc : dmc : $(command) ] ;
+ command ?= dmc ;
+
+ common.handle-options dmc : $(condition) : $(command) : $(options) ;
+
+ if $(command)
+ {
+ command = [ common.get-absolute-tool-path $(command[-1]) ] ;
+ }
+ root = $(command:D) ;
+
+ if $(root)
+ {
+ # DMC linker is sensitive the the direction of slashes, and
+ # won't link if forward slashes are used in command.
+ root = [ sequence.join [ regex.split $(root) "/" ] : "\\" ] ;
+ flags dmc .root $(condition) : $(root)\\bin\\ ;
+ }
+ else
+ {
+ flags dmc .root $(condition) : "" ;
+ }
+}
+
+
+# Declare generators
+generators.register-linker dmc.link : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : <toolset>dmc ;
+generators.register-linker dmc.link.dll : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB : <toolset>dmc ;
+
+generators.register-archiver dmc.archive : OBJ : STATIC_LIB : <toolset>dmc ;
+generators.register-c-compiler dmc.compile.c++ : CPP : OBJ : <toolset>dmc ;
+generators.register-c-compiler dmc.compile.c : C : OBJ : <toolset>dmc ;
+
+
+# Declare flags
+# dmc optlink has some limitation on the amount of debug-info included. Therefore only linenumbers are enabled in debug builds.
+# flags dmc.compile OPTIONS <debug-symbols>on : -g ;
+flags dmc.compile OPTIONS <debug-symbols>on : -gl ;
+flags dmc.link OPTIONS <debug-symbols>on : /CO /NOPACKF /DEBUGLI ;
+flags dmc.link OPTIONS <debug-symbols>off : /PACKF ;
+
+flags dmc.compile OPTIONS <optimization>off : -S -o+none ;
+flags dmc.compile OPTIONS <optimization>speed : -o+time ;
+flags dmc.compile OPTIONS <optimization>space : -o+space ;
+flags dmc.compile OPTIONS <exception-handling>on : -Ae ;
+flags dmc.compile OPTIONS <rtti>on : -Ar ;
+# FIXME:
+# Compiling sources to be linked into a shared lib (dll) the -WD cflag should be used
+# Compiling sources to be linked into a static lib (lib) or executable the -WA cflag should be used
+# But for some reason the -WD cflag is always in use.
+# flags dmc.compile OPTIONS <link>shared : -WD ;
+# flags dmc.compile OPTIONS <link>static : -WA ;
+
+# Note that these two options actually imply multithreading support on DMC
+# because there is no single-threaded dynamic runtime library. Specifying
+# <threading>multi would be a bad idea, though, because no option would be
+# matched when the build uses the default settings of <runtime-link>dynamic
+# and <threading>single.
+flags dmc.compile OPTIONS <runtime-debugging>off/<runtime-link>shared : -ND ;
+flags dmc.compile OPTIONS <runtime-debugging>on/<runtime-link>shared : -ND ;
+
+flags dmc.compile OPTIONS <runtime-debugging>off/<runtime-link>static/<threading>single : ;
+flags dmc.compile OPTIONS <runtime-debugging>on/<runtime-link>static/<threading>single : ;
+flags dmc.compile OPTIONS <runtime-debugging>off/<runtime-link>static/<threading>multi : -D_MT ;
+flags dmc.compile OPTIONS <runtime-debugging>on/<runtime-link>static/<threading>multi : -D_MT ;
+
+flags dmc.compile OPTIONS : <cflags> ;
+flags dmc.compile.c++ OPTIONS : <cxxflags> ;
+
+flags dmc.compile DEFINES : <define> ;
+flags dmc.compile INCLUDES : <include> ;
+
+flags dmc.link <linkflags> ;
+flags dmc.archive OPTIONS <arflags> ;
+
+flags dmc LIBPATH <library-path> ;
+flags dmc LIBRARIES <library-file> ;
+flags dmc FINDLIBS <find-library-sa> ;
+flags dmc FINDLIBS <find-library-st> ;
+
+actions together link bind LIBRARIES
+{
+ "$(.root)link" $(OPTIONS) /NOI /DE /XN "$(>)" , "$(<[1])" ,, $(LIBRARIES) user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
+}
+
+actions together link.dll bind LIBRARIES
+{
+ echo LIBRARY "$(<[1])" > $(<[2]:B).def
+ echo DESCRIPTION 'A Library' >> $(<[2]:B).def
+ echo EXETYPE NT >> $(<[2]:B).def
+ echo SUBSYSTEM WINDOWS >> $(<[2]:B).def
+ echo CODE EXECUTE READ >> $(<[2]:B).def
+ echo DATA READ WRITE >> $(<[2]:B).def
+ "$(.root)link" $(OPTIONS) /NOI /DE /XN /ENTRY:_DllMainCRTStartup /IMPLIB:"$(<[2])" "$(>)" $(LIBRARIES) , "$(<[1])" ,, user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
+}
+
+actions compile.c
+{
+ "$(.root)dmc" -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o"$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(.root)dmc" -cpp -c -Ab $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o"$(<)" "$(>)"
+}
+
+actions together piecemeal archive
+{
+ "$(.root)lib" $(OPTIONS) -c -n -p256 "$(<)" "$(>)"
+}
diff --git a/src/boost/tools/build/src/tools/docutils.jam b/src/boost/tools/build/src/tools/docutils.jam
new file mode 100644
index 000000000..d5c99b184
--- /dev/null
+++ b/src/boost/tools/build/src/tools/docutils.jam
@@ -0,0 +1,125 @@
+# Copyright David Abrahams 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)
+
+# Support for docutils ReStructuredText processing.
+
+import type ;
+import scanner ;
+import generators ;
+import os ;
+import common ;
+import toolset ;
+import path ;
+import feature : feature ;
+import property ;
+import errors ;
+
+.initialized = ;
+
+type.register ReST : rst ;
+
+class rst-scanner : common-scanner
+{
+ rule __init__ ( paths * )
+ {
+ common-scanner.__init__ . $(paths) ;
+ }
+
+ rule pattern ( )
+ {
+ return "^[ ]*\\.\\.[ ]+include::[ ]+([^
+]+)"
+ "^[ ]*\\.\\.[ ]+image::[ ]+([^
+]+)"
+ "^[ ]*\\.\\.[ ]+figure::[ ]+([^
+]+)"
+ ;
+ }
+}
+
+scanner.register rst-scanner : include ;
+type.set-scanner ReST : rst-scanner ;
+
+generators.register-standard docutils.html : ReST : HTML ;
+
+rule init ( docutils-dir ? : tools-dir ? )
+{
+ docutils-dir ?= [ modules.peek : DOCUTILS_DIR ] ;
+ tools-dir ?= $(docutils-dir)/tools ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+ if $(docutils-dir)
+ {
+ .docutils-dir = $(docutils-dir) ;
+ .tools-dir = $(tools-dir:R="") ;
+
+ .setup = [
+ common.prepend-path-variable-command PYTHONPATH
+ : $(.docutils-dir) $(.docutils-dir)/extras ] ;
+ RST2XXX = [ common.find-tool rst2html ] ;
+ }
+ else
+ {
+ RST2XXX_PY = [ common.find-tool rst2html.py ] ;
+ }
+ }
+}
+
+rule html ( target : source : properties * )
+{
+ if ! [ on $(target) return $(RST2XXX) ]
+ {
+ local python-cmd = [ property.select <python.interpreter> : $(properties) ] ;
+ if ! $(.tools-dir) && ! $(RST2XXX_PY) {
+ errors.user-error
+ "The docutils module is used, but not configured. "
+ : ""
+ : "Please modify your user-config.jam or project-config.jam to contain:"
+ : ""
+ : " using docutils : <docutils-dir> ;"
+ : ""
+ : "On Ubuntu, 'docutils-common' package will create /usr/share/docutils."
+ : "Other flavours of Linux likely have docutils as package as well."
+ : "On Windows, you can install from http://docutils.sourceforge.net/."
+ ;
+ }
+
+ if $(RST2XXX_PY)
+ {
+ if $(RST2XXX_PY:D)
+ {
+ # If we have a path to the rst2html.py script, we need to use
+ # the python interpreter to load it up.
+ RST2XXX on $(target) = $(python-cmd:G=:E="python") $(RST2XXX_PY) ;
+ }
+ else
+ {
+ # Otherwise, bare rst2html.py, we can just exec that directly.
+ # This work for both Nix, and the standard Windows Python installs.
+ RST2XXX on $(target) = $(RST2XXX_PY) ;
+ }
+ }
+ else
+ {
+ RST2XXX on $(target) = $(python-cmd:G=:E="python") $(.tools-dir)/rst2html.py ;
+ }
+ }
+}
+
+
+feature docutils : : free ;
+feature docutils-html : : free ;
+feature docutils-cmd : : free ;
+toolset.flags docutils COMMON-FLAGS : <docutils> ;
+toolset.flags docutils HTML-FLAGS : <docutils-html> ;
+toolset.flags docutils RST2XXX : <docutils-cmd> ;
+
+actions html
+{
+ $(.setup)
+ "$(RST2XXX)" $(COMMON-FLAGS) $(HTML-FLAGS) $(>) $(<)
+}
+
diff --git a/src/boost/tools/build/src/tools/doxproc.py b/src/boost/tools/build/src/tools/doxproc.py
new file mode 100644
index 000000000..d415133e1
--- /dev/null
+++ b/src/boost/tools/build/src/tools/doxproc.py
@@ -0,0 +1,859 @@
+#!/usr/bin/python
+# Copyright 2006 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)
+
+'''
+Processing of Doxygen generated XML.
+'''
+
+import os
+import os.path
+import sys
+import time
+import string
+import getopt
+import glob
+import re
+import xml.dom.minidom
+
+
+def usage():
+ print '''
+Usage:
+ %s options
+
+Options:
+ --xmldir Directory with the Doxygen xml result files.
+ --output Write the output BoostBook to the given location.
+ --id The ID of the top level BoostBook section.
+ --title The title of the top level BoostBook section.
+ --enable-index Generate additional index sections for classes and
+ types.
+''' % ( sys.argv[0] )
+
+
+def get_args( argv = sys.argv[1:] ):
+ spec = [
+ 'xmldir=',
+ 'output=',
+ 'id=',
+ 'title=',
+ 'enable-index',
+ 'help' ]
+ options = {
+ '--xmldir' : 'xml',
+ '--output' : None,
+ '--id' : 'dox',
+ '--title' : 'Doxygen'
+ }
+ ( option_pairs, other ) = getopt.getopt( argv, '', spec )
+ map( lambda x: options.__setitem__( x[0], x[1] ), option_pairs )
+
+ if '--help' in options:
+ usage()
+ sys.exit(1)
+
+ return {
+ 'xmldir' : options['--xmldir'],
+ 'output' : options['--output'],
+ 'id' : options['--id'],
+ 'title' : options['--title'],
+ 'index' : '--enable-index' in options
+ }
+
+def if_attribute(node, attribute, true_value, false_value=None):
+ if node.getAttribute(attribute) == 'yes':
+ return true_value
+ else:
+ return false_value
+
+class Doxygen2BoostBook:
+
+ def __init__( self, **kwargs ):
+ ##
+ self.args = kwargs
+ self.args.setdefault('id','')
+ self.args.setdefault('title','')
+ self.args.setdefault('last_revision', time.asctime())
+ self.args.setdefault('index', False)
+ self.id = '%(id)s.reference' % self.args
+ self.args['id'] = self.id
+ #~ This is our template BoostBook document we insert the generated content into.
+ self.boostbook = xml.dom.minidom.parseString('''<?xml version="1.0" encoding="UTF-8"?>
+<section id="%(id)s" name="%(title)s" last-revision="%(last_revision)s">
+ <title>%(title)s</title>
+ <library-reference id="%(id)s.headers">
+ <title>Headers</title>
+ </library-reference>
+ <index id="%(id)s.classes">
+ <title>Classes</title>
+ </index>
+ <index id="%(id)s.index">
+ <title>Index</title>
+ </index>
+</section>
+''' % self.args )
+ self.section = {
+ 'headers' : self._getChild('library-reference',id='%(id)s.headers' % self.args),
+ 'classes' : self._getChild('index',id='%(id)s.classes' % self.args),
+ 'index' : self._getChild('index',id='%(id)s.index' % self.args)
+ }
+ #~ Remove the index sections if we aren't generating it.
+ if not self.args['index']:
+ self.section['classes'].parentNode.removeChild(self.section['classes'])
+ self.section['classes'].unlink()
+ del self.section['classes']
+ self.section['index'].parentNode.removeChild(self.section['index'])
+ self.section['index'].unlink()
+ del self.section['index']
+ #~ The symbols, per Doxygen notion, that we translated.
+ self.symbols = {}
+ #~ Map of Doxygen IDs and BoostBook IDs, so we can translate as needed.
+ self.idmap = {}
+ #~ Marks generation, to prevent redoing it.
+ self.generated = False
+
+ #~ Add an Doxygen generated XML document to the content we are translating.
+ def addDox( self, document ):
+ self._translateNode(document.documentElement)
+
+ #~ Turns the internal XML tree into an output UTF-8 string.
+ def tostring( self ):
+ self._generate()
+ #~ return self.boostbook.toprettyxml(' ')
+ return self.boostbook.toxml('utf-8')
+
+ #~ Does post-processing on the partial generated content to generate additional info
+ #~ now that we have the complete source documents.
+ def _generate( self ):
+ if not self.generated:
+ self.generated = True
+ symbols = self.symbols.keys()
+ symbols.sort()
+ #~ Populate the header section.
+ for symbol in symbols:
+ if self.symbols[symbol]['kind'] in ('header'):
+ self.section['headers'].appendChild(self.symbols[symbol]['dom'])
+ for symbol in symbols:
+ if self.symbols[symbol]['kind'] not in ('namespace', 'header'):
+ container = self._resolveContainer(self.symbols[symbol],
+ self.symbols[self.symbols[symbol]['header']]['dom'])
+ if container.nodeName != 'namespace':
+ ## The current BoostBook to Docbook translation doesn't
+ ## respect, nor assign, IDs to inner types of any kind.
+ ## So nuke the ID entry so as not create bogus links.
+ del self.idmap[self.symbols[symbol]['id']]
+ container.appendChild(self.symbols[symbol]['dom'])
+ self._rewriteIDs(self.boostbook.documentElement)
+
+ #~ Rewrite the various IDs from Doxygen references to the newly created
+ #~ BoostBook references.
+ def _rewriteIDs( self, node ):
+ if node.nodeName in ('link'):
+ if node.getAttribute('linkend') in self.idmap:
+ #~ A link, and we have someplace to repoint it at.
+ node.setAttribute('linkend',self.idmap[node.getAttribute('linkend')])
+ else:
+ #~ A link, but we don't have a generated target for it.
+ node.removeAttribute('linkend')
+ elif hasattr(node,'hasAttribute') and node.hasAttribute('id') and node.getAttribute('id') in self.idmap:
+ #~ Simple ID, and we have a translation.
+ node.setAttribute('id',self.idmap[node.getAttribute('id')])
+ #~ Recurse, and iterate, depth-first traversal which turns out to be
+ #~ left-to-right and top-to-bottom for the document.
+ if node.firstChild:
+ self._rewriteIDs(node.firstChild)
+ if node.nextSibling:
+ self._rewriteIDs(node.nextSibling)
+
+ def _resolveContainer( self, cpp, root ):
+ container = root
+ for ns in cpp['namespace']:
+ node = self._getChild('namespace',name=ns,root=container)
+ if not node:
+ node = container.appendChild(
+ self._createNode('namespace',name=ns))
+ container = node
+ for inner in cpp['name'].split('::'):
+ node = self._getChild(name=inner,root=container)
+ if not node:
+ break
+ container = node
+ return container
+
+ def _setID( self, id, name ):
+ self.idmap[id] = name.replace('::','.').replace('/','.')
+ #~ print '--| setID:',id,'::',self.idmap[id]
+
+ #~ Translate a given node within a given context.
+ #~ The translation dispatches to a local method of the form
+ #~ "_translate[_context0,...,_contextN]", and the keyword args are
+ #~ passed along. If there is no translation handling method we
+ #~ return None.
+ def _translateNode( self, *context, **kwargs ):
+ node = None
+ names = [ ]
+ for c in context:
+ if c:
+ if not isinstance(c,xml.dom.Node):
+ suffix = '_'+c.replace('-','_')
+ else:
+ suffix = '_'+c.nodeName.replace('-','_')
+ node = c
+ names.append('_translate')
+ names = map(lambda x: x+suffix,names)
+ if node:
+ for name in names:
+ if hasattr(self,name):
+ return getattr(self,name)(node,**kwargs)
+ return None
+
+ #~ Translates the children of the given parent node, appending the results
+ #~ to the indicated target. For nodes not translated by the translation method
+ #~ it copies the child over and recurses on that child to translate any
+ #~ possible interior nodes. Hence this will translate the entire subtree.
+ def _translateChildren( self, parent, **kwargs ):
+ target = kwargs['target']
+ for n in parent.childNodes:
+ child = self._translateNode(n,target=target)
+ if child:
+ target.appendChild(child)
+ else:
+ child = n.cloneNode(False)
+ if hasattr(child,'data'):
+ child.data = re.sub(r'\s+',' ',child.data)
+ target.appendChild(child)
+ self._translateChildren(n,target=child)
+
+ #~ Translate the given node as a description, into the description subnode
+ #~ of the target. If no description subnode is present in the target it
+ #~ is created.
+ def _translateDescription( self, node, target=None, tag='description', **kwargs ):
+ description = self._getChild(tag,root=target)
+ if not description:
+ description = target.appendChild(self._createNode(tag))
+ self._translateChildren(node,target=description)
+ return description
+
+ #~ Top level translation of: <doxygen ...>...</doxygen>,
+ #~ translates the children.
+ def _translate_doxygen( self, node ):
+ #~ print '_translate_doxygen:', node.nodeName
+ result = []
+ for n in node.childNodes:
+ newNode = self._translateNode(n)
+ if newNode:
+ result.append(newNode)
+ return result
+
+ #~ Top level translation of:
+ #~ <doxygenindex ...>
+ #~ <compound ...>
+ #~ <member ...>
+ #~ <name>...</name>
+ #~ </member>
+ #~ ...
+ #~ </compound>
+ #~ ...
+ #~ </doxygenindex>
+ #~ builds the class and symbol sections, if requested.
+ def _translate_doxygenindex( self, node ):
+ #~ print '_translate_doxygenindex:', node.nodeName
+ if self.args['index']:
+ entries = []
+ classes = []
+ #~ Accumulate all the index entries we care about.
+ for n in node.childNodes:
+ if n.nodeName == 'compound':
+ if n.getAttribute('kind') not in ('file','dir','define'):
+ cpp = self._cppName(self._getChildData('name',root=n))
+ entry = {
+ 'name' : cpp['name'],
+ 'compoundname' : cpp['compoundname'],
+ 'id' : n.getAttribute('refid')
+ }
+ if n.getAttribute('kind') in ('class','struct'):
+ classes.append(entry)
+ entries.append(entry)
+ for m in n.childNodes:
+ if m.nodeName == 'member':
+ cpp = self._cppName(self._getChildData('name',root=m))
+ entry = {
+ 'name' : cpp['name'],
+ 'compoundname' : cpp['compoundname'],
+ 'id' : n.getAttribute('refid')
+ }
+ if hasattr(m,'getAttribute') and m.getAttribute('kind') in ('class','struct'):
+ classes.append(entry)
+ entries.append(entry)
+ #~ Put them in a sensible order.
+ entries.sort(lambda x,y: cmp(x['name'].lower(),y['name'].lower()))
+ classes.sort(lambda x,y: cmp(x['name'].lower(),y['name'].lower()))
+ #~ And generate the BoostBook for them.
+ self._translate_index_(entries,target=self.section['index'])
+ self._translate_index_(classes,target=self.section['classes'])
+ return None
+
+ #~ Translate a set of index entries in the BoostBook output. The output
+ #~ is grouped into groups of the first letter of the entry names.
+ def _translate_index_(self, entries, target=None, **kwargs ):
+ i = 0
+ targetID = target.getAttribute('id')
+ while i < len(entries):
+ dividerKey = entries[i]['name'][0].upper()
+ divider = target.appendChild(self._createNode('indexdiv',id=targetID+'.'+dividerKey))
+ divider.appendChild(self._createText('title',dividerKey))
+ while i < len(entries) and dividerKey == entries[i]['name'][0].upper():
+ iename = entries[i]['name']
+ ie = divider.appendChild(self._createNode('indexentry'))
+ ie = ie.appendChild(self._createText('primaryie',iename))
+ while i < len(entries) and entries[i]['name'] == iename:
+ ie.appendChild(self.boostbook.createTextNode(' ('))
+ ie.appendChild(self._createText(
+ 'link',entries[i]['compoundname'],linkend=entries[i]['id']))
+ ie.appendChild(self.boostbook.createTextNode(')'))
+ i += 1
+
+ #~ Translate a <compounddef ...>...</compounddef>,
+ #~ by retranslating with the "kind" of compounddef.
+ def _translate_compounddef( self, node, target=None, **kwargs ):
+ return self._translateNode(node,node.getAttribute('kind'))
+
+ #~ Translate a <compounddef kind="namespace"...>...</compounddef>. For
+ #~ namespaces we just collect the information for later use as there is no
+ #~ currently namespaces are not included in the BoostBook format. In the future
+ #~ it might be good to generate a namespace index.
+ def _translate_compounddef_namespace( self, node, target=None, **kwargs ):
+ namespace = {
+ 'id' : node.getAttribute('id'),
+ 'kind' : 'namespace',
+ 'name' : self._getChildData('compoundname',root=node),
+ 'brief' : self._getChildData('briefdescription',root=node),
+ 'detailed' : self._getChildData('detaileddescription',root=node),
+ 'parsed' : False
+ }
+ if namespace['name'] in self.symbols:
+ if not self.symbols[namespace['name']]['parsed']:
+ self.symbols[namespace['name']]['parsed'] = True
+ #~ for n in node.childNodes:
+ #~ if hasattr(n,'getAttribute'):
+ #~ self._translateNode(n,n.getAttribute('kind'),target=target,**kwargs)
+ else:
+ self.symbols[namespace['name']] = namespace
+ #~ self._setID(namespace['id'],namespace['name'])
+ return None
+
+ #~ Translate a <compounddef kind="class"...>...</compounddef>, which
+ #~ forwards to the kind=struct as they are the same.
+ def _translate_compounddef_class( self, node, target=None, **kwargs ):
+ return self._translate_compounddef_struct(node,tag='class',target=target,**kwargs)
+
+ #~ Translate a <compounddef kind="struct"...>...</compounddef> into:
+ #~ <header id="?" name="?">
+ #~ <struct name="?">
+ #~ ...
+ #~ </struct>
+ #~ </header>
+ def _translate_compounddef_struct( self, node, tag='struct', target=None, **kwargs ):
+ result = None
+ includes = self._getChild('includes',root=node)
+ if includes:
+ ## Add the header into the output table.
+ self._translate_compounddef_includes_(includes,includes,**kwargs)
+ ## Compounds are the declared symbols, classes, types, etc.
+ ## We add them to the symbol table, along with the partial DOM for them
+ ## so that they can be organized into the output later.
+ compoundname = self._getChildData('compoundname',root=node)
+ compoundname = self._cppName(compoundname)
+ self._setID(node.getAttribute('id'),compoundname['compoundname'])
+ struct = self._createNode(tag,name=compoundname['name'].split('::')[-1])
+ self.symbols[compoundname['compoundname']] = {
+ 'header' : includes.firstChild.data,
+ 'namespace' : compoundname['namespace'],
+ 'id' : node.getAttribute('id'),
+ 'kind' : tag,
+ 'name' : compoundname['name'],
+ 'dom' : struct
+ }
+ ## Add the children which will be the members of the struct.
+ for n in node.childNodes:
+ self._translateNode(n,target=struct,scope=compoundname['compoundname'])
+ result = struct
+ return result
+
+ #~ Translate a <compounddef ...><includes ...>...</includes></compounddef>,
+ def _translate_compounddef_includes_( self, node, target=None, **kwargs ):
+ name = node.firstChild.data
+ if name not in self.symbols:
+ self._setID(node.getAttribute('refid'),name)
+ self.symbols[name] = {
+ 'kind' : 'header',
+ 'id' : node.getAttribute('refid'),
+ 'dom' : self._createNode('header',
+ id=node.getAttribute('refid'),
+ name=name)
+ }
+ return None
+
+ #~ Translate a <basecompoundref...>...</basecompoundref> into:
+ #~ <inherit access="?">
+ #~ ...
+ #~ </inherit>
+ def _translate_basecompoundref( self, ref, target=None, **kwargs ):
+ inherit = target.appendChild(self._createNode('inherit',
+ access=ref.getAttribute('prot')))
+ self._translateChildren(ref,target=inherit)
+ return
+
+ #~ Translate:
+ #~ <templateparamlist>
+ #~ <param>
+ #~ <type>...</type>
+ #~ <declname>...</declname>
+ #~ <defname>...</defname>
+ #~ <defval>...</defval>
+ #~ </param>
+ #~ ...
+ #~ </templateparamlist>
+ #~ Into:
+ #~ <template>
+ #~ <template-type-parameter name="?" />
+ #~ <template-nontype-parameter name="?">
+ #~ <type>?</type>
+ #~ <default>?</default>
+ #~ </template-nontype-parameter>
+ #~ </template>
+ def _translate_templateparamlist( self, templateparamlist, target=None, **kwargs ):
+ template = target.appendChild(self._createNode('template'))
+ for param in templateparamlist.childNodes:
+ if param.nodeName == 'param':
+ type = self._getChildData('type',root=param)
+ defval = self._getChild('defval',root=param)
+ paramKind = None
+ if type in ('class','typename'):
+ paramKind = 'template-type-parameter'
+ else:
+ paramKind = 'template-nontype-parameter'
+ templateParam = template.appendChild(
+ self._createNode(paramKind,
+ name=self._getChildData('declname',root=param)))
+ if paramKind == 'template-nontype-parameter':
+ template_type = templateParam.appendChild(self._createNode('type'))
+ self._translate_type(
+ self._getChild('type',root=param),target=template_type)
+ if defval:
+ value = self._getChildData('ref',root=defval.firstChild)
+ if not value:
+ value = self._getData(defval)
+ templateParam.appendChild(self._createText('default',value))
+ return template
+
+ #~ Translate:
+ #~ <briefdescription>...</briefdescription>
+ #~ Into:
+ #~ <purpose>...</purpose>
+ def _translate_briefdescription( self, brief, target=None, **kwargs ):
+ self._translateDescription(brief,target=target,**kwargs)
+ return self._translateDescription(brief,target=target,tag='purpose',**kwargs)
+
+ #~ Translate:
+ #~ <detaileddescription>...</detaileddescription>
+ #~ Into:
+ #~ <description>...</description>
+ def _translate_detaileddescription( self, detailed, target=None, **kwargs ):
+ return self._translateDescription(detailed,target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="?">...</sectiondef>
+ #~ With kind specific translation.
+ def _translate_sectiondef( self, sectiondef, target=None, **kwargs ):
+ self._translateNode(sectiondef,sectiondef.getAttribute('kind'),target=target,**kwargs)
+
+ #~ Translate non-function sections.
+ def _translate_sectiondef_x_( self, sectiondef, target=None, **kwargs ):
+ for n in sectiondef.childNodes:
+ if hasattr(n,'getAttribute'):
+ self._translateNode(n,n.getAttribute('kind'),target=target,**kwargs)
+ return None
+
+ #~ Translate:
+ #~ <sectiondef kind="public-type">...</sectiondef>
+ def _translate_sectiondef_public_type( self, sectiondef, target=None, **kwargs ):
+ return self._translate_sectiondef_x_(sectiondef,target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="public-sttrib">...</sectiondef>
+ def _translate_sectiondef_public_attrib( self, sectiondef, target=None, **kwargs):
+ return self._translate_sectiondef_x_(sectiondef,target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="?-func">...</sectiondef>
+ #~ All the various function group translations end up here for which
+ #~ they are translated into:
+ #~ <method-group name="?">
+ #~ ...
+ #~ </method-group>
+ def _translate_sectiondef_func_( self, sectiondef, name='functions', target=None, **kwargs ):
+ members = target.appendChild(self._createNode('method-group',name=name))
+ for n in sectiondef.childNodes:
+ if hasattr(n,'getAttribute'):
+ self._translateNode(n,n.getAttribute('kind'),target=members,**kwargs)
+ return members
+
+ #~ Translate:
+ #~ <sectiondef kind="public-func">...</sectiondef>
+ def _translate_sectiondef_public_func( self, sectiondef, target=None, **kwargs ):
+ return self._translate_sectiondef_func_(sectiondef,
+ name='public member functions',target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="public-static-func">...</sectiondef>
+ def _translate_sectiondef_public_static_func( self, sectiondef, target=None, **kwargs):
+ return self._translate_sectiondef_func_(sectiondef,
+ name='public static functions',target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="protected-func">...</sectiondef>
+ def _translate_sectiondef_protected_func( self, sectiondef, target=None, **kwargs ):
+ return self._translate_sectiondef_func_(sectiondef,
+ name='protected member functions',target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="private-static-func">...</sectiondef>
+ def _translate_sectiondef_private_static_func( self, sectiondef, target=None, **kwargs):
+ return self._translate_sectiondef_func_(sectiondef,
+ name='private static functions',target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="public-func">...</sectiondef>
+ def _translate_sectiondef_private_func( self, sectiondef, target=None, **kwargs ):
+ return self._translate_sectiondef_func_(sectiondef,
+ name='private member functions',target=target,**kwargs)
+
+ #~ Translate:
+ #~ <sectiondef kind="user-defined"><header>...</header>...</sectiondef>
+ def _translate_sectiondef_user_defined( self, sectiondef, target=None, **kwargs ):
+ return self._translate_sectiondef_func_(sectiondef,
+ name=self._getChildData('header', root=sectiondef),target=target,**kwargs)
+
+ #~ Translate:
+ #~ <memberdef kind="typedef" id="?">
+ #~ <name>...</name>
+ #~ </memberdef>
+ #~ To:
+ #~ <typedef id="?" name="?">
+ #~ <type>...</type>
+ #~ </typedef>
+ def _translate_memberdef_typedef( self, memberdef, target=None, scope=None, **kwargs ):
+ self._setID(memberdef.getAttribute('id'),
+ scope+'::'+self._getChildData('name',root=memberdef))
+ typedef = target.appendChild(self._createNode('typedef',
+ id=memberdef.getAttribute('id'),
+ name=self._getChildData('name',root=memberdef)))
+ typedef_type = typedef.appendChild(self._createNode('type'))
+ self._translate_type(self._getChild('type',root=memberdef),target=typedef_type)
+ return typedef
+
+ #~ Translate:
+ #~ <memberdef kind="function" id="?" const="?" static="?" explicit="?" inline="?">
+ #~ <name>...</name>
+ #~ </memberdef>
+ #~ To:
+ #~ <method name="?" cv="?" specifiers="?">
+ #~ ...
+ #~ </method>
+ def _translate_memberdef_function( self, memberdef, target=None, scope=None, **kwargs ):
+ name = self._getChildData('name',root=memberdef)
+ self._setID(memberdef.getAttribute('id'),scope+'::'+name)
+ ## Check if we have some specific kind of method.
+ if name == scope.split('::')[-1]:
+ kind = 'constructor'
+ target = target.parentNode
+ elif name == '~'+scope.split('::')[-1]:
+ kind = 'destructor'
+ target = target.parentNode
+ elif name == 'operator=':
+ kind = 'copy-assignment'
+ target = target.parentNode
+ else:
+ kind = 'method'
+ method = target.appendChild(self._createNode(kind,
+ # id=memberdef.getAttribute('id'),
+ name=name,
+ cv=' '.join([
+ if_attribute(memberdef,'const','const','').strip()
+ ]),
+ specifiers=' '.join([
+ if_attribute(memberdef,'static','static',''),
+ if_attribute(memberdef,'explicit','explicit',''),
+ if_attribute(memberdef,'inline','inline','')
+ ]).strip()
+ ))
+ ## We iterate the children to translate each part of the function.
+ for n in memberdef.childNodes:
+ self._translateNode(memberdef,'function',n,target=method)
+ return method
+
+ #~ Translate:
+ #~ <memberdef kind="function"...><templateparamlist>...</templateparamlist></memberdef>
+ def _translate_memberdef_function_templateparamlist(
+ self, templateparamlist, target=None, **kwargs ):
+ return self._translate_templateparamlist(templateparamlist,target=target,**kwargs)
+
+ #~ Translate:
+ #~ <memberdef kind="function"...><type>...</type></memberdef>
+ #~ To:
+ #~ ...<type>?</type>
+ def _translate_memberdef_function_type( self, resultType, target=None, **kwargs ):
+ methodType = self._createNode('type')
+ self._translate_type(resultType,target=methodType)
+ if methodType.hasChildNodes():
+ target.appendChild(methodType)
+ return methodType
+
+ #~ Translate:
+ #~ <memberdef kind="function"...><briefdescription>...</briefdescription></memberdef>
+ def _translate_memberdef_function_briefdescription( self, description, target=None, **kwargs ):
+ result = self._translateDescription(description,target=target,**kwargs)
+ ## For functions if we translate the brief docs to the purpose they end up
+ ## right above the regular description. And since we just added the brief to that
+ ## on the previous line, don't bother with the repetition.
+ # result = self._translateDescription(description,target=target,tag='purpose',**kwargs)
+ return result
+
+ #~ Translate:
+ #~ <memberdef kind="function"...><detaileddescription>...</detaileddescription></memberdef>
+ def _translate_memberdef_function_detaileddescription( self, description, target=None, **kwargs ):
+ return self._translateDescription(description,target=target,**kwargs)
+
+ #~ Translate:
+ #~ <memberdef kind="function"...><inbodydescription>...</inbodydescription></memberdef>
+ def _translate_memberdef_function_inbodydescription( self, description, target=None, **kwargs ):
+ return self._translateDescription(description,target=target,**kwargs)
+
+ #~ Translate:
+ #~ <memberdef kind="function"...><param>...</param></memberdef>
+ def _translate_memberdef_function_param( self, param, target=None, **kwargs ):
+ return self._translate_param(param,target=target,**kwargs)
+
+ #~ Translate:
+ #~ <memberdef kind="variable" id="?">
+ #~ <name>...</name>
+ #~ <type>...</type>
+ #~ </memberdef>
+ #~ To:
+ #~ <data-member id="?" name="?">
+ #~ <type>...</type>
+ #~ </data-member>
+ def _translate_memberdef_variable( self, memberdef, target=None, scope=None, **kwargs ):
+ self._setID(memberdef.getAttribute('id'),
+ scope+'::'+self._getChildData('name',root=memberdef))
+ data_member = target.appendChild(self._createNode('data-member',
+ id=memberdef.getAttribute('id'),
+ name=self._getChildData('name',root=memberdef)))
+ data_member_type = data_member.appendChild(self._createNode('type'))
+ self._translate_type(self._getChild('type',root=memberdef),target=data_member_type)
+
+ #~ Translate:
+ #~ <memberdef kind="enum" id="?">
+ #~ <name>...</name>
+ #~ ...
+ #~ </memberdef>
+ #~ To:
+ #~ <enum id="?" name="?">
+ #~ ...
+ #~ </enum>
+ def _translate_memberdef_enum( self, memberdef, target=None, scope=None, **kwargs ):
+ self._setID(memberdef.getAttribute('id'),
+ scope+'::'+self._getChildData('name',root=memberdef))
+ enum = target.appendChild(self._createNode('enum',
+ id=memberdef.getAttribute('id'),
+ name=self._getChildData('name',root=memberdef)))
+ for n in memberdef.childNodes:
+ self._translateNode(memberdef,'enum',n,target=enum,scope=scope,**kwargs)
+ return enum
+
+ #~ Translate:
+ #~ <memberdef kind="enum"...>
+ #~ <enumvalue id="?">
+ #~ <name>...</name>
+ #~ <initializer>...</initializer>
+ #~ </enumvalue>
+ #~ </memberdef>
+ #~ To:
+ #~ <enumvalue id="?" name="?">
+ #~ <default>...</default>
+ #~ </enumvalue>
+ def _translate_memberdef_enum_enumvalue( self, enumvalue, target=None, scope=None, **kwargs ):
+ self._setID(enumvalue.getAttribute('id'),
+ scope+'::'+self._getChildData('name',root=enumvalue))
+ value = target.appendChild(self._createNode('enumvalue',
+ id=enumvalue.getAttribute('id'),
+ name=self._getChildData('name',root=enumvalue)))
+ initializer = self._getChild('initializer',root=enumvalue)
+ if initializer:
+ self._translateChildren(initializer,
+ target=target.appendChild(self._createNode('default')))
+ return value
+
+ #~ Translate:
+ #~ <param>
+ #~ <type>...</type>
+ #~ <declname>...</declname>
+ #~ <defval>...</defval>
+ #~ </param>
+ #~ To:
+ #~ <parameter name="?">
+ #~ <paramtype>...</paramtype>
+ #~ ...
+ #~ </parameter>
+ def _translate_param( self, param, target=None, **kwargs):
+ parameter = target.appendChild(self._createNode('parameter',
+ name=self._getChildData('declname',root=param)))
+ paramtype = parameter.appendChild(self._createNode('paramtype'))
+ self._translate_type(self._getChild('type',root=param),target=paramtype)
+ defval = self._getChild('defval',root=param)
+ if defval:
+ self._translateChildren(self._getChild('defval',root=param),target=parameter)
+ return parameter
+
+ #~ Translate:
+ #~ <ref kindref="?" ...>...</ref>
+ def _translate_ref( self, ref, **kwargs ):
+ return self._translateNode(ref,ref.getAttribute('kindref'))
+
+ #~ Translate:
+ #~ <ref refid="?" kindref="compound">...</ref>
+ #~ To:
+ #~ <link linkend="?"><classname>...</classname></link>
+ def _translate_ref_compound( self, ref, **kwargs ):
+ result = self._createNode('link',linkend=ref.getAttribute('refid'))
+ classname = result.appendChild(self._createNode('classname'))
+ self._translateChildren(ref,target=classname)
+ return result
+
+ #~ Translate:
+ #~ <ref refid="?" kindref="member">...</ref>
+ #~ To:
+ #~ <link linkend="?">...</link>
+ def _translate_ref_member( self, ref, **kwargs ):
+ result = self._createNode('link',linkend=ref.getAttribute('refid'))
+ self._translateChildren(ref,target=result)
+ return result
+
+ #~ Translate:
+ #~ <type>...</type>
+ def _translate_type( self, type, target=None, **kwargs ):
+ result = self._translateChildren(type,target=target,**kwargs)
+ #~ Filter types to clean up various readability problems, most notably
+ #~ with really long types.
+ xml = target.toxml('utf-8');
+ if (
+ xml.startswith('<type>boost::mpl::') or
+ xml.startswith('<type>BOOST_PP_') or
+ re.match('<type>boost::(lazy_)?(enable|disable)_if',xml)
+ ):
+ while target.firstChild:
+ target.removeChild(target.firstChild)
+ target.appendChild(self._createText('emphasis','unspecified'))
+ return result
+
+ def _getChild( self, tag = None, id = None, name = None, root = None ):
+ if not root:
+ root = self.boostbook.documentElement
+ for n in root.childNodes:
+ found = True
+ if tag and found:
+ found = found and tag == n.nodeName
+ if id and found:
+ if n.hasAttribute('id'):
+ found = found and n.getAttribute('id') == id
+ else:
+ found = found and n.hasAttribute('id') and n.getAttribute('id') == id
+ if name and found:
+ found = found and n.hasAttribute('name') and n.getAttribute('name') == name
+ if found:
+ #~ print '--|', n
+ return n
+ return None
+
+ def _getChildData( self, tag, **kwargs ):
+ return self._getData(self._getChild(tag,**kwargs),**kwargs)
+
+ def _getData( self, node, **kwargs ):
+ if node:
+ text = self._getChild('#text',root=node)
+ if text:
+ return text.data.strip()
+ return ''
+
+ def _cppName( self, type ):
+ parts = re.search('^([^<]+)[<]?(.*)[>]?$',type.strip().strip(':'))
+ result = {
+ 'compoundname' : parts.group(1),
+ 'namespace' : parts.group(1).split('::')[0:-1],
+ 'name' : parts.group(1).split('::')[-1],
+ 'specialization' : parts.group(2)
+ }
+ if result['namespace'] and len(result['namespace']) > 0:
+ namespace = '::'.join(result['namespace'])
+ while (
+ len(result['namespace']) > 0 and (
+ namespace not in self.symbols or
+ self.symbols[namespace]['kind'] != 'namespace')
+ ):
+ result['name'] = result['namespace'].pop()+'::'+result['name']
+ namespace = '::'.join(result['namespace'])
+ return result
+
+ def _createNode( self, tag, **kwargs ):
+ result = self.boostbook.createElement(tag)
+ for k in kwargs.keys():
+ if kwargs[k] != '':
+ if k == 'id':
+ result.setAttribute('id',kwargs[k])
+ else:
+ result.setAttribute(k,kwargs[k])
+ return result
+
+ def _createText( self, tag, data, **kwargs ):
+ result = self._createNode(tag,**kwargs)
+ data = data.strip()
+ if len(data) > 0:
+ result.appendChild(self.boostbook.createTextNode(data))
+ return result
+
+
+def main( xmldir=None, output=None, id=None, title=None, index=False ):
+ #~ print '--- main: xmldir = %s, output = %s' % (xmldir,output)
+
+ input = glob.glob( os.path.abspath( os.path.join( xmldir, "*.xml" ) ) )
+ input.sort
+ translator = Doxygen2BoostBook(id=id, title=title, index=index)
+ #~ Feed in the namespaces first to build up the set of namespaces
+ #~ and definitions so that lookup is unambiguous when reading in the definitions.
+ namespace_files = filter(
+ lambda x:
+ os.path.basename(x).startswith('namespace'),
+ input)
+ decl_files = filter(
+ lambda x:
+ not os.path.basename(x).startswith('namespace') and not os.path.basename(x).startswith('_'),
+ input)
+ for dox in namespace_files:
+ #~ print '--|',os.path.basename(dox)
+ translator.addDox(xml.dom.minidom.parse(dox))
+ for dox in decl_files:
+ #~ print '--|',os.path.basename(dox)
+ translator.addDox(xml.dom.minidom.parse(dox))
+
+ if output:
+ output = open(output,'w')
+ else:
+ output = sys.stdout
+ if output:
+ output.write(translator.tostring())
+
+
+main( **get_args() )
diff --git a/src/boost/tools/build/src/tools/doxygen-config.jam b/src/boost/tools/build/src/tools/doxygen-config.jam
new file mode 100644
index 000000000..2cd2ccaeb
--- /dev/null
+++ b/src/boost/tools/build/src/tools/doxygen-config.jam
@@ -0,0 +1,11 @@
+#~ Copyright 2005, 2006 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)
+
+# Automatic configuration for Doxygen tools. To use, just import this module.
+
+import toolset : using ;
+
+ECHO "warning: doxygen-config.jam is deprecated. Use 'using doxygen ;' instead." ;
+
+using doxygen ;
diff --git a/src/boost/tools/build/src/tools/doxygen.jam b/src/boost/tools/build/src/tools/doxygen.jam
new file mode 100644
index 000000000..a676b6c60
--- /dev/null
+++ b/src/boost/tools/build/src/tools/doxygen.jam
@@ -0,0 +1,782 @@
+# Copyright 2003, 2004 Douglas Gregor
+# Copyright 2003, 2004, 2005 Vladimir Prus
+# Copyright 2006 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)
+
+# This module defines rules to handle generation of various outputs from source
+# files documented with doxygen comments. The supported transformations are:
+#
+# * Source -> Doxygen XML -> BoostBook XML
+# * Source -> Doxygen HTML
+#
+# The type of transformation is selected based on the target requested. For
+# BoostBook XML, the default, specifying a target with an ".xml" suffix, or an
+# empty suffix, will produce a <target>.xml and <target>.boostbook. For Doxygen
+# HTML specifying a target with an ".html" suffix will produce a directory
+# <target> with the Doxygen html files, and a <target>.html file redirecting to
+# that directory.
+
+import alias ;
+import boostbook ;
+import "class" : new ;
+import common ;
+import feature ;
+import make ;
+import modules ;
+import generators ;
+import os ;
+import param ;
+import path ;
+import print ;
+import project ;
+import property ;
+import stage ;
+import targets ;
+import toolset ;
+import type ;
+import utility ;
+import xsltproc ;
+import virtual-target ;
+
+
+# Use to specify extra configuration parameters. These get translated into a
+# doxyfile which configures the building of the docs.
+feature.feature "doxygen:param" : : free ;
+
+# Specify the "<xsl:param>boost.doxygen.header.prefix" XSLT option.
+feature.feature prefix : : free ;
+
+# Specify the "<xsl:param>boost.doxygen.reftitle" XSLT option.
+feature.feature reftitle : : free ;
+
+# Which processor to use for various translations from Doxygen.
+feature.feature doxygen.processor : xsltproc doxproc : propagated implicit ;
+
+# To generate, or not, index sections.
+feature.feature doxygen.doxproc.index : no yes : propagated incidental ;
+
+# The ID for the resulting BoostBook reference section.
+feature.feature doxygen.doxproc.id : : free ;
+
+# The title for the resulting BoostBook reference section.
+feature.feature doxygen.doxproc.title : : free ;
+
+# Location for images when generating XML
+feature.feature "doxygen:xml-imagedir" : : free ;
+
+# Indicates whether the entire directory should be deleted
+feature.feature doxygen.rmdir : off on : optional incidental ;
+
+# Doxygen configuration input file.
+type.register DOXYFILE : doxyfile ;
+
+# Doxygen XML multi-file output.
+type.register DOXYGEN_XML_MULTIFILE : xml-dir : XML ;
+
+# Doxygen XML coallesed output.
+type.register DOXYGEN_XML : doxygen : XML ;
+
+# Doxygen HTML multifile directory.
+type.register DOXYGEN_HTML_MULTIFILE : html-dir : HTML ;
+
+# Redirection HTML file to HTML multifile directory.
+type.register DOXYGEN_HTML : : HTML ;
+
+type.register DOXYGEN_XML_IMAGES : doxygen-xml-images ;
+
+
+# Initialize the Doxygen module. Parameters are:
+# name: the name of the 'doxygen' executable. If not specified, the name
+# 'doxygen' will be used
+#
+rule init ( name ? )
+{
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ .doxproc = [ modules.binding $(__name__) ] ;
+ .doxproc = $(.doxproc:D)/doxproc.py ;
+
+ generators.register-composing doxygen.headers-to-doxyfile
+ : H HPP CPP MARKDOWN : DOXYFILE ;
+ generators.register-standard doxygen.run
+ : DOXYFILE : DOXYGEN_XML_MULTIFILE ;
+ generators.register-standard doxygen.xml-dir-to-boostbook
+ : DOXYGEN_XML_MULTIFILE : BOOSTBOOK : <doxygen.processor>doxproc ;
+ generators.register-xslt doxygen.xml-to-boostbook
+ : DOXYGEN_XML : BOOSTBOOK : <doxygen.processor>xsltproc ;
+ generators.register-xslt doxygen.collect
+ : DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ;
+ generators.register-standard doxygen.run
+ : DOXYFILE : DOXYGEN_HTML_MULTIFILE ;
+ generators.register-standard doxygen.html-redirect
+ : DOXYGEN_HTML_MULTIFILE : DOXYGEN_HTML ;
+ generators.register-standard doxygen.copy-latex-pngs
+ : DOXYGEN_HTML : DOXYGEN_XML_IMAGES ;
+
+ IMPORT $(__name__) : doxygen : : doxygen ;
+ }
+
+ if $(name)
+ {
+ modify-config ;
+ .doxygen = $(name) ;
+ check-doxygen ;
+ }
+
+ if ! $(.doxygen)
+ {
+ check-doxygen ;
+ }
+}
+
+
+local rule freeze-config ( )
+{
+ if ! $(.initialized)
+ {
+ import errors ;
+ errors.user-error doxygen must be initialized before it can be used. ;
+ }
+ if ! $(.config-frozen)
+ {
+ .config-frozen = true ;
+ if [ .is-cygwin ]
+ {
+ .is-cygwin = true ;
+ }
+ }
+}
+
+
+local rule modify-config ( )
+{
+ if $(.config-frozen)
+ {
+ import errors ;
+ errors.user-error "Cannot change doxygen after it has been used." ;
+ }
+}
+
+
+local rule check-doxygen ( )
+{
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice:" using doxygen ":" $(.doxygen) ;
+ }
+ local extra-paths ;
+ if [ os.name ] = NT
+ {
+ local ProgramFiles = [ modules.peek : ProgramFiles ] ;
+ if $(ProgramFiles)
+ {
+ extra-paths = "$(ProgramFiles:J= )" ;
+ }
+ else
+ {
+ extra-paths = "C:\\Program Files" ;
+ }
+ }
+ .doxygen = [ common.get-invocation-command doxygen : doxygen : $(.doxygen) :
+ $(extra-paths) ] ;
+}
+
+
+rule name ( )
+{
+ freeze-config ;
+ return $(.doxygen) ;
+}
+
+
+local rule .is-cygwin ( )
+{
+ if [ os.on-windows ]
+ {
+ local file = [ path.make [ modules.binding $(__name__) ] ] ;
+ local dir = [ path.native [ path.join [ path.parent $(file) ] doxygen ]
+ ] ;
+ local command = cd \"$(dir)\" "&&" \"$(.doxygen)\"
+ windows-paths-check.doxyfile 2>&1 ;
+ command = $(command:J=" ") ;
+ result = [ SHELL $(command) ] ;
+ if [ MATCH "(Parsing file /)" : $(result) ]
+ {
+ return true ;
+ }
+ }
+}
+
+
+# Runs Doxygen on the given Doxygen configuration file (the source) to generate
+# the Doxygen files. The output is dumped according to the settings in the
+# Doxygen configuration file, not according to the target! Because of this, we
+# essentially "touch" the target file, in effect making it look like we have
+# really written something useful to it. Anyone that uses this action must deal
+# with this behavior.
+#
+actions doxygen-action
+{
+ $(RM) "$(*.XML)" & "$(NAME:E=doxygen)" "$(>)" && echo "Stamped" > "$(<)"
+}
+
+
+# Runs the Python doxproc XML processor.
+#
+actions doxproc
+{
+ python "$(DOXPROC)" "--xmldir=$(>)" "--output=$(<)" "$(OPTIONS)" "--id=$(ID)" "--title=$(TITLE)"
+}
+
+
+rule translate-path ( path )
+{
+ freeze-config ;
+ if [ os.on-windows ]
+ {
+ if [ os.name ] = CYGWIN
+ {
+ if $(.is-cygwin)
+ {
+ return $(path) ;
+ }
+ else
+ {
+ return $(path:W) ;
+ }
+ }
+ else
+ {
+ if $(.is-cygwin)
+ {
+ match = [ MATCH "^(.):(.*)" : $(path) ] ;
+ if $(match)
+ {
+ return /cygdrive/$(match[1])$(match[2]:T) ;
+ }
+ else
+ {
+ return $(path:T) ;
+ }
+ }
+ else
+ {
+ return $(path) ;
+ }
+ }
+ }
+ else
+ {
+ return $(path) ;
+ }
+}
+
+toolset.uses-features doxygen.headers-to-doxyfile : "<doxygen:param>" ;
+
+# Generates a doxygen configuration file (doxyfile) given a set of C++ sources
+# and a property list that may contain <doxygen:param> features.
+#
+rule headers-to-doxyfile ( target : sources * : properties * )
+{
+ local text = "# Generated by B2 version 2" ;
+
+ local output-dir ;
+
+ # Translate <doxygen:param> into command line flags.
+ for local param in [ feature.get-values <doxygen:param> : $(properties) ]
+ {
+ local namevalue = [ MATCH "([^=]*)=(.*)" : $(param) ] ;
+ if $(namevalue[1]) = OUTPUT_DIRECTORY
+ {
+ output-dir = [ translate-path [ utility.unquote $(namevalue[2]) ] ]
+ ;
+ text += "OUTPUT_DIRECTORY = \"$(output-dir)\"" ;
+ }
+ else
+ {
+ text += "$(namevalue[1]) = $(namevalue[2])" ;
+ }
+ }
+
+ if ! $(output-dir)
+ {
+ output-dir = [ translate-path [ on $(target) return $(LOCATE) ] ] ;
+ text += "OUTPUT_DIRECTORY = \"$(output-dir)\"" ;
+ }
+
+ local headers ;
+ for local header in $(sources:G=)
+ {
+ header = [ translate-path $(header) ] ;
+ headers += \"$(header)\" ;
+ }
+
+ # Doxygen generates LaTex by default. So disable it unconditionally, or at
+ # least until someone needs, and hence writes support for, LaTex output.
+ text += "GENERATE_LATEX = NO" ;
+ text += "INPUT = $(headers:J= )" ;
+ print.output $(target) plain ;
+ print.text $(text) : true ;
+}
+
+toolset.uses-features doxygen.run : <doxygen.rmdir> "<doxygen:param>" ;
+
+# Run Doxygen. See doxygen-action for a description of the strange properties of
+# this rule.
+#
+rule run ( target : source : properties * )
+{
+ freeze-config ;
+ if <doxygen.rmdir>on in $(properties)
+ {
+ local output-dir = [ path.make [ MATCH
+ "<doxygen:param>OUTPUT_DIRECTORY=\"?([^\"]*)" : $(properties) ] ] ;
+ local html-dir = [ path.make [ MATCH <doxygen:param>HTML_OUTPUT=(.*) :
+ $(properties) ] ] ;
+ if $(output-dir) && $(html-dir) &&
+ [ path.glob $(output-dir) : $(html-dir) ]
+ {
+ HTMLDIR on $(target) = [ path.native [ path.join $(output-dir)
+ $(html-dir) ] ] ;
+ rm-htmldir $(target) ;
+ }
+ }
+ doxygen-action $(target) : $(source) ;
+ NAME on $(target) = $(.doxygen) ;
+ RM on $(target) = [ modules.peek common : RM ] ;
+ *.XML on $(target) = [ path.native [ path.join [ path.make [ on $(target)
+ return $(LOCATE) ] ] $(target:B:S=) *.xml ] ] ;
+}
+
+
+if [ os.name ] = NT
+{
+ RMDIR = rmdir /s /q ;
+}
+else
+{
+ RMDIR = rm -rf ;
+}
+
+actions quietly rm-htmldir
+{
+ $(RMDIR) $(HTMLDIR)
+}
+
+
+# The rules below require BoostBook stylesheets, so we need some code to check
+# that the boostbook module has actually been initialized.
+#
+rule check-boostbook ( )
+{
+ if ! [ modules.peek boostbook : .initialized ]
+ {
+ import errors ;
+ errors.user-error
+ : The boostbook module is not initialized you have attempted to use
+ : the 'doxygen' toolset, which requires BoostBook, but never
+ : initialized BoostBook.
+ : "Hint:" add 'using boostbook \;' to your user-config.jam. ;
+ }
+}
+
+
+# Collect the set of Doxygen XML files into a single XML source file that can be
+# handled by an XSLT processor. The source is completely ignored (see
+# doxygen-action), because this action picks up the Doxygen XML index file xml/
+# index.xml. This is because we can not teach Doxygen to act like a NORMAL
+# program and take a "-o output.xml" argument (grrrr). The target of the
+# collection will be a single Doxygen XML file.
+#
+rule collect ( target : source : properties * )
+{
+ check-boostbook ;
+ local collect-xsl-dir
+ = [ path.native [ path.join [ boostbook.xsl-dir ] doxygen collect ] ] ;
+ local source-path
+ = [ path.make [ on $(source) return $(LOCATE) ] ] ;
+ local collect-path
+ = [ path.root [ path.join $(source-path) $(source:B) ] [ path.pwd ] ] ;
+ local native-path
+ = [ path.native $(collect-path) ] ;
+ local real-source
+ = [ path.native [ path.join $(collect-path) index.xml ] ] ;
+ xsltproc.xslt $(target) : $(real-source) $(collect-xsl-dir:S=.xsl)
+ : <xsl:param>doxygen.xml.path=$(native-path) ;
+}
+
+toolset.uses-features doxygen.xml-to-boostbook : <prefix> <reftitle> ;
+
+# Translate Doxygen XML into BoostBook.
+#
+rule xml-to-boostbook ( target : source : properties * )
+{
+ check-boostbook ;
+ local xsl-dir = [ boostbook.xsl-dir ] ;
+ local d2b-xsl = [ path.native [ path.join [ boostbook.xsl-dir ] doxygen
+ doxygen2boostbook.xsl ] ] ;
+
+ local xslt-properties = $(properties) ;
+ for local prefix in [ feature.get-values <prefix> : $(properties) ]
+ {
+ xslt-properties += "<xsl:param>boost.doxygen.header.prefix=$(prefix)" ;
+ }
+ for local title in [ feature.get-values <reftitle> : $(properties) ]
+ {
+ xslt-properties += "<xsl:param>boost.doxygen.reftitle=$(title)" ;
+ }
+
+ xsltproc.xslt $(target) : $(source) $(d2b-xsl) : $(xslt-properties) ;
+}
+
+
+toolset.flags doxygen.xml-dir-to-boostbook OPTIONS <doxygen.doxproc.index>yes :
+ --enable-index ;
+toolset.flags doxygen.xml-dir-to-boostbook ID <doxygen.doxproc.id> ;
+toolset.flags doxygen.xml-dir-to-boostbook TITLE <doxygen.doxproc.title> ;
+
+
+rule xml-dir-to-boostbook ( target : source : properties * )
+{
+ DOXPROC on $(target) = $(.doxproc) ;
+ LOCATE on $(source:S=) = [ on $(source) return $(LOCATE) ] ;
+ doxygen.doxproc $(target) : $(source:S=) ;
+}
+
+
+# Generate the HTML redirect to HTML dir index.html file.
+#
+rule html-redirect ( target : source : properties * )
+{
+ local uri = "$(target:B)/index.html" ;
+ print.output $(target) plain ;
+ print.text
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
+<html xmlns=\"http://www.w3.org/1999/xhtml\">
+<head>
+ <meta http-equiv=\"refresh\" content=\"0; URL=$(uri)\" />
+
+ <title></title>
+</head>
+
+<body>
+ Automatic redirection failed, please go to <a href=
+ \"$(uri)\">$(uri)</a>.
+</body>
+</html>
+"
+ : true ;
+}
+
+rule copy-latex-pngs ( target : source : requirements * )
+{
+ local directory = [ path.native [ feature.get-values <doxygen:xml-imagedir>
+ : $(requirements) ] ] ;
+ local location = [ on $(target) return $(LOCATE) ] ;
+
+ local pdf-location = [ path.native [ path.join [ path.make $(location) ]
+ [ path.make $(directory) ] ] ] ;
+ local html-location = [ path.native [ path.join . html [ path.make
+ $(directory) ] ] ] ;
+
+ common.MkDir $(pdf-location) ;
+ common.MkDir $(html-location) ;
+
+ DEPENDS $(target) : $(pdf-location) $(html-location) ;
+
+ if [ os.name ] = NT
+ {
+ CP on $(target) = copy /y ;
+ FROM on $(target) = \\*.png ;
+ TOHTML on $(target) = .\\html\\$(directory) ;
+ TOPDF on $(target) = \\$(directory) ;
+ }
+ else
+ {
+ CP on $(target) = cp ;
+ FROM on $(target) = /*.png ;
+ TOHTML on $(target) = ./html/$(directory) ;
+ TOPDF on $(target) = $(target:D)/$(directory) ;
+ }
+}
+
+actions copy-latex-pngs
+{
+ $(CP) $(>:S=)$(FROM) $(TOHTML)
+ $(CP) $(>:S=)$(FROM) $(<:D)$(TOPDF)
+ echo "Stamped" > "$(<)"
+}
+
+
+# Building latex images for doxygen XML depends on latex, dvips, and gs being in
+# your PATH. This is true for most Unix installs, but not on Win32, where you
+# will need to install MkTex and Ghostscript and add these tools to your path.
+
+actions check-latex
+{
+ latex -version >$(<)
+}
+
+actions check-dvips
+{
+ dvips -version >$(<)
+}
+
+if [ os.name ] = "NT"
+{
+ actions check-gs
+ {
+ gswin32c -version >$(<)
+ }
+}
+else
+{
+ actions check-gs
+ {
+ gs -version >$(<)
+ }
+}
+
+
+local rule check-tools-targets ( project )
+{
+ if ! $(.check-tools-targets)
+ {
+ # Find the root project.
+ #
+ # This is a best effort attempt to avoid using different locations for
+ # storing *.check files depending on which project imported the doxygen
+ # toolset first. The files are stored in a location related to the
+ # project's root project. Note that this location may change depending
+ # on the folder the build was run from in case the build uses multiple
+ # related projects with their own Jamroot separate modules.
+ local project-module = [ $(project).project-module ] ;
+ local root-module = [ project.get-jamroot-module $(project-module) ] ;
+ if ! $(root-module)
+ {
+ import errors ;
+ if [ project.is-config-module $(project-module) ]
+ {
+ errors.user-error doxygen targets can not be declared in Boost
+ Build's configuration modules. ;
+ }
+ else
+ {
+ errors.user-error doxygen targets can not be declared in
+ standalone projects. : use a Jamfile/Jamroot project
+ instead. ;
+ }
+ }
+ local root-project = [ project.target $(root-module) ] ;
+
+ local targets =
+ [ new file-target latex.check : : $(root-project) : [ new action :
+ doxygen.check-latex ] ]
+ [ new file-target dvips.check : : $(root-project) : [ new action :
+ doxygen.check-dvips ] ]
+ [ new file-target gs.check : : $(root-project) : [ new action :
+ doxygen.check-gs ] ] ;
+
+ for local target in $(targets)
+ {
+ .check-tools-targets += [ virtual-target.register $(target) ] ;
+ }
+ }
+ return $(.check-tools-targets) ;
+}
+
+
+project.initialize $(__name__) ;
+project doxygen ;
+
+class doxygen-check-tools-target-class : basic-target
+{
+ rule construct ( name : sources * : property-set )
+ {
+ IMPORT doxygen : check-tools-targets : $(__name__) :
+ doxygen.check-tools-targets ;
+ return [ property-set.empty ] [ doxygen.check-tools-targets [ project ]
+ ] ;
+ }
+}
+
+
+# Declares a metatarget for collecting version information on different external
+# tools used in this module.
+#
+rule check-tools ( target )
+{
+ freeze-config ;
+ targets.create-metatarget doxygen-check-tools-target-class :
+ [ project.current ] : $(target) ;
+}
+
+
+# User-level rule to generate HTML files or BoostBook XML from a set of headers
+# via Doxygen.
+#
+rule doxygen ( target : sources + : requirements * : default-build * :
+ usage-requirements * )
+{
+ param.handle-named-params
+ sources requirements default-build usage-requirements ;
+ requirements += <format>none ;
+ freeze-config ;
+ local project = [ project.current ] ;
+
+ if $(target:S) = .html
+ {
+ # Build an HTML directory from the sources.
+ local html-location = [ feature.get-values <location> : $(requirements)
+ ] ;
+ local output-dir ;
+ if [ $(project).get build-dir ]
+ {
+ # Explicitly specified build dir. Add html at the end.
+ output-dir = [ path.join [ $(project).build-dir ]
+ $(html-location:E=html) ] ;
+ }
+ else
+ {
+ # Trim 'bin' from implicit build dir, for no other reason than
+ # backward compatibility.
+ output-dir = [ path.join [ path.parent [ $(project).build-dir ] ]
+ $(html-location:E=html) ] ;
+ }
+ output-dir = [ path.root $(output-dir) [ path.pwd ] ] ;
+ local output-dir-native = [ path.native $(output-dir) ] ;
+ requirements = [ property.change $(requirements) : <location> ] ;
+
+ # The doxygen configuration file.
+ targets.create-typed-target DOXYFILE : $(project) : $(target:S=.tag)
+ : $(sources)
+ : $(requirements)
+ <doxygen:param>GENERATE_HTML=YES
+ <doxygen:param>GENERATE_XML=NO
+ <doxygen:param>"OUTPUT_DIRECTORY=\"$(output-dir-native)\""
+ <doxygen:param>HTML_OUTPUT=$(target:B)
+ : $(default-build) ;
+ $(project).mark-target-as-explicit $(target:S=.tag) ;
+
+ # The html directory to generate by running doxygen.
+ targets.create-typed-target DOXYGEN_HTML_MULTIFILE : $(project)
+ : $(target:S=.dir) # Name.
+ : $(target:S=.tag) # Sources.
+ : $(requirements)
+ <doxygen:param>"OUTPUT_DIRECTORY=\"$(output-dir-native)\""
+ <doxygen:param>HTML_OUTPUT=$(target:B)
+ : $(default-build) ;
+ $(project).mark-target-as-explicit $(target:S=.dir) ;
+
+ # The redirect html file into the generated html.
+ targets.create-typed-target DOXYGEN_HTML : $(project) : $(target)
+ : $(target:S=.dir) # Sources.
+ : $(requirements) <location>$(output-dir)
+ : $(default-build) ;
+ }
+ else
+ {
+ # Build a BoostBook XML file from the sources.
+ local location-xml = [ feature.get-values <location> : $(requirements) ]
+ ;
+ requirements = [ property.change $(requirements) : <location> ] ;
+ local target-xml = $(target:B=$(target:B)-xml) ;
+
+ # Check whether we need to build images.
+ local images-location = [ feature.get-values <doxygen:xml-imagedir> :
+ $(requirements) ] ;
+ if $(images-location)
+ {
+ # Prepare a metatarget for collecting used external tool version
+ # information. We use only one such metatarget as they always
+ # produce the same files and we do not want to deal with multiple
+ # metatargets having matching names, causing 'ambiguous variants'
+ # errors.
+ if ! $(.check-tools)
+ {
+ # FIXME: Since we have the check-tools target object reference,
+ # see how we can use that instead of having to construct a valid
+ # target reference string for use in <dependency> property
+ # values.
+ local project-id = --doxygen.check-tools-project-- ;
+ local target-id = --doxygen.check-tools-- ;
+ local pm = [ $(project).project-module ] ;
+ project.register-id $(project-id) : $(pm) ;
+ check-tools $(target-id) ;
+ .check-tools = /$(project-id)//$(target-id) ;
+ }
+
+ doxygen $(target).doxygen-xml-images.html : $(sources) :
+ $(requirements)
+ <doxygen.rmdir>on
+ <doxygen:param>QUIET=YES
+ <doxygen:param>WARNINGS=NO
+ <doxygen:param>WARN_IF_UNDOCUMENTED=NO
+ <dependency>$(.check-tools) ;
+ $(project).mark-target-as-explicit $(target).doxygen-xml-images.html
+ ;
+
+ targets.create-typed-target DOXYGEN_XML_IMAGES : $(project)
+ : $(target).doxygen-xml-images # Name.
+ : $(target).doxygen-xml-images.html # Sources.
+ : $(requirements)
+ : $(default-build) ;
+ $(project).mark-target-as-explicit $(target).doxygen-xml-images ;
+
+ if ! [ MATCH (/)$ : $(images-location) ]
+ {
+ images-location = $(images-location)/ ;
+ }
+
+ requirements +=
+ <dependency>$(target).doxygen-xml-images
+ <xsl:param>boost.doxygen.formuladir=$(images-location) ;
+ }
+
+ # The doxygen configuration file.
+ targets.create-typed-target DOXYFILE : $(project) : $(target-xml:S=.tag)
+ : $(sources)
+ : $(requirements)
+ <doxygen:param>GENERATE_HTML=NO
+ <doxygen:param>GENERATE_XML=YES
+ <doxygen:param>XML_OUTPUT=$(target-xml)
+ : $(default-build) ;
+ $(project).mark-target-as-explicit $(target-xml:S=.tag) ;
+
+ # The Doxygen XML directory for the processed source files.
+ targets.create-typed-target DOXYGEN_XML_MULTIFILE : $(project)
+ : $(target-xml:S=.dir) # Name.
+ : $(target-xml:S=.tag) # Sources.
+ : $(requirements)
+ : $(default-build) ;
+ $(project).mark-target-as-explicit $(target-xml:S=.dir) ;
+
+ # The resulting BoostBook file is generated by the processor tool. The
+ # tool can be either the xsltproc plus accompanying XSL scripts. Or it
+ # can be the python doxproc.py script.
+ targets.create-typed-target BOOSTBOOK : $(project) : $(target-xml)
+ : $(target-xml:S=.dir) # Sources.
+ : $(requirements)
+ : $(default-build) ;
+ $(project).mark-target-as-explicit $(target-xml) ;
+
+ stage $(target:S=.xml) # Name.
+ : $(target-xml) # Sources.
+ : $(requirements)
+ <location>$(location-xml:E=.)
+ <name>$(target:S=.xml)
+ : $(default-build) ;
+ $(project).mark-target-as-explicit $(target:S=.xml) ;
+
+ # TODO: See why this alias target is used here instead of simply naming
+ # the previous stage target $(target) and having it specify the alias
+ # target's usage requirements directly.
+ alias $(target) : : $(requirements) : $(default-build) :
+ $(usage-requirements) <dependency>$(target:S=.xml) ;
+ }
+}
diff --git a/src/boost/tools/build/src/tools/doxygen/windows-paths-check.doxyfile b/src/boost/tools/build/src/tools/doxygen/windows-paths-check.doxyfile
new file mode 100644
index 000000000..9b969df9c
--- /dev/null
+++ b/src/boost/tools/build/src/tools/doxygen/windows-paths-check.doxyfile
@@ -0,0 +1,3 @@
+INPUT = windows-paths-check.hpp
+GENERATE_HTML = NO
+GENERATE_LATEX = NO
diff --git a/src/boost/tools/build/src/tools/doxygen/windows-paths-check.hpp b/src/boost/tools/build/src/tools/doxygen/windows-paths-check.hpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/boost/tools/build/src/tools/doxygen/windows-paths-check.hpp
diff --git a/src/boost/tools/build/src/tools/emscripten.jam b/src/boost/tools/build/src/tools/emscripten.jam
new file mode 100644
index 000000000..c9a0009db
--- /dev/null
+++ b/src/boost/tools/build/src/tools/emscripten.jam
@@ -0,0 +1,113 @@
+# Copyright Rene Rivera 2016
+# 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 os ;
+import toolset ;
+import common ;
+import gcc ;
+import type ;
+
+feature.feature embind : off on : propagated ;
+feature.feature closure : off on full : propagated ;
+feature.feature link-optimization : off on full : propagated ;
+
+rule init ( version ? : command * : options * )
+{
+ command = [ common.get-invocation-command emscripten
+ : emcc
+ : $(command) ] ;
+
+ # Determine the version
+ if $(command)
+ {
+ local command-string = \"$(command)\" ;
+ command-string = $(command-string:J=" ") ;
+ version ?= [ MATCH "([0-9.]+)"
+ : [ SHELL "$(command-string) --version" ] ] ;
+ }
+
+ local condition = [ common.check-init-parameters emscripten
+ : version $(version) ] ;
+
+ common.handle-options emscripten : $(condition) : $(command) : $(options) ;
+}
+
+feature.extend toolset : emscripten ;
+
+toolset.inherit-generators emscripten <toolset>emscripten
+ : gcc
+ : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
+ ;
+toolset.inherit-rules emscripten : gcc ;
+toolset.inherit-flags emscripten : gcc
+ :
+ <optimization>off <optimization>speed <optimization>space
+ <profiling>off <profiling>on
+ <inlining>off <inlining>on <inlining>full
+ <warnings>off <warnings>all <warnings>on
+ <warnings-as-errors>off <warnings-as-errors>on
+ <debug-symbols>off <debug-symbols>on
+ <rtti>off <rtti>on
+ ;
+
+type.set-generated-target-suffix EXE : <toolset>emscripten : "js" ;
+type.set-generated-target-suffix OBJ : <toolset>emscripten : "bc" ;
+type.set-generated-target-suffix STATIC_LIB : <toolset>emscripten : "bc" ;
+
+toolset.flags emscripten.compile OPTIONS <flags> ;
+toolset.flags emscripten.compile OPTIONS <cflags> ;
+toolset.flags emscripten.compile.c++ OPTIONS <cxxflags> ;
+
+toolset.flags emscripten.compile OPTIONS <optimization>off : -O0 ;
+toolset.flags emscripten.compile OPTIONS <optimization>speed : -O3 ;
+toolset.flags emscripten.compile OPTIONS <optimization>space : -Oz ;
+toolset.flags emscripten.link OPTIONS <optimization>off : -O0 ;
+toolset.flags emscripten.link OPTIONS <optimization>speed : -O3 ;
+toolset.flags emscripten.link OPTIONS <optimization>space : -O3 ;
+
+toolset.flags emscripten.compile OPTIONS <profiling>on : --profiling-funcs ;
+
+toolset.flags emscripten.compile OPTIONS <inlining>off : -fno-inline ;
+toolset.flags emscripten.compile OPTIONS <inlining>on : -Wno-inline ;
+toolset.flags emscripten.compile OPTIONS <inlining>full : -Wno-inline ;
+
+toolset.flags emscripten.compile OPTIONS <warnings>off : -w ;
+toolset.flags emscripten.compile OPTIONS <warnings>on : -Wall ;
+toolset.flags emscripten.compile OPTIONS <warnings>all : -Wall -pedantic ;
+toolset.flags emscripten.compile OPTIONS <warnings-as-errors>on : -Werror ;
+
+toolset.flags emscripten OPTIONS <debug-symbols>off : -g0 ;
+toolset.flags emscripten OPTIONS <debug-symbols>on : -g4 -s DEMANGLE_SUPPORT=1 ;
+toolset.flags emscripten OPTIONS <rtti>off : -fno-rtti ;
+
+toolset.flags emscripten.link OPTIONS <embind>on : --bind ;
+toolset.flags emscripten.link OPTIONS <closure>on : --closure 1 ;
+toolset.flags emscripten.link OPTIONS <closure>full : --closure 2 ;
+toolset.flags emscripten.link OPTIONS <link-optimization>off : --llvm-lto 0 ;
+toolset.flags emscripten.link OPTIONS <link-optimization>on : --llvm-lto 1 ;
+toolset.flags emscripten.link OPTIONS <link-optimization>full : --llvm-lto 3 ;
+
+actions compile.c
+{
+ "$(CONFIG_COMMAND)" -x c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions archive
+{
+ "$(CONFIG_COMMAND)" $(AROPTIONS) -o "$(<)" "$(>)"
+}
+
+toolset.flags emscripten.link USER_OPTIONS <linkflags> ;
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS)
+}
diff --git a/src/boost/tools/build/src/tools/features/__init_features__.jam b/src/boost/tools/build/src/tools/features/__init_features__.jam
new file mode 100644
index 000000000..aedf3e1dc
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/__init_features__.jam
@@ -0,0 +1,23 @@
+# Copyright 2017 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)
+
+# Here we automatically define any "feature" modules in this directory.
+
+local key = feature ;
+
+import os path modules ;
+
+.this-module's-file = [ modules.binding $(__name__) ] ;
+.this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ;
+.to-load-jamfiles = [ path.glob $(.this-module's-dir) : *-$(key).jam ] ;
+.to-load-modules = [ MATCH ^(.*)\.jam$ : $(.to-load-jamfiles) ] ;
+
+# A loop over all matched modules in this directory
+for local m in $(.to-load-modules)
+{
+ m = [ path.basename $(m) ] ;
+ m = $(key)s/$(m) ;
+ import $(m) ;
+}
diff --git a/src/boost/tools/build/src/tools/features/address-model-feature.jam b/src/boost/tools/build/src/tools/features/address-model-feature.jam
new file mode 100644
index 000000000..479c89298
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/address-model-feature.jam
@@ -0,0 +1,22 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.address-model]]`address-model`::
+*Allowed values:* `32`, `64`.
++
+Specifies if 32-bit or 64-bit code should be generated by the compiler. Whether
+this feature works depends on the used compiler, its version, how the compiler
+is configured, and the values of the `architecture` `instruction-set` features.
+Please see the section <<C++ Compilers>> for details.
+
+|# # end::doc[]
+
+feature.feature address-model
+ : 16 32 64 32_64
+ : propagated optional ;
diff --git a/src/boost/tools/build/src/tools/features/allow-feature.jam b/src/boost/tools/build/src/tools/features/allow-feature.jam
new file mode 100644
index 000000000..bcee55796
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/allow-feature.jam
@@ -0,0 +1,19 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.allow]]`allow`::
+This feature is used to allow specific generators to run. For example, Qt tools
+can only be invoked when Qt library is used. In that case, `<allow>qt` will be
+in usage requirement of the library.
+
+|# # end::doc[]
+
+feature.feature allow
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/architecture-feature.jam b/src/boost/tools/build/src/tools/features/architecture-feature.jam
new file mode 100644
index 000000000..3e3ca382f
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/architecture-feature.jam
@@ -0,0 +1,55 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.architecture]]`architecture`::
+*Allowed values:* `x86`, `ia64`, `sparc`, `power`, `mips1`, `mips2`,
+`mips3`, `mips4`, `mips32`, `mips32r2`, `mips64`, `parisc`, `arm`,
+`s390x`, `combined`, `combined-x86-power`.
++
+Specifies the general processor family to generate code for.
+
+|# # end::doc[]
+
+feature.feature architecture
+ :
+ # x86 and x86-64
+ x86
+
+ # ia64
+ ia64
+
+ # Sparc
+ sparc
+
+ # RS/6000 & PowerPC
+ power
+
+ # MIPS/SGI
+ mips1 mips2 mips3 mips4 mips32 mips32r2 mips64
+
+ # HP/PA-RISC
+ parisc
+
+ # Advanced RISC Machines
+ arm
+
+ # RISC-V
+ riscv
+
+ # z Systems (aka s390x)
+ s390x
+
+ # Combined architectures for platforms/toolsets that support building for
+ # multiple architectures at once. "combined" would be the default multi-arch
+ # for the toolset.
+ combined
+ combined-x86-power
+ :
+ propagated optional
+ ;
diff --git a/src/boost/tools/build/src/tools/features/archiveflags-feature.jam b/src/boost/tools/build/src/tools/features/archiveflags-feature.jam
new file mode 100644
index 000000000..c645d8c7a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/archiveflags-feature.jam
@@ -0,0 +1,18 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.archiveflags]]`archiveflags`::
+The value of this feature is passed without modification to the archiver tool
+when creating static libraries.
+
+|# # end::doc[]
+
+feature.feature archiveflags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/asmflags-feature.jam b/src/boost/tools/build/src/tools/features/asmflags-feature.jam
new file mode 100644
index 000000000..00626958e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/asmflags-feature.jam
@@ -0,0 +1,17 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.asmflags]]`asmflags`::
+The value of this feature is passed without modification to the assembler.
+
+|# # end::doc[]
+
+feature.feature asmflags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/build-feature.jam b/src/boost/tools/build/src/tools/features/build-feature.jam
new file mode 100644
index 000000000..64c7713c8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/build-feature.jam
@@ -0,0 +1,22 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.build]]`build`::
+*Allowed values:* `no`
++
+Used to conditionally disable build of a target. If `<build>no` is in
+properties when building a target, build of that target is skipped. Combined
+with conditional requirements this allows you to skip building some target in
+configurations where the build is known to fail.
+
+|# # end::doc[]
+
+feature.feature build
+ : yes no
+ : optional ;
diff --git a/src/boost/tools/build/src/tools/features/cflags-feature.jam b/src/boost/tools/build/src/tools/features/cflags-feature.jam
new file mode 100644
index 000000000..4586317f4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/cflags-feature.jam
@@ -0,0 +1,21 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.cflags]]`cflags`; `cxxflags`; `linkflags`::
+The value of these features is passed without modification to the corresponding
+tools. For `cflags` that is both the C and {CPP} compilers, for `cxxflags` that
+is the {CPP} compiler, and for `linkflags` that is the linker. The features are
+handy when you are trying to do something special that cannot be achieved by a
+higher-level feature in B2.
+
+|# # end::doc[]
+
+feature.feature cflags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/conditional-feature.jam b/src/boost/tools/build/src/tools/features/conditional-feature.jam
new file mode 100644
index 000000000..368ad232f
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/conditional-feature.jam
@@ -0,0 +1,31 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.conditional]]`conditional`::
+Used to introduce indirect conditional requirements. The value should have the
+form:
++
+----
+@rulename
+----
++
+where _rulename_ should be a name of a rule with the following signature:
++
+----
+rule rulename ( properties * )
+----
++
+The rule will be called for each target with its properties and should return
+any additional properties. See also section <<Requirements>> for an example.
+
+|# # end::doc[]
+
+feature.feature conditional
+ :
+ : incidental free ;
diff --git a/src/boost/tools/build/src/tools/features/coverage-feature.jam b/src/boost/tools/build/src/tools/features/coverage-feature.jam
new file mode 100644
index 000000000..517c6d5b9
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/coverage-feature.jam
@@ -0,0 +1,22 @@
+# Copyright 2019 Rene Rivera
+# Copyright 2019 Hans Dembinski
+# 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 ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.coverage]]`coverage`::
+*Allowed values:* `off`, `on`.
++
+Enables code instrumentation to generate coverage data during execution.
+
+|# # end::doc[]
+
+feature.feature coverage
+ :
+ off # Disable coverage generation for the tool (default).
+ on # Enable coverage generation for the tool.
+ : incidental propagated ;
diff --git a/src/boost/tools/build/src/tools/features/cxx-template-depth-feature.jam b/src/boost/tools/build/src/tools/features/cxx-template-depth-feature.jam
new file mode 100644
index 000000000..825b03a1c
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/cxx-template-depth-feature.jam
@@ -0,0 +1,39 @@
+# Copyright 2017 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)
+
+import feature ;
+import numbers ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.cpp-template-depth]]`c++-template-depth`::
+*Allowed values:* Any positive integer.
++
+Allows configuring a {CPP} compiler with the maximal template instantiation
+depth parameter. Specific toolsets may or may not provide support for this
+feature depending on whether their compilers provide a corresponding
+command-line option.
++
+NOTE: Due to some internal details in the current B2 implementation it
+is not possible to have features whose valid values are all positive integer.
+As a workaround a large set of allowed values has been defined for this feature
+and, if a different one is needed, user can easily add it by calling the
+feature.extend rule.
+
+|# # end::doc[]
+
+# TODO: This should be upgraded as soon as Boost Build adds support for custom
+# validated feature values or at least features allowing any positive integral
+# value. See related Boost Build related trac ticket #194.
+
+feature.feature c++-template-depth
+ :
+ [ numbers.range 64 1024 : 64 ]
+ [ numbers.range 20 1000 : 10 ]
+ # Maximum template instantiation depth guaranteed for ANSI/ISO C++
+ # conforming programs.
+ 17
+ :
+ incidental optional propagated ;
diff --git a/src/boost/tools/build/src/tools/features/cxxabi-feature.jam b/src/boost/tools/build/src/tools/features/cxxabi-feature.jam
new file mode 100644
index 000000000..9b6cd4fd4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/cxxabi-feature.jam
@@ -0,0 +1,18 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.cxxabi]]`c++abi`::
+Selects a specific variant of C++ ABI if the compiler supports several.
+
+
+|# # end::doc[]
+
+feature.feature c++abi
+ :
+ : propagated optional ;
diff --git a/src/boost/tools/build/src/tools/features/cxxflags-feature.jam b/src/boost/tools/build/src/tools/features/cxxflags-feature.jam
new file mode 100644
index 000000000..6db7a7ce6
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/cxxflags-feature.jam
@@ -0,0 +1,17 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.cxxflags]]`cxxflags`::
+See <<bbv2.builtin.features.cflags,`<cflags>`>>.
+
+|# # end::doc[]
+
+feature.feature cxxflags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/cxxstd-feature.jam b/src/boost/tools/build/src/tools/features/cxxstd-feature.jam
new file mode 100644
index 000000000..dfddf5bb7
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/cxxstd-feature.jam
@@ -0,0 +1,50 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.cxxstd]]`cxxstd`::
+*Allowed values*: `98`, `03`, `0x`, `11`, `1y`, `14`, `1z`, `17`, `2a`,
+`latest`.
++
+Specifies the version of the C++ Standard Language to build with. All the
+official versions of the standard since "98" are included. It is also possible
+to specify using the experimental, work in progress, `latest` version. Some
+compilers specified intermediate versions for the experimental versions leading
+up to the released standard version. Those are included following the GNU
+nomenclature as `0x`, `1y`, `1z`, and `2a`. Depending on the compiler `latest`
+would map to one of those.
+
+NOTE: This is an `optional` feature. Hence when not specified the compiler
+default behaviour is used.
+
+NOTE: Please consult the toolset specific documentation for which `cxxstd`
+is supported.
+
+|# # end::doc[]
+
+feature.feature cxxstd
+ : 98 03 0x 11 1y 14 1z 17 2a latest
+ : optional composite propagated ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.cxxstd-dialect]]`cxxstd-dialect`::
+*Subfeature of* `cxxstd`
++
+*Allowed values*: `iso`, `gnu`, `ms`.
++
+Indicates if a non-standard dialect should be used. These usually have
+either/or extensions or platform specific functionality. Not specifying the
+dialect will default to 'iso' which will attempt to use ISO C++ Standard
+conformance to the best of the compiler's ability.
+
+|# # end::doc[]
+
+feature.subfeature cxxstd : dialect
+ : iso gnu ms
+ : composite propagated ;
diff --git a/src/boost/tools/build/src/tools/features/debug-feature.jam b/src/boost/tools/build/src/tools/features/debug-feature.jam
new file mode 100644
index 000000000..f98177e39
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/debug-feature.jam
@@ -0,0 +1,34 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.debug-symbols]]`debug-symbols`::
+*Allowed values:* `on`, `off`.
++
+Specifies if produced object files, executables, and libraries should include
+debug information. Typically, the value of this feature is implicitly set by
+the `variant` feature, but it can be explicitly specified by the user. The most
+common usage is to build release variant with debugging information.
+
+|# # end::doc[]
+
+feature.feature debug-symbols
+ : on off
+ : propagated ;
+
+#| tag::prof-doc[]
+
+[[bbv2.builtin.features.profiling]]`profiling`::
+*Allowed values:* `off`, `on`.
++
+Enables generation of extra code to write profile information.
+|# # end::prof-doc[]
+
+feature.feature profiling
+ : off on
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/define-feature.jam b/src/boost/tools/build/src/tools/features/define-feature.jam
new file mode 100644
index 000000000..680afdd94
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/define-feature.jam
@@ -0,0 +1,30 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.define]]`define`::
+Specifies a preprocessor symbol that should be defined on the command line.
+You may either specify just the symbol, which will be defined without any
+value, or both the symbol and the value, separated by equal sign.
+
+|# # end::doc[]
+
+feature.feature define
+ :
+ : free ;
+
+#| tag::undef-doc[]
+
+[[bbv2.builtin.features.undef]]`undef`::
+Specifies a preprocessor symbol to undefine.
+
+|# # end::undef-doc[]
+
+feature.feature undef
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/dependency-feature.jam b/src/boost/tools/build/src/tools/features/dependency-feature.jam
new file mode 100644
index 000000000..d866fb21c
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/dependency-feature.jam
@@ -0,0 +1,62 @@
+# Copyright 2017 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)
+
+# The following features are incidental since they have no effect on built
+# products. Not making them incidental will result in problems in corner cases,
+# e.g.:
+#
+# unit-test a : a.cpp : <use>b ;
+# lib b : a.cpp b ;
+#
+# Here, if <use> is not incidental, we would decide we have two targets for
+# a.obj with different properties and complain about it.
+#
+# Note that making a feature incidental does not mean it is ignored. It may be
+# ignored when creating a virtual target, but the rest of build process will use
+# them.
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.dependency]]`dependency`::
+Introduces a dependency on the target named by the value of this feature (so it
+will be brought up-to-date whenever the target being declared is). The
+dependency is not used in any other way.
+
+|# # end::doc[]
+
+feature.feature dependency
+ :
+ : free dependency incidental ;
+
+#| tag::impl-doc[]
+
+[[bbv2.builtin.features.implicit-dependency]]`implicit-dependency`::
+Indicates that the target named by the value of this feature may produce files
+that are included by the sources of the target being declared. See the section
+<<Generated headers>> for more information.
+
+|# # end::impl-doc[]
+
+feature.feature implicit-dependency
+ :
+ : free dependency incidental ;
+
+#| tag::use-doc[]
+
+[[bbv2.builtin.features.use]]`use`::
+Introduces a dependency on the target named by the value of this feature (so it
+will be brought up-to-date whenever the target being declared is), and adds its
+usage requirements to the build properties of the target being declared. The
+dependency is not used in any other way. The primary use case is when you want
+the usage requirements (such as `#include` paths) of some library to be
+applied, but do not want to link to it.
+
+|# # end::use-doc[]
+
+feature.feature use
+ :
+ : free dependency incidental ;
diff --git a/src/boost/tools/build/src/tools/features/dll-feature.jam b/src/boost/tools/build/src/tools/features/dll-feature.jam
new file mode 100644
index 000000000..3c7ed0d65
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/dll-feature.jam
@@ -0,0 +1,73 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.dll-path]]`dll-path`::
+Specifies an additional directory where the system should look for shared
+libraries when the executable or shared library is run. This feature only
+affects Unix compilers. Please see
+<<Why are the `dll-path` and `hardcode-dll-paths` properties useful?>>
+in <<Frequently Asked Questions>> for details.
+
+|# # end::doc[]
+
+feature.feature dll-path
+ :
+ : free path ;
+
+#| tag::hardcode-doc[]
+
+[[bbv2.builtin.features.hardcode-dll-paths]]`hardcode-dll-paths`::
+*Allowed values:* `true`, `false`.
++
+Controls automatic generation of dll-path properties.
++
+This property is specific to Unix systems. If an executable is built with
+`<hardcode-dll-paths>true`, the generated binary will contain the list of all
+the paths to the used shared libraries. As the result, the executable can be
+run without changing system paths to shared libraries or installing the
+libraries to system paths. This is very convenient during development. Please
+see the <<bbv2.faq.dll-path,FAQ entry>> for details. Note that on Mac OSX,
+the paths are unconditionally hardcoded by the linker, and it is not possible
+to disable that behavior
+
+|# # end::hardcode-doc[]
+
+feature.feature hardcode-dll-paths
+ : true false
+ : incidental ;
+
+# An internal feature that holds the paths of all dependency shared libraries.
+# On Windows, it is needed so that we can add all those paths to PATH when
+# running applications. On Linux, it is needed to add proper -rpath-link command
+# line options.
+feature.feature xdll-path
+ :
+ : free path ;
+
+#| tag::def-doc[]
+
+[[bbv2.builtin.features.def-file]]`def-file`::
+Provides a means to specify def-file for windows DLLs.
+
+|# # end::def-doc[]
+
+feature.feature def-file
+ :
+ : free dependency ;
+
+#| tag::suppress-doc[]
+
+[[bbv2.builtin.features.suppress-import-lib]]`suppress-import-lib`::
+Suppresses creation of import library by the linker.
+
+|# # end::suppress-doc[]
+
+feature.feature suppress-import-lib
+ : false true
+ : incidental ;
diff --git a/src/boost/tools/build/src/tools/features/exception-feature.jam b/src/boost/tools/build/src/tools/features/exception-feature.jam
new file mode 100644
index 000000000..9db3834b2
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/exception-feature.jam
@@ -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 copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# TODO: Documentation.
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.exception-handling]]`exception-handling`::
+*Allowed values:* `on`, `off`.
++
+Disables exceptions.
+
+|# # end::doc[]
+
+feature.feature exception-handling
+ : on off
+ : propagated ;
+
+#| tag::asynch-doc[]
+
+[[bbv2.builtin.features.asynch-exceptions]]`asynch-exceptions`::
+*Allowed values:* `off`, `on`.
++
+Selects whether there is support for asynchronous EH (e.g. catching SEGVs).
+
+|# # end::asynch-doc[]
+
+feature.feature asynch-exceptions
+ : off on
+ : propagated ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.extern-c-nothrow]]`extern-c-nothrow`::
+*Allowed values:* `off`, `on`.
++
+Selects whether all `extern "C"` functions are considered `nothrow` by default.
+
+|# # end::doc[]
+
+feature.feature extern-c-nothrow
+ : off on
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/fflags-feature.jam b/src/boost/tools/build/src/tools/features/fflags-feature.jam
new file mode 100644
index 000000000..fe89d6e63
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/fflags-feature.jam
@@ -0,0 +1,18 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.fflags]]`fflags`::
+The value of this feature is passed without modification to the tool when
+compiling Fortran sources.
+
+|# # end::doc[]
+
+feature.feature fflags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/file-feature.jam b/src/boost/tools/build/src/tools/features/file-feature.jam
new file mode 100644
index 000000000..a16d8d754
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/file-feature.jam
@@ -0,0 +1,18 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.file]]`file`::
+When used in requirements of a prebuilt library target this feature specifies
+the path to the library file. See <<Prebuilt targets>> for examples.
+
+|# # end::doc[]
+
+feature.feature file
+ :
+ : free dependency incidental ;
diff --git a/src/boost/tools/build/src/tools/features/find-lib-feature.jam b/src/boost/tools/build/src/tools/features/find-lib-feature.jam
new file mode 100644
index 000000000..e00f40397
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/find-lib-feature.jam
@@ -0,0 +1,42 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.find-shared-library]]`find-shared-library`::
+Adds a shared library to link to. Usually link:#bbv2.tasks.libraries[`lib`]
+targets should be preferred over using this feature.
+
+|# # end::doc[]
+
+feature.feature find-shared-library
+ :
+ : free ; #order-sensitive ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.find-static-library]]`find-static-library`::
+Adds a static library to link to. Usually link:#bbv2.tasks.libraries[`lib`]
+targets should be preferred over using this feature.
+
+|# # end::doc[]
+
+feature.feature find-static-library
+ :
+ : free ; #order-sensitive ;
+
+#| tag::path-doc[]
+
+[[bbv2.builtin.features.library-path]]`library-path`::
+Adds to the list of directories which will be used by the linker to search for
+libraries.
+
+|# # end::path-doc[]
+
+feature.feature library-path
+ :
+ : free path ; #order-sensitive ;
diff --git a/src/boost/tools/build/src/tools/features/flags-feature.jam b/src/boost/tools/build/src/tools/features/flags-feature.jam
new file mode 100644
index 000000000..a0c416609
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/flags-feature.jam
@@ -0,0 +1,19 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.flags]]`flags`::
+This feature is used for generic, i.e. non-language specific, flags for tools.
+The value of this feature is passed without modification to the tool that will
+build the target.
+
+|# # end::doc[]
+
+feature.feature flags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/include-feature.jam b/src/boost/tools/build/src/tools/features/include-feature.jam
new file mode 100644
index 000000000..25d8ad8c4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/include-feature.jam
@@ -0,0 +1,19 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.include]]`include`::
+Specifies an additional include path that is to be passed to C and {CPP}
+compilers.
+
+|# # end::doc[]
+
+feature.feature "include"
+ :
+ : free path #order-sensitive
+ ;
diff --git a/src/boost/tools/build/src/tools/features/instruction-set-feature.jam b/src/boost/tools/build/src/tools/features/instruction-set-feature.jam
new file mode 100644
index 000000000..d68c29afc
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/instruction-set-feature.jam
@@ -0,0 +1,64 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.instruction-set]]`instruction-set`::
+*Allowed values:* depends on the used toolset.
++
+Specifies for which specific instruction set the code should be generated. The
+code in general might not run on processors with older/different instruction
+sets.
++
+While B2 allows a large set of possible values for this features,
+whether a given value works depends on which compiler you use. Please see
+the section <<C++ Compilers>> for details.
+
+|# # end::doc[]
+
+feature.feature instruction-set
+ :
+ # x86 and x86-64
+ native i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3
+ pentium3m pentium-m pentium4 pentium4m prescott nocona core2 corei7 corei7-avx core-avx-i
+ conroe conroe-xe conroe-l allendale merom merom-xe kentsfield kentsfield-xe penryn wolfdale
+ yorksfield nehalem sandy-bridge ivy-bridge haswell broadwell skylake skylake-avx512 cannonlake
+ icelake
+ k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx
+ k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 btver1
+ btver2 znver1 winchip-c6 winchip2 c3 c3-2 atom
+
+ # ia64
+ itanium itanium1 merced itanium2 mckinley
+
+ # Sparc
+ v7 cypress v8 supersparc sparclite hypersparc sparclite86x f930 f934
+ sparclet tsc701 v9 ultrasparc ultrasparc3
+
+ # RS/6000 & PowerPC
+ 401 403 405 405fp 440 440fp 505 601 602 603 603e 604 604e 620 630 740 7400
+ 7450 750 801 821 823 860 970 8540 power-common ec603e g3 g4 g5 power power2
+ power3 power4 power5 powerpc powerpc64 rios rios1 rsc rios2 rs64a
+
+ # MIPS
+ 4kc 4kp 5kc 20kc m4k r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650
+ r6000 r8000 rm7000 rm9000 orion sb1 vr4100 vr4111 vr4120 vr4130 vr4300
+ vr5000 vr5400 vr5500
+
+ # HP/PA-RISC
+ 700 7100 7100lc 7200 7300 8000
+
+ # Advanced RISC Machines
+ armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312
+ armv7 armv7s
+
+ # z Systems (aka s390x)
+ z196 zEC12 z13 z14 z15
+
+ :
+ propagated optional
+ ;
diff --git a/src/boost/tools/build/src/tools/features/internal-feature.jam b/src/boost/tools/build/src/tools/features/internal-feature.jam
new file mode 100644
index 000000000..5c1d88e78
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/internal-feature.jam
@@ -0,0 +1,19 @@
+# Copyright 2017 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)
+
+# TODO: Documentation.
+
+import feature ;
+
+# Internal feature.
+feature.feature library-file
+ :
+ : free dependency ;
+
+# Internal feature used to store the name of a bjam action to call when building
+# a target.
+feature.feature action
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/library-feature.jam b/src/boost/tools/build/src/tools/features/library-feature.jam
new file mode 100644
index 000000000..86772c0e9
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/library-feature.jam
@@ -0,0 +1,22 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.library]]`library`::
+This feature is almost equivalent to the
+<<bbv2.builtin.features.library,`<source>`>> feature, except that it takes
+effect only for linking. When you want to link all targets in a Jamfile to
+certain library, the `<library>` feature is preferred over `<source>X` -- the
+latter will add the library to all targets, even those that have nothing to do
+with libraries.
+
+|# # end::doc[]
+
+feature.feature library
+ :
+ : free dependency incidental ;
diff --git a/src/boost/tools/build/src/tools/features/link-feature.jam b/src/boost/tools/build/src/tools/features/link-feature.jam
new file mode 100644
index 000000000..f697341a8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/link-feature.jam
@@ -0,0 +1,19 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.link]]`link`::
+*Allowed values:* `shared`, `static`
++
+Controls how libraries are built.
+
+|# # end::doc[]
+
+feature.feature link
+ : shared static
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/linkflags-feature.jam b/src/boost/tools/build/src/tools/features/linkflags-feature.jam
new file mode 100644
index 000000000..4e157f399
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/linkflags-feature.jam
@@ -0,0 +1,17 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.linkflags]]`linkflags`::
+See <<bbv2.builtin.features.cflags,`<cflags>`>>.
+
+|# # end::doc[]
+
+feature.feature linkflags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/local-visibility-feature.jam b/src/boost/tools/build/src/tools/features/local-visibility-feature.jam
new file mode 100644
index 000000000..d1792fd06
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/local-visibility-feature.jam
@@ -0,0 +1,27 @@
+# Copyright 2018 Andrey Semashev
+# 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 ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.local-visibility]]`local-visibility`::
+*Allowed values:* `global`, `protected`, `hidden`.
++
+This feature has the same effect as the
+<<bbv2.builtin.features.visibility,`visibility`>> feature but is intended
+to be used by targets that require a particular symbol visibility. Unlike the
+`visibility` feature, `local-visibility` is not inherited by the target
+dependencies and only affects the target to which it is applied.
++
+The `local-visibility` feature supports the same values with the same meaning
+as the `visibility` feature. By default, if `local-visibility` is not specified
+for a target, the value of the `visibility` feature is used.
+
+|# # end::doc[]
+
+feature.feature local-visibility
+ : global protected hidden
+ : optional ;
diff --git a/src/boost/tools/build/src/tools/features/location-feature.jam b/src/boost/tools/build/src/tools/features/location-feature.jam
new file mode 100644
index 000000000..1581d3392
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/location-feature.jam
@@ -0,0 +1,18 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.location]]`location`::
+Specifies the build directory for a target. The feature is used primarily with
+<<bbv2.tasks.installing,`<install>`>> rule.
+
+|# # end::doc[]
+
+feature.feature location
+ :
+ : free path ;
diff --git a/src/boost/tools/build/src/tools/features/location-prefix-feature.jam b/src/boost/tools/build/src/tools/features/location-prefix-feature.jam
new file mode 100644
index 000000000..11582fd20
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/location-prefix-feature.jam
@@ -0,0 +1,18 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.location-prefix]]`location-prefix`::
+Sets the build directory for a target as the project’s build directory prefixed
+with the value of this feature. See section <<Target Paths>> for an example.
+
+|# # end::doc[]
+
+feature.feature location-prefix
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/lto-feature.jam b/src/boost/tools/build/src/tools/features/lto-feature.jam
new file mode 100644
index 000000000..99ca7bdcc
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/lto-feature.jam
@@ -0,0 +1,46 @@
+# Copyright 2019 Dmitry Arkhipov
+# 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 ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.lto]]`lto`::
+*Allowed values:* `on`.
++
+Enables link time optimizations (also known as interprocedural optimizations or
+whole-program optimizations). Currently supported toolsets are <<GNU {CPP}>>,
+clang and <<Microsoft Visual {CPP}>>. The feature is optional.
+
+|# # end::doc[]
+
+feature.feature lto
+ : on
+ : optional propagated ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.lto-mode]]`lto-mode`::
+*Subfeature of* `lto`
++
+*Allowed values:* `full`, `thin`, `fat`.
++
+Specifies the type of LTO to use.
++
+`full`::: Use the monolithic LTO: on linking all input is merged into a single
+ module.
+`thin`::: Use clang's ThinLTO: each compiled file contains a summary of the
+ module, these summaries are merged into a single index. This allows to avoid
+ merging all modules together, which greatly reduces linking time.
+`fat`::: Produce gcc's fat LTO objects: compiled files contain both the
+ intermidiate language suitable for LTO and object code suitable for regular
+ linking.
+
+|# # end::doc[]
+
+feature.subfeature lto
+ : mode
+ : full thin fat
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/name-feature.jam b/src/boost/tools/build/src/tools/features/name-feature.jam
new file mode 100644
index 000000000..e134fc422
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/name-feature.jam
@@ -0,0 +1,22 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.name]]`name`::
+When used in requirements of a prebuilt library target this feature specifies
+the name of the library (the name of the library file without any
+platform-specific suffixes or prefixes). See <<Prebuilt targets>> for examples.
++
+When used in requirements of an `<install>` target it specifies the name of the
+target file.
+
+|# # end::doc[]
+
+feature.feature name
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/objcflags-feature.jam b/src/boost/tools/build/src/tools/features/objcflags-feature.jam
new file mode 100644
index 000000000..b69c6b661
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/objcflags-feature.jam
@@ -0,0 +1,32 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.mflags]]`mflags`::
+The value of this feature is passed without modification to the tool when
+compiling Objective C sources.
+
+
+|# # end::doc[]
+
+feature.feature mflags
+ :
+ : free ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.mmflags]]`mmflags`::
+The value of this feature is passed without modification to the tool when
+compiling Objective {CPP} sources.
+
+
+|# # end::doc[]
+
+feature.feature mmflags
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/optimization-feature.jam b/src/boost/tools/build/src/tools/features/optimization-feature.jam
new file mode 100644
index 000000000..f02183622
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/optimization-feature.jam
@@ -0,0 +1,46 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.optimization]]`optimization`::
+*Allowed values:* `off`, `speed`, `space`.
++
+Enables optimization. `speed` optimizes for faster code, `space` optimizes for
+smaller binary.
+
+|# # end::doc[]
+
+feature.feature optimization
+ : off speed space
+ : propagated ;
+
+#| tag::inline-doc[]
+
+[[bbv2.builtin.features.inlining]]`inlining`::
+*Allowed values:* `off`, `on`, `full`.
++
+Enables inlining.
+
+|# # end::inline-doc[]
+
+feature.feature inlining
+ : off on full
+ : propagated ;
+
+#| tag::vector-doc[]
+
+[[bbv2.builtin.features.vectorize]]`vectorize`::
+*Allowed values:* `off`, `on`, `full`.
++
+Enables vectorization.
+
+|# # end::vector-doc[]
+
+feature.feature vectorize
+ : off on full
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/os-feature.jam b/src/boost/tools/build/src/tools/features/os-feature.jam
new file mode 100644
index 000000000..98407e16a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/os-feature.jam
@@ -0,0 +1,95 @@
+# Copyright 2017 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)
+
+import feature ;
+import modules ;
+import os ;
+
+.os-names =
+ aix android appletv bsd cygwin darwin freebsd haiku hpux iphone linux
+ netbsd openbsd osf qnx qnxnto sgi solaris unix unixware windows vms vxworks
+ freertos
+
+ # Not actually an OS -- used for targeting bare metal where object
+ # format is ELF. This catches both -elf and -eabi gcc targets as well
+ # as other compilers targeting ELF. It is not clear how often we need
+ # the 'elf' key as opposed to other bare metal targets, but let us
+ # stick with gcc naming.
+ elf
+ ;
+
+# Feature used to determine which OS we're on. New <target-os> and <host-os>
+# features should be used instead.
+local os = [ modules.peek : OS ] ;
+feature.feature os : $(os) : propagated link-incompatible ;
+
+# Translates from bjam current OS to the os tags used in host-os and
+# target-os, i.e. returns the running host-os.
+#
+local rule default-host-os ( )
+{
+ local host-os ;
+ if [ os.name ] in $(.os-names:U)
+ {
+ host-os = [ os.name ] ;
+ }
+ else
+ {
+ switch [ os.name ]
+ {
+ case NT : host-os = windows ;
+ case AS400 : host-os = unix ;
+ case MINGW : host-os = windows ;
+ case BSDI : host-os = bsd ;
+ case COHERENT : host-os = unix ;
+ case DRAGONFLYBSD : host-os = bsd ;
+ case IRIX : host-os = sgi ;
+ case HAIKU : host-os = haiku ;
+ case MACOSX : host-os = darwin ;
+ case KFREEBSD : host-os = freebsd ;
+ case LINUX : host-os = linux ;
+ case VMS : host-os = vms ;
+ case SUNOS :
+ ECHO
+ "SunOS is not a supported operating system."
+ "We believe last version of SunOS was released in 1992, "
+ "so if you get this message, something is very wrong with "
+ "configuration logic. Please report this as a bug. " ;
+ EXIT ;
+ case * : host-os = unix ;
+ }
+ }
+ return $(host-os:L) ;
+}
+
+
+# The two OS features define a known set of abstract OS names. The host-os is
+# the OS under which bjam is running. Even though this should really be a fixed
+# property we need to list all the values to prevent unknown value errors. Both
+# set the default value to the current OS to account for the default use case of
+# building on the target OS.
+feature.feature host-os : $(.os-names) ;
+feature.set-default host-os : [ default-host-os ] ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.target-os]]`target-os`::
+*Allowed values:* `aix`, `android`, `appletv`, `bsd`, `cygwin`, `darwin`,
+`freebsd`, `haiku`, `hpux`, `iphone`, `linux`, `netbsd`, `openbsd`, `osf`,
+`qnx`, `qnxnto`, `sgi`, `solaris`, `unix`, `unixware`, `windows`, `vms`,
+`vxworks`, `freertos`.
++
+Specifies the operating system for which the code is to be generated. The
+compiler you used should be the compiler for that operating system. This option
+causes B2 to use naming conventions suitable for that operating
+system, and adjust build process accordingly. For example, with gcc, it
+controls if import libraries are produced for shared libraries or not.
++
+See the section <<Cross-compilation>> for details of cross-compilation.
+
+|# # end::doc[]
+
+feature.feature target-os : $(.os-names) : propagated link-incompatible ;
+feature.set-default target-os : [ default-host-os ] ;
diff --git a/src/boost/tools/build/src/tools/features/relevant-feature.jam b/src/boost/tools/build/src/tools/features/relevant-feature.jam
new file mode 100644
index 000000000..94ba69965
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/relevant-feature.jam
@@ -0,0 +1,48 @@
+# Copyright 2017 Steven Watanabe
+# 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 ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.relevant]]`relevant`::
+*Allowed values:* the name of any feature.
++
+Indicates which other features are relevant for a given target. It is usually
+not necessary to manage it explicitly, as B2 can deduce it in most
+cases. Features which are not relevant will not affect target paths, and will
+not cause conflicts.
++
+* A feature will be considered relevant if any of the following are true
++
+** It is referenced by `toolset.flags` or `toolset.uses-features`
+** It is used by the requirements of a generator
+** It is a sub-feature of a relevant feature
+** It has a sub-feature which is relevant
+** It is a composite feature, and any composed feature is relevant
+** It affects target alternative selection for a main target
+** It is a propagated feature and is relevant for any dependency
+** It is relevant for any dependency created by the same main target
+** It is used in the condition of a conditional property and the corresponding
+ value is relevant
+** It is explicitly named as relevant
++
+* Relevant features cannot be automatically deduced in the following cases:
++
+** Indirect conditionals. Solution: return properties of the form
+`<relevant>result-feature:<relevant>condition-feature`
++
+NOTE: This isn't really a conditional, although for most purposes it functions
+like one. In particular, it does not support multiple comma-separated elements
+in the condition, and it does work correctly even in contexts where conditional
+properties are not allowed
+** Action rules that read properties. Solution: add toolset.uses-features to
+ tell B2 that the feature is actually used.
+** Generators and targets that manipulate property-sets directly. Solution:
+ set <relevant> manually.
+
+|# # end::doc[]
+
+feature.feature relevant : : incidental free ;
diff --git a/src/boost/tools/build/src/tools/features/rtti-feature.jam b/src/boost/tools/build/src/tools/features/rtti-feature.jam
new file mode 100644
index 000000000..5943412e4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/rtti-feature.jam
@@ -0,0 +1,19 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.rtti]]`rtti`::
+*Allowed values:* `on`, `off`.
++
+Disables run-time type information.
+
+|# # end::doc[]
+
+feature.feature rtti
+ : on off
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/runtime-feature.jam b/src/boost/tools/build/src/tools/features/runtime-feature.jam
new file mode 100644
index 000000000..f25c178ea
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/runtime-feature.jam
@@ -0,0 +1,40 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.runtime-debugging]]`runtime-debugging`::
+*Allowed values:* `on`, `off`.
++
+Specifies whether produced object files, executables, and libraries should
+include behavior useful only for debugging, such as asserts. Typically, the
+value of this feature is implicitly set by the `variant` feature, but it can be
+explicitly specified by the user. The most common usage is to build release
+variant with debugging output.
+
+|# # end::doc[]
+
+feature.feature runtime-debugging
+ : on off
+ : propagated ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.runtime-link]]`runtime-link`::
+*Allowed values:* `shared`, `static`
++
+Controls if a static or shared C/{CPP} runtime should be used. There are some
+restrictions how this feature can be used, for example on some compilers an
+application using static runtime should not use shared libraries at all, and on
+some compilers, mixing static and shared runtime requires extreme care. Check
+your compiler documentation for more details.
+
+|# # end::doc[]
+
+feature.feature runtime-link
+ : shared static
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/sanitizers-feature.jam b/src/boost/tools/build/src/tools/features/sanitizers-feature.jam
new file mode 100644
index 000000000..8affd57a9
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/sanitizers-feature.jam
@@ -0,0 +1,63 @@
+# Copyright 2019 Damian Jarek
+# 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 ;
+
+#| tag::addr-doc[]
+
+[[bbv2.builtin.features.address-sanitizer]]`address-sanitizer`::
+*Allowed values:* `on`, `norecover`.
++
+Enables address sanitizer. Value `norecover` disables recovery for the
+sanitizer. The feature is optional, thus no sanitizer is enabled by default.
+
+|# # end::addr-doc[]
+
+feature.feature address-sanitizer
+ : on norecover
+ : propagated optional ;
+
+#| tag::leak-doc[]
+
+[[bbv2.builtin.features.leak-sanitizer]]`leak-sanitizer`::
+*Allowed values:* `on`, `norecover`.
++
+Enables leak sanitizer. Value `norecover` disables recovery for the
+sanitizer. The feature is optional, thus no sanitizer is enabled by default.
+
+|# # end::leak-doc[]
+
+feature.feature leak-sanitizer
+ : on norecover
+ : propagated optional ;
+
+#| tag::thread-doc[]
+
+[[bbv2.builtin.features.thread-sanitizer]]`thread-sanitizer`::
+*Allowed values:* `on`, `norecover`.
++
+Enables thread sanitizer. Value `norecover` disables recovery for the
+sanitizer. The feature is optional, thus no sanitizer is enabled by default.
+
+|# # end::thread-doc[]
+
+feature.feature thread-sanitizer
+ : on norecover
+ : propagated optional ;
+
+#| tag::undef-doc[]
+
+[[bbv2.builtin.features.undefined-sanitizer]]`undefined-sanitizer`::
+*Allowed values:* `on`, `norecover`.
++
+Enables undefined behavior sanitizer. Value `norecover` disables recovery for
+the sanitizer. The feature is optional, thus no sanitizer is enabled by
+default.
+
+|# # end::undef-doc[]
+
+feature.feature undefined-sanitizer
+ : on norecover
+ : propagated optional ;
diff --git a/src/boost/tools/build/src/tools/features/search-feature.jam b/src/boost/tools/build/src/tools/features/search-feature.jam
new file mode 100644
index 000000000..cbcf2a176
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/search-feature.jam
@@ -0,0 +1,20 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.search]]`search`::
+When used in requirements of a prebuilt library target this feature adds to the
+list of directories to search for the library file. See <<Prebuilt targets>>
+for examples.
+
+|# # end::doc[]
+
+feature.feature search
+ :
+ : free path #order-sensitive
+ ;
diff --git a/src/boost/tools/build/src/tools/features/source-feature.jam b/src/boost/tools/build/src/tools/features/source-feature.jam
new file mode 100644
index 000000000..7cc1ab8d3
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/source-feature.jam
@@ -0,0 +1,22 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.source]]`source`::
+The `<source>X` property has the same effect on building a target as putting X
+in the list of sources. It is useful when you want to add the same source to
+all targets in the project (you can put `<source>` in requirements) or to
+conditionally include a source (using conditional requirements, see
+the section <<Conditions and alternatives>>. See also the
+<<bbv2.builtin.features.library,`<library>`>> feature.
+
+|# # end::doc[]
+
+feature.feature source
+ :
+ : free dependency incidental ;
diff --git a/src/boost/tools/build/src/tools/features/stdlib-feature.jam b/src/boost/tools/build/src/tools/features/stdlib-feature.jam
new file mode 100644
index 000000000..b280ac8d0
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/stdlib-feature.jam
@@ -0,0 +1,29 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.stdlib]]`stdlib`::
+*Allowed values*: `native`, `gnu`, `gnu11`, `libc++`, `sun-stlport`, `apache`.
++
+Specifies C++ standard library to link to and in some cases the library ABI to
+use:
++
+`native`::: Use compiler's default.
+`gnu`::: Use GNU Standard Library (a.k.a. pass:[libstdc++]) with the old ABI.
+`gnu11`::: Use GNU Standard Library with the new ABI.
+`libc++`::: Use LLVM pass:[libc++].
+`sun-stlport`::: Use the STLport implementation of the standard library
+ provided with the Solaris Studio compiler.
+`apache`::: Use the Apache stdcxx version 4 C++ standard library provided with
+ the Solaris Studio compiler.
+
+|# # end::doc[]
+
+feature.feature stdlib
+ : native gnu gnu11 libc++ sun-stlport apache
+ : propagated composite ;
diff --git a/src/boost/tools/build/src/tools/features/strip-feature.jam b/src/boost/tools/build/src/tools/features/strip-feature.jam
new file mode 100644
index 000000000..0bb9221af
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/strip-feature.jam
@@ -0,0 +1,25 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.strip]]`strip`::
+*Allowed values:* `off`, `on`.
++
+Controls whether the binary should be stripped -- that is have everything not
+necessary to running removed.
++
+NOTE: This feature will show up in target paths of everything, not just
+binaries.
+
+|# # end::doc[]
+
+# TODO: Should fix that when implementing feature relevance.
+
+feature.feature strip
+ : off on
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/tag-feature.jam b/src/boost/tools/build/src/tools/features/tag-feature.jam
new file mode 100644
index 000000000..c03924edf
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/tag-feature.jam
@@ -0,0 +1,39 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.tag]]`tag`::
+Used to customize the name of the generated files. The value should have the
+form:
++
+----
+@rulename
+----
++
+where _rulename_ should be a name of a rule with the following signature:
++
+----
+rule tag ( name : type ? : property-set )
+----
++
+The rule will be called for each target with the default name computed by
+B2, the type of the target, and property set. The rule can either
+return a string that must be used as the name of the target, or an empty
+string, in which case the default name will be used.
++
+Most typical use of the `tag` feature is to encode build properties, or library
+version in library target names. You should take care to return non-empty
+string from the tag rule only for types you care about -- otherwise, you might
+end up modifying names of object files, generated header file and other targets
+for which changing names does not make sense.
+
+|# # end::doc[]
+
+feature.feature tag
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/threadapi-feature.jam b/src/boost/tools/build/src/tools/features/threadapi-feature.jam
new file mode 100644
index 000000000..ae320678d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/threadapi-feature.jam
@@ -0,0 +1,39 @@
+# Copyright 2017 Alexander Karzhenkov
+# 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 property-set ;
+import feature : feature ;
+import toolset ;
+import features/os-feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.threadapi]]`threadapi`::
+*Allowed values:* `pthread`, `win32`.
++
+Selects threading implementation. The default is `win32` if `<target-os>` is
+`windows` and `pthread` otherwise.
+
+|# # end::doc[]
+
+feature threadapi : pthread win32 : symmetric propagated ;
+toolset.add-defaults <target-os>windows:<threadapi>win32 ;
+
+rule get-default ( property-set )
+{
+ local api = pthread ;
+ if [ $(property-set).get <target-os> ] = windows { api = win32 ; }
+ return $(api) ;
+}
+
+# Obsolete rule that didn't quite work. Remove this
+# after all references to it have been cleaned up.
+rule detect ( properties * )
+{
+ # local ps = [ property-set.create $(properties) ] ;
+ # local api = [ $(ps).get <threadapi> ] ;
+ # if ! $(api) { api = [ get-default $(ps) ] ; }
+ # return <threadapi>$(api) <relevant>threadapi:<relevant>target-os ;
+}
diff --git a/src/boost/tools/build/src/tools/features/threading-feature.jam b/src/boost/tools/build/src/tools/features/threading-feature.jam
new file mode 100644
index 000000000..8d7a8f7c3
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/threading-feature.jam
@@ -0,0 +1,24 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.threading]]`threading`::
+*Allowed values:* `single`, `multi`
++
+Controls if the project should be built in multi-threaded mode. This feature
+does not necessary change code generation in the compiler, but it causes the
+compiler to link to additional or different runtime libraries, and define
+additional preprocessor symbols (for example, `_MT` on Windows and `_REENTRANT`
+on Linux). How those symbols affect the compiled code depends on the code
+itself.
+
+|# # end::doc[]
+
+feature.feature threading
+ : single multi
+ : propagated ;
diff --git a/src/boost/tools/build/src/tools/features/toolset-feature.jam b/src/boost/tools/build/src/tools/features/toolset-feature.jam
new file mode 100644
index 000000000..fbd0baba8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/toolset-feature.jam
@@ -0,0 +1,20 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.toolset]]`toolset`::
+*Allowed values:* any of the toolset modules.
++
+Selects the toolset that will be used to build binary targets. The full list of
+toolset modules is in the <<Builtin tools>> section.
+
+|# # end::doc[]
+
+feature.feature toolset
+ :
+ : implicit propagated symmetric ;
diff --git a/src/boost/tools/build/src/tools/features/user-interface-feature.jam b/src/boost/tools/build/src/tools/features/user-interface-feature.jam
new file mode 100644
index 000000000..d4631ead4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/user-interface-feature.jam
@@ -0,0 +1,28 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.user-interface]]`user-interface`::
+*Allowed values:* `console`, `gui`, `wince`, `native`, `auto`.
++
+Specifies the environment for the executable which affects the entry point
+symbol (or entry point function) that the linker will select. This feature is
+Windows-specific.
++
+`console`::: console application.
+`gui`::: application does not require a console (it is supposed to create its
+ own windows.
+`wince`::: application is intended to run on a device that has a version of the
+ Windows CE kernel.
+`native`::: application runs without a subsystem environment.
+`auto`::: application runs in the POSIX subsystem in Windows.
+
+|# # end::doc[]
+
+feature.feature user-interface
+ : console gui wince native auto ;
diff --git a/src/boost/tools/build/src/tools/features/variant-feature.jam b/src/boost/tools/build/src/tools/features/variant-feature.jam
new file mode 100644
index 000000000..ced88cebe
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/variant-feature.jam
@@ -0,0 +1,114 @@
+# Copyright 2017 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)
+
+import feature ;
+import errors ;
+import property ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.variant]]`variant`::
+*Allowed values:* `debug`, `release`, `profile`.
++
+A feature combining several low-level features, making it easy to
+request common build configurations.
++
+The value `debug` expands to
++
+----
+<optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on
+----
++
+The value `release` expands to
++
+----
+<optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off
+----
++
+The value `profile` expands to the same as `release`, plus:
++
+----
+<profiling>on <debug-symbols>on
+----
++
+Users can define their own build variants using the `variant` rule
+from the `common` module.
++
+NOTE: Runtime debugging is on in debug builds to suit the expectations of
+people used to various IDEs.
+
+|# # end::doc[]
+
+feature.feature variant
+ :
+ : implicit composite propagated symmetric ;
+
+# Declares a new variant.
+#
+# First determines explicit properties for this variant, by refining parents'
+# explicit properties with the passed explicit properties. The result is
+# remembered and will be used if this variant is used as parent.
+#
+# Second, determines the full property set for this variant by adding to the
+# explicit properties default values for all missing non-symmetric properties.
+#
+# Lastly, makes appropriate value of 'variant' property expand to the full
+# property set.
+#
+rule variant ( name # Name of the variant
+ : parents-or-properties * # Specifies parent variants, if
+ # 'explicit-properties' are given, and
+ # explicit-properties or parents otherwise.
+ : explicit-properties * # Explicit properties.
+ )
+{
+ local parents ;
+ if ! $(explicit-properties)
+ {
+ if $(parents-or-properties[1]:G)
+ {
+ explicit-properties = $(parents-or-properties) ;
+ }
+ else
+ {
+ parents = $(parents-or-properties) ;
+ }
+ }
+ else
+ {
+ parents = $(parents-or-properties) ;
+ }
+
+ # The problem is that we have to check for conflicts between base variants.
+ if $(parents[2])
+ {
+ errors.error "multiple base variants are not yet supported" ;
+ }
+
+ local inherited ;
+ # Add explicitly specified properties for parents.
+ for local p in $(parents)
+ {
+ # TODO: This check may be made stricter.
+ if ! [ feature.is-implicit-value $(p) ]
+ {
+ errors.error "Invalid base variant" $(p) ;
+ }
+
+ inherited += $(.explicit-properties.$(p)) ;
+ }
+ property.validate $(explicit-properties) ;
+ explicit-properties = [ property.refine $(inherited)
+ : $(explicit-properties) ] ;
+
+ # Record explicitly specified properties for this variant. We do this after
+ # inheriting parents' properties so they affect other variants derived from
+ # this one.
+ .explicit-properties.$(name) = $(explicit-properties) ;
+
+ feature.extend variant : $(name) ;
+ feature.compose <variant>$(name) : $(explicit-properties) ;
+}
+IMPORT $(__name__) : variant : : variant ;
diff --git a/src/boost/tools/build/src/tools/features/version-feature.jam b/src/boost/tools/build/src/tools/features/version-feature.jam
new file mode 100644
index 000000000..10f7fa7d2
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/version-feature.jam
@@ -0,0 +1,19 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.version]]`version`::
+This feature isn't used by any of the builtin tools, but can be used, for
+example, to adjust target's name via <<bbv2.builtin.features.tag,`<tag>`>>
+feature.
+
+|# # end::doc[]
+
+feature.feature version
+ :
+ : free ;
diff --git a/src/boost/tools/build/src/tools/features/visibility-feature.jam b/src/boost/tools/build/src/tools/features/visibility-feature.jam
new file mode 100644
index 000000000..443dc89ef
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/visibility-feature.jam
@@ -0,0 +1,46 @@
+# Copyright 2018 Andrey Semashev
+# 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 ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.visibility]]`visibility`::
+*Allowed values:* `global`, `protected`, `hidden`.
++
+Specifies the default symbol visibility in compiled binaries. Not all values
+are supported on all platforms and on some platforms (for example, Windows)
+symbol visibility is not supported at all.
++
+The supported values have the following meaning:
++
+`global`::: a.k.a. "default" in gcc documentation. Global symbols are
+ considered public, they are exported from shared libraries and can be
+ redefined by another shared library or executable.
+`protected`::: a.k.a. "symbolic". Protected symbols are exported from shared
+ ibraries but cannot be redefined by another shared library or executable.
+ This mode is not supported on some platforms, for example OS X.
+`hidden`::: Hidden symbols are not exported from shared libraries and cannot
+ be redefined by a different shared library or executable loaded in a process.
+ In this mode, public symbols have to be explicitly marked in the source code
+ to be exported from shared libraries. This is the recommended mode.
++
+By default compiler default visibility mode is used (no compiler flags are
+added).
++
+NOTE: In Boost super-project Jamroot file this property is set to the default
+value of `hidden`. This means that Boost libraries are built with hidden
+visibility by default, unless the user overrides it with a different
+`visibility` or a library sets a different `local-visibility` (see below).
+
+|# # end::doc[]
+
+feature.feature visibility
+ : global protected hidden
+ : optional composite propagated ;
+
+feature.compose <visibility>global : <local-visibility>global ;
+feature.compose <visibility>protected : <local-visibility>protected ;
+feature.compose <visibility>hidden : <local-visibility>hidden ;
diff --git a/src/boost/tools/build/src/tools/features/warnings-feature.jam b/src/boost/tools/build/src/tools/features/warnings-feature.jam
new file mode 100644
index 000000000..b64bda648
--- /dev/null
+++ b/src/boost/tools/build/src/tools/features/warnings-feature.jam
@@ -0,0 +1,41 @@
+# Copyright 2017 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)
+
+import feature ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.warnings]]`warnings`::
+*Allowed values:* `on`, `all`, `extra`, `pedantic`, `off`.
++
+Controls the warning level of compilers.
++
+`on`::: enable default/"reasonable" warning level.
+`all`::: enable most warnings.
+`extra`::: enable extra, possibly conflicting, warnings.
+`pedantic`::: enable likely inconsequential, and conflicting, warnings.
+`off`::: disable all warnings.
++
+Default value is `all`.
+
+|# # end::doc[]
+
+feature.feature warnings
+ : on all extra pedantic off
+ : incidental propagated ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.warnings-as-errors]]`warnings-as-errors`::
+*Allowed values:* `off`, `on`.
++
+Makes it possible to treat warnings as errors and abort compilation on a
+warning.
+
+|# # end::doc[]
+
+feature.feature warnings-as-errors
+ : off on
+ : incidental propagated ;
diff --git a/src/boost/tools/build/src/tools/flags.jam b/src/boost/tools/build/src/tools/flags.jam
new file mode 100644
index 000000000..045f9af69
--- /dev/null
+++ b/src/boost/tools/build/src/tools/flags.jam
@@ -0,0 +1,152 @@
+# Copyright 2018 Steven Watanabe
+# 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)
+
+# defines the check-has-flag rule.
+
+import "class" ;
+import common ;
+import feature : feature ;
+import generators ;
+import make ;
+import print ;
+import project ;
+import toolset : flags ;
+
+rule init ( )
+{
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+ project.push-current ;
+ project.initialize $(__name__) ;
+ project /check/flags ;
+ .project = [ project.current ] ;
+ make empty.c : : @write-main ;
+ make empty.cpp : : @write-main ;
+ obj empty.obj : empty.cpp ;
+ project : requirements <flags.check>on ;
+ project.pop-current ;
+ }
+}
+
+rule write-main ( target : : properties * )
+{
+ print.output $(target) ;
+ print.text "int main() { return 0; }\n" : yes ;
+}
+
+# Applies true-properties if the toolset recognizes a specific flag.
+# Otherwise applies false-properties.
+#
+# Option must be one of <cflags>, <cxxflags>, or <linkflags>.
+#
+# Example::
+#
+# exe foo : foo.cpp :
+# [ check-has-flag <cxxflags>-std=c++11 : <cxxflags>-std=c++11 ] ;
+#
+rule check-has-flag ( option message ? : true-properties * : false-properties * )
+{
+ init ;
+ local id = [ MD5 $(option) ] ;
+
+ if ! $(.targets.$(id))
+ {
+ project.push-current $(.project) ;
+ switch $(option:G)
+ {
+ case <cflags> : obj flags_$(id) : empty.c : $(option) ;
+ case <cxxflags> : obj flags_$(id) : empty.cpp : $(option) ;
+ case <linkflags> : exe flags_$(id) : empty.obj : $(option) ;
+ case * :
+ import errors ;
+ errors.user-error "Don't know how to check $(option:G)" ;
+ }
+ project.pop-current ;
+ .targets.$(id) = true ;
+ }
+ message ?= "has $(option:G=)" ;
+ return [ check-target-builds /check/flags//flags_$(id) $(message)
+ : $(true-properties) : $(false-properties) ] ;
+}
+
+IMPORT $(__name__) : check-has-flag : : check-has-flag ;
+
+feature flags.check : on : optional composite ;
+feature.compose <flags.check>on : <warnings-as-errors>on ;
+
+# Some compilers don't have an easy way to cause an error
+# for unknown options. In this case, we need to check
+# their stdout/stderr. This generator will copy it's
+# source, but will cause an error if the given pattern
+# matches the output from the source.
+#
+
+feature flags.pattern : : free ;
+
+class flag-check-generator : generator
+{
+ rule __init__ ( type : requirements * : pattern )
+ {
+ generator.__init__ flags.check-output : $(type) : $(type)(%_valid) :
+ $(requirements) <flags.check>on ;
+ self.pattern = $(pattern) ;
+ }
+ rule run ( project name ? : property-set : sources * )
+ {
+ property-set = [ property-set.create
+ [ property.change [ $(property-set).raw ] : <flags.check> ]
+ <flags.pattern>$(self.pattern) ] ;
+ return [ generator.run $(project) $(name)
+ : $(property-set) : $(sources) ] ;
+ }
+ rule action-class ( )
+ {
+ return non-scanning-action ;
+ }
+}
+
+# These generator definitions should probably be moved to the individual toolsets.
+
+# msvc-7.1 uses 4002. Later versions use 9002.
+generators.register
+ [ class.new flag-check-generator OBJ : <toolset>msvc : "(D[94]002)" ] ;
+generators.register
+ [ class.new flag-check-generator EXE : <toolset>msvc : "(LNK4044)" ] ;
+generators.register
+ [ class.new flag-check-generator OBJ : <toolset>intel : "(#10006)" ] ;
+generators.register
+ [ class.new flag-check-generator EXE : <toolset>intel : "(#10006)" ] ;
+generators.override flags.check-output : all ;
+
+rule check-output-callback ( targets * : source-targets * : ignored * : output ? )
+{
+ if [ MATCH [ on $(targets) return $(PATTERN) ] : $(output) ]
+ {
+ FLAG_CHECK_COMMAND on $(targets) = illegal-ad22d215a8bbd73 ;
+ }
+}
+
+IMPORT $(__name__) : check-output-callback : : flags.check-output-callback ;
+
+flags flags.check-output PATTERN : <flags.pattern> ;
+
+rule check-output ( targets * : sources * : properties * )
+{
+ local action = [ on $(sources) return $(.action) ] ;
+ local all-sources ;
+ for local t in [ $(action).targets ]
+ {
+ all-sources += [ $(t).actualize ] ;
+ }
+ REBUILDS $(targets) : $(sources) ;
+ __ACTION_RULE__ on $(all-sources) = flags.check-output-callback $(targets) ;
+ common.copy $(targets[1]) : $(sources[1]) ;
+}
+
+actions check-output
+{
+ $(FLAG_CHECK_COMMAND)
+}
diff --git a/src/boost/tools/build/src/tools/fop.jam b/src/boost/tools/build/src/tools/fop.jam
new file mode 100644
index 000000000..c24b8725f
--- /dev/null
+++ b/src/boost/tools/build/src/tools/fop.jam
@@ -0,0 +1,69 @@
+# Copyright (C) 2003-2004 Doug Gregor and Dave Abrahams. 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 module defines rules to handle generation of PDF and
+# PostScript files from XSL Formatting Objects via Apache FOP
+
+import generators ;
+import common ;
+import boostbook ;
+
+generators.register-standard fop.render.pdf : FO : PDF ;
+generators.register-standard fop.render.ps : FO : PS ;
+
+# Initializes the fop toolset.
+#
+rule init ( fop-command ? : java-home ? : java ? )
+{
+ local has-command = $(.has-command) ;
+
+ if $(fop-command)
+ {
+ .has-command = true ;
+ }
+
+ if $(fop-command) || ! $(has-command)
+ {
+ fop-command = [ common.get-invocation-command fop : fop : $(fop-command)
+ : [ modules.peek : FOP_DIR ] ] ;
+ }
+
+ if $(fop-command)
+ {
+ .FOP_COMMAND = $(fop-command) ;
+ }
+
+ if $(java-home) || $(java)
+ {
+ .FOP_SETUP = ;
+
+
+ # JAVA_HOME is the location that java was installed to.
+
+ if $(java-home)
+ {
+ .FOP_SETUP += [ common.variable-setting-command JAVA_HOME : $(java-home) ] ;
+ }
+
+ # JAVACMD is the location that of the java executable, useful for a
+ # non-standard java installation, where the executable isn't at
+ # $JAVA_HOME/bin/java.
+
+ if $(java)
+ {
+ .FOP_SETUP += [ common.variable-setting-command JAVACMD : $(java) ] ;
+ }
+ }
+}
+
+actions render.pdf
+{
+ $(.FOP_SETUP) $(.FOP_COMMAND:E=fop) $(>) $(<)
+}
+
+actions render.ps
+{
+ $(.FOP_SETUP) $(.FOP_COMMAND:E=fop) $(>) -ps $(<)
+}
diff --git a/src/boost/tools/build/src/tools/fortran.jam b/src/boost/tools/build/src/tools/fortran.jam
new file mode 100644
index 000000000..37665825e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/fortran.jam
@@ -0,0 +1,55 @@
+# Copyright (C) 2004 Toon Knapen
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+#
+# This file contains common settings for all fortran tools
+#
+
+import "class" : new ;
+import feature : feature ;
+
+import type ;
+import generators ;
+import common ;
+
+type.register FORTRAN : f F for f77 ;
+type.register FORTRAN90 : f90 F90 ;
+
+feature fortran : : free ;
+feature fortran90 : : free ;
+
+class fortran-compiling-generator : generator
+{
+ rule __init__ ( id : source-types + : target-types + : requirements * : optional-properties * )
+ {
+ generator.__init__ $(id) : $(source-types) : $(target-types) : $(requirements) : $(optional-properties) ;
+ }
+}
+
+rule register-fortran-compiler ( id : source-types + : target-types + : requirements * : optional-properties * )
+{
+ local g = [ new fortran-compiling-generator $(id) : $(source-types) : $(target-types) : $(requirements) : $(optional-properties) ] ;
+ generators.register $(g) ;
+}
+
+class fortran90-compiling-generator : generator
+{
+ rule __init__ ( id : source-types + : target-types + : requirements * : optional-properties * )
+ {
+ generator.__init__ $(id) : $(source-types) : $(target-types) : $(requirements) : $(optional-properties) ;
+ }
+}
+
+rule register-fortran90-compiler ( id : source-types + : target-types + : requirements * : optional-properties * )
+{
+ local g = [ new fortran90-compiling-generator $(id) : $(source-types) : $(target-types) : $(requirements) : $(optional-properties) ] ;
+ generators.register $(g) ;
+}
+
+# FIXME: this is ugly, should find a better way (we'd want client code to
+# register all generators as "generator.some-rule", not with "some-module.some-rule".)
+IMPORT $(__name__) : register-fortran-compiler : : generators.register-fortran-compiler ;
+IMPORT $(__name__) : register-fortran90-compiler : : generators.register-fortran90-compiler ;
diff --git a/src/boost/tools/build/src/tools/gcc.jam b/src/boost/tools/build/src/tools/gcc.jam
new file mode 100644
index 000000000..8910a55f2
--- /dev/null
+++ b/src/boost/tools/build/src/tools/gcc.jam
@@ -0,0 +1,1330 @@
+# Copyright 2001 David Abrahams
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2003 Vladimir Prus
+# Copyright 2005 Reece H. Dunn
+# Copyright 2006 Ilya Sokolov
+# Copyright 2007 Roland Schwarz
+# Copyright 2007 Boris Gubenko
+#
+# 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.gcc]]
+= GNU C++
+
+The `gcc` module supports the http://gcc.gnu.org[GNU C++ compiler] on
+Linux, a number of Unix-like system including SunOS and on Windows
+(either http://www.cygwin.com[Cygwin] or http://www.mingw.org[MinGW]).
+
+The `gcc` module is initialized using the following syntax:
+
+----
+using gcc : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the version is not explicitly specified, it will be automatically
+detected by running the compiler with the `-v` option. If the command is
+not specified, the `g++` binary will be searched in PATH.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+`root`::
+Specifies root directory of the compiler installation. This option is
+necessary only if it is not possible to detect this information from the
+compiler command--for example if the specified compiler command is a user
+script.
+
+`archiver`::
+Specifies the archiver command that is used to produce static
+libraries. Normally, it is autodetected using gcc `-print-prog-name`
+option or defaulted to `ar`, but in some cases you might want to
+override it, for example to explicitly use a system version instead of
+one included with gcc.
+
+`ranlib`::
+Specifies the ranlib command that is used to generated symbol table
+for static libraries. Normally, it is autodetected using gcc
+`-print-prog-name` option or defaulted to `ranlib`, but in some cases
+you might want to override it, for example to explicitly use a system
+version instead of one included with gcc.
+
+`rc`::
+Specifies the resource compiler command that will be used with the
+version of gcc that is being configured. This setting makes sense only
+for Windows and only if you plan to use resource files. By default
+`windres` will be used.
+
+`rc-type`::
+Specifies the type of resource compiler. The value can be either
+`windres` for msvc resource compiler, or `rc` for borland's resource
+compiler.
+
+In order to compile 64-bit applications, you have to specify
+`address-model=64`, and the `instruction-set` feature should refer to a 64
+bit processor. Currently, those include `nocona`, `opteron`, `athlon64` and
+`athlon-fx`.
+
+|# # end::doc[]
+
+import "class" : new ;
+import common ;
+import cygwin ;
+import feature ;
+import fortran ;
+import generators ;
+import os ;
+import pch ;
+import property ;
+import property-set ;
+import rc ;
+import regex ;
+import sequence ;
+import set ;
+import toolset ;
+import type ;
+import unix ;
+import virtual-target ;
+import errors ;
+
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+
+feature.extend toolset : gcc ;
+
+toolset.inherit-generators gcc : unix : unix.link unix.link.dll ;
+toolset.inherit-flags gcc : unix ;
+toolset.inherit-rules gcc : unix ;
+
+generators.override gcc.prebuilt : builtin.prebuilt ;
+generators.override gcc.searched-lib-generator : searched-lib-generator ;
+
+# Make gcc toolset object files use the "o" suffix on all platforms.
+type.set-generated-target-suffix OBJ : <toolset>gcc : o ;
+type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>windows : o ;
+type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>cygwin : o ;
+
+
+# Initializes the gcc toolset for the given version. If necessary, command may
+# be used to specify where the compiler is located. The parameter 'options' is a
+# space-delimited list of options, each one specified as
+# <option-name>option-value. Valid option names are: cxxflags, linkflags and
+# linker-type. Accepted linker-type values are aix, darwin, gnu, hpux, osf or
+# sun and the default value will be selected based on the current OS.
+# Example:
+# using gcc : 3.4 : : <cxxflags>foo <linkflags>bar <linker-type>sun ;
+#
+# The compiler command to use is detected in three steps:
+# 1) If an explicit command is specified by the user, it will be used and must
+# be available.
+# 2) If only a certain version is specified, it is enforced:
+# - either the 'g++-VERSION' command must be available
+# - or the default command 'g++' must be available and match the exact
+# version.
+# 3) Without user-provided restrictions use default 'g++'.
+#
+rule init ( version ? : command * : options * : requirement * )
+{
+ #1): use user-provided command
+ local tool-command = ;
+ if $(command)
+ {
+ tool-command = [ common.get-invocation-command-nodefault gcc : g++ :
+ $(command) ] ;
+ if ! $(tool-command)
+ {
+ import errors ;
+ errors.error toolset gcc "initialization:"
+ : provided command '$(command)' not found
+ : initialized from [ errors.nearest-user-location ] ;
+ }
+ }
+ #2): enforce user-provided version
+ else if $(version)
+ {
+ tool-command = [ common.get-invocation-command-nodefault gcc :
+ "g++-$(version[1])" ] ;
+
+ #2.1) fallback: check whether "g++" reports the requested version
+ if ! $(tool-command)
+ {
+ tool-command = [ common.get-invocation-command-nodefault gcc : g++ ]
+ ;
+ if $(tool-command)
+ {
+ local tool-command-string = \"$(tool-command)\" ;
+ tool-command-string = $(tool-command-string:J=" ") ;
+ local tool-version = [ dump-full-version
+ $(tool-command-string) ] ;
+ # Permit a match between a two-digit version specified by the
+ # user (e.g. 4.4) and a 3-digit version reported by gcc.
+ # Since only two digits are present in the binary name
+ # anyway, insisting that user specify the 3-digit version
+ # when configuring B2, while it is not required on
+ # the command line, would be strange.
+ local versionl = [ regex.split $(version) "[.]" ] ;
+ local tool-versionl = [ regex.split $(tool-version) "[.]" ] ;
+ if ! ( $(versionl[1]) = $(tool-versionl[1]) &&
+ $(versionl[2]:E=$(tool-versionl[2])) = $(tool-versionl[2]) &&
+ $(versionl[3]:E=$(tool-versionl[3])) = $(tool-versionl[3]) )
+ {
+ import errors ;
+ errors.error toolset gcc "initialization:"
+ : version '$(version)' requested but
+ 'g++-$(version)' not found and version
+ '$(tool-version)' of default '$(tool-command)'
+ does not match
+ : initialized from [ errors.nearest-user-location ]
+ ;
+ tool-command = ;
+ }
+ }
+ else
+ {
+ import errors ;
+ errors.error toolset gcc "initialization:"
+ : version '$(version)' requested but neither
+ 'g++-$(version)' nor default 'g++' found
+ : initialized from [ errors.nearest-user-location ] ;
+ }
+ }
+ }
+ #3) default: no command and no version specified, try using "g++"
+ else
+ {
+ tool-command = [ common.get-invocation-command-nodefault gcc : g++ ] ;
+ if ! $(tool-command)
+ {
+ import errors ;
+ errors.error toolset gcc "initialization:"
+ : no command provided, default command 'g++' not found
+ : initialized from [ errors.nearest-user-location ] ;
+ }
+ }
+
+
+ # Information about the gcc command...
+ # The command.
+ local command = $(tool-command) ;
+ # The 'command' variable can have multiple elements but when calling the
+ # SHELL builtin we need a single string, and we need to quote elements
+ # with spaces.
+ local command-string = \"$(command)\" ;
+ command-string = $(command-string:J=" ") ;
+ # The root directory of the tool install.
+ local root = [ feature.get-values <root> : $(options) ] ;
+ # The bin directory where to find the command to execute.
+ local bin ;
+ # The compiler flavor.
+ local flavor = [ feature.get-values <flavor> : $(options) ] ;
+ # vxworks build on windows uses csh that is neither mingw or cygwin
+ if [ feature.get-values <target-os> : $(options) ] = vxworks
+ {
+ flavor ?= vxworks ;
+ }
+ # Autodetect the root and bin dir if not given.
+ if $(command)
+ {
+ bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
+ root ?= $(bin:D) ;
+ }
+ local target-os ;
+ # Autodetect the version and flavor if not given.
+ if $(command)
+ {
+ local machine = [ MATCH "^([^ ]+)" :
+ [ SHELL "$(command-string) -dumpmachine" ] ] ;
+ version ?= [ dump-version $(command-string) ] ;
+ switch $(machine:L)
+ {
+ case *mingw* : flavor ?= mingw ;
+ case *cygwin* : flavor ?= cygwin ;
+ }
+ switch $(machine:L)
+ {
+ case *mingw* : target-os ?= windows ;
+ case *cygwin* : target-os ?= cygwin ;
+ case *linux* : target-os ?= linux ;
+ # TODO: finish this list.
+ }
+ }
+
+ local condition ;
+ condition = [ common.check-init-parameters gcc $(requirement) : version $(version)
+ : $(condition) ] ;
+
+ common.handle-options gcc : $(condition) : $(command) : $(options) ;
+
+ # Set the default target-os for this toolset.
+ if $(target-os) && ! [ feature.get-values <target-os> : $(requirement) ]
+ {
+ local conditionx = [ regex.replace $(condition) "/" "," ] ;
+ toolset.add-defaults $(conditionx)\:<target-os>$(target-os) ;
+ }
+
+ # If gcc is installed in a non-standard location, we would need to add
+ # LD_LIBRARY_PATH when running programs created with it (for unit-test/run
+ # rules).
+ if $(command)
+ {
+ # On multilib 64-bit boxes, there are both 32-bit and 64-bit libraries
+ # and all must be added to LD_LIBRARY_PATH. The linker will pick the
+ # right onces. Note that we do not provide a clean way to build a 32-bit
+ # binary using a 64-bit compiler, but user can always pass -m32
+ # manually.
+ local lib_path = $(root)/bin $(root)/lib $(root)/lib32 $(root)/lib64 ;
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" using gcc libraries "::" $(condition) "::" $(lib_path) ;
+ }
+ toolset.flags gcc.link RUN_PATH $(condition) : $(lib_path) ;
+ }
+
+ # If we are not using a system gcc installation we should adjust the various
+ # programs as needed to prefer using their installation specific versions.
+ # This is essential for correct use of MinGW and for cross-compiling.
+
+ # - Archive builder.
+ local archiver = [ common.get-invocation-command gcc
+ : [ .get-prog-name $(command-string) : ar : $(flavor) ]
+ : [ feature.get-values <archiver> : $(options) ]
+ : $(bin)
+ : search-path ] ;
+ toolset.flags gcc.archive .AR $(condition) : $(archiver[1]) ;
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" using gcc archiver "::" $(condition) "::" $(archiver[1]) ;
+ }
+ local arflags = [ feature.get-values <arflags> : $(options) ] ;
+ toolset.flags gcc.archive .ARFLAGS $(condition) : $(arflags) ;
+
+ # - Ranlib.
+ local ranlib = [ common.get-invocation-command gcc
+ : [ .get-prog-name $(command-string) : ranlib : $(flavor) ]
+ : [ feature.get-values <ranlib> : $(options) ]
+ : $(bin)
+ : search-path ] ;
+ toolset.flags gcc.archive .RANLIB $(condition) : $(ranlib[1]) ;
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" using gcc ranlib "::" $(condition) "::" $(ranlib[1]) ;
+ }
+
+ # - Resource compiler.
+ local rc = [ common.get-invocation-command-nodefault gcc : windres :
+ [ feature.get-values <rc> : $(options) ] : $(bin) : search-path ] ;
+ local rc-type = [ feature.get-values <rc-type> : $(options) ] ;
+ rc-type ?= windres ;
+ if ! $(rc)
+ {
+ # If we can not find an RC compiler we fallback to a null one that
+ # creates empty object files. This allows the same Jamfiles to work
+ # across the board. The null RC uses assembler to create the empty
+ # objects, so configure that.
+ rc = [ common.get-invocation-command gcc : as : : $(bin) : search-path ]
+ ;
+ rc-type = null ;
+ }
+ rc.configure $(rc) : $(condition) : <rc-type>$(rc-type) ;
+
+ toolset.flags gcc VERSION $(condition) : [ regex.split $(version) "[.]" ] ;
+
+ init-cxxstd-flags $(condition) : $(version) ;
+}
+
+if [ os.name ] = NT
+{
+ # This causes single-line command invocation to not go through .bat files,
+ # thus avoiding command-line length limitations.
+ # TODO: Set JAMSHELL on specific targets instead of globally.
+ JAMSHELL = % ;
+}
+
+local rule dump-full-version ( command-string )
+{
+ # -dumpfullversion is only supported for gcc 7+.
+ # Passing both options works, as the first one that's
+ # recognized will be used.
+ return [ MATCH "^([0-9.]+)" :
+ [ SHELL "$(command-string) -dumpfullversion -dumpversion" ] ] ;
+}
+
+local rule dump-version ( command-string )
+{
+ return [ MATCH "^([0-9.]+)" :
+ [ SHELL "$(command-string) -dumpversion" ] ] ;
+}
+
+# Uses -print-prog-name to get the name of the tool.
+# Converts the path to native form if using cygwin.
+rule .get-prog-name ( command-string : tool : flavor ? )
+{
+ local prog-name = [ NORMALIZE_PATH [ MATCH "(.*)[\n]+" :
+ [ SHELL "$(command-string) -print-prog-name=$(tool)" ] ] ] ;
+
+ if $(flavor) = cygwin && [ os.name ] = NT
+ {
+ prog-name = [ cygwin.cygwin-to-windows-path $(prog-name) ] ;
+ }
+ return $(prog-name) ;
+}
+
+###
+### Functions that set options on the targets.
+###
+
+local all-os = [ feature.values <target-os> ] ;
+
+local rule compile-link-flags ( * )
+{
+ toolset.flags gcc.compile OPTIONS $(1) : $(2) ;
+ toolset.flags gcc.link OPTIONS $(1) : $(2) ;
+}
+
+{
+ # This logic will add -fPIC for all compilations:
+ #
+ # lib a : a.cpp b ;
+ # obj b : b.cpp ;
+ # exe c : c.cpp a d ;
+ # obj d : d.cpp ;
+ #
+ # This all is fine, except that 'd' will be compiled with -fPIC even
+ # though it is not needed, as 'd' is used only in exe. However, it is
+ # hard to detect where a target is going to be used. Alternatively, we
+ # can set -fPIC only when main target type is LIB but than 'b' would be
+ # compiled without -fPIC which would lead to link errors on x86-64. So,
+ # compile everything with -fPIC.
+ #
+ # Yet another alternative would be to create a propagated <sharedable>
+ # feature and set it when building shared libraries, but that would be
+ # hard to implement and would increase the target path length even more.
+
+ # On Windows, fPIC is the default, and specifying -fPIC explicitly leads
+ # to a warning.
+ local non-windows = [ set.difference $(all-os) : cygwin windows ] ;
+ compile-link-flags <link>shared/<target-os>$(non-windows) : -fPIC ;
+}
+
+{
+ # Handle address-model
+ compile-link-flags <target-os>aix/<address-model>32 : -maix32 ;
+ compile-link-flags <target-os>aix/<address-model>64 : -maix64 ;
+
+ compile-link-flags <target-os>hpux/<address-model>32 : -milp32 ;
+ compile-link-flags <target-os>hpux/<address-model>64 : -mlp64 ;
+
+ local generic-os = [ set.difference $(all-os) : aix hpux ] ;
+ local arch = power sparc x86 ;
+ compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>32 : -m32 ;
+ compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>64 : -m64 ;
+}
+
+{
+ # Handle threading
+ local rule threading-flags ( * )
+ {
+ compile-link-flags <threading>multi/$(1) : $(2) ;
+ if $(3)
+ {
+ toolset.flags gcc.link FINDLIBS-SA <threading>multi/$(1) : $(3) ;
+ }
+ }
+
+ threading-flags <target-os>windows : -mthreads ;
+ threading-flags <target-os>cygwin : -mthreads ;
+ threading-flags <target-os>solaris : -pthreads : rt ;
+ threading-flags <target-os>qnx : -pthread ;
+
+ local bsd = [ MATCH ^(.*bsd)$ : $(all-os) ] ;
+ threading-flags <target-os>$(bsd) : -pthread ;
+
+ local no-threading = android beos haiku sgi darwin vxworks ;
+ local threading-generic-os = [ set.difference $(all-os) : $(no-threading) $(bsd) windows cygwin solaris qnx ] ;
+ threading-flags <target-os>$(threading-generic-os) : -pthread : rt ;
+}
+
+{
+ local rule cxxstd-flags ( * )
+ {
+ toolset.flags gcc.compile.c++ OPTIONS $(1) : $(2) ;
+ toolset.flags gcc.link OPTIONS $(1) : $(2) ;
+ }
+
+ local cxxstd = [ feature.values <cxxstd> ] ;
+ local dialects = [ feature.values <cxxstd-dialect> ] ;
+ .cxxstd-dialects = [ set.difference $(dialects) : gnu iso ] ;
+ # C++ latest needs to be set up on a per-toolset basis
+ for local std in [ set.difference $(cxxstd) : latest ]
+ {
+ cxxstd-flags <cxxstd>$(std)/<cxxstd-dialect>iso : -std=c++$(std) ;
+ cxxstd-flags <cxxstd>$(std)/<cxxstd-dialect>gnu : -std=gnu++$(std) ;
+ # If we see this it's probably a mistake, but
+ # toolset.flags has no way to set up diagnostics.
+ cxxstd-flags <cxxstd>$(std)/<cxxstd-dialect>$(.cxxstd-dialects) : -std=c++$(std) ;
+ }
+
+ local rule version-ge ( lhs : rhs )
+ {
+ lhs = [ regex.split $(lhs) "[.]" ] ;
+ rhs = [ regex.split $(rhs) "[.]" ] ;
+ return [ sequence.compare $(rhs) : $(lhs) : numbers.less ] ;
+ }
+ # Version specific flags
+ local rule init-cxxstd-flags ( condition * : version )
+ {
+ local std ;
+ if [ version-ge $(version) : 8 ] { std = 2a ; }
+ else if [ version-ge $(version) : 5 ] { std = 1z ; }
+ else if [ version-ge $(version) : 4.8 ] { std = 1y ; }
+ else if [ version-ge $(version) : 4.7 ] { std = 11 ; }
+ else if [ version-ge $(version) : 3.3 ] { std = 98 ; }
+ if $(std)
+ {
+ cxxstd-flags $(condition)/<cxxstd>latest/<cxxstd-dialect>iso : -std=c++$(std) ;
+ cxxstd-flags $(condition)/<cxxstd>latest/<cxxstd-dialect>gnu : -std=gnu++$(std) ;
+ cxxstd-flags $(condition)/<cxxstd>latest/<cxxstd-dialect>$(.cxxstd-dialects) : -std=c++$(std) ;
+ }
+ }
+}
+
+generators.register-c-compiler gcc.compile.c++.preprocess : CPP : PREPROCESSED_CPP : <toolset>gcc ;
+generators.register-c-compiler gcc.compile.c.preprocess : C : PREPROCESSED_C : <toolset>gcc ;
+generators.register-c-compiler gcc.compile.c++ : CPP : OBJ : <toolset>gcc ;
+generators.register-c-compiler gcc.compile.c : C : OBJ : <toolset>gcc ;
+generators.register-c-compiler gcc.compile.asm : ASM : OBJ : <toolset>gcc ;
+
+generators.register [ new fortran-compiling-generator
+ gcc.compile.fortran : FORTRAN FORTRAN90 : OBJ : <toolset>gcc ] ;
+
+rule compile.c++.preprocess ( targets * : sources * : properties * )
+{
+ # Some extensions are compiled as C++ by default. For others, we need to
+ # pass -x c++. We could always pass -x c++ but distcc does not work with it.
+ if ! $(>:S) in .cc .cp .cxx .cpp .c++ .C
+ {
+ LANG on $(<) = "-x c++" ;
+ }
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
+}
+
+rule compile.c.preprocess ( targets * : sources * : properties * )
+{
+ # If we use the name g++ then default file suffix -> language mapping does
+ # not work. So have to pass -x option. Maybe, we can work around this by
+ # allowing the user to specify both C and C++ compiler names.
+ #if $(>:S) != .c
+ #{
+ LANG on $(<) = "-x c" ;
+ #}
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
+}
+
+rule compile.c++ ( targets * : sources * : properties * )
+{
+ # Some extensions are compiled as C++ by default. For others, we need to
+ # pass -x c++. We could always pass -x c++ but distcc does not work with it.
+ if ! $(>:S) in .cc .cp .cxx .cpp .c++ .C
+ {
+ LANG on $(<) = "-x c++" ;
+ }
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
+}
+
+rule compile.c ( targets * : sources * : properties * )
+{
+ # If we use the name g++ then default file suffix -> language mapping does
+ # not work. So have to pass -x option. Maybe, we can work around this by
+ # allowing the user to specify both C and C++ compiler names.
+ #if $(>:S) != .c
+ #{
+ LANG on $(<) = "-x c" ;
+ #}
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
+}
+
+rule compile.fortran ( targets * : sources * : properties * )
+{
+}
+
+actions compile.c++ bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<:W)" "$(>:W)"
+}
+
+actions compile.c bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++.preprocess bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>:W)" -E >"$(<:W)"
+}
+
+actions compile.c.preprocess bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>)" -E >$(<)
+}
+
+actions compile.fortran
+{
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+rule compile.asm ( targets * : sources * : properties * )
+{
+ LANG on $(<) = "-x assembler-with-cpp" ;
+}
+
+actions compile.asm
+{
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+###
+### Precompiled header use and generation.
+###
+
+# The compiler looks for a precompiled header in each directory just before it
+# looks for the include file in that directory. The name searched for is the
+# name specified in the #include directive with ".gch" suffix appended. The
+# logic in gcc-pch-generator will make sure that the BASE_PCH suffix is appended
+# to the full header name.
+
+type.set-generated-target-suffix PCH : <toolset>gcc : gch ;
+
+# GCC-specific pch generator.
+class gcc-pch-generator : pch-generator
+{
+ import project ;
+ import property-set ;
+ import type ;
+
+ rule run-pch ( project name ? : property-set : sources + )
+ {
+ # Find the header in sources. Ignore any CPP sources.
+ local header ;
+ for local s in $(sources)
+ {
+ if [ type.is-derived [ $(s).type ] H ]
+ {
+ header = $(s) ;
+ }
+ }
+
+ # Error handling: base header file name should be the same as the base
+ # precompiled header name.
+ local header-name = [ $(header).name ] ;
+ local header-basename = $(header-name:B) ;
+ if $(header-basename) != $(name)
+ {
+ local location = [ $(project).project-module ] ;
+ import errors : user-error : errors.user-error ;
+ errors.user-error "in" "$(location):" pch target name '$(name)' should
+ be the same as the base name of header file '$(header-name)' ;
+ }
+
+ local pch-file = [ generator.run $(project) $(name) : $(property-set)
+ : $(header) ] ;
+
+ # Return result of base class and pch-file property as
+ # usage-requirements.
+ return
+ [ $(pch-file[1]).add-raw <pch-file>$(pch-file[2-]) <cflags>-Winvalid-pch ]
+ $(pch-file[2-])
+ ;
+ }
+
+ # Calls the base version specifying source's name as the name of the created
+ # target. As a result, the PCH will be named whatever.hpp.gch, and not
+ # whatever.gch.
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ name = [ $(sources[1]).name ] ;
+ return [ generator.generated-targets $(sources)
+ : $(property-set) : $(project) $(name) ] ;
+ }
+}
+
+# Note: the 'H' source type will catch both '.h' header and '.hpp' header. The
+# latter have HPP type, but HPP type is derived from H. The type of compilation
+# is determined entirely by the destination type.
+generators.register [ new gcc-pch-generator gcc.compile.c.pch : H : C_PCH : <pch>on <toolset>gcc ] ;
+generators.register [ new gcc-pch-generator gcc.compile.c++.pch : H : CPP_PCH : <pch>on <toolset>gcc ] ;
+
+# Override default do-nothing generators.
+generators.override gcc.compile.c.pch : pch.default-c-pch-generator ;
+generators.override gcc.compile.c++.pch : pch.default-cpp-pch-generator ;
+
+toolset.flags gcc.compile PCH_FILE <pch>on : <pch-file> ;
+
+rule compile.c++.pch ( targets * : sources * : properties * )
+{
+}
+
+actions compile.c++.pch
+{
+ "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+rule compile.c.pch ( targets * : sources * : properties * )
+{
+}
+
+actions compile.c.pch
+{
+ "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+###
+### General options, like optimization.
+###
+
+# Declare flags and action for compilation.
+toolset.flags gcc.compile OPTIONS <optimization>off : -O0 ;
+toolset.flags gcc.compile OPTIONS <optimization>speed : -O3 ;
+toolset.flags gcc.compile OPTIONS <optimization>space : -Os ;
+
+toolset.flags gcc.compile OPTIONS <inlining>off : -fno-inline ;
+toolset.flags gcc.compile OPTIONS <inlining>on : -Wno-inline ;
+toolset.flags gcc.compile OPTIONS <inlining>full : -finline-functions -Wno-inline ;
+
+toolset.flags gcc.compile OPTIONS <warnings>off : -w ;
+toolset.flags gcc.compile OPTIONS <warnings>on : -Wall ;
+toolset.flags gcc.compile OPTIONS <warnings>all : -Wall ;
+toolset.flags gcc.compile OPTIONS <warnings>extra : -Wall -Wextra ;
+toolset.flags gcc.compile OPTIONS <warnings>pedantic : -Wall -Wextra -pedantic ;
+toolset.flags gcc.compile OPTIONS <warnings-as-errors>on : -Werror ;
+
+toolset.flags gcc.compile OPTIONS <debug-symbols>on : -g ;
+toolset.flags gcc.compile OPTIONS <profiling>on : -pg ;
+
+toolset.flags gcc.compile OPTIONS <local-visibility>hidden : -fvisibility=hidden ;
+toolset.flags gcc.compile.c++ OPTIONS <local-visibility>hidden : -fvisibility-inlines-hidden ;
+toolset.flags gcc.compile OPTIONS <local-visibility>protected : -fvisibility=protected ;
+toolset.flags gcc.compile OPTIONS <local-visibility>protected/<target-os>darwin : ;
+toolset.flags gcc.compile OPTIONS <local-visibility>global : -fvisibility=default ;
+
+toolset.flags gcc.compile.c++ OPTIONS <exception-handling>off : -fno-exceptions ;
+toolset.flags gcc.compile.c++ OPTIONS <rtti>off : -fno-rtti ;
+
+# sanitizers
+toolset.flags gcc.compile.c++ OPTIONS <address-sanitizer>on : -fsanitize=address -fno-omit-frame-pointer ;
+toolset.flags gcc.compile.c++ OPTIONS <address-sanitizer>norecover : -fsanitize=address -fno-sanitize-recover=address -fno-omit-frame-pointer ;
+toolset.flags gcc.compile.c++ OPTIONS <leak-sanitizer>on : -fsanitize=leak -fno-omit-frame-pointer ;
+toolset.flags gcc.compile.c++ OPTIONS <leak-sanitizer>norecover : -fsanitize=leak -fno-sanitize-recover=leak -fno-omit-frame-pointer ;
+toolset.flags gcc.compile.c++ OPTIONS <thread-sanitizer>on : -fsanitize=thread -fno-omit-frame-pointer ;
+toolset.flags gcc.compile.c++ OPTIONS <thread-sanitizer>norecover : -fsanitize=thread -fno-sanitize-recover=thread -fno-omit-frame-pointer ;
+toolset.flags gcc.compile.c++ OPTIONS <undefined-sanitizer>on : -fsanitize=undefined -fno-omit-frame-pointer ;
+toolset.flags gcc.compile.c++ OPTIONS <undefined-sanitizer>norecover : -fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer ;
+
+toolset.flags gcc.compile.c++ OPTIONS <coverage>on : --coverage ;
+
+# configure Dinkum STL to match compiler options
+toolset.flags gcc.compile.c++ DEFINES <rtti>off/<target-os>vxworks : _NO_RTTI ;
+toolset.flags gcc.compile.c++ DEFINES <exception-handling>off/<target-os>vxworks : _NO_EX=1 ;
+
+# LTO
+toolset.flags gcc.compile OPTIONS <lto>on/<lto-mode>full : -flto ;
+toolset.flags gcc.link OPTIONS <lto>on/<lto-mode>full : -flto ;
+
+toolset.flags gcc.compile OPTIONS <lto>on/<lto-mode>fat : -flto -ffat-lto-objects ;
+toolset.flags gcc.link OPTIONS <lto>on/<lto-mode>fat : -flto ;
+
+# ABI selection
+toolset.flags gcc.compile.c++ DEFINES <stdlib>gnu : _GLIBCXX_USE_CXX11_ABI=0 ;
+toolset.flags gcc.compile.c++ DEFINES <stdlib>gnu11 : _GLIBCXX_USE_CXX11_ABI=1 ;
+
+###
+### User free feature options.
+###
+
+toolset.flags gcc.compile USER_OPTIONS <cflags> ;
+toolset.flags gcc.compile.c++ USER_OPTIONS <cxxflags> ;
+toolset.flags gcc.compile.asm USER_OPTIONS <asmflags> ;
+toolset.flags gcc.compile DEFINES <define> ;
+toolset.flags gcc.compile INCLUDES <include> ;
+toolset.flags gcc.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
+toolset.flags gcc.compile.fortran USER_OPTIONS <fflags> ;
+
+###
+### Linking generators and actions.
+###
+
+# Class checking that we do not try to use the <runtime-link>static property
+# while creating or using a shared library, since it is not supported by
+# gcc/libc.
+class gcc-linking-generator : unix-linking-generator
+{
+ rule run ( project name ? : property-set : sources + )
+ {
+ local target-os = [ $(property-set).get <target-os> ] ;
+ local no-static-link = true ;
+ switch $(target-os)
+ {
+ case vms : no-static-link = ;
+ case windows : no-static-link = ;
+ }
+
+ local properties = [ $(property-set).raw ] ;
+ local reason ;
+ if $(no-static-link) && <runtime-link>static in $(properties)
+ {
+ if <link>shared in $(properties)
+ {
+ reason = On gcc, DLLs can not be built with
+ '<runtime-link>static'. ;
+ }
+ else if [ type.is-derived $(self.target-types[1]) EXE ]
+ {
+ for local s in $(sources)
+ {
+ local type = [ $(s).type ] ;
+ if $(type) && [ type.is-derived $(type) SHARED_LIB ]
+ {
+ reason = On gcc, using DLLs together with the
+ '<runtime-link>static' option is not possible. ;
+ }
+ }
+ }
+ }
+ if $(reason)
+ {
+ ECHO "warning:" $(reason) ;
+ ECHO "warning:" It is suggested to use '<runtime-link>static' together
+ with '<link>static'. ;
+ }
+ else
+ {
+ return [ unix-linking-generator.run $(project) $(name) :
+ $(property-set) : $(sources) ] ;
+ }
+ }
+}
+
+# The set of permissible input types is different on mingw. So, define two sets
+# of generators, with mingw generators selected when target-os=windows.
+
+local g ;
+g = [ new gcc-linking-generator gcc.mingw.link
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : EXE
+ : <toolset>gcc <target-os>windows ] ;
+$(g).set-rule-name gcc.link ;
+generators.register $(g) ;
+
+g = [ new gcc-linking-generator gcc.mingw.link.dll
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : IMPORT_LIB SHARED_LIB
+ : <toolset>gcc <target-os>windows ] ;
+$(g).set-rule-name gcc.link.dll ;
+generators.register $(g) ;
+
+generators.register
+ [ new gcc-linking-generator gcc.link
+ : LIB OBJ
+ : EXE
+ : <toolset>gcc ] ;
+generators.register
+ [ new gcc-linking-generator gcc.link.dll
+ : LIB OBJ
+ : SHARED_LIB
+ : <toolset>gcc ] ;
+
+generators.override gcc.mingw.link : gcc.link ;
+generators.override gcc.mingw.link.dll : gcc.link.dll ;
+
+# Cygwin is similar to msvc and mingw in that it uses import libraries. While in
+# simple cases, it can directly link to a shared library, it is believed to be
+# slower, and not always possible. Define cygwin-specific generators here.
+
+g = [ new gcc-linking-generator gcc.cygwin.link
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : EXE
+ : <toolset>gcc <target-os>cygwin ] ;
+$(g).set-rule-name gcc.link ;
+generators.register $(g) ;
+
+g = [ new gcc-linking-generator gcc.cygwin.link.dll
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : IMPORT_LIB SHARED_LIB
+ : <toolset>gcc <target-os>cygwin ] ;
+$(g).set-rule-name gcc.link.dll ;
+generators.register $(g) ;
+
+generators.override gcc.cygwin.link : gcc.link ;
+generators.override gcc.cygwin.link.dll : gcc.link.dll ;
+
+# Declare flags for linking.
+# First, the common flags.
+toolset.flags gcc.link OPTIONS <debug-symbols>on : -g ;
+toolset.flags gcc.link OPTIONS <profiling>on : -pg ;
+toolset.flags gcc.link USER_OPTIONS <linkflags> ;
+toolset.flags gcc.link LINKPATH <library-path> ;
+toolset.flags gcc.link FINDLIBS-ST <find-static-library> ;
+toolset.flags gcc.link FINDLIBS-SA <find-shared-library> ;
+toolset.flags gcc.link LIBRARIES <library-file> ;
+
+# Specify compile flags for linker as well as they may be needed for LTO
+toolset.flags gcc.link OPTIONS <local-visibility>hidden : -fvisibility=hidden -fvisibility-inlines-hidden ;
+toolset.flags gcc.link OPTIONS <local-visibility>protected : -fvisibility=protected ;
+toolset.flags gcc.link OPTIONS <local-visibility>protected/<target-os>darwin : ;
+toolset.flags gcc.link OPTIONS <local-visibility>global : -fvisibility=default ;
+
+# sanitizers
+toolset.flags gcc.link OPTIONS <address-sanitizer>on : -fsanitize=address -fno-omit-frame-pointer ;
+toolset.flags gcc.link OPTIONS <address-sanitizer>norecover : -fsanitize=address -fno-sanitize-recover=address -fno-omit-frame-pointer ;
+toolset.flags gcc.link OPTIONS <leak-sanitizer>on : -fsanitize=leak -fno-omit-frame-pointer ;
+toolset.flags gcc.link OPTIONS <leak-sanitizer>norecover : -fsanitize=leak -fno-sanitize-recover=leak -fno-omit-frame-pointer ;
+toolset.flags gcc.link OPTIONS <thread-sanitizer>on : -fsanitize=thread -fno-omit-frame-pointer ;
+toolset.flags gcc.link OPTIONS <thread-sanitizer>norecover : -fsanitize=thread -fno-sanitize-recover=thread -fno-omit-frame-pointer ;
+toolset.flags gcc.link OPTIONS <undefined-sanitizer>on : -fsanitize=undefined -fno-omit-frame-pointer ;
+toolset.flags gcc.link OPTIONS <undefined-sanitizer>norecover : -fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer ;
+
+toolset.flags gcc.link OPTIONS <coverage>on : --coverage ;
+
+toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>windows : "-Wl,--out-implib," ;
+toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>cygwin : "-Wl,--out-implib," ;
+
+# target specific link flags
+{
+ # aix
+
+ # On AIX we *have* to use the native linker.
+ #
+ # Using -brtl, the AIX linker will look for libraries with both the .a
+ # and .so extensions, such as libfoo.a and libfoo.so. Without -brtl, the
+ # AIX linker looks only for libfoo.a. Note that libfoo.a is an archived
+ # file that may contain shared objects and is different from static libs
+ # as on Linux.
+ #
+ # The -bnoipath strips the prepending (relative) path of libraries from
+ # the loader section in the target library or executable. Hence, during
+ # load-time LIBPATH (identical to LD_LIBRARY_PATH) or a hard-coded
+ # -blibpath (*similar* to -lrpath/-lrpath-link) is searched. Without
+ # this option, the prepending (relative) path + library name is
+ # hard-coded in the loader section, causing *only* this path to be
+ # searched during load-time. Note that the AIX linker does not have an
+ # -soname equivalent, this is as close as it gets.
+ #
+ # The -bbigtoc option instrcuts the linker to create a TOC bigger than 64k.
+ # This is necessary for some submodules such as math, but it does make running
+ # the tests a tad slower.
+ #
+ # The above options are definitely for AIX 5.x, and most likely also for
+ # AIX 4.x and AIX 6.x. For details about the AIX linker see:
+ # http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
+ #
+ toolset.flags gcc.link OPTIONS <target-os>aix : -Wl,-brtl -Wl,-bnoipath -Wl,-bbigtoc ;
+
+ # See note [1]
+ toolset.flags gcc.link OPTIONS <target-os>aix/<runtime-link>static : -static ;
+
+ # darwin
+
+ # On Darwin, the -s option to ld does not work unless we pass -static,
+ # and passing -static unconditionally is a bad idea. So, do not pass -s
+ # at all and darwin.jam will use a separate 'strip' invocation.
+ toolset.flags gcc.link RPATH <target-os>darwin : <dll-path> ;
+ # This does not support -R.
+ toolset.flags gcc.link RPATH_OPTION <target-os>darwin : -rpath ;
+ # -rpath-link is not supported at all.
+
+ # See note [1]
+ toolset.flags gcc.link OPTIONS <target-os>darwin/<runtime-link>static : -static ;
+
+ # vxworks
+ # On VxWorks we want to reflect what ever special flags have been set in the
+ # environment for the CPU we are targeting in the cross build
+ toolset.flags gcc.link OPTIONS <target-os>vxworks/<strip>on : -Wl,--strip-all ;
+ toolset.flags gcc.link OPTIONS <target-os>vxworks/<link>static : [ os.environ LDFLAGS_STATIC ] ;
+ toolset.flags gcc.link.dll OPTIONS <target-os>vxworks : [ os.environ LDFLAGS_SO ] ;
+ toolset.flags gcc.link OPTIONS <target-os>vxworks/<link>shared : [ os.environ LDFLAGS_DYNAMIC ] ;
+
+ # default
+
+ local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;
+ # Strip the binary when no debugging is needed. We use --strip-all flag
+ # as opposed to -s since icc (intel's compiler) is generally
+ # option-compatible with and inherits from the gcc toolset, but does not
+ # support -s.
+ toolset.flags gcc.link OPTIONS <target-os>$(generic-os)/<strip>on :
+ -Wl,--strip-all ;
+ toolset.flags gcc.link RPATH <target-os>$(generic-os) : <dll-path> ;
+ toolset.flags gcc.link RPATH_OPTION <target-os>$(generic-os) : -rpath ;
+ toolset.flags gcc.link RPATH_LINK <target-os>$(generic-os) : <xdll-path> ;
+ toolset.flags gcc.link START-GROUP <target-os>$(generic-os) :
+ -Wl,--start-group ;
+ toolset.flags gcc.link END-GROUP <target-os>$(generic-os) : -Wl,--end-group ;
+
+ # gnu ld has the ability to change the search behaviour for libraries
+ # referenced by the -l switch. These modifiers are -Bstatic and
+ # -Bdynamic and change search for -l switches that follow them. The
+ # following list shows the tried variants. Search stops at the first
+ # variant that has a match.
+ #
+ # *nix: -Bstatic -lxxx
+ # libxxx.a
+ #
+ # *nix: -Bdynamic -lxxx
+ # libxxx.so
+ # libxxx.a
+ #
+ # windows (mingw, cygwin) -Bstatic -lxxx
+ # libxxx.a
+ # xxx.lib
+ #
+ # windows (mingw, cygwin) -Bdynamic -lxxx
+ # libxxx.dll.a
+ # xxx.dll.a
+ # libxxx.a
+ # xxx.lib
+ # cygxxx.dll (*)
+ # libxxx.dll
+ # xxx.dll
+ # libxxx.a
+ #
+ # (*) This is for cygwin
+ # Please note that -Bstatic and -Bdynamic are not a guarantee that a
+ # static or dynamic lib indeed gets linked in. The switches only change
+ # search patterns!
+
+ # On *nix mixing shared libs with static runtime is not a good idea.
+ toolset.flags gcc.link FINDLIBS-ST-PFX <target-os>$(generic-os)/<runtime-link>shared : -Wl,-Bstatic ;
+ toolset.flags gcc.link FINDLIBS-SA-PFX <target-os>$(generic-os)/<runtime-link>shared : -Wl,-Bdynamic ;
+
+ # On windows allow mixing of static and dynamic libs with static
+ # runtime is not a good idea.
+ toolset.flags gcc.link FINDLIBS-ST-PFX <target-os>windows/<runtime-link>static : -Wl,-Bstatic ;
+ toolset.flags gcc.link FINDLIBS-SA-PFX <target-os>windows/<runtime-link>static : -Wl,-Bdynamic ;
+ toolset.flags gcc.link OPTIONS <target-os>windows/<runtime-link>static : -Wl,-Bstatic ;
+
+ toolset.flags gcc.link HAVE_SONAME <target-os>$(generic-os) : "" ;
+ toolset.flags gcc.link SONAME_OPTION <target-os>$(generic-os) : -h ;
+
+ # See note [1]
+ toolset.flags gcc.link OPTIONS <target-os>$(generic-os)/<runtime-link>static : -static ;
+
+ # hpux
+
+ toolset.flags gcc.link OPTIONS <target-os>hpux/<strip>on : -Wl,-s ;
+
+ toolset.flags gcc.link HAVE_SONAME <target-os>hpux : "" ;
+ toolset.flags gcc.link SONAME_OPTION <target-os>hpux : +h ;
+
+ # osf
+
+ # No --strip-all, just -s.
+ toolset.flags gcc.link OPTIONS <target-os>osf/<strip>on : -Wl,-s ;
+ toolset.flags gcc.link RPATH <target-os>osf : <dll-path> ;
+ # This does not support -R.
+ toolset.flags gcc.link RPATH_OPTION <target-os>osf : -rpath ;
+ # -rpath-link is not supported at all.
+
+ # See note [1]
+ toolset.flags gcc.link OPTIONS <target-os>osf/<runtime-link>static : -static ;
+
+ # sun
+
+ toolset.flags gcc.link OPTIONS <target-os>solaris/<strip>on : -Wl,-s ;
+
+ toolset.flags gcc.link RPATH <target-os>solaris : <dll-path> ;
+ # Solaris linker does not have a separate -rpath-link, but allows using
+ # -L for the same purpose.
+ toolset.flags gcc.link LINKPATH <target-os>solaris : <xdll-path> ;
+
+ # This permits shared libraries with non-PIC code on Solaris.
+ # VP, 2004/09/07: Now that we have -fPIC hardcode in link.dll, the
+ # following is not needed. Whether -fPIC should be hardcoded, is a
+ # separate question.
+ # AH, 2004/10/16: it is still necessary because some tests link against
+ # static libraries that were compiled without PIC.
+ toolset.flags gcc.link OPTIONS <target-os>solaris : -mimpure-text ;
+
+ # See note [1]
+ toolset.flags gcc.link OPTIONS <target-os>solaris/<runtime-link>static : -static ;
+
+ # [1]
+ # For <runtime-link>static we made sure there are no dynamic libraries in the
+ # link. On HP-UX not all system libraries exist as archived libraries (for
+ # example, there is no libunwind.a), so, on this platform, the -static option
+ # cannot be specified.
+}
+
+
+# Enclose the RPATH variable on 'targets' in double quotes, unless it is already
+# enclosed in single quotes. This special casing is done because it is common to
+# pass '$ORIGIN' to linker -- and it has to have single quotes to prevent shell
+# expansion -- and if we add double quotes then the preventing properties of
+# single quotes disappear.
+#
+rule quote-rpath ( targets * )
+{
+ local r = [ on $(targets[1]) return $(RPATH) ] ;
+ if ! [ MATCH ('.*') : $(r) ]
+ {
+ r = \"$(r)\" ;
+ }
+ RPATH on $(targets) = $(r) ;
+}
+
+# Declare actions for linking.
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the 'link' action, since running N links in
+ # parallel is just slower. For now, serialize only gcc links, it might be a
+ # good idea to serialize all links.
+ JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
+ quote-rpath $(targets) ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+}
+
+rule link.dll ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
+ quote-rpath $(targets) ;
+}
+
+# Differs from 'link' above only by -shared.
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+}
+
+###
+### Archive library generation.
+###
+
+# Default value. Mostly for the sake of intel-linux that inherits from gcc, but
+# does not have the same logic to set the .AR variable. We can put the same
+# logic in intel-linux, but that is hardly worth the trouble as on Linux, 'ar'
+# is always available.
+.AR = ar ;
+.ARFLAGS = rc ;
+.RANLIB = ranlib ;
+
+toolset.flags gcc.archive AROPTIONS <archiveflags> ;
+
+rule archive ( targets * : sources * : properties * )
+{
+ # Always remove archive and start again. Here is the rationale from
+ #
+ # Andre Hentz:
+ #
+ # I had a file, say a1.c, that was included into liba.a. I moved a1.c to
+ # a2.c, updated my Jamfiles and rebuilt. My program was crashing with absurd
+ # errors. After some debugging I traced it back to the fact that a1.o was
+ # *still* in liba.a
+ #
+ # Rene Rivera:
+ #
+ # Originally removing the archive was done by splicing an RM onto the
+ # archive action. That makes archives fail to build on NT when they have
+ # many files because it will no longer execute the action directly and blow
+ # the line length limit. Instead we remove the file in a different action,
+ # just before building the archive.
+ #
+ local clean.a = $(targets[1])(clean) ;
+ TEMPORARY $(clean.a) ;
+ NOCARE $(clean.a) ;
+ LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
+ DEPENDS $(clean.a) : $(sources) ;
+ DEPENDS $(targets) : $(clean.a) ;
+ common.RmTemps $(clean.a) : $(targets) ;
+}
+
+# Declare action for creating static libraries.
+# The letter 'r' means to add files to the archive with replacement. Since we
+# remove archive, we do not care about replacement, but there is no option "add
+# without replacement".
+# The letter 'c' suppresses the warning in case the archive does not exists yet.
+# That warning is produced only on some platforms, for whatever reasons.
+#
+actions piecemeal archive
+{
+ "$(.AR)" $(AROPTIONS) $(.ARFLAGS) "$(<)" "$(>)"
+ "$(.RANLIB)" "$(<)"
+}
+
+###
+### CPU architecture and instruction set options.
+###
+
+local rule cpu-flags ( toolset variable : architecture : instruction-set + :
+ values + : default ? )
+{
+ if $(default)
+ {
+ toolset.flags $(toolset) $(variable)
+ <architecture>$(architecture)/<instruction-set> : $(values) ;
+ }
+ toolset.flags $(toolset) $(variable)
+ <architecture>/<instruction-set>$(instruction-set)
+ <architecture>$(architecture)/<instruction-set>$(instruction-set)
+ : $(values) ;
+}
+
+
+# Set architecture/instruction-set options.
+#
+# x86 and compatible
+# The 'native' option appeared in gcc 4.2 so we cannot safely use it as default.
+# Use i686 instead for 32-bit.
+toolset.flags gcc OPTIONS <architecture>x86/<address-model>32/<instruction-set> : -march=i686 ;
+cpu-flags gcc OPTIONS : x86 : native : -march=native ;
+cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
+cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
+cpu-flags gcc OPTIONS : x86 : i686 : -march=i686 ;
+cpu-flags gcc OPTIONS : x86 : pentium : -march=pentium ;
+cpu-flags gcc OPTIONS : x86 : pentium-mmx : -march=pentium-mmx ;
+cpu-flags gcc OPTIONS : x86 : pentiumpro : -march=pentiumpro ;
+cpu-flags gcc OPTIONS : x86 : pentium2 : -march=pentium2 ;
+cpu-flags gcc OPTIONS : x86 : pentium3 : -march=pentium3 ;
+cpu-flags gcc OPTIONS : x86 : pentium3m : -march=pentium3m ;
+cpu-flags gcc OPTIONS : x86 : pentium-m : -march=pentium-m ;
+cpu-flags gcc OPTIONS : x86 : pentium4 : -march=pentium4 ;
+cpu-flags gcc OPTIONS : x86 : pentium4m : -march=pentium4m ;
+cpu-flags gcc OPTIONS : x86 : prescott : -march=prescott ;
+cpu-flags gcc OPTIONS : x86 : nocona : -march=nocona ;
+cpu-flags gcc OPTIONS : x86 : core2 : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : conroe : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : conroe-xe : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : conroe-l : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : allendale : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : wolfdale : -march=core2 -msse4.1 ;
+cpu-flags gcc OPTIONS : x86 : merom : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : merom-xe : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : kentsfield : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : kentsfield-xe : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : yorksfield : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : penryn : -march=core2 ;
+cpu-flags gcc OPTIONS : x86 : corei7 : -march=corei7 ;
+cpu-flags gcc OPTIONS : x86 : nehalem : -march=corei7 ;
+cpu-flags gcc OPTIONS : x86 : corei7-avx : -march=corei7-avx ;
+cpu-flags gcc OPTIONS : x86 : sandy-bridge : -march=corei7-avx ;
+cpu-flags gcc OPTIONS : x86 : core-avx-i : -march=core-avx-i ;
+cpu-flags gcc OPTIONS : x86 : ivy-bridge : -march=core-avx-i ;
+cpu-flags gcc OPTIONS : x86 : haswell : -march=core-avx-i -mavx2 -mfma -mbmi -mbmi2 -mlzcnt ;
+cpu-flags gcc OPTIONS : x86 : broadwell : -march=broadwell ;
+cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
+cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
+cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
+cpu-flags gcc OPTIONS : x86 : icelake : -march=icelake ;
+cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
+cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
+cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
+cpu-flags gcc OPTIONS : x86 : athlon : -march=athlon ;
+cpu-flags gcc OPTIONS : x86 : athlon-tbird : -march=athlon-tbird ;
+cpu-flags gcc OPTIONS : x86 : athlon-4 : -march=athlon-4 ;
+cpu-flags gcc OPTIONS : x86 : athlon-xp : -march=athlon-xp ;
+cpu-flags gcc OPTIONS : x86 : athlon-mp : -march=athlon-mp ;
+##
+cpu-flags gcc OPTIONS : x86 : k8 : -march=k8 ;
+cpu-flags gcc OPTIONS : x86 : opteron : -march=opteron ;
+cpu-flags gcc OPTIONS : x86 : athlon64 : -march=athlon64 ;
+cpu-flags gcc OPTIONS : x86 : athlon-fx : -march=athlon-fx ;
+cpu-flags gcc OPTIONS : x86 : k8-sse3 : -march=k8-sse3 ;
+cpu-flags gcc OPTIONS : x86 : opteron-sse3 : -march=opteron-sse3 ;
+cpu-flags gcc OPTIONS : x86 : athlon64-sse3 : -march=athlon64-sse3 ;
+cpu-flags gcc OPTIONS : x86 : amdfam10 : -march=amdfam10 ;
+cpu-flags gcc OPTIONS : x86 : barcelona : -march=barcelona ;
+cpu-flags gcc OPTIONS : x86 : bdver1 : -march=bdver1 ;
+cpu-flags gcc OPTIONS : x86 : bdver2 : -march=bdver2 ;
+cpu-flags gcc OPTIONS : x86 : bdver3 : -march=bdver3 ;
+cpu-flags gcc OPTIONS : x86 : bdver4 : -march=bdver4 ;
+cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
+cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
+cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ;
+cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
+cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
+cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
+cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
+##
+cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
+# Sparc
+cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ;
+cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
+cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ;
+cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ;
+cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ;
+cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ;
+cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ;
+cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ;
+cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ;
+cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ;
+cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ;
+cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ;
+cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
+cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
+# RS/6000 & PowerPC
+cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
+cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;
+cpu-flags gcc OPTIONS : power : 601 : -mcpu=601 ;
+cpu-flags gcc OPTIONS : power : 602 : -mcpu=602 ;
+cpu-flags gcc OPTIONS : power : 603 : -mcpu=603 ;
+cpu-flags gcc OPTIONS : power : 603e : -mcpu=603e ;
+cpu-flags gcc OPTIONS : power : 604 : -mcpu=604 ;
+cpu-flags gcc OPTIONS : power : 604e : -mcpu=604e ;
+cpu-flags gcc OPTIONS : power : 620 : -mcpu=620 ;
+cpu-flags gcc OPTIONS : power : 630 : -mcpu=630 ;
+cpu-flags gcc OPTIONS : power : 740 : -mcpu=740 ;
+cpu-flags gcc OPTIONS : power : 7400 : -mcpu=7400 ;
+cpu-flags gcc OPTIONS : power : 7450 : -mcpu=7450 ;
+cpu-flags gcc OPTIONS : power : 750 : -mcpu=750 ;
+cpu-flags gcc OPTIONS : power : 801 : -mcpu=801 ;
+cpu-flags gcc OPTIONS : power : 821 : -mcpu=821 ;
+cpu-flags gcc OPTIONS : power : 823 : -mcpu=823 ;
+cpu-flags gcc OPTIONS : power : 860 : -mcpu=860 ;
+cpu-flags gcc OPTIONS : power : 970 : -mcpu=970 ;
+cpu-flags gcc OPTIONS : power : 8540 : -mcpu=8540 ;
+cpu-flags gcc OPTIONS : power : power : -mcpu=power ;
+cpu-flags gcc OPTIONS : power : power2 : -mcpu=power2 ;
+cpu-flags gcc OPTIONS : power : power3 : -mcpu=power3 ;
+cpu-flags gcc OPTIONS : power : power4 : -mcpu=power4 ;
+cpu-flags gcc OPTIONS : power : power5 : -mcpu=power5 ;
+cpu-flags gcc OPTIONS : power : powerpc : -mcpu=powerpc ;
+cpu-flags gcc OPTIONS : power : powerpc64 : -mcpu=powerpc64 ;
+cpu-flags gcc OPTIONS : power : rios : -mcpu=rios ;
+cpu-flags gcc OPTIONS : power : rios1 : -mcpu=rios1 ;
+cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ;
+cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ;
+cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ;
+cpu-flags gcc OPTIONS : s390x : z196 : -march=z196 ;
+cpu-flags gcc OPTIONS : s390x : zEC12 : -march=zEC12 ;
+cpu-flags gcc OPTIONS : s390x : z13 : -march=z13 ;
+cpu-flags gcc OPTIONS : s390x : z14 : -march=z14 ;
+cpu-flags gcc OPTIONS : s390x : z15 : -march=z15 ;
+# AIX variant of RS/6000 & PowerPC
+toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;
diff --git a/src/boost/tools/build/src/tools/gcc.py b/src/boost/tools/build/src/tools/gcc.py
new file mode 100644
index 000000000..1db7d5758
--- /dev/null
+++ b/src/boost/tools/build/src/tools/gcc.py
@@ -0,0 +1,871 @@
+# Status: being ported by Steven Watanabe
+# Base revision: 47077
+# TODO: common.jam needs to be ported
+# TODO: generators.jam needs to have register_c_compiler.
+#
+# Copyright 2001 David Abrahams.
+# Copyright 2002-2006 Rene Rivera.
+# Copyright 2002-2003 Vladimir Prus.
+# Copyright (c) 2005 Reece H. Dunn.
+# Copyright 2006 Ilya Sokolov.
+# Copyright 2007 Roland Schwarz
+# Copyright 2007 Boris Gubenko.
+# Copyright 2008 Steven Watanabe
+#
+# 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 os
+import subprocess
+import re
+
+import bjam
+
+from b2.tools import unix, common, rc, pch, builtin
+from b2.build import feature, type, toolset, generators, property_set
+from b2.build.property import Property
+from b2.util.utility import os_name, on_windows
+from b2.manager import get_manager
+from b2.build.generators import Generator
+from b2.build.toolset import flags
+from b2.util.utility import to_seq
+
+
+
+__debug = None
+
+def debug():
+ global __debug
+ if __debug is None:
+ __debug = "--debug-configuration" in bjam.variable("ARGV")
+ return __debug
+
+feature.extend('toolset', ['gcc'])
+
+
+toolset.inherit_generators('gcc', [], 'unix', ['unix.link', 'unix.link.dll'])
+toolset.inherit_flags('gcc', 'unix')
+toolset.inherit_rules('gcc', 'unix')
+
+generators.override('gcc.prebuilt', 'builtin.prebuilt')
+generators.override('gcc.searched-lib-generator', 'searched-lib-generator')
+
+# Target naming is determined by types/lib.jam and the settings below this
+# comment.
+#
+# On *nix:
+# libxxx.a static library
+# libxxx.so shared library
+#
+# On windows (mingw):
+# libxxx.lib static library
+# xxx.dll DLL
+# xxx.lib import library
+#
+# On windows (cygwin) i.e. <target-os>cygwin
+# libxxx.a static library
+# xxx.dll DLL
+# libxxx.dll.a import library
+#
+# Note: user can always override by using the <tag>@rule
+# This settings have been chosen, so that mingw
+# is in line with msvc naming conventions. For
+# cygwin the cygwin naming convention has been chosen.
+
+# Make the "o" suffix used for gcc toolset on all
+# platforms
+type.set_generated_target_suffix('OBJ', ['<toolset>gcc'], 'o')
+type.set_generated_target_suffix('STATIC_LIB', ['<toolset>gcc', '<target-os>cygwin'], 'a')
+
+type.set_generated_target_suffix('IMPORT_LIB', ['<toolset>gcc', '<target-os>cygwin'], 'dll.a')
+type.set_generated_target_prefix('IMPORT_LIB', ['<toolset>gcc', '<target-os>cygwin'], 'lib')
+
+__machine_match = re.compile('^([^ ]+)')
+__version_match = re.compile('^([0-9.]+)')
+
+def init(version = None, command = None, options = None):
+ """
+ Initializes the gcc toolset for the given version. If necessary, command may
+ be used to specify where the compiler is located. The parameter 'options' is a
+ space-delimited list of options, each one specified as
+ <option-name>option-value. Valid option names are: cxxflags, linkflags and
+ linker-type. Accepted linker-type values are gnu, darwin, osf, hpux or sun
+ and the default value will be selected based on the current OS.
+ Example:
+ using gcc : 3.4 : : <cxxflags>foo <linkflags>bar <linker-type>sun ;
+ """
+
+ options = to_seq(options)
+ command = to_seq(command)
+
+ # Information about the gcc command...
+ # The command.
+ command = to_seq(common.get_invocation_command('gcc', 'g++', command))
+ # The root directory of the tool install.
+ root = feature.get_values('<root>', options)
+ root = root[0] if root else ''
+ # The bin directory where to find the command to execute.
+ bin = None
+ # The flavor of compiler.
+ flavor = feature.get_values('<flavor>', options)
+ flavor = flavor[0] if flavor else ''
+ # Autodetect the root and bin dir if not given.
+ if command:
+ if not bin:
+ bin = common.get_absolute_tool_path(command[-1])
+ if not root:
+ root = os.path.dirname(bin)
+ # Autodetect the version and flavor if not given.
+ if command:
+ machine_info = subprocess.Popen(command + ['-dumpmachine'], stdout=subprocess.PIPE).communicate()[0]
+ machine = __machine_match.search(machine_info).group(1)
+
+ version_info = subprocess.Popen(command + ['-dumpversion'], stdout=subprocess.PIPE).communicate()[0]
+ version = __version_match.search(version_info).group(1)
+ if not flavor and machine.find('mingw') != -1:
+ flavor = 'mingw'
+
+ condition = None
+ if flavor:
+ condition = common.check_init_parameters('gcc', None,
+ ('version', version),
+ ('flavor', flavor))
+ else:
+ condition = common.check_init_parameters('gcc', None,
+ ('version', version))
+
+ if command:
+ command = command[0]
+
+ common.handle_options('gcc', condition, command, options)
+
+ linker = feature.get_values('<linker-type>', options)
+ if not linker:
+ if os_name() == 'OSF':
+ linker = 'osf'
+ elif os_name() == 'HPUX':
+ linker = 'hpux' ;
+ else:
+ linker = 'gnu'
+
+ init_link_flags('gcc', linker, condition)
+
+ # If gcc is installed in non-standard location, we'd need to add
+ # LD_LIBRARY_PATH when running programs created with it (for unit-test/run
+ # rules).
+ if command:
+ # On multilib 64-bit boxes, there are both 32-bit and 64-bit libraries
+ # and all must be added to LD_LIBRARY_PATH. The linker will pick the
+ # right ones. Note that we don't provide a clean way to build 32-bit
+ # binary with 64-bit compiler, but user can always pass -m32 manually.
+ lib_path = [os.path.join(root, 'bin'),
+ os.path.join(root, 'lib'),
+ os.path.join(root, 'lib32'),
+ os.path.join(root, 'lib64')]
+ if debug():
+ print 'notice: using gcc libraries ::', condition, '::', lib_path
+ toolset.flags('gcc.link', 'RUN_PATH', condition, lib_path)
+
+ # If it's not a system gcc install we should adjust the various programs as
+ # needed to prefer using the install specific versions. This is essential
+ # for correct use of MinGW and for cross-compiling.
+
+ # - The archive builder.
+ archiver = common.get_invocation_command('gcc',
+ 'ar', feature.get_values('<archiver>', options), [bin], path_last=True)
+ toolset.flags('gcc.archive', '.AR', condition, [archiver])
+ if debug():
+ print 'notice: using gcc archiver ::', condition, '::', archiver
+
+ # - Ranlib
+ ranlib = common.get_invocation_command('gcc',
+ 'ranlib', feature.get_values('<ranlib>', options), [bin], path_last=True)
+ toolset.flags('gcc.archive', '.RANLIB', condition, [ranlib])
+ if debug():
+ print 'notice: using gcc archiver ::', condition, '::', ranlib
+
+ # - The resource compiler.
+ rc_command = common.get_invocation_command_nodefault('gcc',
+ 'windres', feature.get_values('<rc>', options), [bin], path_last=True)
+ rc_type = feature.get_values('<rc-type>', options)
+
+ if not rc_type:
+ rc_type = 'windres'
+
+ if not rc_command:
+ # If we can't find an RC compiler we fallback to a null RC compiler that
+ # creates empty object files. This allows the same Jamfiles to work
+ # across the board. The null RC uses the assembler to create the empty
+ # objects, so configure that.
+ rc_command = common.get_invocation_command('gcc', 'as', [], [bin], path_last=True)
+ rc_type = 'null'
+ rc.configure([rc_command], condition, ['<rc-type>' + rc_type])
+
+###if [ os.name ] = NT
+###{
+### # This causes single-line command invocation to not go through .bat files,
+### # thus avoiding command-line length limitations.
+### JAMSHELL = % ;
+###}
+
+#FIXME: when register_c_compiler is moved to
+# generators, these should be updated
+builtin.register_c_compiler('gcc.compile.c++.preprocess', ['CPP'], ['PREPROCESSED_CPP'], ['<toolset>gcc'])
+builtin.register_c_compiler('gcc.compile.c.preprocess', ['C'], ['PREPROCESSED_C'], ['<toolset>gcc'])
+builtin.register_c_compiler('gcc.compile.c++', ['CPP'], ['OBJ'], ['<toolset>gcc'])
+builtin.register_c_compiler('gcc.compile.c', ['C'], ['OBJ'], ['<toolset>gcc'])
+builtin.register_c_compiler('gcc.compile.asm', ['ASM'], ['OBJ'], ['<toolset>gcc'])
+
+# pch support
+
+# The compiler looks for a precompiled header in each directory just before it
+# looks for the include file in that directory. The name searched for is the
+# name specified in the #include directive with ".gch" suffix appended. The
+# logic in gcc-pch-generator will make sure that BASE_PCH suffix is appended to
+# full name of the header.
+
+type.set_generated_target_suffix('PCH', ['<toolset>gcc'], 'gch')
+
+# GCC-specific pch generator.
+class GccPchGenerator(pch.PchGenerator):
+
+ # Inherit the __init__ method
+
+ def run_pch(self, project, name, prop_set, sources):
+ # Find the header in sources. Ignore any CPP sources.
+ header = None
+ for s in sources:
+ if type.is_derived(s.type(), 'H'):
+ header = s
+
+ # Error handling: Base header file name should be the same as the base
+ # precompiled header name.
+ header_name = header.name()
+ header_basename = os.path.basename(header_name).rsplit('.', 1)[0]
+ if header_basename != name:
+ location = project.project_module
+ ###FIXME:
+ raise Exception()
+ ### errors.user-error "in" $(location)": pch target name `"$(name)"' should be the same as the base name of header file `"$(header-name)"'" ;
+
+ pch_file = Generator.run(self, project, name, prop_set, [header])
+
+ # return result of base class and pch-file property as usage-requirements
+ # FIXME: what about multiple results from generator.run?
+ return (property_set.create([Property('pch-file', pch_file[0]),
+ Property('cflags', '-Winvalid-pch')]),
+ pch_file)
+
+ # Calls the base version specifying source's name as the name of the created
+ # target. As result, the PCH will be named whatever.hpp.gch, and not
+ # whatever.gch.
+ def generated_targets(self, sources, prop_set, project, name = None):
+ name = sources[0].name()
+ return Generator.generated_targets(self, sources,
+ prop_set, project, name)
+
+# Note: the 'H' source type will catch both '.h' header and '.hpp' header. The
+# latter have HPP type, but HPP type is derived from H. The type of compilation
+# is determined entirely by the destination type.
+generators.register(GccPchGenerator('gcc.compile.c.pch', False, ['H'], ['C_PCH'], ['<pch>on', '<toolset>gcc' ]))
+generators.register(GccPchGenerator('gcc.compile.c++.pch', False, ['H'], ['CPP_PCH'], ['<pch>on', '<toolset>gcc' ]))
+
+# Override default do-nothing generators.
+generators.override('gcc.compile.c.pch', 'pch.default-c-pch-generator')
+generators.override('gcc.compile.c++.pch', 'pch.default-cpp-pch-generator')
+
+flags('gcc.compile', 'PCH_FILE', ['<pch>on'], ['<pch-file>'])
+
+# Declare flags and action for compilation
+flags('gcc.compile', 'OPTIONS', ['<optimization>off'], ['-O0'])
+flags('gcc.compile', 'OPTIONS', ['<optimization>speed'], ['-O3'])
+flags('gcc.compile', 'OPTIONS', ['<optimization>space'], ['-Os'])
+
+flags('gcc.compile', 'OPTIONS', ['<inlining>off'], ['-fno-inline'])
+flags('gcc.compile', 'OPTIONS', ['<inlining>on'], ['-Wno-inline'])
+flags('gcc.compile', 'OPTIONS', ['<inlining>full'], ['-finline-functions', '-Wno-inline'])
+
+flags('gcc.compile', 'OPTIONS', ['<warnings>off'], ['-w'])
+flags('gcc.compile', 'OPTIONS', ['<warnings>on'], ['-Wall'])
+flags('gcc.compile', 'OPTIONS', ['<warnings>all'], ['-Wall', '-pedantic'])
+flags('gcc.compile', 'OPTIONS', ['<warnings-as-errors>on'], ['-Werror'])
+
+flags('gcc.compile', 'OPTIONS', ['<debug-symbols>on'], ['-g'])
+flags('gcc.compile', 'OPTIONS', ['<profiling>on'], ['-pg'])
+
+flags('gcc.compile.c++', 'OPTIONS', ['<rtti>off'], ['-fno-rtti'])
+flags('gcc.compile.c++', 'OPTIONS', ['<exception-handling>off'], ['-fno-exceptions'])
+
+# On cygwin and mingw, gcc generates position independent code by default, and
+# warns if -fPIC is specified. This might not be the right way of checking if
+# we're using cygwin. For example, it's possible to run cygwin gcc from NT
+# shell, or using crosscompiling. But we'll solve that problem when it's time.
+# In that case we'll just add another parameter to 'init' and move this login
+# inside 'init'.
+if not os_name () in ['CYGWIN', 'NT']:
+ # This logic will add -fPIC for all compilations:
+ #
+ # lib a : a.cpp b ;
+ # obj b : b.cpp ;
+ # exe c : c.cpp a d ;
+ # obj d : d.cpp ;
+ #
+ # This all is fine, except that 'd' will be compiled with -fPIC even though
+ # it's not needed, as 'd' is used only in exe. However, it's hard to detect
+ # where a target is going to be used. Alternative, we can set -fPIC only
+ # when main target type is LIB but than 'b' will be compiled without -fPIC.
+ # In x86-64 that will lead to link errors. So, compile everything with
+ # -fPIC.
+ #
+ # Yet another alternative would be to create propagated <sharedable>
+ # feature, and set it when building shared libraries, but that's hard to
+ # implement and will increase target path length even more.
+ flags('gcc.compile', 'OPTIONS', ['<link>shared'], ['-fPIC'])
+
+if os_name() != 'NT' and os_name() != 'OSF' and os_name() != 'HPUX':
+ # OSF does have an option called -soname but it doesn't seem to work as
+ # expected, therefore it has been disabled.
+ HAVE_SONAME = ''
+ SONAME_OPTION = '-h'
+
+
+flags('gcc.compile', 'USER_OPTIONS', [], ['<cflags>'])
+flags('gcc.compile.c++', 'USER_OPTIONS',[], ['<cxxflags>'])
+flags('gcc.compile', 'DEFINES', [], ['<define>'])
+flags('gcc.compile', 'INCLUDES', [], ['<include>'])
+
+engine = get_manager().engine()
+
+engine.register_action('gcc.compile.c++.pch',
+ '"$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"')
+
+engine.register_action('gcc.compile.c.pch',
+ '"$(CONFIG_COMMAND)" -x c-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"')
+
+
+def gcc_compile_cpp(targets, sources, properties):
+ # Some extensions are compiled as C++ by default. For others, we need to
+ # pass -x c++. We could always pass -x c++ but distcc does not work with it.
+ extension = os.path.splitext (sources [0]) [1]
+ lang = ''
+ if not extension in ['.cc', '.cp', '.cxx', '.cpp', '.c++', '.C']:
+ lang = '-x c++'
+ get_manager().engine().set_target_variable (targets, 'LANG', lang)
+ engine.add_dependency(targets, bjam.call('get-target-variable', targets, 'PCH_FILE'))
+
+def gcc_compile_c(targets, sources, properties):
+ engine = get_manager().engine()
+ # If we use the name g++ then default file suffix -> language mapping does
+ # not work. So have to pass -x option. Maybe, we can work around this by
+ # allowing the user to specify both C and C++ compiler names.
+ #if $(>:S) != .c
+ #{
+ engine.set_target_variable (targets, 'LANG', '-x c')
+ #}
+ engine.add_dependency(targets, bjam.call('get-target-variable', targets, 'PCH_FILE'))
+
+engine.register_action(
+ 'gcc.compile.c++',
+ '"$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-128 $(OPTIONS) ' +
+ '$(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" ' +
+ '-c -o "$(<:W)" "$(>:W)"',
+ function=gcc_compile_cpp,
+ bound_list=['PCH_FILE'])
+
+engine.register_action(
+ 'gcc.compile.c',
+ '"$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) ' +
+ '-I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<)" "$(>)"',
+ function=gcc_compile_c,
+ bound_list=['PCH_FILE'])
+
+engine.register_action(
+ 'gcc.compile.c++.preprocess',
+ function=gcc_compile_cpp,
+ bound_list=['PCH_FILE'],
+ command="""
+ $(CONFIG_COMMAND) $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>:W)" -E >"$(<:W)"
+ """
+)
+
+engine.register_action(
+ 'gcc.compile.c.preprocess',
+ function=gcc_compile_c,
+ bound_list=['PCH_FILE'],
+ command="""
+ $(CONFIG_COMMAND) $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>)" -E >$(<)
+ """
+)
+
+def gcc_compile_asm(targets, sources, properties):
+ get_manager().engine().set_target_variable(targets, 'LANG', '-x assembler-with-cpp')
+
+engine.register_action(
+ 'gcc.compile.asm',
+ '"$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"',
+ function=gcc_compile_asm)
+
+
+class GccLinkingGenerator(unix.UnixLinkingGenerator):
+ """
+ The class which check that we don't try to use the <runtime-link>static
+ property while creating or using shared library, since it's not supported by
+ gcc/libc.
+ """
+ def run(self, project, name, ps, sources):
+ # TODO: Replace this with the use of a target-os property.
+
+ no_static_link = False
+ if bjam.variable('UNIX'):
+ no_static_link = True;
+ ##FIXME: what does this mean?
+## {
+## switch [ modules.peek : JAMUNAME ]
+## {
+## case * : no-static-link = true ;
+## }
+## }
+
+ reason = None
+ if no_static_link and ps.get('runtime-link') == 'static':
+ if ps.get('link') == 'shared':
+ reason = "On gcc, DLL can't be build with '<runtime-link>static'."
+ elif type.is_derived(self.target_types[0], 'EXE'):
+ for s in sources:
+ source_type = s.type()
+ if source_type and type.is_derived(source_type, 'SHARED_LIB'):
+ reason = "On gcc, using DLLS together with the " +\
+ "<runtime-link>static options is not possible "
+ if reason:
+ print 'warning:', reason
+ print 'warning:',\
+ "It is suggested to use '<runtime-link>static' together",\
+ "with '<link>static'." ;
+ return
+ else:
+ generated_targets = unix.UnixLinkingGenerator.run(self, project,
+ name, ps, sources)
+ return generated_targets
+
+if on_windows():
+ flags('gcc.link.dll', '.IMPLIB-COMMAND', [], ['-Wl,--out-implib,'])
+ generators.register(
+ GccLinkingGenerator('gcc.link', True,
+ ['OBJ', 'SEARCHED_LIB', 'STATIC_LIB', 'IMPORT_LIB'],
+ [ 'EXE' ],
+ [ '<toolset>gcc' ]))
+ generators.register(
+ GccLinkingGenerator('gcc.link.dll', True,
+ ['OBJ', 'SEARCHED_LIB', 'STATIC_LIB', 'IMPORT_LIB'],
+ ['IMPORT_LIB', 'SHARED_LIB'],
+ ['<toolset>gcc']))
+else:
+ generators.register(
+ GccLinkingGenerator('gcc.link', True,
+ ['LIB', 'OBJ'],
+ ['EXE'],
+ ['<toolset>gcc']))
+ generators.register(
+ GccLinkingGenerator('gcc.link.dll', True,
+ ['LIB', 'OBJ'],
+ ['SHARED_LIB'],
+ ['<toolset>gcc']))
+
+# Declare flags for linking.
+# First, the common flags.
+flags('gcc.link', 'OPTIONS', ['<debug-symbols>on'], ['-g'])
+flags('gcc.link', 'OPTIONS', ['<profiling>on'], ['-pg'])
+flags('gcc.link', 'USER_OPTIONS', [], ['<linkflags>'])
+flags('gcc.link', 'LINKPATH', [], ['<library-path>'])
+flags('gcc.link', 'FINDLIBS-ST', [], ['<find-static-library>'])
+flags('gcc.link', 'FINDLIBS-SA', [], ['<find-shared-library>'])
+flags('gcc.link', 'LIBRARIES', [], ['<library-file>'])
+
+# For <runtime-link>static we made sure there are no dynamic libraries in the
+# link. On HP-UX not all system libraries exist as archived libraries (for
+# example, there is no libunwind.a), so, on this platform, the -static option
+# cannot be specified.
+if os_name() != 'HPUX':
+ flags('gcc.link', 'OPTIONS', ['<runtime-link>static'], ['-static'])
+
+# Now, the vendor specific flags.
+# The parameter linker can be either gnu, darwin, osf, hpux or sun.
+def init_link_flags(toolset, linker, condition):
+ """
+ Now, the vendor specific flags.
+ The parameter linker can be either gnu, darwin, osf, hpux or sun.
+ """
+ toolset_link = toolset + '.link'
+ if linker == 'gnu':
+ # Strip the binary when no debugging is needed. We use --strip-all flag
+ # as opposed to -s since icc (intel's compiler) is generally
+ # option-compatible with and inherits from the gcc toolset, but does not
+ # support -s.
+
+ # FIXME: what does unchecked translate to?
+ flags(toolset_link, 'OPTIONS', map(lambda x: x + '/<debug-symbols>off', condition), ['-Wl,--strip-all']) # : unchecked ;
+ flags(toolset_link, 'RPATH', condition, ['<dll-path>']) # : unchecked ;
+ flags(toolset_link, 'RPATH_LINK', condition, ['<xdll-path>']) # : unchecked ;
+ flags(toolset_link, 'START-GROUP', condition, ['-Wl,--start-group'])# : unchecked ;
+ flags(toolset_link, 'END-GROUP', condition, ['-Wl,--end-group']) # : unchecked ;
+
+ # gnu ld has the ability to change the search behaviour for libraries
+ # referenced by -l switch. These modifiers are -Bstatic and -Bdynamic
+ # and change search for -l switches that follow them. The following list
+ # shows the tried variants.
+ # The search stops at the first variant that has a match.
+ # *nix: -Bstatic -lxxx
+ # libxxx.a
+ #
+ # *nix: -Bdynamic -lxxx
+ # libxxx.so
+ # libxxx.a
+ #
+ # windows (mingw,cygwin) -Bstatic -lxxx
+ # libxxx.a
+ # xxx.lib
+ #
+ # windows (mingw,cygwin) -Bdynamic -lxxx
+ # libxxx.dll.a
+ # xxx.dll.a
+ # libxxx.a
+ # xxx.lib
+ # cygxxx.dll (*)
+ # libxxx.dll
+ # xxx.dll
+ # libxxx.a
+ #
+ # (*) This is for cygwin
+ # Please note that -Bstatic and -Bdynamic are not a guarantee that a
+ # static or dynamic lib indeed gets linked in. The switches only change
+ # search patterns!
+
+ # On *nix mixing shared libs with static runtime is not a good idea.
+ flags(toolset_link, 'FINDLIBS-ST-PFX',
+ map(lambda x: x + '/<runtime-link>shared', condition),
+ ['-Wl,-Bstatic']) # : unchecked ;
+ flags(toolset_link, 'FINDLIBS-SA-PFX',
+ map(lambda x: x + '/<runtime-link>shared', condition),
+ ['-Wl,-Bdynamic']) # : unchecked ;
+
+ # On windows allow mixing of static and dynamic libs with static
+ # runtime.
+ flags(toolset_link, 'FINDLIBS-ST-PFX',
+ map(lambda x: x + '/<runtime-link>static/<target-os>windows', condition),
+ ['-Wl,-Bstatic']) # : unchecked ;
+ flags(toolset_link, 'FINDLIBS-SA-PFX',
+ map(lambda x: x + '/<runtime-link>static/<target-os>windows', condition),
+ ['-Wl,-Bdynamic']) # : unchecked ;
+ flags(toolset_link, 'OPTIONS',
+ map(lambda x: x + '/<runtime-link>static/<target-os>windows', condition),
+ ['-Wl,-Bstatic']) # : unchecked ;
+
+ elif linker == 'darwin':
+ # On Darwin, the -s option to ld does not work unless we pass -static,
+ # and passing -static unconditionally is a bad idea. So, don't pass -s.
+ # at all, darwin.jam will use separate 'strip' invocation.
+ flags(toolset_link, 'RPATH', condition, ['<dll-path>']) # : unchecked ;
+ flags(toolset_link, 'RPATH_LINK', condition, ['<xdll-path>']) # : unchecked ;
+
+ elif linker == 'osf':
+ # No --strip-all, just -s.
+ flags(toolset_link, 'OPTIONS', map(lambda x: x + '/<debug-symbols>off', condition), ['-Wl,-s'])
+ # : unchecked ;
+ flags(toolset_link, 'RPATH', condition, ['<dll-path>']) # : unchecked ;
+ # This does not supports -R.
+ flags(toolset_link, 'RPATH_OPTION', condition, ['-rpath']) # : unchecked ;
+ # -rpath-link is not supported at all.
+
+ elif linker == 'sun':
+ flags(toolset_link, 'OPTIONS', map(lambda x: x + '/<debug-symbols>off', condition), ['-Wl,-s'])
+ # : unchecked ;
+ flags(toolset_link, 'RPATH', condition, ['<dll-path>']) # : unchecked ;
+ # Solaris linker does not have a separate -rpath-link, but allows to use
+ # -L for the same purpose.
+ flags(toolset_link, 'LINKPATH', condition, ['<xdll-path>']) # : unchecked ;
+
+ # This permits shared libraries with non-PIC code on Solaris.
+ # VP, 2004/09/07: Now that we have -fPIC hardcode in link.dll, the
+ # following is not needed. Whether -fPIC should be hardcoded, is a
+ # separate question.
+ # AH, 2004/10/16: it is still necessary because some tests link against
+ # static libraries that were compiled without PIC.
+ flags(toolset_link, 'OPTIONS', map(lambda x: x + '/<link>shared', condition), ['-mimpure-text'])
+ # : unchecked ;
+
+ elif linker == 'hpux':
+ flags(toolset_link, 'OPTIONS', map(lambda x: x + '/<debug-symbols>off', condition),
+ ['-Wl,-s']) # : unchecked ;
+ flags(toolset_link, 'OPTIONS', map(lambda x: x + '/<link>shared', condition),
+ ['-fPIC']) # : unchecked ;
+
+ else:
+ # FIXME:
+ errors.user_error(
+ "$(toolset) initialization: invalid linker '$(linker)' " +
+ "The value '$(linker)' specified for <linker> is not recognized. " +
+ "Possible values are 'gnu', 'darwin', 'osf', 'hpux' or 'sun'")
+
+# Declare actions for linking.
+def gcc_link(targets, sources, properties):
+ engine = get_manager().engine()
+ engine.set_target_variable(targets, 'SPACE', ' ')
+ # Serialize execution of the 'link' action, since running N links in
+ # parallel is just slower. For now, serialize only gcc links, it might be a
+ # good idea to serialize all links.
+ engine.set_target_variable(targets, 'JAM_SEMAPHORE', '<s>gcc-link-semaphore')
+
+engine.register_action(
+ 'gcc.link',
+ '"$(CONFIG_COMMAND)" -L"$(LINKPATH)" ' +
+ '-Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" ' +
+ '-Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" ' +
+ '$(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) ' +
+ '-l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) ' +
+ '$(OPTIONS) $(USER_OPTIONS)',
+ function=gcc_link,
+ bound_list=['LIBRARIES'])
+
+# Default value. Mostly for the sake of intel-linux that inherits from gcc, but
+# does not have the same logic to set the .AR variable. We can put the same
+# logic in intel-linux, but that's hardly worth the trouble as on Linux, 'ar' is
+# always available.
+__AR = 'ar'
+
+flags('gcc.archive', 'AROPTIONS', [], ['<archiveflags>'])
+
+def gcc_archive(targets, sources, properties):
+ # Always remove archive and start again. Here's rationale from
+ #
+ # Andre Hentz:
+ #
+ # I had a file, say a1.c, that was included into liba.a. I moved a1.c to
+ # a2.c, updated my Jamfiles and rebuilt. My program was crashing with absurd
+ # errors. After some debugging I traced it back to the fact that a1.o was
+ # *still* in liba.a
+ #
+ # Rene Rivera:
+ #
+ # Originally removing the archive was done by splicing an RM onto the
+ # archive action. That makes archives fail to build on NT when they have
+ # many files because it will no longer execute the action directly and blow
+ # the line length limit. Instead we remove the file in a different action,
+ # just before building the archive.
+ clean = targets[0] + '(clean)'
+ bjam.call('TEMPORARY', clean)
+ bjam.call('NOCARE', clean)
+ engine = get_manager().engine()
+ engine.set_target_variable('LOCATE', clean, bjam.call('get-target-variable', targets, 'LOCATE'))
+ engine.add_dependency(clean, sources)
+ engine.add_dependency(targets, clean)
+ engine.set_update_action('common.RmTemps', clean, targets)
+
+# Declare action for creating static libraries.
+# The letter 'r' means to add files to the archive with replacement. Since we
+# remove archive, we don't care about replacement, but there's no option "add
+# without replacement".
+# The letter 'c' suppresses the warning in case the archive does not exists yet.
+# That warning is produced only on some platforms, for whatever reasons.
+engine.register_action('gcc.archive',
+ '''"$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
+ "$(.RANLIB)" "$(<)"
+ ''',
+ function=gcc_archive,
+ flags=['piecemeal'])
+
+def gcc_link_dll(targets, sources, properties):
+ engine = get_manager().engine()
+ engine.set_target_variable(targets, 'SPACE', ' ')
+ engine.set_target_variable(targets, 'JAM_SEMAPHORE', '<s>gcc-link-semaphore')
+ engine.set_target_variable(targets, "HAVE_SONAME", HAVE_SONAME)
+ engine.set_target_variable(targets, "SONAME_OPTION", SONAME_OPTION)
+
+engine.register_action(
+ 'gcc.link.dll',
+ # Differ from 'link' above only by -shared.
+ '"$(CONFIG_COMMAND)" -L"$(LINKPATH)" ' +
+ '-Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" ' +
+ '"$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" ' +
+ '$(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) ' +
+ '-shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) ' +
+ '-l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) ' +
+ '$(OPTIONS) $(USER_OPTIONS)',
+ function = gcc_link_dll,
+ bound_list=['LIBRARIES'])
+
+# Set up threading support. It's somewhat contrived, so perform it at the end,
+# to avoid cluttering other code.
+
+if on_windows():
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-mthreads'])
+elif bjam.variable('UNIX'):
+ jamuname = bjam.variable('JAMUNAME')
+ host_os_name = jamuname[0]
+ if host_os_name.startswith('SunOS'):
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-pthreads'])
+ flags('gcc', 'FINDLIBS-SA', [], ['rt'])
+ elif host_os_name == 'BeOS':
+ # BeOS has no threading options, don't set anything here.
+ pass
+ elif host_os_name == 'Haiku':
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-lroot'])
+ # there is no -lrt on Haiku, and -pthread is implicit
+ elif host_os_name.endswith('BSD'):
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-pthread'])
+ # there is no -lrt on BSD
+ elif host_os_name == 'DragonFly':
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-pthread'])
+ # there is no -lrt on BSD - DragonFly is a FreeBSD variant,
+ # which anoyingly doesn't say it's a *BSD.
+ elif host_os_name == 'IRIX':
+ # gcc on IRIX does not support multi-threading, don't set anything here.
+ pass
+ elif host_os_name == 'Darwin':
+ # Darwin has no threading options, don't set anything here.
+ pass
+ else:
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-pthread'])
+ flags('gcc', 'FINDLIBS-SA', [], ['rt'])
+
+def cpu_flags(toolset, variable, architecture, instruction_set, values, default=None):
+ #FIXME: for some reason this fails. Probably out of date feature code
+## if default:
+## flags(toolset, variable,
+## ['<architecture>' + architecture + '/<instruction-set>'],
+## values)
+ flags(toolset, variable,
+ #FIXME: same as above
+ [##'<architecture>/<instruction-set>' + instruction_set,
+ '<architecture>' + architecture + '/<instruction-set>' + instruction_set],
+ values)
+
+# Set architecture/instruction-set options.
+#
+# x86 and compatible
+flags('gcc', 'OPTIONS', ['<architecture>x86/<address-model>32'], ['-m32'])
+flags('gcc', 'OPTIONS', ['<architecture>x86/<address-model>64'], ['-m64'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'native', ['-march=native'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'i486', ['-march=i486'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'i586', ['-march=i586'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'i686', ['-march=i686'], default=True)
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium', ['-march=pentium'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium-mmx', ['-march=pentium-mmx'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentiumpro', ['-march=pentiumpro'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium2', ['-march=pentium2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium3', ['-march=pentium3'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium3m', ['-march=pentium3m'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium-m', ['-march=pentium-m'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium4', ['-march=pentium4'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'pentium4m', ['-march=pentium4m'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'prescott', ['-march=prescott'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'nocona', ['-march=nocona'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'core2', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'conroe', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'conroe-xe', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'conroe-l', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'allendale', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'wolfdale', ['-march=core2', '-msse4.1'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'merom', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'merom-xe', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'kentsfield', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'kentsfield-xe', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'yorksfield', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'penryn', ['-march=core2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'corei7', ['-march=corei7'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'nehalem', ['-march=corei7'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'corei7-avx', ['-march=corei7-avx'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'sandy-bridge', ['-march=corei7-avx'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'core-avx-i', ['-march=core-avx-i'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'ivy-bridge', ['-march=core-avx-i'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'haswell', ['-march=core-avx-i', '-mavx2', '-mfma', '-mbmi', '-mbmi2', '-mlzcnt'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'k6', ['-march=k6'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'k6-2', ['-march=k6-2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'k6-3', ['-march=k6-3'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon', ['-march=athlon'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon-tbird', ['-march=athlon-tbird'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon-4', ['-march=athlon-4'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon-xp', ['-march=athlon-xp'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon-mp', ['-march=athlon-mp'])
+##
+cpu_flags('gcc', 'OPTIONS', 'x86', 'k8', ['-march=k8'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'opteron', ['-march=opteron'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon64', ['-march=athlon64'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon-fx', ['-march=athlon-fx'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'k8-sse3', ['-march=k8-sse3'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'opteron-sse3', ['-march=opteron-sse3'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'athlon64-sse3', ['-march=athlon64-sse3'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'amdfam10', ['-march=amdfam10'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'barcelona', ['-march=barcelona'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'bdver1', ['-march=bdver1'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'bdver2', ['-march=bdver2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'bdver3', ['-march=bdver3'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'btver1', ['-march=btver1'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'btver2', ['-march=btver2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'winchip-c6', ['-march=winchip-c6'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'winchip2', ['-march=winchip2'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'c3', ['-march=c3'])
+cpu_flags('gcc', 'OPTIONS', 'x86', 'c3-2', ['-march=c3-2'])
+##
+cpu_flags('gcc', 'OPTIONS', 'x86', 'atom', ['-march=atom'])
+# Sparc
+flags('gcc', 'OPTIONS', ['<architecture>sparc/<address-model>32'], ['-m32'])
+flags('gcc', 'OPTIONS', ['<architecture>sparc/<address-model>64'], ['-m64'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'v7', ['-mcpu=v7'], default=True)
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'cypress', ['-mcpu=cypress'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'v8', ['-mcpu=v8'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'supersparc', ['-mcpu=supersparc'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'sparclite', ['-mcpu=sparclite'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'hypersparc', ['-mcpu=hypersparc'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'sparclite86x', ['-mcpu=sparclite86x'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'f930', ['-mcpu=f930'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'f934', ['-mcpu=f934'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'sparclet', ['-mcpu=sparclet'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'tsc701', ['-mcpu=tsc701'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'v9', ['-mcpu=v9'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'ultrasparc', ['-mcpu=ultrasparc'])
+cpu_flags('gcc', 'OPTIONS', 'sparc', 'ultrasparc3', ['-mcpu=ultrasparc3'])
+# RS/6000 & PowerPC
+flags('gcc', 'OPTIONS', ['<architecture>power/<address-model>32'], ['-m32'])
+flags('gcc', 'OPTIONS', ['<architecture>power/<address-model>64'], ['-m64'])
+cpu_flags('gcc', 'OPTIONS', 'power', '403', ['-mcpu=403'])
+cpu_flags('gcc', 'OPTIONS', 'power', '505', ['-mcpu=505'])
+cpu_flags('gcc', 'OPTIONS', 'power', '601', ['-mcpu=601'])
+cpu_flags('gcc', 'OPTIONS', 'power', '602', ['-mcpu=602'])
+cpu_flags('gcc', 'OPTIONS', 'power', '603', ['-mcpu=603'])
+cpu_flags('gcc', 'OPTIONS', 'power', '603e', ['-mcpu=603e'])
+cpu_flags('gcc', 'OPTIONS', 'power', '604', ['-mcpu=604'])
+cpu_flags('gcc', 'OPTIONS', 'power', '604e', ['-mcpu=604e'])
+cpu_flags('gcc', 'OPTIONS', 'power', '620', ['-mcpu=620'])
+cpu_flags('gcc', 'OPTIONS', 'power', '630', ['-mcpu=630'])
+cpu_flags('gcc', 'OPTIONS', 'power', '740', ['-mcpu=740'])
+cpu_flags('gcc', 'OPTIONS', 'power', '7400', ['-mcpu=7400'])
+cpu_flags('gcc', 'OPTIONS', 'power', '7450', ['-mcpu=7450'])
+cpu_flags('gcc', 'OPTIONS', 'power', '750', ['-mcpu=750'])
+cpu_flags('gcc', 'OPTIONS', 'power', '801', ['-mcpu=801'])
+cpu_flags('gcc', 'OPTIONS', 'power', '821', ['-mcpu=821'])
+cpu_flags('gcc', 'OPTIONS', 'power', '823', ['-mcpu=823'])
+cpu_flags('gcc', 'OPTIONS', 'power', '860', ['-mcpu=860'])
+cpu_flags('gcc', 'OPTIONS', 'power', '970', ['-mcpu=970'])
+cpu_flags('gcc', 'OPTIONS', 'power', '8540', ['-mcpu=8540'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'power', ['-mcpu=power'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'power2', ['-mcpu=power2'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'power3', ['-mcpu=power3'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'power4', ['-mcpu=power4'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'power5', ['-mcpu=power5'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'powerpc', ['-mcpu=powerpc'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'powerpc64', ['-mcpu=powerpc64'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'rios', ['-mcpu=rios'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'rios1', ['-mcpu=rios1'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'rios2', ['-mcpu=rios2'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'rsc', ['-mcpu=rsc'])
+cpu_flags('gcc', 'OPTIONS', 'power', 'rs64a', ['-mcpu=rs64'])
+cpu_flags('gcc', 'OPTIONS', 's390x', 'z196', ['-march=z196'])
+cpu_flags('gcc', 'OPTIONS', 's390x', 'zEC12', ['-march=zEC12'])
+cpu_flags('gcc', 'OPTIONS', 's390x', 'z13', ['-march=z13'])
+cpu_flags('gcc', 'OPTIONS', 's390x', 'z14', ['-march=z14'])
+cpu_flags('gcc', 'OPTIONS', 's390x', 'z15', ['-march=z15'])
+# AIX variant of RS/6000 & PowerPC
+flags('gcc', 'OPTIONS', ['<architecture>power/<address-model>32/<target-os>aix'], ['-maix32'])
+flags('gcc', 'OPTIONS', ['<architecture>power/<address-model>64/<target-os>aix'], ['-maix64'])
+flags('gcc', 'AROPTIONS', ['<architecture>power/<address-model>64/<target-os>aix'], ['-X64'])
diff --git a/src/boost/tools/build/src/tools/generate.jam b/src/boost/tools/build/src/tools/generate.jam
new file mode 100644
index 000000000..7eaecc889
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generate.jam
@@ -0,0 +1,111 @@
+# 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)
+
+# Declares main target 'generate' used to produce targets by calling a
+# user-provided rule that takes and produces virtual targets.
+
+import "class" : new ;
+import errors ;
+import feature ;
+import param ;
+import project ;
+import property ;
+import property-set ;
+import targets ;
+import regex ;
+
+
+feature.feature generating-rule : : free ;
+
+
+class generated-target-class : basic-target
+{
+ import errors ;
+ import indirect ;
+ import virtual-target ;
+
+ rule __init__ ( name : project : sources * : requirements *
+ : default-build * : usage-requirements * )
+ {
+ basic-target.__init__ $(name) : $(project) : $(sources)
+ : $(requirements) : $(default-build) : $(usage-requirements) ;
+
+ if ! [ $(self.requirements).get <generating-rule> ]
+ {
+ errors.user-error "The generate rule requires the <generating-rule>"
+ "property to be set" ;
+ }
+ }
+
+ rule construct ( name : sources * : property-set )
+ {
+ local result ;
+ local gr = [ $(property-set).get <generating-rule> ] ;
+
+ # FIXME: this is a copy-paste from virtual-target.jam. We should add a
+ # utility rule to call a rule like this.
+ local rule-name = [ MATCH ^@(.*) : $(gr) ] ;
+ if $(rule-name)
+ {
+ if $(gr[2])
+ {
+ local target-name = [ full-name ] ;
+ errors.user-error "Multiple <generating-rule> properties"
+ "encountered for target $(target-name)." ;
+ }
+
+ result = [ indirect.call $(rule-name) $(self.project) $(name)
+ : $(property-set) : $(sources) ] ;
+
+ if ! $(result)
+ {
+ ECHO "warning: Unable to construct" [ full-name ] ;
+ }
+ }
+
+ local ur ;
+ local targets ;
+
+ if $(result)
+ {
+ if [ class.is-a $(result[1]) : property-set ]
+ {
+ ur = $(result[1]) ;
+ targets = $(result[2-]) ;
+ }
+ else
+ {
+ ur = [ property-set.empty ] ;
+ targets = $(result) ;
+ }
+ }
+ # FIXME: the following loop should be doable using sequence.transform or
+ # some similar utility rule.
+ local rt ;
+ for local t in $(targets)
+ {
+ rt += [ virtual-target.register $(t) ] ;
+ }
+ return $(ur) $(rt) ;
+ }
+}
+
+
+rule generate ( 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 generated-target-class $(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) ]
+ ] ;
+}
+
+IMPORT $(__name__) : generate : : generate ;
diff --git a/src/boost/tools/build/src/tools/generators/__init_generators__.jam b/src/boost/tools/build/src/tools/generators/__init_generators__.jam
new file mode 100644
index 000000000..5f2483305
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/__init_generators__.jam
@@ -0,0 +1,23 @@
+# Copyright 2017 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)
+
+# Here we automatically define any "generator" modules in this directory.
+
+local key = generator ;
+
+import os path modules ;
+
+.this-module's-file = [ modules.binding $(__name__) ] ;
+.this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ;
+.to-load-jamfiles = [ path.glob $(.this-module's-dir) : *-$(key).jam ] ;
+.to-load-modules = [ MATCH ^(.*)\.jam$ : $(.to-load-jamfiles) ] ;
+
+# A loop over all matched modules in this directory
+for local m in $(.to-load-modules)
+{
+ m = [ path.basename $(m) ] ;
+ m = $(key)s/$(m) ;
+ import $(m) ;
+}
diff --git a/src/boost/tools/build/src/tools/generators/archive-generator.jam b/src/boost/tools/build/src/tools/generators/archive-generator.jam
new file mode 100644
index 000000000..6afc8e7aa
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/archive-generator.jam
@@ -0,0 +1,74 @@
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2017 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)
+
+import "class" : new ;
+import generators ;
+
+# The generator class for handling STATIC_LIB creation.
+#
+class archive-generator : generator
+{
+ import generators ;
+ import property-set ;
+
+ rule __init__ ( id composing ? : source-types + : target-types +
+ : requirements * )
+ {
+ composing ?= true ;
+ generator.__init__ $(id) $(composing) : $(source-types)
+ : $(target-types) : $(requirements) ;
+ }
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ sources += [ $(property-set).get <library> ] ;
+
+ property-set = [ $(property-set).add-raw <relevant>link ] ;
+
+ local result = [ generator.run $(project) $(name) : $(property-set)
+ : $(sources) ] ;
+
+ # For static linking, if we get a library in source, we can not directly
+ # link to it so we need to cause our dependencies to link to that
+ # library. There are two approaches:
+ # - adding the library to the list of returned targets.
+ # - using the <library> usage requirements.
+ # The problem with the first is:
+ #
+ # lib a1 : : <file>liba1.a ;
+ # lib a2 : a2.cpp a1 : <link>static ;
+ # install dist : a2 ;
+ #
+ # here we will try to install 'a1', even though it is not necessary in
+ # the general case. With the second approach, even indirect dependants
+ # will link to the library, but it should not cause any harm. So, return
+ # all LIB sources together with created targets, so that dependants link
+ # to them.
+ local usage-requirements = <relevant>link ;
+ if [ $(property-set).get <link> ] = static
+ {
+ for local t in $(sources)
+ {
+ if [ $(t).type ] && [ type.is-derived [ $(t).type ] LIB ]
+ {
+ usage-requirements += <library>$(t) ;
+ }
+ }
+ }
+
+ return [ generators.add-usage-requirements $(result) : $(usage-requirements) ] ;
+ }
+}
+
+
+rule register-archiver ( id composing ? : source-types + : target-types +
+ : requirements * )
+{
+ generators.register [ new archive-generator $(id) $(composing)
+ : $(source-types) : $(target-types) : $(requirements) ] ;
+}
+
+IMPORT $(__name__) : register-archiver : : generators.register-archiver ;
diff --git a/src/boost/tools/build/src/tools/generators/c-compiling-generator.jam b/src/boost/tools/build/src/tools/generators/c-compiling-generator.jam
new file mode 100644
index 000000000..00cd42a4d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/c-compiling-generator.jam
@@ -0,0 +1,70 @@
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2017 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)
+
+import "class" : new ;
+import generators ;
+import virtual-target ;
+
+# Declare a special compiler generator. The only thing it does is changing the
+# type used to represent 'action' in the constructed dependency graph to
+# 'compile-action'. That class in turn adds additional include paths to handle
+# cases when a source file includes headers which are generated themselves.
+#
+class C-compiling-generator : generator
+{
+ rule __init__ ( id : source-types + : target-types + : requirements *
+ : optional-properties * )
+ {
+ generator.__init__ $(id) : $(source-types) : $(target-types) :
+ $(requirements) : $(optional-properties) ;
+ }
+
+ rule action-class ( )
+ {
+ return compile-action ;
+ }
+}
+
+
+rule register-c-compiler ( id : source-types + : target-types + : requirements *
+ : optional-properties * )
+{
+ generators.register [ new C-compiling-generator $(id) : $(source-types) :
+ $(target-types) : $(requirements) : $(optional-properties) ] ;
+}
+
+# FIXME: this is ugly, should find a better way (we would like client code to
+# register all generators as "generators.some-rule" instead of
+# "some-module.some-rule".)
+#
+IMPORT $(__name__) : register-c-compiler : : generators.register-c-compiler ;
+
+class compile-action : action
+{
+ import sequence ;
+
+ rule __init__ ( targets * : sources * : action-name : properties * )
+ {
+ action.__init__ $(targets) : $(sources) : $(action-name) : $(properties) ;
+ }
+
+ # For all virtual targets for the same dependency graph as self, i.e. which
+ # belong to the same main target, add their directories to the include path.
+ #
+ rule adjust-properties ( property-set )
+ {
+ local s = [ $(self.targets[1]).creating-subvariant ] ;
+ if $(s)
+ {
+ return [ $(property-set).add-raw
+ [ $(s).implicit-includes "include" : H ] ] ;
+ }
+ else
+ {
+ return $(property-set) ;
+ }
+ }
+}
diff --git a/src/boost/tools/build/src/tools/generators/dummy-generator.jam b/src/boost/tools/build/src/tools/generators/dummy-generator.jam
new file mode 100644
index 000000000..ee93cfe88
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/dummy-generator.jam
@@ -0,0 +1,20 @@
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2017 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)
+
+import generators ;
+
+# Generator that accepts everything and produces nothing. Useful as a general
+# fallback for toolset-specific actions like PCH generation.
+#
+class dummy-generator : generator
+{
+ import property-set ;
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ return [ property-set.empty ] ;
+ }
+}
diff --git a/src/boost/tools/build/src/tools/generators/lib-generator.jam b/src/boost/tools/build/src/tools/generators/lib-generator.jam
new file mode 100644
index 000000000..2d9ce4aee
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/lib-generator.jam
@@ -0,0 +1,121 @@
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2017 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)
+
+import "class" : new ;
+import generators ;
+import param ;
+import project ;
+import targets ;
+
+# The generator class for libraries (target type LIB). Depending on properties
+# it will request building of the appropriate specific library type --
+# -- SHARED_LIB, STATIC_LIB or SHARED_LIB.
+#
+class lib-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8)
+ : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) :
+ $(17) : $(18) : $(19) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ # The lib generator is composing, and can be only invoked with an
+ # explicit name. This check is present in generator.run (and so in
+ # builtin.linking-generator) but duplicated here to avoid doing extra
+ # work.
+ if $(name)
+ {
+ local properties = [ $(property-set).raw ] ;
+ # Determine the needed target type.
+ local actual-type ;
+ # <source>files can be generated by <conditional>@rule feature
+ # in which case we do not consider it a SEARCHED_LIB type.
+ if ! <source> in $(properties:G) &&
+ ( <search> in $(properties:G) || <name> in $(properties:G) )
+ {
+ actual-type = SEARCHED_LIB ;
+ }
+ else if <file> in $(properties:G)
+ {
+ actual-type = LIB ;
+ }
+ else if <link>shared in $(properties)
+ {
+ actual-type = SHARED_LIB ;
+ }
+ else
+ {
+ actual-type = STATIC_LIB ;
+ }
+ property-set = [ $(property-set).add-raw <main-target-type>LIB <relevant>link ] ;
+ # Construct the target.
+ local result = [ generators.construct $(project) $(name) : $(actual-type)
+ : $(property-set) : $(sources) ] ;
+ return [ $(result[1]).add-raw <relevant>link ] $(result[2-]) ;
+ }
+ }
+
+ rule viable-source-types ( )
+ {
+ return * ;
+ }
+}
+
+generators.register [ new lib-generator builtin.lib-generator : : LIB ] ;
+
+# The implementation of the 'lib' rule. Beyond standard syntax that rule allows
+# simplified: "lib a b c ;".
+#
+rule lib ( names + : sources * : requirements * : default-build * :
+ usage-requirements * )
+{
+ param.handle-named-params
+ sources requirements default-build usage-requirements ;
+ if $(names[2])
+ {
+ if <name> in $(requirements:G)
+ {
+ import errors ;
+ errors.user-error "When several names are given to the 'lib' rule" :
+ "it is not allowed to specify the <name> feature." ;
+ }
+ if $(sources)
+ {
+ import errors ;
+ errors.user-error "When several names are given to the 'lib' rule" :
+ "it is not allowed to specify sources." ;
+ }
+ }
+
+ # This is a circular module dependency so it must be imported here.
+ import targets ;
+
+ local project = [ project.current ] ;
+ local result ;
+
+ for local name in $(names)
+ {
+ local r = $(requirements) ;
+ # Support " lib a ; " and " lib a b c ; " syntax.
+ if ! $(sources) && ! <name> in $(requirements:G)
+ && ! <file> in $(requirements:G)
+ {
+ r += <name>$(name) ;
+ }
+ result += [ targets.main-target-alternative
+ [ new typed-target $(name) : $(project) : LIB
+ : [ targets.main-target-sources $(sources) : $(name) ]
+ : [ targets.main-target-requirements $(r) : $(project) ]
+ : [ targets.main-target-default-build $(default-build) : $(project) ]
+ : [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ]
+ ] ] ;
+ }
+ return $(result) ;
+}
+IMPORT $(__name__) : lib : : lib ;
diff --git a/src/boost/tools/build/src/tools/generators/linking-generator.jam b/src/boost/tools/build/src/tools/generators/linking-generator.jam
new file mode 100644
index 000000000..37277a0b2
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/linking-generator.jam
@@ -0,0 +1,179 @@
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2017 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)
+
+import "class" : new ;
+import generators ;
+
+# The generator class for handling EXE and SHARED_LIB creation.
+#
+class linking-generator : generator
+{
+ import path ;
+ import project ;
+ import property-set ;
+ import type ;
+
+ rule __init__ ( id
+ composing ? : # The generator will be composing if a non-empty
+ # string is passed or the parameter is not given. To
+ # make the generator non-composing, pass an empty
+ # string ("").
+ source-types + :
+ target-types + :
+ requirements * )
+ {
+ composing ?= true ;
+ generator.__init__ $(id) $(composing) : $(source-types)
+ : $(target-types) : $(requirements) ;
+ }
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ sources += [ $(property-set).get <library> ] ;
+
+ # Add <library-path> properties for all searched libraries.
+ local extra = <relevant>link ;
+ for local s in $(sources)
+ {
+ if [ $(s).type ] = SEARCHED_LIB
+ {
+ local search = [ $(s).search ] ;
+ extra += <library-path>$(search) ;
+ }
+ }
+
+ # It is possible that sources include shared libraries that did not came
+ # from 'lib' targets, e.g. .so files specified as sources. In this case
+ # we have to add extra dll-path properties and propagate extra xdll-path
+ # properties so that application linking to us will get xdll-path to
+ # those libraries.
+ local extra-xdll-paths ;
+ for local s in $(sources)
+ {
+ if [ $(s).type ] && [ type.is-derived [ $(s).type ] SHARED_LIB ] && ! [ $(s).action ]
+ {
+ local location = [ path.root [ $(s).name ]
+ [ $(s).path ] ] ;
+ extra-xdll-paths += [ path.parent $(location) ] ;
+ }
+ }
+
+ # Hardcode DLL paths only when linking executables.
+ # Pros: do not need to relink libraries when installing.
+ # Cons: "standalone" libraries (plugins, python extensions) can not
+ # hardcode paths to dependent libraries.
+ if [ $(property-set).get <hardcode-dll-paths> ] = true
+ && [ type.is-derived $(self.target-types[1]) EXE ]
+ {
+ local xdll-path = [ $(property-set).get <xdll-path> ] ;
+ extra += <dll-path>$(xdll-path) <dll-path>$(extra-xdll-paths) ;
+ }
+
+ if $(extra)
+ {
+ property-set = [ $(property-set).add-raw $(extra) ] ;
+ }
+
+ local result = [ generator.run $(project) $(name) : $(property-set)
+ : $(sources) ] ;
+
+ local ur ;
+ if $(result)
+ {
+ ur = [ extra-usage-requirements $(result[2-]) : $(property-set) ] ;
+ ur = [ $(ur).add-raw
+ <relevant>link <xdll-path>$(extra-xdll-paths) ] ;
+ ur = [ $(ur).add $(result[1]) ] ;
+ }
+ return $(ur) $(result[2-]) ;
+ }
+
+ rule extra-usage-requirements ( created-targets * : property-set )
+ {
+ local result = [ property-set.empty ] ;
+ local extra ;
+
+ # Add appropriate <xdll-path> usage requirements.
+ local raw = [ $(property-set).raw ] ;
+ if <link>shared in $(raw)
+ {
+ local paths ;
+ local pwd = [ path.pwd ] ;
+ for local t in $(created-targets)
+ {
+ if [ type.is-derived [ $(t).type ] SHARED_LIB ]
+ {
+ paths += [ path.root [ path.make [ $(t).path ] ] $(pwd) ] ;
+ }
+ }
+ extra += $(paths:G=<xdll-path>) ;
+ }
+
+ # We need to pass <xdll-path> features that we've got from sources,
+ # because if a shared library is built, exe using it needs to know paths
+ # to other shared libraries this one depends on in order to be able to
+ # find them all at runtime.
+
+ # Just pass all features in property-set, it is theoretically possible
+ # that we will propagate <xdll-path> features explicitly specified by
+ # the user, but then the user is to blame for using an internal feature.
+ local values = [ $(property-set).get <xdll-path> ] ;
+ extra += $(values:G=<xdll-path>) ;
+
+ if $(extra)
+ {
+ result = [ property-set.create $(extra) ] ;
+ }
+ return $(result) ;
+ }
+
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ local sources2 ; # Sources to pass to inherited rule.
+ local properties2 ; # Properties to pass to inherited rule.
+ local libraries ; # Library sources.
+
+ # Searched libraries are not passed as arguments to the linker but via
+ # some option. So, we pass them to the action using a property.
+ properties2 = [ $(property-set).raw ] ;
+ local fsa ;
+ local fst ;
+ for local s in $(sources)
+ {
+ if [ $(s).type ] && [ type.is-derived [ $(s).type ] SEARCHED_LIB ]
+ {
+ local name = [ $(s).name ] ;
+ if [ $(s).shared ]
+ {
+ fsa += $(name) ;
+ }
+ else
+ {
+ fst += $(name) ;
+ }
+ }
+ else
+ {
+ sources2 += $(s) ;
+ }
+ }
+ properties2 += <find-shared-library>$(fsa:J=&&)
+ <find-static-library>$(fst:J=&&) ;
+
+ return [ generator.generated-targets $(sources2)
+ : [ property-set.create $(properties2) ] : $(project) $(name) ] ;
+ }
+}
+
+
+rule register-linker ( id composing ? : source-types + : target-types +
+ : requirements * )
+{
+ generators.register [ new linking-generator $(id) $(composing)
+ : $(source-types) : $(target-types) : $(requirements) ] ;
+}
+
+IMPORT $(__name__) : register-linker : : generators.register-linker ;
diff --git a/src/boost/tools/build/src/tools/generators/prebuilt-lib-generator.jam b/src/boost/tools/build/src/tools/generators/prebuilt-lib-generator.jam
new file mode 100644
index 000000000..00c8e6bdc
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/prebuilt-lib-generator.jam
@@ -0,0 +1,30 @@
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2017 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)
+
+import "class" : new ;
+import generators ;
+
+class prebuilt-lib-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8)
+ : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) :
+ $(17) : $(18) : $(19) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ local f = [ $(property-set).get <file> ] ;
+ return $(f) $(sources) ;
+ }
+}
+
+generators.register
+ [ new prebuilt-lib-generator builtin.prebuilt : : LIB : <file> ] ;
+
+generators.override builtin.prebuilt : builtin.lib-generator ;
+ \ No newline at end of file
diff --git a/src/boost/tools/build/src/tools/generators/searched-lib-generator.jam b/src/boost/tools/build/src/tools/generators/searched-lib-generator.jam
new file mode 100644
index 000000000..b3435daa3
--- /dev/null
+++ b/src/boost/tools/build/src/tools/generators/searched-lib-generator.jam
@@ -0,0 +1,97 @@
+# Copyright 2002-2017 Rene Rivera
+# Copyright 2002-2017 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)
+
+import "class" : new ;
+import generators ;
+
+class searched-lib-generator : generator
+{
+ import property-set ;
+
+ rule __init__ ( )
+ {
+ # The requirements cause the generators to be tried *only* when we are
+ # building a lib target with a 'search' feature. This seems ugly --- all
+ # we want is to make sure searched-lib-generator is not invoked deep
+ # inside transformation search to produce intermediate targets.
+ generator.__init__ searched-lib-generator : : SEARCHED_LIB ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if $(name)
+ {
+ # If 'name' is empty, it means we have not been called to build a
+ # top-level target. In this case, we just fail immediately, because
+ # searched-lib-generator cannot be used to produce intermediate
+ # targets.
+
+ local properties = [ $(property-set).raw ] ;
+ local shared ;
+ if <link>shared in $(properties)
+ {
+ shared = true ;
+ }
+
+ local search = [ feature.get-values <search> : $(properties) ] ;
+
+ local a = [ new null-action [ $(property-set).add-raw <relevant>link ] ] ;
+ local lib-name = [ feature.get-values <name> : $(properties) ] ;
+ lib-name ?= $(name) ;
+ local t = [ new searched-lib-target $(lib-name) : $(project)
+ : $(shared) : $(search) : $(a) ] ;
+ # We return sources for a simple reason. If there is
+ # lib png : z : <name>png ;
+ # the 'z' target should be returned, so that apps linking to 'png'
+ # will link to 'z', too.
+ return [ property-set.create <xdll-path>$(search) <relevant>link ]
+ [ virtual-target.register $(t) ] $(sources) ;
+ }
+ }
+}
+
+generators.register [ new searched-lib-generator ] ;
+
+class searched-lib-target : abstract-file-target
+{
+ rule __init__ ( name
+ : project
+ : shared ?
+ : search *
+ : action
+ )
+ {
+ abstract-file-target.__init__ $(name) : SEARCHED_LIB : $(project)
+ : $(action) : ;
+
+ self.shared = $(shared) ;
+ self.search = $(search) ;
+ }
+
+ rule shared ( )
+ {
+ return $(self.shared) ;
+ }
+
+ rule search ( )
+ {
+ return $(self.search) ;
+ }
+
+ rule actualize-location ( target )
+ {
+ NOTFILE $(target) ;
+ }
+
+ rule relevant ( )
+ {
+ return [ property-set.create <relevant>link ] ;
+ }
+
+ rule path ( )
+ {
+ }
+}
diff --git a/src/boost/tools/build/src/tools/gettext.jam b/src/boost/tools/build/src/tools/gettext.jam
new file mode 100644
index 000000000..35827d750
--- /dev/null
+++ b/src/boost/tools/build/src/tools/gettext.jam
@@ -0,0 +1,230 @@
+# Copyright 2003, 2004, 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)
+
+# This module support GNU gettext internationalization utilities.
+#
+# It provides two main target rules: 'gettext.catalog', used for
+# creating machine-readable catalogs from translations files, and
+# 'gettext.update', used for update translation files from modified
+# sources.
+#
+# To add i18n support to your application you should follow these
+# steps.
+#
+# - Decide on a file name which will contain translations and
+# what main target name will be used to update it. For example::
+#
+# gettext.update update-russian : russian.po a.cpp my_app ;
+#
+# - Create the initial translation file by running::
+#
+# bjam update-russian
+#
+# - Edit russian.po. For example, you might change fields like LastTranslator.
+#
+# - Create a main target for final message catalog::
+#
+# gettext.catalog russian : russian.po ;
+#
+# The machine-readable catalog will be updated whenever you update
+# "russian.po". The "russian.po" file will be updated only on explicit
+# request. When you're ready to update translations, you should
+#
+# - Run::
+#
+# bjam update-russian
+#
+# - Edit "russian.po" in appropriate editor.
+#
+# The next bjam run will convert "russian.po" into machine-readable form.
+#
+# By default, translations are marked by 'i18n' call. The 'gettext.keyword'
+# feature can be used to alter this.
+
+
+import targets ;
+import property-set ;
+import virtual-target ;
+import "class" : new ;
+import project ;
+import type ;
+import generators ;
+import errors ;
+import feature : feature ;
+import toolset : flags ;
+import regex ;
+
+.path = "" ;
+
+# Initializes the gettext module.
+rule init ( path ? # Path where all tools are located. If not specified,
+ # they should be in PATH.
+ )
+{
+ if $(.initialized) && $(.path) != $(path)
+ {
+ errors.error "Attempt to reconfigure with different path" ;
+ }
+ .initialized = true ;
+ if $(path)
+ {
+ .path = $(path)/ ;
+ }
+}
+
+# Creates a main target 'name', which, when updated, will cause
+# file 'existing-translation' to be updated with translations
+# extracted from 'sources'. It's possible to specify main target
+# in sources --- it which case all target from dependency graph
+# of those main targets will be scanned, provided they are of
+# appropricate type. The 'gettext.types' feature can be used to
+# control the types.
+#
+# The target will be updated only if explicitly requested on the
+# command line.
+rule update ( name : existing-translation sources + : requirements * )
+{
+ local project = [ project.current ] ;
+
+ targets.main-target-alternative
+ [ new typed-target $(name) : $(project) : gettext.UPDATE :
+ $(existing-translation) $(sources)
+ : [ targets.main-target-requirements $(requirements) : $(project) ]
+ ] ;
+ $(project).mark-target-as-explicit $(name) ;
+}
+
+
+# The human editable source, containing translation.
+type.register gettext.PO : po ;
+# The machine readable message catalog.
+type.register gettext.catalog : mo ;
+# Intermediate type produce by extracting translations from
+# sources.
+type.register gettext.POT : pot ;
+# Pseudo type used to invoke update-translations generator
+type.register gettext.UPDATE ;
+
+# Identifies the keyword that should be used when scanning sources.
+# Default: i18n
+feature gettext.keyword : : free ;
+# Contains space-separated list of sources types which should be scanned.
+# Default: "C CPP"
+feature gettext.types : : free ;
+
+generators.register-standard gettext.compile : gettext.PO : gettext.catalog ;
+
+class update-translations-generator : generator
+{
+ import regex : split ;
+ import property-set ;
+
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ # The rule should be called with at least two sources. The first source
+ # is the translation (.po) file to update. The remaining sources are targets
+ # which should be scanned for new messages. All sources files for those targets
+ # will be found and passed to the 'xgettext' utility, which extracts the
+ # messages for localization. Those messages will be merged to the .po file.
+ rule run ( project name ? : property-set : sources * : multiple ? )
+ {
+ local types = [ $(property-set).get <gettext.types> ] ;
+ types ?= "C CPP" ;
+ types = [ regex.split $(types) " " ] ;
+
+ local keywords = [ $(property-set).get <gettext.keyword> ] ;
+ property-set = [ property-set.create $(keywords:G=<gettext.keyword>) ] ;
+
+ # First deterime the list of sources that must be scanned for
+ # messages.
+ local all-sources ;
+ # CONSIDER: I'm not sure if the logic should be the same as for 'stage':
+ # i.e. following dependency properties as well.
+ for local s in $(sources[2-])
+ {
+ all-sources += [ virtual-target.traverse $(s) : : include-sources ] ;
+ }
+ local right-sources ;
+ for local s in $(all-sources)
+ {
+ if [ $(s).type ] in $(types)
+ {
+ right-sources += $(s) ;
+ }
+ }
+
+ local .constructed ;
+ if $(right-sources)
+ {
+ # Create the POT file, which will contain list of messages extracted
+ # from the sources.
+ local extract =
+ [ new action $(right-sources) : gettext.extract : $(property-set) ] ;
+ local new-messages = [ new file-target $(name) : gettext.POT
+ : $(project) : $(extract) ] ;
+
+ # Create a notfile target which will update the existing translation file
+ # with new messages.
+ local a = [ new action $(sources[1]) $(new-messages)
+ : gettext.update-po-dispatch ] ;
+ local r = [ new notfile-target $(name) : $(project) : $(a) ] ;
+ .constructed = [ virtual-target.register $(r) ] ;
+ }
+ else
+ {
+ errors.error "No source could be scanned by gettext tools" ;
+ }
+ return $(.constructed) ;
+ }
+}
+generators.register [ new update-translations-generator gettext.update : : gettext.UPDATE ] ;
+
+flags gettext.extract KEYWORD <gettext.keyword> ;
+actions extract
+{
+ $(.path)xgettext -k$(KEYWORD:E=i18n) -o $(<) $(>)
+}
+
+# Does really updating of po file. The tricky part is that
+# we're actually updating one of the sources:
+# $(<) is the NOTFILE target we're updating
+# $(>[1]) is the PO file to be really updated.
+# $(>[2]) is the PO file created from sources.
+#
+# When file to be updated does not exist (during the
+# first run), we need to copy the file created from sources.
+# In all other cases, we need to update the file.
+rule update-po-dispatch
+{
+ NOCARE $(>[1]) ;
+ gettext.create-po $(<) : $(>) ;
+ gettext.update-po $(<) : $(>) ;
+ _ on $(<) = " " ;
+ ok on $(<) = "" ;
+ EXISTING_PO on $(<) = $(>[1]) ;
+}
+
+# Due to fancy interaction of existing and updated, this rule can be called with
+# one source, in which case we copy the lonely source into EXISTING_PO, or with
+# two sources, in which case the action body expands to nothing. I'd really like
+# to have "missing" action modifier.
+actions quietly existing updated create-po bind EXISTING_PO
+{
+ cp$(_)"$(>[1])"$(_)"$(EXISTING_PO)"$($(>[2]:E=ok))
+}
+
+actions updated update-po bind EXISTING_PO
+{
+ $(.path)msgmerge$(_)-U$(_)"$(EXISTING_PO)"$(_)"$(>[1])"
+}
+
+actions gettext.compile
+{
+ $(.path)msgfmt -o $(<) $(>)
+}
+
+IMPORT $(__name__) : update : : gettext.update ;
diff --git a/src/boost/tools/build/src/tools/gfortran.jam b/src/boost/tools/build/src/tools/gfortran.jam
new file mode 100644
index 000000000..0aa69b85c
--- /dev/null
+++ b/src/boost/tools/build/src/tools/gfortran.jam
@@ -0,0 +1,39 @@
+# Copyright (C) 2004 Toon Knapen
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import toolset : flags ;
+import feature ;
+import fortran ;
+
+rule init ( version ? : command * : options * )
+{
+}
+
+# Declare flags and action for compilation
+flags gfortran OPTIONS <fflags> ;
+
+flags gfortran OPTIONS <optimization>off : -O0 ;
+flags gfortran OPTIONS <optimization>speed : -O3 ;
+flags gfortran OPTIONS <optimization>space : -Os ;
+
+flags gfortran OPTIONS <debug-symbols>on : -g ;
+flags gfortran OPTIONS <profiling>on : -pg ;
+
+flags gfortran OPTIONS <link>shared/<main-target-type>LIB : -fPIC ;
+
+flags gfortran DEFINES <define> ;
+flags gfortran INCLUDES <include> ;
+
+rule compile.fortran
+{
+}
+
+actions compile.fortran
+{
+ gcc -Wall $(OPTIONS) -D$(DEFINES) -I$(INCLUDES) -c -o "$(<)" "$(>)"
+}
+
+generators.register-fortran-compiler gfortran.compile.fortran : FORTRAN FORTRAN90 : OBJ ;
diff --git a/src/boost/tools/build/src/tools/hp_cxx.jam b/src/boost/tools/build/src/tools/hp_cxx.jam
new file mode 100644
index 000000000..82ef8080d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/hp_cxx.jam
@@ -0,0 +1,222 @@
+# Copyright 2001 David Abrahams.
+# Copyright 2004, 2005 Markus Schoepflin.
+# 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.hp_cxx]]
+= HP C++ Compiler for Tru64 Unix
+
+The `hp_cxx` modules supports the
+http://h30097.www3.hp.com/cplus/?jumpid=reg_R1002_USEN[HP C++ Compiler]
+for Tru64 Unix.
+
+The module is initialized using the following syntax:
+
+----
+using hp_cxx : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the command is not specified, B2 will search for a binary
+named `hp_cxx` in PATH.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+|# # end::doc[]
+
+#
+# HP CXX compiler
+# See http://h30097.www3.hp.com/cplus/?jumpid=reg_R1002_USEN
+#
+#
+# Notes on this toolset:
+#
+# - Because of very subtle issues with the default ansi mode, strict_ansi mode
+# is used for compilation. One example of things that don't work correctly in
+# the default ansi mode is overload resolution of function templates when
+# mixed with non-template functions.
+#
+# - For template instantiation "-timplicit_local" is used. Previously,
+# "-tlocal" has been tried to avoid the need for a template repository
+# but this doesn't work with manually instantiated templates. "-tweak"
+# has not been used to avoid the stream of warning messages issued by
+# ar or ld when creating a library or linking an application.
+#
+# - Debug symbols are generated with "-g3", as this works both in debug and
+# release mode. When compiling C++ code without optimization, we additionally
+# use "-gall", which generates full symbol table information for all classes,
+# structs, and unions. As this turns off optimization, it can't be used when
+# optimization is needed.
+#
+
+import feature generators common ;
+import toolset : flags ;
+
+feature.extend toolset : hp_cxx ;
+feature.extend c++abi : cxxarm ;
+
+# Inherit from Unix toolset to get library ordering magic.
+toolset.inherit hp_cxx : unix ;
+
+generators.override hp_cxx.prebuilt : builtin.lib-generator ;
+generators.override hp_cxx.prebuilt : builtin.prebuilt ;
+generators.override hp_cxx.searched-lib-generator : searched-lib-generator ;
+
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters hp_cxx : version $(version) ] ;
+
+ local command = [ common.get-invocation-command hp_cxx : cxx : $(command) ] ;
+
+ if $(command)
+ {
+ local root = [ common.get-absolute-tool-path $(command[-1]) ] ;
+
+ if $(root)
+ {
+ flags hp_cxx .root $(condition) : "\"$(root)\"/" ;
+ }
+ }
+ # If we can't find 'cxx' anyway, at least show 'cxx' in the commands
+ command ?= cxx ;
+
+ common.handle-options hp_cxx : $(condition) : $(command) : $(options) ;
+}
+
+generators.register-c-compiler hp_cxx.compile.c++ : CPP : OBJ : <toolset>hp_cxx ;
+generators.register-c-compiler hp_cxx.compile.c : C : OBJ : <toolset>hp_cxx ;
+
+
+
+# No static linking as far as I can tell.
+# flags cxx LINKFLAGS <runtime-link>static : -bstatic ;
+flags hp_cxx.compile OPTIONS <debug-symbols>on : -g3 ;
+flags hp_cxx.compile OPTIONS <optimization>off/<debug-symbols>on : -gall ;
+flags hp_cxx.link OPTIONS <debug-symbols>on : -g ;
+flags hp_cxx.link OPTIONS <debug-symbols>off : -s ;
+
+flags hp_cxx.compile OPTIONS <optimization>off : -O0 ;
+flags hp_cxx.compile OPTIONS <optimization>speed/<inlining>on : -O2 ;
+flags hp_cxx.compile OPTIONS <optimization>speed : -O2 ;
+
+# This (undocumented) macro needs to be defined to get all C function
+# overloads required by the C++ standard.
+flags hp_cxx.compile.c++ OPTIONS : -D__CNAME_OVERLOADS ;
+
+# Added for threading support
+flags hp_cxx.compile OPTIONS <threading>multi : -pthread ;
+flags hp_cxx.link OPTIONS <threading>multi : -pthread ;
+
+flags hp_cxx.compile OPTIONS <optimization>space/<inlining>on : <inlining>size ;
+flags hp_cxx.compile OPTIONS <optimization>space : -O1 ;
+flags hp_cxx.compile OPTIONS <inlining>off : -inline none ;
+
+# The compiler versions tried (up to V6.5-040) hang when compiling Boost code
+# with full inlining enabled. So leave it at the default level for now.
+#
+# flags hp_cxx.compile OPTIONS <inlining>full : -inline all ;
+
+flags hp_cxx.compile OPTIONS <profiling>on : -pg ;
+flags hp_cxx.link OPTIONS <profiling>on : -pg ;
+
+# Selection of the object model. This flag is needed on both the C++ compiler
+# and linker command line.
+
+# Unspecified ABI translates to '-model ansi' as most
+# standard-conforming.
+flags hp_cxx.compile.c++ OPTIONS <c++abi> : -model ansi : : hack-hack ;
+flags hp_cxx.compile.c++ OPTIONS <c++abi>cxxarm : -model arm ;
+flags hp_cxx.link OPTIONS <c++abi> : -model ansi : : hack-hack ;
+flags hp_cxx.link OPTIONS <c++abi>cxxarm : -model arm ;
+
+# Display a descriptive tag together with each compiler message. This tag can
+# be used by the user to explicitly suppress the compiler message.
+flags hp_cxx.compile OPTIONS : -msg_display_tag ;
+
+flags hp_cxx.compile OPTIONS <cflags> ;
+flags hp_cxx.compile.c++ OPTIONS <cxxflags> ;
+flags hp_cxx.compile DEFINES <define> ;
+flags hp_cxx.compile INCLUDES <include> ;
+flags hp_cxx.link OPTIONS <linkflags> ;
+
+flags hp_cxx.link LIBPATH <library-path> ;
+flags hp_cxx.link LIBRARIES <library-file> ;
+flags hp_cxx.link FINDLIBS-ST <find-static-library> ;
+flags hp_cxx.link FINDLIBS-SA <find-shared-library> ;
+
+flags hp_cxx.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
+
+actions link bind LIBRARIES
+{
+ $(CONFIG_COMMAND) -noimplicit_include $(OPTIONS) -o "$(<)" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) -lrt -lm
+}
+
+# When creating dynamic libraries, we don't want to be warned about unresolved
+# symbols, therefore all unresolved symbols are marked as expected by
+# '-expect_unresolved *'. This also mirrors the behaviour of the GNU tool
+# chain.
+
+actions link.dll bind LIBRARIES
+{
+ $(CONFIG_COMMAND) -shared -expect_unresolved \* -noimplicit_include $(OPTIONS) -o "$(<[1])" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) -lm
+}
+
+
+# Note: Relaxed ANSI mode (-std) is used for compilation because in strict ANSI
+# C89 mode (-std1) the compiler doesn't accept C++ comments in C files. As -std
+# is the default, no special flag is needed.
+actions compile.c
+{
+ $(.root:E=)cc -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
+}
+
+# Note: The compiler is forced to compile the files as C++ (-x cxx) because
+# otherwise it will silently ignore files with no file extension.
+#
+# Note: We deliberately don't suppress any warnings on the compiler command
+# line, the user can always do this in a customized toolset later on.
+
+rule compile.c++
+{
+ # We preprocess the TEMPLATE_DEPTH command line option here because we found
+ # no way to do it correctly in the actual action code. There we either get
+ # the -pending_instantiations parameter when no c++-template-depth property
+ # has been specified or we get additional quotes around
+ # "-pending_instantiations ".
+ local template-depth = [ on $(1) return $(TEMPLATE_DEPTH) ] ;
+ TEMPLATE_DEPTH on $(1) = "-pending_instantiations "$(template-depth) ;
+}
+
+actions compile.c++
+{
+ $(CONFIG_COMMAND) -x cxx -c -std strict_ansi -nopure_cname -noimplicit_include -timplicit_local -ptr "$(<[1]:D)/cxx_repository" $(OPTIONS) $(TEMPLATE_DEPTH) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
+}
+
+# Always create archive from scratch. See the gcc toolet for rationale.
+RM = [ common.rm-command ] ;
+actions together piecemeal archive
+{
+ $(RM) "$(<)"
+ ar rc $(<) $(>)
+}
diff --git a/src/boost/tools/build/src/tools/hpfortran.jam b/src/boost/tools/build/src/tools/hpfortran.jam
new file mode 100644
index 000000000..96e8d18b5
--- /dev/null
+++ b/src/boost/tools/build/src/tools/hpfortran.jam
@@ -0,0 +1,35 @@
+# Copyright (C) 2004 Toon Knapen
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import toolset : flags ;
+import feature ;
+import fortran ;
+
+rule init ( version ? : command * : options * )
+{
+}
+
+# Declare flags and action for compilation
+flags hpfortran OPTIONS <optimization>off : -O0 ;
+flags hpfortran OPTIONS <optimization>speed : -O3 ;
+flags hpfortran OPTIONS <optimization>space : -O1 ;
+
+flags hpfortran OPTIONS <debug-symbols>on : -g ;
+flags hpfortran OPTIONS <profiling>on : -pg ;
+
+flags hpfortran DEFINES <define> ;
+flags hpfortran INCLUDES <include> ;
+
+rule compile.fortran
+{
+}
+
+actions compile.fortran
+{
+ f77 +DD64 $(OPTIONS) -D$(DEFINES) -I$(INCLUDES) -c -o "$(<)" "$(>)"
+}
+
+generators.register-fortran-compiler hpfortran.compile.fortran : FORTRAN : OBJ ;
diff --git a/src/boost/tools/build/src/tools/ifort.jam b/src/boost/tools/build/src/tools/ifort.jam
new file mode 100644
index 000000000..958485928
--- /dev/null
+++ b/src/boost/tools/build/src/tools/ifort.jam
@@ -0,0 +1,44 @@
+# Copyright (C) 2004 Toon Knapen
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import toolset : flags ;
+import feature ;
+import fortran ;
+
+rule init ( version ? : command * : options * )
+{
+}
+
+# Declare flags and action for compilation
+flags ifort OPTIONS <fflags> ;
+
+flags ifort OPTIONS <optimization>off : /Od ;
+flags ifort OPTIONS <optimization>speed : /O3 ;
+flags ifort OPTIONS <optimization>space : /O1 ;
+
+flags ifort OPTIONS <debug-symbols>on : "/debug:full" ;
+flags ifort OPTIONS <profiling>on : /Qprof_gen ;
+
+flags ifort.compile FFLAGS <runtime-debugging>off/<runtime-link>shared : /MD ;
+flags ifort.compile FFLAGS <runtime-debugging>on/<runtime-link>shared : /MDd ;
+flags ifort.compile FFLAGS <runtime-debugging>off/<runtime-link>static/<threading>single : /ML ;
+flags ifort.compile FFLAGS <runtime-debugging>on/<runtime-link>static/<threading>single : /MLd ;
+flags ifort.compile FFLAGS <runtime-debugging>off/<runtime-link>static/<threading>multi : /MT ;
+flags ifort.compile FFLAGS <runtime-debugging>on/<runtime-link>static/<threading>multi : /MTd ;
+
+flags ifort DEFINES <define> ;
+flags ifort INCLUDES <include> ;
+
+rule compile.fortran
+{
+}
+
+actions compile.fortran
+{
+ ifort $(FFLAGS) $(OPTIONS) /names:lowercase /D$(DEFINES) /I"$(INCLUDES)" /c /object:"$(<)" "$(>)"
+}
+
+generators.register-fortran-compiler ifort.compile.fortran : FORTRAN : OBJ ;
diff --git a/src/boost/tools/build/src/tools/intel-darwin.jam b/src/boost/tools/build/src/tools/intel-darwin.jam
new file mode 100644
index 000000000..03a75df61
--- /dev/null
+++ b/src/boost/tools/build/src/tools/intel-darwin.jam
@@ -0,0 +1,233 @@
+# Copyright Vladimir Prus 2004.
+# Copyright Noel Belcourt 2007.
+# 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 intel ;
+import feature : feature ;
+import os ;
+import toolset ;
+import toolset : flags ;
+import gcc ;
+import common ;
+import errors ;
+import generators ;
+
+feature.extend-subfeature toolset intel : platform : darwin ;
+
+toolset.inherit-generators intel-darwin
+ <toolset>intel <toolset-intel:platform>darwin
+ : gcc
+ # Don't inherit PCH generators. They were not tested, and probably
+ # don't work for this compiler.
+ : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
+ ;
+
+generators.override intel-darwin.prebuilt : builtin.lib-generator ;
+generators.override intel-darwin.prebuilt : builtin.prebuilt ;
+generators.override intel-darwin.searched-lib-generator : searched-lib-generator ;
+
+toolset.inherit-rules intel-darwin : gcc ;
+toolset.inherit-flags intel-darwin : gcc
+ : <inlining>off <inlining>on <inlining>full <optimization>space
+ <warnings>off <warnings>all <warnings>on
+ <architecture>x86/<address-model>32
+ <architecture>x86/<address-model>64
+ ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Initializes the intel-darwin toolset
+# version in mandatory
+# name (default icc) is used to invoke the specified intel compiler
+# compile and link options allow you to specify addition command line options for each version
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters intel-darwin
+ : version $(version) ] ;
+
+ command = [ common.get-invocation-command intel-darwin : icc
+ : $(command) : /opt/intel_cc_80/bin ] ;
+
+ common.handle-options intel-darwin : $(condition) : $(command) : $(options) ;
+
+ # handle <library-path>
+ # local library-path = [ feature.get-values <library-path> : $(options) ] ;
+ # flags intel-darwin.link USER_OPTIONS $(condition) : [ feature.get-values <dll-path> : $(options) ] ;
+
+ local root = [ feature.get-values <root> : $(options) ] ;
+ local bin ;
+ if $(command) || $(root)
+ {
+ bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
+ root ?= $(bin:D) ;
+
+ if $(root)
+ {
+ # Libraries required to run the executable may be in either
+ # $(root)/lib (10.1 and earlier)
+ # or
+ # $(root)/lib/architecture-name (11.0 and later:
+ local lib_path = $(root)/lib $(root:P)/lib/$(bin:B) ;
+ if $(.debug-configuration)
+ {
+ ECHO notice\: using intel libraries "::" $(condition) "::" $(lib_path) ;
+ }
+ flags intel-darwin.link RUN_PATH $(condition) : $(lib_path) ;
+ }
+ }
+
+ local m = [ MATCH (..).* : $(version) ] ;
+ local n = [ MATCH (.)\\. : $(m) ] ;
+ if $(n) {
+ m = $(n) ;
+ }
+
+ local major = $(m) ;
+
+ if $(major) = "9" {
+ flags intel-darwin.compile OPTIONS $(condition)/<inlining>off : -Ob0 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<inlining>on : -Ob1 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<inlining>full : -Ob2 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<vectorize>off : -vec-report0 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<vectorize>on : -vec-report1 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<vectorize>full : -vec-report5 ;
+ flags intel-darwin.link OPTIONS $(condition)/<runtime-link>static : -static -static-libcxa -lstdc++ -lpthread ;
+ flags intel-darwin.link OPTIONS $(condition)/<runtime-link>shared : -shared-libcxa -lstdc++ -lpthread ;
+ }
+ else {
+ flags intel-darwin.compile OPTIONS $(condition)/<inlining>off : -inline-level=0 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<inlining>on : -inline-level=1 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<inlining>full : -inline-level=2 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<vectorize>off : -vec-report0 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<vectorize>on : -vec-report1 ;
+ flags intel-darwin.compile OPTIONS $(condition)/<vectorize>full : -vec-report5 ;
+ flags intel-darwin.link OPTIONS $(condition)/<runtime-link>static : -static -static-intel -lstdc++ -lpthread ;
+ flags intel-darwin.link OPTIONS $(condition)/<runtime-link>shared : -shared-intel -lstdc++ -lpthread ;
+ }
+
+ local minor = [ MATCH ".*\\.(.).*" : $(version) ] ;
+
+ # wchar_t char_traits workaround for compilers older than 10.2
+ if $(major) = "9" || ( $(major) = "10" && ( $(minor) = "0" || $(minor) = "1" ) ) {
+ flags intel-darwin.compile DEFINES $(condition) : __WINT_TYPE__=int : unchecked ;
+ }
+
+ # - Ranlib.
+ local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
+ toolset.flags intel-darwin.archive .RANLIB $(condition) : $(ranlib[1]) ;
+
+ # - Archive builder.
+ local archiver = [ feature.get-values <archiver> : $(options) ] ;
+ toolset.flags intel-darwin.archive .AR $(condition) : $(archiver[1]) ;
+}
+
+SPACE = " " ;
+
+flags intel-darwin.compile OPTIONS <cflags> ;
+flags intel-darwin.compile.c++ OPTIONS <cxxflags> ;
+# flags intel-darwin.compile INCLUDES <include> ;
+
+flags intel-darwin.compile OPTIONS <optimization>space : -O1 ; # no specific space optimization flag in icc
+
+#
+.cpu-type-em64t = prescott nocona core2 corei7 corei7-avx core-avx-i
+ conroe conroe-xe conroe-l allendale merom
+ merom-xe kentsfield kentsfield-xe penryn wolfdale
+ yorksfield nehalem sandy-bridge ivy-bridge haswell
+ broadwell skylake skylake-avx512 cannonlake icelake ;
+.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
+ athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3
+ bdver4 btver1 btver2 znver1 ;
+.cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ;
+
+flags intel-darwin.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>32 : -m32 ; # -mcmodel=small ;
+flags intel-darwin.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>64 : -m64 ; # -mcmodel=large ;
+
+flags intel-darwin.compile.c OPTIONS <warnings>off : -w0 ;
+flags intel-darwin.compile.c OPTIONS <warnings>on : -w1 ;
+flags intel-darwin.compile.c OPTIONS <warnings>all : -w2 ;
+
+flags intel-darwin.compile.c++ OPTIONS <warnings>off : -w0 ;
+flags intel-darwin.compile.c++ OPTIONS <warnings>on : -w1 ;
+flags intel-darwin.compile.c++ OPTIONS <warnings>all : -w2 ;
+
+actions compile.c
+{
+ "$(CONFIG_COMMAND)" -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+flags intel-darwin ARFLAGS <archiveflags> ;
+
+# Default value. Mostly for the sake of intel-linux
+# that inherits from gcc, but does not has the same
+# logic to set the .AR variable. We can put the same
+# logic in intel-linux, but that's hardly worth the trouble
+# as on Linux, 'ar' is always available.
+.AR = ar ;
+.RANLIB = ranlib ;
+
+rule archive ( targets * : sources * : properties * )
+{
+ # Always remove archive and start again. Here's rationale from
+ # Andre Hentz:
+ #
+ # I had a file, say a1.c, that was included into liba.a.
+ # I moved a1.c to a2.c, updated my Jamfiles and rebuilt.
+ # My program was crashing with absurd errors.
+ # After some debugging I traced it back to the fact that a1.o was *still*
+ # in liba.a
+ #
+ # Rene Rivera:
+ #
+ # Originally removing the archive was done by splicing an RM
+ # onto the archive action. That makes archives fail to build on NT
+ # when they have many files because it will no longer execute the
+ # action directly and blow the line length limit. Instead we
+ # remove the file in a different action, just before the building
+ # of the archive.
+ #
+ local clean.a = $(targets[1])(clean) ;
+ TEMPORARY $(clean.a) ;
+ NOCARE $(clean.a) ;
+ LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
+ DEPENDS $(clean.a) : $(sources) ;
+ DEPENDS $(targets) : $(clean.a) ;
+ common.RmTemps $(clean.a) : $(targets) ;
+}
+
+actions piecemeal archive
+{
+ "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
+ "$(.RANLIB)" -cs "$(<)"
+}
+
+flags intel-darwin.link USER_OPTIONS <linkflags> ;
+
+# Declare actions for linking
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the 'link' action, since
+ # running N links in parallel is just slower.
+ JAM_SEMAPHORE on $(targets) = <s>intel-darwin-link-semaphore ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -single_module -dynamiclib -install_name "$(<[1]:D=)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
+}
diff --git a/src/boost/tools/build/src/tools/intel-linux.jam b/src/boost/tools/build/src/tools/intel-linux.jam
new file mode 100644
index 000000000..d5edf2e1d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/intel-linux.jam
@@ -0,0 +1,232 @@
+# Copyright (c) 2003 Michael Stevens
+# Copyright (c) 2011 Bryce Lelbach
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import toolset ;
+import feature ;
+import toolset : flags ;
+
+import intel ;
+import gcc ;
+import common ;
+import errors ;
+import generators ;
+import type ;
+import numbers ;
+
+feature.extend-subfeature toolset intel : platform : linux ;
+
+toolset.inherit-generators intel-linux
+ <toolset>intel <toolset-intel:platform>linux : gcc : gcc.mingw.link gcc.mingw.link.dll ;
+generators.override intel-linux.prebuilt : builtin.lib-generator ;
+generators.override intel-linux.prebuilt : builtin.prebuilt ;
+generators.override intel-linux.searched-lib-generator : searched-lib-generator ;
+
+# Override default do-nothing generators.
+generators.override intel-linux.compile.c.pch : pch.default-c-pch-generator ;
+generators.override intel-linux.compile.c++.pch : pch.default-cpp-pch-generator ;
+
+type.set-generated-target-suffix PCH : <toolset>intel <toolset-intel:platform>linux : pchi ;
+
+toolset.inherit-rules intel-linux : gcc ;
+toolset.inherit-flags intel-linux : gcc
+ : <inlining>off <inlining>on <inlining>full
+ <optimization>space <optimization>speed
+ <warnings>off <warnings>all <warnings>on
+ ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Initializes the intel-linux toolset
+# version in mandatory
+# name (default icpc) is used to invoke the specified intel-linux compiler
+# compile and link options allow you to specify addition command line options for each version
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters intel-linux
+ : version $(version) ] ;
+
+ if $(.debug-configuration)
+ {
+ ECHO "notice: intel-linux version is" $(version) ;
+ }
+
+ local default_path ;
+
+ # Intel C++ Composer XE 2011 for Linux, aka Intel C++ Compiler XE 12.0,
+ # aka intel-linux-12.0. In this version, Intel thankfully decides to install
+ # to a sane 'intel' folder in /opt.
+ if [ MATCH "(12[.]0|12)" : $(version) ]
+ { default_path = /opt/intel/bin ; }
+ # Intel C++ Compiler 11.1.
+ else if [ MATCH "(11[.]1)" : $(version) ]
+ { default_path = /opt/intel_cce_11.1.064.x86_64/bin ; }
+ # Intel C++ Compiler 11.0.
+ else if [ MATCH "(11[.]0|11)" : $(version) ]
+ { default_path = /opt/intel_cce_11.0.074.x86_64/bin ; }
+ # Intel C++ Compiler 10.1.
+ else if [ MATCH "(10[.]1)" : $(version) ]
+ { default_path = /opt/intel_cce_10.1.013_x64/bin ; }
+ # Intel C++ Compiler 9.1.
+ else if [ MATCH "(9[.]1)" : $(version) ]
+ { default_path = /opt/intel_cc_91/bin ; }
+ # Intel C++ Compiler 9.0.
+ else if [ MATCH "(9[.]0|9)" : $(version) ]
+ { default_path = /opt/intel_cc_90/bin ; }
+ # Intel C++ Compiler 8.1.
+ else if [ MATCH "(8[.]1)" : $(version) ]
+ { default_path = /opt/intel_cc_81/bin ; }
+ # Intel C++ Compiler 8.0 - this used to be the default, so now it's the
+ # fallback.
+ else
+ { default_path = /opt/intel_cc_80/bin ; }
+
+ if $(.debug-configuration)
+ {
+ ECHO "notice: default search path for intel-linux is" $(default_path) ;
+ }
+
+ command = [ common.get-invocation-command intel-linux : icpc
+ : $(command) : $(default_path) ] ;
+
+ common.handle-options intel-linux : $(condition) : $(command) : $(options) ;
+
+ local root = [ feature.get-values <root> : $(options) ] ;
+ local bin ;
+ if $(command) || $(root)
+ {
+ bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
+ root ?= $(bin:D) ;
+
+ local command-string = $(command:J=" ") ;
+ local version-output = [ SHELL "$(command-string) --version" ] ;
+ local real-version = [ MATCH "([0-9.]+)" : $(version-output) ] ;
+ local major = [ MATCH "([0-9]+).*" : $(real-version) ] ;
+
+ # If we failed to determine major version, use the behaviour for
+ # the current compiler.
+ if $(major) && [ numbers.less $(major) 10 ]
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-Ob0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-Ob1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-Ob2" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
+ }
+ else if $(major) && [ numbers.less $(major) 11 ]
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
+ }
+ else # newer version of intel do have -Os (at least 11+, don't know about 10)
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-Os" ;
+ flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
+ }
+
+ if $(root)
+ {
+ # Libraries required to run the executable may be in either
+ # $(root)/lib (10.1 and earlier)
+ # or
+ # $(root)/lib/architecture-name (11.0 and later:
+ local lib_path = $(root)/lib $(root:P)/lib/$(bin:B) ;
+ if $(.debug-configuration)
+ {
+ ECHO notice\: using intel libraries "::" $(condition) "::" $(lib_path) ;
+ }
+ flags intel-linux.link RUN_PATH $(condition) : $(lib_path) ;
+ }
+ }
+}
+
+SPACE = " " ;
+
+flags intel-linux.compile OPTIONS <warnings>off : -w0 ;
+flags intel-linux.compile OPTIONS <warnings>on : -w1 ;
+flags intel-linux.compile OPTIONS <warnings>all : -w2 ;
+
+rule compile.c++ ( targets * : sources * : properties * )
+{
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
+}
+
+actions compile.c++ bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" -c -xc++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -use-pch"$(PCH_FILE)" -c -o "$(<)" "$(>)"
+}
+
+rule compile.c ( targets * : sources * : properties * )
+{
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
+}
+
+actions compile.c bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" -c -xc $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -use-pch"$(PCH_FILE)" -c -o "$(<)" "$(>)"
+}
+
+rule compile.c++.pch ( targets * : sources * : properties * )
+{
+}
+#
+# Compiling a pch first deletes any existing *.pchi file, as Intel's compiler
+# won't over-write an existing pch: instead it creates filename$1.pchi, filename$2.pchi
+# etc - which appear not to do anything except take up disk space :-(
+#
+actions compile.c++.pch
+{
+ rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)"
+}
+
+actions compile.fortran
+{
+ "ifort" -c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+rule compile.c.pch ( targets * : sources * : properties * )
+{
+}
+
+actions compile.c.pch
+{
+ rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)"
+}
+
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>intel-linux-link-semaphore ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) $(USER_OPTIONS)
+}
+
+rule link.dll ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>intel-linux-link-semaphore ;
+}
+
+# Differ from 'link' above only by -shared.
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) $(USER_OPTIONS)
+}
+
+
+
diff --git a/src/boost/tools/build/src/tools/intel-vxworks.jam b/src/boost/tools/build/src/tools/intel-vxworks.jam
new file mode 100644
index 000000000..2a457c334
--- /dev/null
+++ b/src/boost/tools/build/src/tools/intel-vxworks.jam
@@ -0,0 +1,183 @@
+# Copyright Wind River 2017.
+# 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 intel ;
+import feature : feature ;
+import os ;
+import toolset ;
+import toolset : flags ;
+import gcc ;
+import common ;
+import errors ;
+import generators ;
+
+feature.extend-subfeature toolset intel : platform : vxworks ;
+
+toolset.inherit-generators intel-vxworks
+ <toolset>intel <toolset-intel:platform>vxworks
+ : gcc
+ # Don't inherit PCH generators. They were not tested, and probably
+ # don't work for this compiler.
+ : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
+ ;
+
+generators.override intel-vxworks.prebuilt : builtin.lib-generator ;
+generators.override intel-vxworks.prebuilt : builtin.prebuilt ;
+generators.override intel-vxworks.searched-lib-generator : searched-lib-generator ;
+
+toolset.inherit-rules intel-vxworks : gcc ;
+toolset.inherit-flags intel-vxworks : gcc
+ : <inlining>off <inlining>on <inlining>full <optimization>space
+ <warnings>off <warnings>all <warnings>on
+ <architecture>x86/<address-model>32
+ <architecture>x86/<address-model>64
+ ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Initializes the intel-vxworks toolset
+# version in mandatory
+# name (default icc) is used to invoke the specified intel compiler
+# compile and link options allow you to specify addition command line options for each version
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters intel-vxworks
+ : version $(version) ] ;
+
+ command = [ common.get-invocation-command intel-vxworks : icc
+ : $(command) : /opt/intel_cc_80/bin ] ;
+
+ common.handle-options intel-vxworks : $(condition) : $(command) : $(options) ;
+
+ # handle <library-path>
+ # local library-path = [ feature.get-values <library-path> : $(options) ] ;
+ # flags intel-vxworks.link USER_OPTIONS $(condition) : [ feature.get-values <dll-path> : $(options) ] ;
+
+ local root = [ feature.get-values <root> : $(options) ] ;
+ local bin ;
+ if $(command) || $(root)
+ {
+ bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
+ root ?= $(bin:D) ;
+
+ if $(root)
+ {
+ # Libraries required to run the executable may be in either
+ # $(root)/lib (10.1 and earlier)
+ # or
+ # $(root)/lib/architecture-name (11.0 and later:
+ local lib_path = $(root)/lib $(root:P)/lib/$(bin:B) ;
+ if $(.debug-configuration)
+ {
+ ECHO notice\: using intel libraries "::" $(condition) "::" $(lib_path) ;
+ }
+ flags intel-vxworks.link RUN_PATH $(condition) : $(lib_path) ;
+ }
+ }
+
+ local m = [ MATCH (..).* : $(version) ] ;
+ local n = [ MATCH (.)\\. : $(m) ] ;
+ if $(n) {
+ m = $(n) ;
+ }
+
+ local major = $(m) ;
+
+
+ flags intel-vxworks.compile OPTIONS $(condition)/<inlining>off : -inline-level=0 ;
+ flags intel-vxworks.compile OPTIONS $(condition)/<inlining>on : -inline-level=1 ;
+ flags intel-vxworks.compile OPTIONS $(condition)/<inlining>full : -inline-level=2 ;
+
+ flags intel-vxworks.link OPTIONS $(condition)/<runtime-link>static : [ os.environ LDFLAGS_STATIC ] ;
+ flags intel-vxworks.link OPTIONS $(condition)/<runtime-link>shared : [ os.environ LDFLAGS_DYNAMIC ] ;
+ flags intel-vxworks.compile OPTIONS $(condition)/<link>shared : -fPIC ;
+
+ local minor = [ MATCH ".*\\.(.).*" : $(version) ] ;
+
+
+}
+
+SPACE = " " ;
+
+flags intel-vxworks.compile OPTIONS <cflags> ;
+flags intel-vxworks.compile.c++ OPTIONS <cxxflags> ;
+flags intel-vxworks.compile INCLUDES <include> ;
+
+
+.cpu-type-em64t = prescott nocona core2 corei7 corei7-avx core-avx-i
+ conroe conroe-xe conroe-l allendale merom
+ merom-xe kentsfield kentsfield-xe penryn wolfdale
+ yorksfield nehalem sandy-bridge ivy-bridge haswell ;
+.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
+ athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2 ;
+.cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ;
+
+#flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>32 : -m32 ; # -mcmodel=small ;
+#flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>64 : -m64 ; # -mcmodel=large ;
+
+flags intel-vxworks.compile.c OPTIONS <warnings>off : -w0 ;
+flags intel-vxworks.compile.c OPTIONS <warnings>on : -w1 ;
+flags intel-vxworks.compile.c OPTIONS <warnings>all : -w2 ;
+
+flags intel-vxworks.compile.c++ OPTIONS <warnings>off : -w0 ;
+flags intel-vxworks.compile.c++ OPTIONS <warnings>on : -w1 ;
+flags intel-vxworks.compile.c++ OPTIONS <warnings>all : -w2 ;
+
+actions compile.c
+{
+ "$(CONFIG_COMMAND)" -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+flags intel-vxworks ARFLAGS <archiveflags> ;
+
+.AR = ar ;
+
+rule archive ( targets * : sources * : properties * )
+{
+ # Always remove archive and start again.
+ # of the archive.
+ #
+ local clean.a = $(targets[1])(clean) ;
+ TEMPORARY $(clean.a) ;
+ NOCARE $(clean.a) ;
+ LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
+ DEPENDS $(clean.a) : $(sources) ;
+ DEPENDS $(targets) : $(clean.a) ;
+ common.RmTemps $(clean.a) : $(targets) ;
+}
+
+actions piecemeal archive
+{
+ "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
+}
+
+flags intel-vxworks.link USER_OPTIONS <linkflags> ;
+
+# Declare actions for linking
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the 'link' action, since
+ # running N links in parallel is just slower.
+ JAM_SEMAPHORE on $(targets) = <s>intel-vxworks-link-semaphore ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
+}
diff --git a/src/boost/tools/build/src/tools/intel-win.jam b/src/boost/tools/build/src/tools/intel-win.jam
new file mode 100644
index 000000000..f79fd530a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/intel-win.jam
@@ -0,0 +1,514 @@
+# Copyright Vladimir Prus 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)
+
+# Importing common is needed because the rules we inherit here depend on it.
+# That is nasty.
+import common ;
+import errors ;
+import feature ;
+import intel ;
+import msvc ;
+import os ;
+import set ;
+import toolset ;
+import generators ;
+import type ;
+import path ;
+
+feature.extend-subfeature toolset intel : platform : win ;
+
+toolset.inherit-generators intel-win <toolset>intel <toolset-intel:platform>win : msvc ;
+toolset.inherit-flags intel-win : msvc : : YLOPTION ;
+toolset.inherit-rules intel-win : msvc ;
+
+# Override default do-nothing generators.
+generators.override intel-win.compile.c.pch : pch.default-c-pch-generator ;
+generators.override intel-win.compile.c++.pch : pch.default-cpp-pch-generator ;
+generators.override intel-win.compile.rc : rc.compile.resource ;
+generators.override intel-win.compile.mc : mc.compile ;
+
+toolset.flags intel-win.compile PCH_SOURCE <pch>on : <pch-source> ;
+
+toolset.add-requirements <toolset>intel-win,<runtime-link>shared:<threading>multi ;
+
+# Initializes the intel toolset for windows
+rule init ( version ? : # the compiler version
+ command * : # the command to invoke the compiler itself
+ options * # Additional option: <compatibility>
+ # either 'vc6', 'vc7', 'vc7.1'
+ # or 'native'(default).
+ )
+{
+ if $(version)
+ {
+ configure $(version) : $(command) : $(options) ;
+ }
+ else
+ {
+ if $(command)
+ {
+ errors.error "Autodetect of version from command not implemented!" ;
+ }
+ local intel_versions = [ get-autodetect-versions () ] ;
+ if ! $(intel_versions)
+ {
+ errors.error "No intel compiler version found!" ;
+ }
+ else
+ {
+ local msvc-version = [ feature.get-values <compatibility> : $(options) ] ; # On auto config mode the user can still request a msvc backend. If some intel compiler doesn't support it, don't try to configure it!
+ msvc-version = [ get-msvc-version-from-vc-string $(msvc-version) ] ;
+ for local v in $(intel_versions)
+ {
+ if [ is-msvc-supported $(v) : $(msvc-version) ]
+ {
+ configure $(v) : : $(options) ;
+ }
+ }
+ }
+ }
+}
+
+local rule configure ( version ? : command * : options * )
+{
+ local compatibility =
+ [ feature.get-values <compatibility> : $(options) ] ;
+ # Allow to specify toolset and visual studio backend from commandline .e.g --toolset=intel-14.0-vc10
+ local vc_in_version = [ MATCH "(vc[0-9]+(\\.[0-9]+)?)$" : $(version) ] ;
+ vc_in_version = $(vc_in_version[1]) ;
+ if $(compatibility) && $(vc_in_version)
+ {
+ if $(compatibility) != $(vc_in_version)
+ {
+ errors.error "feature compatibility and vc version in toolset present!" ;
+ }
+ }
+
+ if $(vc_in_version) && ! $(compatibility)
+ {
+ # vc Version must be stripped before check-init-parameters is called!
+ version = [ MATCH (.+)-vc.+$ : $(version) ] ;
+
+ compatibility = $(vc_in_version) ;
+ options += <compatibility>$(vc_in_version) ;
+ }
+ if $(compatibility)
+ {
+ configure-really $(version) : $(command) : $(options) : $(compatibility) ;
+ }
+ else
+ {
+ local msvc_versions = [ feature.values <toolset-msvc:version> ] ;
+ if ! $(msvc_versions)
+ {
+ ECHO notice\: no msvc versions detected. trying auto detect ;
+ toolset.using msvc : all ;
+ msvc_versions = [ feature.values <toolset-msvc:version> ] ;
+ }
+ if ! $(.iclvars-$(version)-supported-vcs)
+ {
+ errors.error "Supported msvc versions not known for intel $(version)" ;
+ }
+
+ for local v in $(msvc_versions)
+ {
+ if [ MATCH "($(v))" : $(.iclvars-$(version)-supported-vcs) ]
+ {
+ # Strip trailing .0 from msvc version as intel compiler uses atm only major version for Qvc
+ local m = [ MATCH "([0-9]+).0$" : $(v) ] ;
+ if $(m)
+ {
+ v = $(m) ;
+ }
+ v = "vc$(v)" ;
+ local options_really = $(options) ;
+ options_really += <compatibility>$(v) ;
+ if $(.debug-configuration)
+ {
+ ECHO "configure: intel version: $(version) msvc version: $(v)" ;
+ }
+ configure-really $(version) : $(command) : $(options) : $(v) ;
+ }
+ }
+ if ! [ feature.values <toolset-intel:version> ]
+ {
+ errors.error "Failed to register an intel toolset!" ;
+ }
+ }
+}
+
+local rule configure-really ( version ? : command * : options * : compatibility )
+{
+ local rewrite-setupscript = [ feature.get-values <rewrite-setup-scripts> : $(options) ] ;
+ local condition = [ common.check-init-parameters intel-win
+ : version $(version) : compatibility $(compatibility) ] ;
+
+ local m = [ MATCH "([0-9]+).*" : $(version) ] ;
+ local major = $(m[1]) ;
+ if ! $(major)
+ {
+ errors.error "Major version not found: $(version)" ;
+ }
+
+ local msvc-version = [ get-msvc-version-from-vc-string $(compatibility) ] ;
+ if ! $(msvc-version)
+ {
+ errors.user-error "Invalid value for compatibility option:"
+ $(compatibility) ;
+ }
+
+ command = [ get-compiler-invocation-cmd $(major) : $(command) ] ;
+
+ common.handle-options intel-win : $(condition) : $(command) : $(options) ;
+
+ local root = [ feature.get-values <root> : $(options) ] ;
+ if $(command) || $(root)
+ {
+ local bin = [ common.get-absolute-tool-path $(command[-1]) ] ;
+ if $(major) >= 12
+ {
+ bin = [ path.make $(bin) ] ;
+ bin = [ path.parent $(bin) ] ;
+ }
+ root ?= $(bin) ;
+ root = $(root)/ ;
+ }
+
+ local setup ;
+ setup = [ path.glob $(root) : iclvars_*.bat ] ;
+ if ! $(setup)
+ {
+ setup = [ path.join $(root) "iclvars.bat" ] ;
+ setup = [ path.native $(setup) ] ;
+ }
+
+ local target_types ;
+ local iclvars_vs_arg ;
+ if $(major) >= 12
+ {
+ # if we have a known intel toolset check for visual studio compatibility
+ # if not trust parameters
+ if ! [ is-msvc-supported $(version) : $(msvc-version) ]
+ {
+ errors.error "msvc $(msvc-version) not supported for intel toolset version $(version)" ;
+ }
+ if $(.iclvars-version-alias-$(compatibility))
+ {
+ iclvars_vs_arg = $(.iclvars-version-alias-$(compatibility)) ;
+ }
+ else
+ {
+ errors.error "Don't know what parameter to pass for vc version ( $(compatibility) )" ;
+ }
+ # There are two possible paths for the 64-bit intel compiler,
+ # one for the IA32-Intel64 cross compiler, and one for the native
+ # 64 bit compiler. We prefer the latter one if it's installed,
+ # and don't rely on whether the OS reports whether we're 64 or 32 bit
+ # as that really only tells us which subsystem bjam is running in:
+ #
+ local intel64_path = [ path.join $(root) intel64 ] ;
+ if [ path.glob $(intel64_path) : icl.exe ]
+ {
+ target_types = ia32 intel64 ;
+ }
+ else
+ {
+ target_types = ia32 ia32_intel64 ;
+ }
+ }
+ else
+ {
+ target_types = default ;
+ iclvars_vs_arg = $(compatibility) ;
+ }
+
+ local default-assembler-intel64 = ml64 ;
+ local default-assembler-ia32_intel64 = ml64 ;
+ local default-assembler-ia32 = "ml -coff" ;
+ assembler = [ feature.get-values <assembler> : $(options) ] ;
+
+ for local c in $(target_types)
+ {
+ local cpu-conditions ;
+ local setup-call ;
+ if $(major) >= 12
+ {
+ cpu-conditions = $(condition)/$(.cpu-arch-$(c)) ;
+
+ if ! $(setup)
+ {
+ # No setup script
+ }
+ else if $(rewrite-setupscript) = off || [ os.name ] != NT
+ {
+ setup-call = "call \"$(setup)\" $(c) $(iclvars_vs_arg) > nul " ;
+ }
+ else
+ {
+ if $(rewrite-setupscript) = always
+ {
+ toolset.flags intel-win .REWRITE-SETUP $(cpu-conditions) : true ;
+ }
+ toolset.flags intel-win .SETUP-SCRIPT $(cpu-conditions) : $(setup) ;
+ toolset.flags intel-win .SETUP-OPTIONS $(cpu-conditions) : "$(c) $(iclvars_vs_arg)" ;
+ }
+ }
+ else
+ {
+ setup-call = "call \""$(setup)"\" $(compatibility) > nul " ;
+ cpu-conditions = $(condition) ;
+ }
+
+ if $(setup-call)
+ {
+ if [ os.name ] = NT
+ {
+ setup-call = $(setup-call)"\n " ;
+ }
+ else
+ {
+ setup-call = "cmd /S /C "$(setup-call)" \"&&\" " ;
+ }
+ toolset.flags intel-win .SETUP $(cpu-conditions) : $(setup-call) ;
+ }
+
+ if $(.debug-configuration)
+ {
+ for local cond in $(cpu-conditions)
+ {
+ ECHO "notice: [intel-cfg] condition: '$(cond)', setup: '$(setup-call)'" ;
+ }
+ }
+
+ local cpu-assembler = $(assembler) ;
+ cpu-assembler ?= $(default-assembler-$(c)) ;
+
+ toolset.flags intel-win.compile .CC $(cpu-conditions) : icl ;
+ toolset.flags intel-win.link .LD $(cpu-conditions) : xilink /nologo ;
+ toolset.flags intel-win.archive .LD $(cpu-conditions) : xilink /lib /nologo ;
+ toolset.flags intel-win.link .MT $(cpu-conditions) : mt -nologo ;
+ toolset.flags intel-win.compile .ASM $(cpu-conditions) : $(cpu-assembler) -nologo ;
+ toolset.flags intel-win.compile .MC $(cpu-conditions) : mc ;
+ toolset.flags intel-win.compile .RC $(cpu-conditions) : rc ;
+ }
+
+ # Depending on the settings, running of tests require some runtime DLLs.
+ toolset.flags intel-win RUN_PATH $(condition) : $(root) ;
+
+
+ local C++FLAGS ;
+
+ C++FLAGS += /nologo ;
+
+ # Reduce the number of spurious error messages
+ C++FLAGS += /Qwn5 /Qwd985 ;
+
+ # Enable ADL
+ C++FLAGS += -Qoption,c,--arg_dep_lookup ; #"c" works for C++, too
+
+ # Disable Microsoft "secure" overloads in Dinkumware libraries since they
+ # cause compile errors with Intel versions 9 and 10.
+ if $(major) < 12
+ {
+ C++FLAGS += -D_SECURE_SCL=0 ;
+ }
+
+ if $(major) > 5
+ {
+ C++FLAGS += "/Zc:forScope" ; # Add support for correct for loop scoping.
+ }
+
+ # Add options recognized only by intel7 and above.
+ if $(major) >= 7
+ {
+ C++FLAGS += /Qansi_alias ;
+ }
+
+ if $(compatibility) = vc6
+ {
+ C++FLAGS +=
+ # Emulate VC6
+ /Qvc6
+
+ # No wchar_t support in vc6 dinkum library. Furthermore, in vc6
+ # compatibility-mode, wchar_t is not a distinct type from unsigned
+ # short.
+ -DBOOST_NO_INTRINSIC_WCHAR_T
+ ;
+ }
+ else
+ {
+ if $(major) > 5
+ {
+ # Add support for wchar_t
+ C++FLAGS += "/Zc:wchar_t"
+ # Tell the dinkumware library about it.
+ -D_NATIVE_WCHAR_T_DEFINED
+ ;
+ }
+ }
+
+ if $(compatibility) && $(compatibility) != native
+ {
+ C++FLAGS += /Q$(compatibility) ;
+ }
+ else
+ {
+ C++FLAGS +=
+ -Qoption,cpp,--arg_dep_lookup
+ # The following options were intended to disable the Intel compiler's
+ # 'bug-emulation' mode, but were later reported to be causing ICE with
+ # Intel-Win 9.0. It is not yet clear which options can be safely used.
+ # -Qoption,cpp,--const_string_literals
+ # -Qoption,cpp,--new_for_init
+ # -Qoption,cpp,--no_implicit_typename
+ # -Qoption,cpp,--no_friend_injection
+ # -Qoption,cpp,--no_microsoft_bugs
+ ;
+ }
+
+ toolset.flags intel-win CFLAGS $(condition) : $(C++FLAGS) ;
+ # By default, when creating PCH, intel adds 'i' to the explicitly
+ # specified name of the PCH file. Of course, B2 is not
+ # happy when compiler produces not the file it was asked for.
+ # The option below stops this behaviour.
+ toolset.flags intel-win CFLAGS $(condition) : -Qpchi- ;
+
+ if ! $(compatibility)
+ {
+ # If there's no backend version, assume 7.1.
+ compatibility = vc7.1 ;
+ }
+
+ msvc-version = [ msvc.resolve-possible-msvc-version-alias $(msvc-version) ] ;
+ msvc.configure-version-specific intel-win : $(msvc-version) : $(condition) ;
+}
+
+local rule get-autodetect-versions
+{
+ local result ;
+ for local v in $(.intel-autodetect-versions)
+ {
+ local major = [ MATCH "([0-9]+).*" : $(v) ] ; # Use only major version
+ if [ get-icl-path-from-environment $(major) ]
+ {
+ result += $(v) ;
+ }
+ }
+ return $(result) ;
+}
+
+local rule get-icl-path-from-environment ( major_version )
+{
+ local path = [ os.environ ICPP_COMPILER$(major_version) ] ;
+ if $(path)
+ {
+ path = [ path.make $(path) ] ;
+ local cmdpath ;
+ local subdirs = $(.icl-target-subdirectories) ;
+ while $(subdirs)
+ {
+ cmdpath = [ path.join $(path) "bin/$(subdirs[0])/icl.exe" ] ;
+ cmdpath = [ path.native $(cmdpath) ] ;
+ if [ path.exists $(cmdpath) ]
+ {
+ subdirs = ;
+ } else {
+ cmdpath = ;
+ subdirs = $(subdirs[2-]) ;
+ }
+ }
+ path = $(cmdpath) ;
+ }
+ return $(path) ;
+}
+
+local rule get-compiler-invocation-cmd ( major_version : command * )
+{
+ if $(command)
+ {
+ return [ common.get-invocation-command intel-win : icl.exe : $(command) ] ;
+ }
+ else
+ {
+ local path = [ get-icl-path-from-environment $(major_version) ] ;
+ return [ common.get-invocation-command intel-win : icl.exe : $(path) ] ;
+ }
+}
+
+local rule is-msvc-supported ( intel-version : msvc-version )
+{
+ if ! $(msvc-version)
+ {
+ return true ;
+ }
+ else
+ {
+ if $(.iclvars-$(intel-version)-supported-vcs)
+ {
+ if [ MATCH "($(msvc-version))" : $(.iclvars-$(intel-version)-supported-vcs) ]
+ {
+ return true ;
+ }
+ }
+ else
+ {
+ return true ;
+ }
+ }
+}
+
+local rule get-msvc-version-from-vc-string ( vc-string )
+{
+ local r = [ MATCH "^vc([0-9]+(\\.[0-9]+)?)$" : $(vc-string) ] ;
+ return $(r[1]) ;
+}
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Copied from msvc.jam
+# Supported CPU architectures.
+.cpu-arch-ia32 =
+ <architecture>/<address-model>
+ <architecture>/<address-model>32
+ <architecture>x86/<address-model>
+ <architecture>x86/<address-model>32 ;
+
+.cpu-arch-intel64 =
+ <architecture>/<address-model>64
+ <architecture>x86/<address-model>64 ;
+
+.cpu-arch-ia32_intel64 =
+ <architecture>/<address-model>64
+ <architecture>x86/<address-model>64 ;
+
+.intel-autodetect-versions = 14.0 13.0 12.0 ;
+.iclvars-12.0-supported-vcs = "10.0 9.0 8.0" ;
+.iclvars-12.1-supported-vcs = "10.0 9.0 8.0" ;
+.iclvars-13.0-supported-vcs = "11.0 10.0 9.0" ;
+.iclvars-14.0-supported-vcs = "12.0 11.0 10.0 9.0" ;
+.iclvars-15.0-supported-vcs = "12.0 11.0 10.0 9.0" ;
+.iclvars-16.0-supported-vcs = "14.0 12.0 11.0 10.0 9.0" ;
+.iclvars-17.0-supported-vcs = "14.1 14.0 12.0 11.0 10.0" ;
+.iclvars-18.0-supported-vcs = "14.1 14.0 12.0 11.0 10.0" ;
+.iclvars-19.0-supported-vcs = "14.2 14.1 14.0 12.0" ;
+.iclvars-19.1-supported-vcs = "14.2 14.1 14.0 12.0" ;
+.iclvars-version-alias-vc14.2 = vs2019 ;
+.iclvars-version-alias-vc14.1 = vs2017 ;
+.iclvars-version-alias-vc14 = vs2015 ;
+.iclvars-version-alias-vc12 = vs2013 ;
+.iclvars-version-alias-vc11 = vs2012 ;
+.iclvars-version-alias-vc10 = vs2010 ;
+.iclvars-version-alias-vc9 = vs2008 ;
+.iclvars-version-alias-vc8 = vs2005 ;
+.icl-target-subdirectories = ia32 ia32_intel64 intel64 ;
+
+toolset.flags intel-win.link LIBRARY_OPTION <toolset>intel : "" ;
+
+toolset.flags intel-win YLOPTION ;
+
diff --git a/src/boost/tools/build/src/tools/intel.jam b/src/boost/tools/build/src/tools/intel.jam
new file mode 100644
index 000000000..0c602a8c0
--- /dev/null
+++ b/src/boost/tools/build/src/tools/intel.jam
@@ -0,0 +1,84 @@
+# Copyright Vladimir Prus 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.intel]]
+= Intel C++
+
+The `intel-*` modules support the Intel C++ command-line compiler.
+
+The module is initialized using the following syntax:
+
+----
+using intel : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If compiler command is not specified, then B2 will look in PATH
+for an executable `icpc` (on Linux), or `icl.exe` (on Windows).
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+`root`::
+For the Linux version, specifies the root directory of the compiler installation.
+This option is necessary only if it is not possible to detect this information
+from the compiler command -- for example if the specified compiler command is
+a user script. For the Windows version, specifies the directory where the
+`iclvars.bat` file for configuring the compiler exists. Specifying the `root`
+option without specifying the compiler command allows the end-user not to have
+to worry about whether he is compiling 32-bit or 64-bit code, as the toolset will
+automatically configure the compiler for the appropriate address model and compiler
+command using the `iclvars.bat` batch file.
+
+|# # end::doc[]
+
+# This is a generic 'intel' toolset. Depending on the current
+# system, it forwards either to 'intel-linux' or 'intel-win'
+# modules.
+
+import feature ;
+import os ;
+import toolset ;
+
+feature.extend toolset : intel ;
+feature.subfeature toolset intel : platform : : propagated link-incompatible ;
+
+rule init ( * : * )
+{
+ if [ os.name ] = LINUX
+ {
+ toolset.using intel-linux :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+ else if [ os.name ] = MACOSX
+ {
+ toolset.using intel-darwin :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+ else
+ {
+ toolset.using intel-win :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+}
diff --git a/src/boost/tools/build/src/tools/lex.jam b/src/boost/tools/build/src/tools/lex.jam
new file mode 100644
index 000000000..e85d1d1ad
--- /dev/null
+++ b/src/boost/tools/build/src/tools/lex.jam
@@ -0,0 +1,25 @@
+# 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)
+
+import type ;
+import generators ;
+import feature ;
+import toolset : flags ;
+
+feature.feature flex.prefix : : free ;
+type.register LEX : l ;
+type.register LEX++ : ll ;
+generators.register-standard lex.lex : LEX : C ;
+generators.register-standard lex.lex : LEX++ : CPP ;
+
+rule init ( )
+{
+}
+
+flags lex.lex PREFIX <flex.prefix> ;
+
+actions lex
+{
+ flex -P$(PREFIX) -o$(<) $(>)
+}
diff --git a/src/boost/tools/build/src/tools/libjpeg.jam b/src/boost/tools/build/src/tools/libjpeg.jam
new file mode 100644
index 000000000..f267ecb73
--- /dev/null
+++ b/src/boost/tools/build/src/tools/libjpeg.jam
@@ -0,0 +1,234 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the libjpeg library
+#
+# After 'using libjpeg', the following targets are available:
+#
+# /libjpeg//libjpeg -- The libjpeg library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import property ;
+import property-set ;
+
+header = jpeglib.h ;
+
+# jpeglib.h requires stdio.h to be included first.
+header-test = "#include <stdio.h>\n#include <jpeglib.h>\n" ;
+
+names = jpeg ;
+
+sources = jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+# Initializes the libjpeg library.
+#
+# libjpeg can be configured either to use pre-existing binaries
+# or to build the library from source.
+#
+# Options for configuring a prebuilt libjpeg::
+#
+# <search>
+# The directory containing the libjpeg binaries.
+# <name>
+# Overrides the default library name.
+# <include>
+# The directory containing the libjpeg headers.
+#
+# If none of these options is specified, then the environmental
+# variables LIBJPEG_LIBRARY_PATH, LIBJPEG_NAME, and LIBJPEG_INCLUDE will
+# be used instead.
+#
+# Options for building libjpeg from source::
+#
+# <source>
+# The libjpeg source directory. Defaults to the environmental variable
+# LIBJPEG_SOURCE.
+# <tag>
+# A rule which computes the actual name of the compiled
+# libraries based on the build properties. Ignored
+# when using precompiled binaries.
+# <build-name>
+# The base name to use for the compiled library. Ignored
+# when using precompiled binaries.
+#
+# Examples::
+#
+# # Find libjpeg in the default system location
+# using libjpeg ;
+# # Build libjpeg from source
+# using libjpeg : 8c : <source>/home/steven/libjpeg-8c ;
+# # Find libjpeg in /usr/local
+# using libjpeg : 8c
+# : <include>/usr/local/include <search>/usr/local/lib ;
+# # Build libjpeg from source for msvc and find
+# # prebuilt binaries for gcc.
+# using libjpeg : 8c : <source>C:/Devel/src/libjpeg-8c : <toolset>msvc ;
+# using libjpeg : 8c : : <toolset>gcc ;
+#
+rule init (
+ version ?
+ # The libjpeg version (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the libjpeg target
+
+ : is-default ?
+ # Default configurations are only used when libjpeg
+ # has not yet been configured. This option is
+ # deprecated. A configuration will be treated
+ # as a default when none of <include>, <search>,
+ # <name>, and <source> are present.
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project libjpeg ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local source-path = [ feature.get-values <source> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+ local tag = [ feature.get-values <tag> : $(options) ] ;
+ local build-name = [ feature.get-values <build-name> : $(options) ] ;
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ if ! $(library-path) && ! $(include-path) && ! $(source-path) && ! $(library-name)
+ {
+ is-default = true ;
+ }
+
+ # Ignore environmental LIBJPEG_SOURCE if this initialization
+ # requested to search for a specific pre-built library.
+ if $(library-path) || $(include-path) || $(library-name)
+ {
+ if $(source-path) || $(tag) || $(build-name)
+ {
+ errors.user-error "incompatible options for libjpeg:"
+ [ property.select <search> <include> <name> : $(options) ] "and"
+ [ property.select <source> <tag> <build-name> : $(options) ] ;
+ }
+ }
+ else
+ {
+ source-path ?= [ modules.peek : LIBJPEG_SOURCE ] ;
+ }
+
+ if $(.configured.$(condition))
+ {
+ if $(is-default)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [libjpeg] libjpeg is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "libjpeg is already configured" ;
+ }
+ return ;
+ }
+ else if $(source-path)
+ {
+ build-name ?= jpeg ;
+ library-id = [ CALC $(library-id) + 1 ] ;
+ tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
+ if $(tag)
+ {
+ tag = [ indirect.make $(tag) : [ $(caller).project-module ] ] ;
+ }
+ sources = [ path.glob $(source-path) : $(sources) ] ;
+ if $(.debug)
+ {
+ ECHO "notice: [libjpeg] Building libjpeg from source as $(build-name)" ;
+ if $(condition)
+ {
+ ECHO "notice: [libjpeg] Condition" [ $(condition).raw ] ;
+ }
+ if $(sources)
+ {
+ ECHO "notice: [libjpeg] found libjpeg source in $(source-path)" ;
+ }
+ else
+ {
+ ECHO "warning: [libjpeg] could not find libjpeg source in $(source-path)" ;
+ }
+ }
+ local target ;
+ if $(sources) {
+ target = [ targets.create-typed-target LIB : $(.project)
+ : $(build-name).$(library-id)
+ : $(sources)
+ : $(requirements)
+ <tag>@$(tag)
+ <include>$(source-path)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ :
+ : <include>$(source-path) ] ;
+ }
+
+ local mt = [ new ac-library libjpeg : $(.project) : $(condition) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ if $(target)
+ {
+ $(mt).set-target $(target) ;
+ }
+ targets.main-target-alternative $(mt) ;
+ } else {
+ if $(.debug)
+ {
+ ECHO "notice: [libjpeg] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [libjpeg] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local mt = [ new ac-library libjpeg : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) : $(root) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-header-test $(header-test) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
+ }
+ .configured.$(condition) = true ;
+}
diff --git a/src/boost/tools/build/src/tools/libpng.jam b/src/boost/tools/build/src/tools/libpng.jam
new file mode 100644
index 000000000..dc49b6dbd
--- /dev/null
+++ b/src/boost/tools/build/src/tools/libpng.jam
@@ -0,0 +1,229 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the libpng library
+#
+# After 'using libpng', the following targets are available:
+#
+# /libpng//libpng -- The libpng library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import property ;
+import property-set ;
+
+header = png.h ;
+
+# On Windows, binary distributions of libpng and package managers
+# name the library differently (e.g. vcpkg installs libpng16.lib).
+# Listing popular names increases chances of successful look-up.
+names = libpng libpng16 png png16 ;
+
+sources = png.c pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c
+ pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+# Initializes the libpng library.
+#
+# libpng can be configured either to use pre-existing binaries
+# or to build the library from source.
+#
+# Options for configuring a prebuilt libpng::
+#
+# <search>
+# The directory containing the libpng binaries.
+# <name>
+# Overrides the default library name.
+# <include>
+# The directory containing the libpng headers.
+#
+# If none of these options is specified, then the environmental
+# variables LIBPNG_LIBRARY_PATH, LIBPNG_NAME, and LIBPNG_INCLUDE will
+# be used instead.
+#
+# Options for building libpng from source::
+#
+# <source>
+# The libpng source directory. Defaults to the environmental variable
+# LIBPNG_SOURCE.
+# <tag>
+# A rule which computes the actual name of the compiled
+# libraries based on the build properties. Ignored
+# when using precompiled binaries.
+# <build-name>
+# The base name to use for the compiled library. Ignored
+# when using precompiled binaries.
+#
+# Examples::
+#
+# # Find libpng in the default system location
+# using libpng ;
+# # Build libpng from source
+# using libpng : 1.5.4 : <source>/home/steven/libpng-1.5.4 ;
+# # Find libpng in /usr/local
+# using libpng : 1.5.4
+# : <include>/usr/local/include <search>/usr/local/lib ;
+# # Build libpng from source for msvc and find
+# # prebuilt binaries for gcc.
+# using libpng : 1.5.4 : <source>C:/Devel/src/libpng-1.5.4 : <toolset>msvc ;
+# using libpng : 1.5.4 : : <toolset>gcc ;
+#
+rule init (
+ version ?
+ # The libpng version (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the libpng target
+
+ : is-default ?
+ # Default configurations are only used when libpng
+ # has not yet been configured. This option is
+ # deprecated. A configuration will be treated
+ # as a default when none of <include>, <search>,
+ # <name>, and <source> are present.
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project libpng ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local source-path = [ feature.get-values <source> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+ local tag = [ feature.get-values <tag> : $(options) ] ;
+ local build-name = [ feature.get-values <build-name> : $(options) ] ;
+
+ if ! $(library-path) && ! $(include-path) && ! $(source-path) && ! $(library-name)
+ {
+ is-default = true ;
+ }
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ # Ignore environmental LIBPNG_SOURCE if this initialization
+ # requested to search for a specific pre-built library.
+ if $(library-path) || $(include-path) || $(library-name)
+ {
+ if $(source-path) || $(tag) || $(build-name)
+ {
+ errors.user-error "incompatible options for libpng:"
+ [ property.select <search> <include> <name> : $(options) ] "and"
+ [ property.select <source> <tag> <build-name> : $(options) ] ;
+ }
+ }
+ else
+ {
+ source-path ?= [ modules.peek : LIBPNG_SOURCE ] ;
+ }
+
+ if $(.configured.$(condition))
+ {
+ if $(is-default)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [libpng] libpng is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "libpng is already configured" ;
+ }
+ return ;
+ }
+ else if $(source-path)
+ {
+ build-name ?= png ;
+ library-id = [ CALC $(library-id) + 1 ] ;
+ tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
+ if $(tag)
+ {
+ tag = [ indirect.make $(tag) : [ $(caller).project-module ] ] ;
+ }
+ sources = [ path.glob $(source-path) : $(sources) ] ;
+ if $(.debug)
+ {
+ ECHO "notice: [libpng] Building libpng from source as $(build-name)" ;
+ if $(condition)
+ {
+ ECHO "notice: [libpng] Condition" [ $(condition).raw ] ;
+ }
+ if $(sources)
+ {
+ ECHO "notice: [libpng] found libpng source in $(source-path)" ;
+ }
+ else
+ {
+ ECHO "warning: [libpng] could not find libpng source in $(source-path)" ;
+ }
+ }
+ local target ;
+ if $(sources) {
+ target = [ targets.create-typed-target LIB : $(.project)
+ : $(build-name).$(library-id)
+ : $(sources)
+ : $(requirements)
+ <tag>@$(tag)
+ <include>$(source-path)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <link>shared:<define>LIBPNG_DLL
+ :
+ : <include>$(source-path) ] ;
+ }
+
+ local mt = [ new ac-library libpng : $(.project) : $(condition) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ if $(target)
+ {
+ $(mt).set-target $(target) ;
+ }
+ targets.main-target-alternative $(mt) ;
+ } else {
+ if $(.debug)
+ {
+ ECHO "notice: [libpng] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [libpng] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local mt = [ new ac-library libpng : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) : $(root) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
+ }
+ .configured.$(condition) = true ;
+}
diff --git a/src/boost/tools/build/src/tools/libtiff.jam b/src/boost/tools/build/src/tools/libtiff.jam
new file mode 100644
index 000000000..f31561491
--- /dev/null
+++ b/src/boost/tools/build/src/tools/libtiff.jam
@@ -0,0 +1,227 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the libtiff library
+#
+# After 'using libtiff', the following targets are available:
+#
+# /libtiff//libtiff -- The libtiff library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import property ;
+import property-set ;
+
+header = tiff.h ;
+names = tiff ;
+
+sources = tif_aux.c tif_close.c tif_codec.c tif_color.c tif_compress.c tif_dir.c tif_dirinfo.c
+ tif_dirread.c tif_dirwrite.c tif_dumpmode.c tif_error.c tif_extension.c tif_fax3.c tif_fax3sm.c
+ tif_getimage.c tif_jbig.c tif_jpeg.c tif_jpeg_12.c tif_ojpeg.c tif_flush.c tif_luv.c tif_lzw.c
+ tif_next.c tif_open.c tif_packbits.c tif_pixarlog.c tif_predict.c tif_print.c tif_read.c tif_stream.cxx
+ tif_swab.c tif_strip.c tif_thunder.c tif_tile.c tif_version.c tif_warning.c tif_write.c tif_zip.c ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+# Initializes the libtiff library.
+#
+# libtiff can be configured either to use pre-existing binaries
+# or to build the library from source.
+#
+# Options for configuring a prebuilt libtiff::
+#
+# <search>
+# The directory containing the libtiff binaries.
+# <name>
+# Overrides the default library name.
+# <include>
+# The directory containing the libtiff headers.
+#
+# If none of these options is specified, then the environmental
+# variables LIBTIFF_LIBRARY_PATH, LIBTIFF_NAME, and LIBTIFF_INCLUDE will
+# be used instead.
+#
+# Options for building libtiff from source::
+#
+# <source>
+# The libtiff source directory. Defaults to the environmental variable
+# LIBTIFF_SOURCE.
+# <tag>
+# A rule which computes the actual name of the compiled
+# libraries based on the build properties. Ignored
+# when using precompiled binaries.
+# <build-name>
+# The base name to use for the compiled library. Ignored
+# when using precompiled binaries.
+#
+# Examples::
+#
+# # Find libtiff in the default system location
+# using libtiff ;
+# # Build libtiff from source
+# using libtiff : 4.0.1 : <source>/home/steven/libtiff-4.0.1 ;
+# # Find libtiff in /usr/local
+# using libtiff : 4.0.1
+# : <include>/usr/local/include <search>/usr/local/lib ;
+# # Build libtiff from source for msvc and find
+# # prebuilt binaries for gcc.
+# using libtiff : 4.0.1 : <source>C:/Devel/src/libtiff-4.0.1 : <toolset>msvc ;
+# using libtiff : 4.0.1 : : <toolset>gcc ;
+#
+rule init (
+ version ?
+ # The libtiff version (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the libtiff target
+
+ : is-default ?
+ # Default configurations are only used when libtiff
+ # has not yet been configured. This option is
+ # deprecated. A configuration will be treated
+ # as a default when none of <include>, <search>,
+ # <name>, and <source> are present.
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project libtiff ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local source-path = [ feature.get-values <source> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+ local tag = [ feature.get-values <tag> : $(options) ] ;
+ local build-name = [ feature.get-values <build-name> : $(options) ] ;
+
+ if ! $(library-path) && ! $(include-path) && ! $(source-path) && ! $(library-name)
+ {
+ is-default = true ;
+ }
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ # Ignore environmental LIBTIFF_SOURCE if this initialization
+ # requested to search for a specific pre-built library.
+ if $(library-path) || $(include-path) || $(library-name)
+ {
+ if $(source-path) || $(tag) || $(build-name)
+ {
+ errors.user-error "incompatible options for libtiff:"
+ [ property.select <search> <include> <name> : $(options) ] "and"
+ [ property.select <source> <tag> <build-name> : $(options) ] ;
+ }
+ }
+ else
+ {
+ source-path ?= [ modules.peek : LIBTIFF_SOURCE ] ;
+ }
+
+ if $(.configured.$(condition))
+ {
+ if $(is-default)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [libtiff] libtiff is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "libtiff is already configured" ;
+ }
+ return ;
+ }
+ else if $(source-path)
+ {
+ build-name ?= tiff ;
+ library-id = [ CALC $(library-id) + 1 ] ;
+ tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
+ if $(tag)
+ {
+ tag = [ indirect.make $(tag) : [ $(caller).project-module ] ] ;
+ }
+ sources = [ path.glob $(source-path) : $(sources) ] ;
+ if $(.debug)
+ {
+ ECHO "notice: [libtiff] Building libtiff from source as $(build-name)" ;
+ if $(condition)
+ {
+ ECHO "notice: [libtiff] Condition" [ $(condition).raw ] ;
+ }
+ if $(sources)
+ {
+ ECHO "notice: [libtiff] found libtiff source in $(source-path)" ;
+ }
+ else
+ {
+ ECHO "warning: [libtiff] could not find libtiff source in $(source-path)" ;
+ }
+ }
+ local target ;
+ if $(sources) {
+ target = [ targets.create-typed-target LIB : $(.project)
+ : $(build-name).$(library-id)
+ : $(sources)
+ : $(requirements)
+ <tag>@$(tag)
+ <include>$(source-path)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ :
+ : <include>$(source-path) ] ;
+ }
+
+ local mt = [ new ac-library libtiff : $(.project) : $(condition) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ if $(target)
+ {
+ $(mt).set-target $(target) ;
+ }
+ targets.main-target-alternative $(mt) ;
+ } else {
+ if $(.debug)
+ {
+ ECHO "notice: [libtiff] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [libtiff] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local mt = [ new ac-library libtiff : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) : $(root) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
+ }
+ .configured.$(condition) = true ;
+}
diff --git a/src/boost/tools/build/src/tools/link.jam b/src/boost/tools/build/src/tools/link.jam
new file mode 100644
index 000000000..3cf6e46f7
--- /dev/null
+++ b/src/boost/tools/build/src/tools/link.jam
@@ -0,0 +1,547 @@
+# Copyright 2012 Steven Watanabe
+# 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 os ;
+import targets ;
+import project ;
+import "class" : new ;
+import virtual-target ;
+import configure ;
+import path ;
+import property ;
+import property-set ;
+import common ;
+
+rule get-root-project ( project )
+{
+ # Find the root project.
+ local root-project = $(project) ;
+ root-project = [ $(root-project).project-module ] ;
+ while
+ [ project.attribute $(root-project) parent-module ] &&
+ [ project.attribute $(root-project) parent-module ] != user-config &&
+ [ project.attribute $(root-project) parent-module ] != project-config
+ {
+ root-project = [ project.attribute $(root-project) parent-module ] ;
+ }
+ return $(root-project) ;
+}
+
+TOUCH = [ common.file-touch-command ] ;
+
+actions touch {
+ $(TOUCH) "$(<)"
+}
+
+rule can-symlink ( project )
+{
+ if ! $(.can-symlink)
+ {
+ local root-project = [ get-root-project $(project) ] ;
+
+ local source-target = [ new file-target test-symlink-source : :
+ $(project) : [ new action : link.touch ] ] ;
+ local target = [ new file-target test-symlink : :
+ $(project) : [ new action $(source-target) : link.mklink ] ] ;
+
+ if [ configure.try-build $(target) : [ property-set.empty ] : "symlinks supported" ]
+ {
+ .can-symlink = true ;
+ }
+ else
+ {
+ .can-symlink = false ;
+ }
+ }
+ if $(.can-symlink) = true
+ {
+ return true ;
+ }
+}
+
+if [ os.name ] = NT
+{
+
+# Test for Windows junctions (mklink /J)
+rule can-junction ( project )
+{
+ if ! $(.can-junction)
+ {
+ local root-project = [ get-root-project $(project) ] ;
+
+ local source-target = [ new file-target test-junction-source : :
+ $(project) : [ new action : common.mkdir ] ] ;
+ local target = [ new file-target test-junction : :
+ $(project) : [ new action $(source-target) : link.junction ] ] ;
+
+ if [ configure.try-build $(target) : [ property-set.empty ] : "junctions supported" ]
+ {
+ .can-junction = true ;
+ }
+ else
+ {
+ .can-junction = false ;
+ }
+ }
+ if $(.can-junction) = true
+ {
+ return true ;
+ }
+}
+
+}
+else
+{
+
+.can-junction = false ;
+
+rule can-junction ( project )
+{
+}
+
+}
+
+rule can-hardlink ( project )
+{
+ if ! $(.can-hardlink)
+ {
+ local root-project = [ get-root-project $(project) ] ;
+
+ local source-target = [ new file-target test-hardlink-source : :
+ $(project) : [ new action : link.touch ] ] ;
+ # Use <location-prefix> so that the destination link is created
+ # in a different directory. AFS refuses to make hard links
+ # between files in different directories, so we want to check
+ # it.
+ local target = [ new file-target test-hardlink : :
+ $(project) : [ new action $(source-target) : link.hardlink
+ : [ new property-set <location-prefix>symlink ]
+ ] ] ;
+
+ if [ configure.try-build $(target) : [ property-set.empty ] : "hardlinks supported" ]
+ {
+ .can-hardlink = true ;
+ }
+ else
+ {
+ .can-hardlink = false ;
+ }
+ }
+ if $(.can-hardlink) = true
+ {
+ return true ;
+ }
+}
+
+class file-or-directory-reference : basic-target
+{
+ import virtual-target ;
+ import property-set ;
+ import path ;
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ 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 [ path.exists [ path.native $(location) ] ]
+ {
+ self.file-location = $(src-dir) ;
+ self.file-path = $(location) ;
+ }
+ }
+ }
+ }
+ return $(self.file-location) ;
+ }
+}
+
+class symlink-target-class : basic-target
+{
+ import path ;
+ import virtual-target ;
+ import link ;
+ import os ;
+ import type ;
+ rule construct ( name : source-target : property-set )
+ {
+ local location = [ path.join
+ [ $(source-target).path ] [ $(source-target).name ] ] ;
+ local files = [ path.glob-tree $(location) : * ] ;
+ local targets ;
+
+ # If we have symlinks, don't bother checking
+ # for hardlinks and junctions.
+ if ! [ link.can-symlink $(self.project) ]
+ {
+ link.can-junction $(self.project) ;
+ link.can-hardlink $(self.project) ;
+ }
+
+ if [ $(property-set).get <location> ]
+ {
+ property-set = [ property-set.create
+ [ property.select <location> : [ $(property-set).raw ] ] ] ;
+ }
+ else
+ {
+ local path,relative-to-build-dir = [ $(property-set).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) ] ;
+ }
+
+ property-set = [ property-set.create <location>$(path) ] ;
+ }
+
+ local a = [ new non-scanning-action $(source-target) :
+ link.do-link-recursively : $(property-set) ] ;
+
+ local t = [ new notfile-target $(name)
+ : $(self.project) : $(a) ] ;
+
+ return [ property-set.empty ] [ virtual-target.register $(t) ] ;
+ }
+}
+
+rule do-file-link
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ local source = [ path.native [ path.relative-to [ path.pwd ] $(>) ] ] ;
+ local old-source = [ on $(target) return $(LINK-SOURCE) ] ;
+ if $(old-source)
+ {
+ import errors ;
+ errors.user-error
+ Cannot create link $(target) to $(source). :
+ Link previously defined to another file, $(old-source[1]). ;
+ }
+ LINK-SOURCE on $(target) = $(source) $(.current-target) ;
+ LOCATE on $(target) = . ;
+ DEPENDS $(.current-target) : $(target) ;
+ if $(.can-symlink) = true
+ {
+ DEPENDS $(target) : $(source) ;
+ link.mklink $(target) : $(source) ;
+ }
+ else if $(.can-hardlink) = true
+ {
+ DEPENDS $(target) : $(source) ;
+ link.hardlink $(target) : $(source) ;
+ }
+ else
+ {
+ DEPENDS $(target) : $(source) ;
+ common.copy $(target) : $(source) ;
+ }
+}
+
+rule do-link
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ local source = [ path.native [ path.relative-to [ path.pwd ] $(>) ] ] ;
+ local relative = [ path.native [ path.relative-to [ path.parent $(<) ] $(>) ] ] ;
+ if ! [ on $(target) return $(MKLINK_OR_DIR) ]
+ {
+ LOCATE on $(target) = . ;
+ DEPENDS $(.current-target) : $(target) ;
+ mklink-or-dir $(target) : $(source) ;
+ }
+ if [ os.name ] = NT
+ {
+ if $(.can-symlink) = true
+ {
+ MKLINK_OR_DIR on $(target) = mklink /D \"$(target)\" \"$(relative)\" ;
+ }
+ else
+ {
+ # This function should only be called
+ # if either symlinks or junctions are supported.
+ # To get here $(.can-junction) must be true.
+ mklink-opt = /J ;
+ MKLINK_OR_DIR on $(target) = mklink /J \"$(target)\" \"$(source)\" ;
+ }
+ }
+ else
+ {
+ MKLINK_OR_DIR on $(target) = ln -s $(relative) $(target) ;
+ }
+}
+
+rule force-update
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ ALWAYS $(target) ;
+}
+
+rule do-split
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ if ! [ on $(target) return $(MKLINK_OR_DIR) ]
+ {
+ LOCATE on $(target) = . ;
+ DEPENDS $(.current-target) : $(target) ;
+ common.mkdir $(target) ;
+ }
+ MKLINK_OR_DIR on $(target) = mkdir \"$(target)\" ;
+}
+
+rule do-rm
+{
+ local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
+ ALWAYS $(target) ;
+ RM on $(target) = rmdir ;
+ link.rm $(target) ;
+}
+
+rule mklink-or-dir
+{
+ NOUPDATE $(<) ;
+}
+
+actions mklink-or-dir
+{
+ $(MKLINK_OR_DIR)
+}
+
+rule link-entries ( target : files * : split ? : deleted ? )
+{
+ for local s in $(files)
+ {
+ local t = [ path.join $(target) [ path.basename $(s) ] ] ;
+ if ! $(.known-dirs.$(t))
+ {
+ local t = [ path.native [ path.relative-to [ path.pwd ] $(t) ] ] ;
+ local s = [ path.native [ path.relative-to [ path.pwd ] $(target) ] ] ;
+ LOCATE on $(t) = . ;
+ DEPENDS $(t) : $(s) ;
+ NOUPDATE $(s) ;
+ }
+ if $(split)
+ {
+ link-recursively $(t) : $(s) : : $(deleted) ;
+ }
+ else
+ {
+ link-entries $(t) : [ path.glob $(s) : * ] ;
+ }
+ }
+ if ! $(.known-dirs.$(target))
+ {
+ .known-dirs.$(target) += $(files) ;
+ .known-dirs.base.$(target) = $(.current-target) ;
+ }
+}
+
+rule link-recursively ( target : source : no-recurse ? : deleted ? )
+{
+ if $(deleted) {
+ force-update $(target) ;
+ }
+
+ local split ;
+ if [ CHECK_IF_FILE [ path.native $(source) ] ]
+ {
+ do-file-link $(target) : $(source) ;
+ }
+ else if $(.known-dirs.$(target)) && ! $(no-recurse)
+ {
+ split = true ;
+ if ! $(.split-dirs.$(target))
+ {
+ if [ READLINK [ path.native $(target) ] ]
+ {
+ if ! $(deleted) {
+ do-rm $(target) ;
+ deleted = true ;
+ .deleted-dirs.$(target) = true ;
+ }
+ }
+ local .current-target = $(.known-dirs.base.$(target)) ;
+ for local s in $(.known-dirs.$(target))
+ {
+ local t = [ path.join $(target) [ path.basename $(s) ] ] ;
+ link-recursively $(t) : $(s) : flat : $(deleted) ;
+ }
+ do-split $(target) ;
+ }
+ else if $(.deleted-dirs.$(target))
+ {
+ deleted = true ;
+ }
+ }
+ else if [ path.exists [ path.native $(target) ] ] && ! $(deleted)
+ {
+ local link-target = [ READLINK [ path.native $(target) ] ] ;
+ if $(link-target)
+ {
+ local full-path =
+ [ path.root [ path.make $(link-target) ] [ path.parent $(target) ] ] ;
+ # HACK: Take advantage of the fact that path.glob
+ # normalizes its arguments. If full-path and
+ # source are different, but both are empty, they
+ # will compare equal, but that's okay because
+ # for the purposes of this module, empty directories
+ # are equivalent.
+ if [ path.glob $(full-path) : * ] != [ path.glob $(source) : * ]
+ {
+ if ! $(deleted) {
+ do-rm $(target) ;
+ deleted = true ;
+ .deleted-dirs.$(target) = true ;
+ }
+ do-split $(target) ;
+ split = true ;
+ }
+ }
+ else
+ {
+ do-split $(target) ;
+ split = true ;
+ }
+ }
+ else if $(.can-symlink) = false && $(.can-junction) = false
+ {
+ if [ READLINK [ path.native $(target) ] ]
+ {
+ if ! $(deleted) {
+ do-rm $(target) ;
+ deleted = true ;
+ .deleted-dirs.$(target) = true ;
+ }
+ }
+ do-split $(target) ;
+ split = true ;
+ }
+ else
+ {
+ do-link $(target) : $(source) ;
+ }
+
+ if $(split)
+ {
+ .split-dirs.$(target) = true ;
+ }
+
+ if ! $(no-recurse)
+ {
+ link-entries $(target) : [ path.glob $(source) : * ] : $(split) : $(deleted) ;
+ }
+}
+
+rule do-link-recursively ( target : source : properties * )
+{
+ local target-path = [ property.select <location> : $(properties) ] ;
+ local source-path = [ on $(source) return $(LOCATE) ] [ on $(source) return $(SEARCH) ] ;
+
+ local absolute-target = [ path.root
+ [ path.join [ path.make $(target-path[1]:G=) ]
+ [ path.basename [ path.make $(source:G=) ] ] ]
+ [ path.pwd ] ] ;
+
+ local absolute-source = [ path.root
+ [ path.root [ path.make $(source:G=) ]
+ [ path.make $(source-path[1]) ] ]
+ [ path.pwd ] ] ;
+
+ local .current-target = $(target) ;
+
+ link-recursively $(absolute-target) : $(absolute-source) ;
+}
+
+rule mklink
+{
+ local target-path = [ on $(<) return $(LOCATE) ] [ on $(<) return $(SEARCH) ] . ;
+ local source-path = [ on $(>) return $(LOCATE) ] [ on $(>) return $(SEARCH) ] . ;
+ local relative-path = [ path.relative-to
+ [ path.parent [ path.join [ path.root [ path.make $(target-path[1]) ] [ path.pwd ] ] [ path.make $(<:G=) ] ] ]
+ [ path.join [ path.root [ path.make $(source-path[1]) ] [ path.pwd ] ] [ path.make $(>:G=) ] ] ] ;
+
+ PATH_TO_SOURCE on $(<) = [ path.native $(relative-path) ] ;
+}
+
+if [ os.name ] = NT
+{
+
+actions junction
+{
+ if exist "$(<)" rmdir "$(<)"
+ mklink /J "$(<)" "$(>)"
+}
+
+actions mklink
+{
+ if exist "$(<)" del "$(<)"
+ mklink "$(<)" "$(PATH_TO_SOURCE)"
+}
+
+actions hardlink
+{
+ if exist "$(<)" del "$(<)"
+ mklink /H "$(<)" "$(>)"
+}
+
+actions rm
+{
+ rmdir "$(<)"
+}
+
+}
+else
+{
+
+actions mklink
+{
+ ln -f -s "$(PATH_TO_SOURCE)" "$(<)"
+}
+
+actions hardlink
+{
+ ln -f "$(>)" "$(<)"
+}
+
+actions rm
+{
+ rm "$(<)"
+}
+
+}
+
+rule link-directory ( name : sources : requirements * : default-build * : usage-requirements * )
+{
+ local project = [ project.current ] ;
+ sources = [ new file-or-directory-reference $(sources) : $(project) ] ;
+ targets.main-target-alternative $(sources) ;
+ return [ targets.main-target-alternative
+ [ new symlink-target-class $(name) : $(project)
+ : [ targets.main-target-sources $(sources) : $(name) : no-renaming ]
+ : [ targets.main-target-requirements $(requirements) : $(project) ]
+ : [ targets.main-target-default-build : $(project) ]
+ : [ targets.main-target-usage-requirements $(usage-requirements) :
+ $(project) ] ] ] ;
+}
+
+IMPORT $(__name__) : link-directory : : link-directory ;
diff --git a/src/boost/tools/build/src/tools/lzma.jam b/src/boost/tools/build/src/tools/lzma.jam
new file mode 100644
index 000000000..465d1d693
--- /dev/null
+++ b/src/boost/tools/build/src/tools/lzma.jam
@@ -0,0 +1,134 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the lzma library
+#
+# After 'using lzma', the following targets are available:
+#
+# /lzma//lzma -- The lzma library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import property ;
+import property-set ;
+
+header = lzma.h ;
+# liblzma only needed for VisualC++ builds
+names = lzma liblzma ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+# Initializes the lzma library.
+#
+# Options for configuring lzma::
+#
+# <search>
+# The directory containing the lzma binaries.
+# <name>
+# Overrides the default library name.
+# <include>
+# The directory containing the lzma headers.
+#
+# If none of these options is specified, then the environmental
+# variables LZMA_LIBRARY_PATH, LZMA_NAME, and LZMA_INCLUDE will
+# be used instead.
+#
+# Examples::
+#
+# # Find lzma in the default system location
+# using lzma ;
+# # Find lzma in /usr/local
+# using lzma : 1.2.7
+# : <include>/usr/local/include <search>/usr/local/lib ;
+#
+rule init (
+ version ?
+ # (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the target
+
+ : is-default ?
+ # Default configurations are only used when
+ # not yet configured. This option is
+ # deprecated. A configuration will be treated
+ # as a default when none of <include>, <search>,
+ # <name>, and <source> are present.
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project lzma ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+
+ if ! $(options)
+ {
+ is-default = true ;
+ }
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ if $(.configured.$(condition))
+ {
+ if $(is-default)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [lzma] lzma is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "lzma is already configured" ;
+ }
+ return ;
+ }
+ else
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [lzma] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [lzma] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local mt = [ new ac-library lzma : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
+ }
+ .configured.$(condition) = true ;
+}
diff --git a/src/boost/tools/build/src/tools/make.jam b/src/boost/tools/build/src/tools/make.jam
new file mode 100644
index 000000000..b0784b620
--- /dev/null
+++ b/src/boost/tools/build/src/tools/make.jam
@@ -0,0 +1,69 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2003 Douglas Gregor
+# 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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# This module defines the 'make' main target rule.
+
+import "class" : new ;
+import param ;
+import project ;
+import property-set ;
+import targets ;
+
+
+class make-target-class : basic-target
+{
+ import "class" : new ;
+ import indirect ;
+ import toolset ;
+ import type ;
+ import virtual-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 )
+ {
+ local action-name = [ $(property-set).get <action> ] ;
+ # 'm' will always be set -- we add '@' ourselves in the 'make' rule
+ # below.
+ local m = [ MATCH ^@(.*) : $(action-name) ] ;
+
+ local relevant = [ toolset.relevant [ indirect.get-rule $(m[1]) ] ] ;
+ local a = [ new action $(source-targets) : $(m[1]) : [ $(property-set).add $(relevant) ] ] ;
+ local t = [ new file-target $(self.name) exact : [ type.type
+ $(self.name) ] : $(self.project) : $(a) ] ;
+ return $(relevant) [ virtual-target.register $(t) ] ;
+ }
+}
+
+
+# Declares the 'make' main target.
+#
+rule make ( target-name : sources * : generating-rule + : requirements * :
+ usage-requirements * )
+{
+ param.handle-named-params
+ sources generating-rule requirements default-build usage-requirements ;
+ # The '@' sign causes the feature.jam module to qualify rule name with the
+ # module name of current project, if needed.
+ local m = [ MATCH ^(@).* : $(generating-rule) ] ;
+ if ! $(m)
+ {
+ generating-rule = @$(generating-rule) ;
+ }
+ targets.create-metatarget make-target-class : [ project.current ] :
+ $(target-name) : $(sources) : $(requirements) <action>$(generating-rule)
+ : : $(usage-requirements) ;
+}
+
+
+IMPORT $(__name__) : make : : make ;
diff --git a/src/boost/tools/build/src/tools/make.py b/src/boost/tools/build/src/tools/make.py
new file mode 100644
index 000000000..716a56119
--- /dev/null
+++ b/src/boost/tools/build/src/tools/make.py
@@ -0,0 +1,59 @@
+# Status: ported.
+# Base revision: 64068
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2003 Douglas Gregor
+# 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_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# This module defines the 'make' main target rule.
+
+from b2.build.targets import BasicTarget
+from b2.build.virtual_target import Action, FileTarget
+from b2.build import type
+from b2.manager import get_manager
+import b2.build.property_set
+
+
+class MakeTarget(BasicTarget):
+
+ def construct(self, name, source_targets, property_set):
+
+ action_name = property_set.get("<action>")[0]
+ action = Action(get_manager(), source_targets, action_name[1:], property_set)
+ target = FileTarget(self.name(), type.type(self.name()),
+ self.project(), action, exact=True)
+ return [ b2.build.property_set.empty(),
+ [self.project().manager().virtual_targets().register(target)]]
+
+def make (target_name, sources, generating_rule,
+ requirements=None, usage_requirements=None):
+
+ target_name = target_name[0]
+ generating_rule = generating_rule[0]
+ if generating_rule[0] != '@':
+ generating_rule = '@' + generating_rule
+
+ if not requirements:
+ requirements = []
+
+
+ requirements.append("<action>%s" % generating_rule)
+
+ m = get_manager()
+ targets = m.targets()
+ project = m.projects().current()
+ engine = m.engine()
+ engine.register_bjam_action(generating_rule)
+
+ targets.main_target_alternative(MakeTarget(
+ target_name, project,
+ targets.main_target_sources(sources, target_name),
+ targets.main_target_requirements(requirements, project),
+ targets.main_target_default_build([], project),
+ targets.main_target_usage_requirements(usage_requirements or [], project)))
+
+get_manager().projects().add_rule("make", make)
+
diff --git a/src/boost/tools/build/src/tools/mc.jam b/src/boost/tools/build/src/tools/mc.jam
new file mode 100644
index 000000000..578377735
--- /dev/null
+++ b/src/boost/tools/build/src/tools/mc.jam
@@ -0,0 +1,44 @@
+#~ Copyright 2005 Alexey Pakhunov.
+#~ 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)
+
+# Support for Microsoft message compiler tool.
+# Notes:
+# - there's just message compiler tool, there's no tool for
+# extracting message strings from sources
+# - This file allows to use Microsoft message compiler
+# with any toolset. In msvc.jam, there's more specific
+# message compiling action.
+
+import common ;
+import generators ;
+import feature : feature get-values ;
+import toolset : flags ;
+import type ;
+import rc ;
+
+rule init ( )
+{
+}
+
+type.register MC : mc ;
+
+
+# Command line options
+feature mc-input-encoding : ansi unicode : free ;
+feature mc-output-encoding : unicode ansi : free ;
+feature mc-set-customer-bit : no yes : free ;
+
+flags mc.compile MCFLAGS <mc-input-encoding>ansi : -a ;
+flags mc.compile MCFLAGS <mc-input-encoding>unicode : -u ;
+flags mc.compile MCFLAGS <mc-output-encoding>ansi : -A ;
+flags mc.compile MCFLAGS <mc-output-encoding>unicode : -U ;
+flags mc.compile MCFLAGS <mc-set-customer-bit>no : ;
+flags mc.compile MCFLAGS <mc-set-customer-bit>yes : -c ;
+
+generators.register-standard mc.compile : MC : H RC ;
+
+actions compile
+{
+ mc $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"
+}
diff --git a/src/boost/tools/build/src/tools/mc.py b/src/boost/tools/build/src/tools/mc.py
new file mode 100644
index 000000000..d8b970194
--- /dev/null
+++ b/src/boost/tools/build/src/tools/mc.py
@@ -0,0 +1,46 @@
+# Copyright (c) 2005 Alexey Pakhunov.
+# Copyright (c) 2011 Juraj Ivancic
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Support for Microsoft message compiler tool.
+# Notes:
+# - there's just message compiler tool, there's no tool for
+# extracting message strings from sources
+# - This file allows to use Microsoft message compiler
+# with any toolset. In msvc.jam, there's more specific
+# message compiling action.
+
+import bjam
+
+from b2.tools import common, rc
+from b2.build import generators, type
+from b2.build.toolset import flags
+from b2.build.feature import feature
+from b2.manager import get_manager
+
+def init():
+ pass
+
+type.register('MC', ['mc'])
+
+
+# Command line options
+feature('mc-input-encoding', ['ansi', 'unicode'], ['free'])
+feature('mc-output-encoding', ['unicode', 'ansi'], ['free'])
+feature('mc-set-customer-bit', ['no', 'yes'], ['free'])
+
+flags('mc.compile', 'MCFLAGS', ['<mc-input-encoding>ansi'], ['-a'])
+flags('mc.compile', 'MCFLAGS', ['<mc-input-encoding>unicode'], ['-u'])
+flags('mc.compile', 'MCFLAGS', ['<mc-output-encoding>ansi'], ['-A'])
+flags('mc.compile', 'MCFLAGS', ['<mc-output-encoding>unicode'], ['-U'])
+flags('mc.compile', 'MCFLAGS', ['<mc-set-customer-bit>no'], [])
+flags('mc.compile', 'MCFLAGS', ['<mc-set-customer-bit>yes'], ['-c'])
+
+generators.register_standard('mc.compile', ['MC'], ['H', 'RC'])
+
+get_manager().engine().register_action(
+ 'mc.compile',
+ 'mc $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"')
diff --git a/src/boost/tools/build/src/tools/message.jam b/src/boost/tools/build/src/tools/message.jam
new file mode 100644
index 000000000..672b6e0bc
--- /dev/null
+++ b/src/boost/tools/build/src/tools/message.jam
@@ -0,0 +1,62 @@
+# Copyright 2008 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)
+
+# Defines main target type 'message', that prints a message when built for the
+# first time.
+
+import project ;
+import "class" : new ;
+import targets ;
+import property-set ;
+
+class message-target-class : basic-target
+{
+ rule set-message ( * )
+ {
+ self.1 = $(1) ;
+ self.2 = $(2) ;
+ self.3 = $(3) ;
+ self.4 = $(4) ;
+ self.5 = $(5) ;
+ self.6 = $(6) ;
+ self.7 = $(7) ;
+ self.8 = $(8) ;
+ self.9 = $(9) ;
+ self.built = ;
+ }
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ if ! $(self.built)
+ {
+ for i in 1 2 3 4 5 6 7 8 9
+ {
+ if $(self.$(i))
+ {
+ ECHO $(self.$(i)) ;
+ }
+ }
+ self.built = 1 ;
+ }
+
+ return [ property-set.empty ] ;
+ }
+}
+
+
+rule message ( name : * )
+{
+ local project = [ project.current ] ;
+
+ local result = [ targets.main-target-alternative
+ [ new message-target-class $(name) : $(project)
+ : [ targets.main-target-sources : $(name) ]
+ : [ targets.main-target-requirements : $(project) ]
+ : [ targets.main-target-default-build : $(project) ]
+ : [ targets.main-target-usage-requirements : $(project) ]
+ ] ] ;
+ $(result).set-message $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ return $(result) ;
+}
+IMPORT $(__name__) : message : : message ;
diff --git a/src/boost/tools/build/src/tools/message.py b/src/boost/tools/build/src/tools/message.py
new file mode 100644
index 000000000..3f276f93e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/message.py
@@ -0,0 +1,54 @@
+# Status: ported.
+# Base revision: 64488.
+#
+# Copyright 2008, 2010 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)
+
+# Defines main target type 'message', that prints a message when built for the
+# first time.
+
+import b2.build.targets as targets
+import b2.build.property_set as property_set
+
+from b2.manager import get_manager
+
+class MessageTargetClass(targets.BasicTarget):
+
+ def __init__(self, name, project, sources, requirements, default_build,
+ usage_requirements, *args):
+ targets.BasicTarget.__init__(
+ self, name, project, sources, requirements, default_build, usage_requirements)
+ self.args = args
+ self.built = False
+
+ def construct(self, name, sources, ps):
+
+ if not self.built:
+ for arg in self.args:
+ if type(arg) == type([]):
+ arg = " ".join(arg)
+ print arg
+ self.built = True
+
+ return (property_set.empty(), [])
+
+def message(name, *args):
+
+ if type(name) == type([]):
+ name = name[0]
+
+ t = get_manager().targets()
+ project = get_manager().projects().current()
+
+ return t.main_target_alternative(
+ MessageTargetClass(
+ name, project,
+ t.main_target_sources([], name),
+ t.main_target_requirements([], project),
+ t.main_target_default_build([], project),
+ t.main_target_usage_requirements([], project),
+ *args
+ ))
+
+get_manager().projects().add_rule("message", message)
diff --git a/src/boost/tools/build/src/tools/midl.jam b/src/boost/tools/build/src/tools/midl.jam
new file mode 100644
index 000000000..0aa5dda31
--- /dev/null
+++ b/src/boost/tools/build/src/tools/midl.jam
@@ -0,0 +1,142 @@
+# Copyright (c) 2005 Alexey Pakhunov.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Microsoft Interface Definition Language (MIDL) related routines
+
+import common ;
+import generators ;
+import feature : feature get-values ;
+import os ;
+import scanner ;
+import toolset : flags ;
+import type ;
+
+rule init ( )
+{
+}
+
+type.register IDL : idl ;
+
+# A type library (.tlb) is generated by MIDL compiler and can be included
+# to resources of an application (.rc). In order to be found by a resource
+# compiler its target type should be derived from 'H' - otherwise
+# the property '<implicit-dependency>' will be ignored.
+type.register MSTYPELIB : tlb : H ;
+
+
+# Register scanner for MIDL files
+class midl-scanner : scanner
+{
+ import path property-set regex scanner type virtual-target ;
+
+ rule __init__ ( includes * )
+ {
+ scanner.__init__ ;
+
+ self.includes = $(includes) ;
+
+ # List of quoted strings
+ self.re-strings = "[ \t]*\"([^\"]*)\"([ \t]*,[ \t]*\"([^\"]*)\")*[ \t]*" ;
+
+ # 'import' and 'importlib' directives
+ self.re-import = "import"$(self.re-strings)"[ \t]*;" ;
+ self.re-importlib = "importlib[ \t]*[(]"$(self.re-strings)"[)][ \t]*;" ;
+
+ # C preprocessor 'include' directive
+ self.re-include-angle = "#[ \t]*include[ \t]*<(.*)>" ;
+ self.re-include-quoted = "#[ \t]*include[ \t]*\"(.*)\"" ;
+ }
+
+ rule pattern ( )
+ {
+ # Match '#include', 'import' and 'importlib' directives
+ return "((#[ \t]*include|import(lib)?).+(<(.*)>|\"(.*)\").+)" ;
+ }
+
+ rule process ( target : matches * : binding )
+ {
+ local included-angle = [ regex.transform $(matches) : $(self.re-include-angle) : 1 ] ;
+ local included-quoted = [ regex.transform $(matches) : $(self.re-include-quoted) : 1 ] ;
+ local imported = [ regex.transform $(matches) : $(self.re-import) : 1 3 ] ;
+ local imported_tlbs = [ regex.transform $(matches) : $(self.re-importlib) : 1 3 ] ;
+
+ # CONSIDER: the new scoping rule seem to defeat "on target" variables.
+ local g = [ on $(target) return $(HDRGRIST) ] ;
+ local b = [ NORMALIZE_PATH $(binding:D) ] ;
+
+ # Attach binding of including file to included targets.
+ # When target is directly created from virtual target
+ # this extra information is unnecessary. But in other
+ # cases, it allows to distinguish between two headers of the
+ # same name included from different places.
+ local g2 = $(g)"#"$(b) ;
+
+ included-angle = $(included-angle:G=$(g)) ;
+ included-quoted = $(included-quoted:G=$(g2)) ;
+ imported = $(imported:G=$(g2)) ;
+ imported_tlbs = $(imported_tlbs:G=$(g2)) ;
+
+ local all = $(included-angle) $(included-quoted) $(imported) ;
+
+ INCLUDES $(target) : $(all) ;
+ DEPENDS $(target) : $(imported_tlbs) ;
+ NOCARE $(all) $(imported_tlbs) ;
+ SEARCH on $(included-angle) = $(self.includes:G=) ;
+ SEARCH on $(included-quoted) = $(b) $(self.includes:G=) ;
+ SEARCH on $(imported) = $(b) $(self.includes:G=) ;
+ SEARCH on $(imported_tlbs) = $(b) $(self.includes:G=) ;
+
+ scanner.propagate
+ [ type.get-scanner CPP : [ property-set.create $(self.includes) ] ] :
+ $(included-angle) $(included-quoted) : $(target) ;
+
+ scanner.propagate $(__name__) : $(imported) : $(target) ;
+ }
+}
+
+scanner.register midl-scanner : include ;
+type.set-scanner IDL : midl-scanner ;
+
+
+# Command line options
+feature midl-stubless-proxy : yes no : propagated ;
+feature midl-robust : yes no : propagated ;
+
+flags midl.compile.idl MIDLFLAGS <midl-stubless-proxy>yes : /Oicf ;
+flags midl.compile.idl MIDLFLAGS <midl-stubless-proxy>no : /Oic ;
+flags midl.compile.idl MIDLFLAGS <midl-robust>yes : /robust ;
+flags midl.compile.idl MIDLFLAGS <midl-robust>no : /no_robust ;
+
+# Architecture-specific options
+architecture-x86 = <architecture> <architecture>x86 ;
+address-model-32 = <address-model> <address-model>32 ;
+address-model-64 = <address-model> <address-model>64 ;
+
+flags midl.compile.idl MIDLFLAGS $(architecture-x86)/$(address-model-32) : /win32 ;
+flags midl.compile.idl MIDLFLAGS $(architecture-x86)/<address-model>64 : /x64 ;
+flags midl.compile.idl MIDLFLAGS <architecture>ia64/$(address-model-64) : /ia64 ;
+
+
+flags midl.compile.idl DEFINES <define> ;
+flags midl.compile.idl UNDEFS <undef> ;
+flags midl.compile.idl INCLUDES <include> ;
+
+
+generators.register-c-compiler midl.compile.idl : IDL : MSTYPELIB H C(%_i) C(%_proxy) C(%_dlldata) ;
+
+
+# MIDL does not always generate '%_proxy.c' and '%_dlldata.c'. This behavior
+# depends on contents of the source IDL file. Calling TOUCH_FILE below ensures
+# that both files will be created so bjam will not try to recreate them
+# constantly.
+TOUCH_FILE = [ common.file-touch-command ] ;
+
+actions compile.idl
+{
+ midl /nologo @"@($(<[1]:W).rsp:E=$(nl)"$(>:W)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)" $(nl)-U$(UNDEFS) $(nl)$(MIDLFLAGS) $(nl)/tlb "$(<[1]:W)" $(nl)/h "$(<[2]:W)" $(nl)/iid "$(<[3]:W)" $(nl)/proxy "$(<[4]:W)" $(nl)/dlldata "$(<[5]:W)")"
+ $(TOUCH_FILE) "$(<[4]:W)"
+ $(TOUCH_FILE) "$(<[5]:W)"
+}
diff --git a/src/boost/tools/build/src/tools/midl.py b/src/boost/tools/build/src/tools/midl.py
new file mode 100644
index 000000000..51bc51feb
--- /dev/null
+++ b/src/boost/tools/build/src/tools/midl.py
@@ -0,0 +1,134 @@
+# Copyright (c) 2005 Alexey Pakhunov.
+# Copyright (c) 2011 Juraj Ivancic
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Microsoft Interface Definition Language (MIDL) related routines
+from b2.build import scanner, type
+from b2.build.toolset import flags
+from b2.build.feature import feature
+from b2.manager import get_manager
+from b2.tools import builtin, common
+from b2.util import regex, utility
+
+def init():
+ pass
+
+type.register('IDL', ['idl'])
+
+# A type library (.tlb) is generated by MIDL compiler and can be included
+# to resources of an application (.rc). In order to be found by a resource
+# compiler its target type should be derived from 'H' - otherwise
+# the property '<implicit-dependency>' will be ignored.
+type.register('MSTYPELIB', ['tlb'], 'H')
+
+# Register scanner for MIDL files
+class MidlScanner(scanner.Scanner):
+ def __init__ (self, includes=[]):
+ scanner.Scanner.__init__(self)
+ self.includes = includes
+
+ # List of quoted strings
+ re_strings = "[ \t]*\"([^\"]*)\"([ \t]*,[ \t]*\"([^\"]*)\")*[ \t]*" ;
+
+ # 'import' and 'importlib' directives
+ self.re_import = "import" + re_strings + "[ \t]*;" ;
+ self.re_importlib = "importlib[ \t]*[(]" + re_strings + "[)][ \t]*;" ;
+
+ # C preprocessor 'include' directive
+ self.re_include_angle = "#[ \t]*include[ \t]*<(.*)>" ;
+ self.re_include_quoted = "#[ \t]*include[ \t]*\"(.*)\"" ;
+
+ def pattern():
+ # Match '#include', 'import' and 'importlib' directives
+ return "((#[ \t]*include|import(lib)?).+(<(.*)>|\"(.*)\").+)"
+
+ def process(self, target, matches, binding):
+ included_angle = regex.transform(matches, self.re_include_angle)
+ included_quoted = regex.transform(matches, self.re_include_quoted)
+ imported = regex.transform(matches, self.re_import, [1, 3])
+ imported_tlbs = regex.transform(matches, self.re_importlib, [1, 3])
+
+ # CONSIDER: the new scoping rule seem to defeat "on target" variables.
+ g = bjam.call('get-target-variable', target, 'HDRGRIST')[0]
+ b = os.path.normpath(os.path.dirname(binding))
+
+ # Attach binding of including file to included targets.
+ # When target is directly created from virtual target
+ # this extra information is unnecessary. But in other
+ # cases, it allows to distinguish between two headers of the
+ # same name included from different places.
+ g2 = g + "#" + b
+
+ g = "<" + g + ">"
+ g2 = "<" + g2 + ">"
+
+ included_angle = [ g + x for x in included_angle ]
+ included_quoted = [ g + x for x in included_quoted ]
+ imported = [ g + x for x in imported ]
+ imported_tlbs = [ g + x for x in imported_tlbs ]
+
+ all = included_angle + included_quoted + imported
+
+ bjam.call('INCLUDES', [target], all)
+ bjam.call('DEPENDS', [target], imported_tlbs)
+ bjam.call('NOCARE', all + imported_tlbs)
+ engine.set_target_variable(included_angle , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(included_quoted, 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(imported , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(imported_tlbs , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+
+ get_manager().scanners().propagate(type.get_scanner('CPP', PropertySet(self.includes)), included_angle + included_quoted)
+ get_manager().scanners().propagate(self, imported)
+
+scanner.register(MidlScanner, 'include')
+type.set_scanner('IDL', MidlScanner)
+
+
+# Command line options
+feature('midl-stubless-proxy', ['yes', 'no'], ['propagated'] )
+feature('midl-robust', ['yes', 'no'], ['propagated'] )
+
+flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-stubless-proxy>yes'], ['/Oicf' ])
+flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-stubless-proxy>no' ], ['/Oic' ])
+flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-robust>yes' ], ['/robust' ])
+flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-robust>no' ], ['/no_robust'])
+
+# Architecture-specific options
+architecture_x86 = ['<architecture>' , '<architecture>x86']
+address_model_32 = ['<address-model>', '<address-model>32']
+address_model_64 = ['<address-model>', '<address-model>64']
+
+flags('midl.compile.idl', 'MIDLFLAGS', [ar + '/' + m for ar in architecture_x86 for m in address_model_32 ], ['/win32'])
+flags('midl.compile.idl', 'MIDLFLAGS', [ar + '/<address-model>64' for ar in architecture_x86], ['/x64'])
+flags('midl.compile.idl', 'MIDLFLAGS', ['<architecture>ia64/' + m for m in address_model_64], ['/ia64'])
+
+flags('midl.compile.idl', 'DEFINES', [], ['<define>'])
+flags('midl.compile.idl', 'UNDEFS', [], ['<undef>'])
+flags('midl.compile.idl', 'INCLUDES', [], ['<include>'])
+
+
+builtin.register_c_compiler('midl.compile.idl', ['IDL'], ['MSTYPELIB', 'H', 'C(%_i)', 'C(%_proxy)', 'C(%_dlldata)'], [])
+
+
+# MIDL does not always generate '%_proxy.c' and '%_dlldata.c'. This behavior
+# depends on contents of the source IDL file. Calling TOUCH_FILE below ensures
+# that both files will be created so bjam will not try to recreate them
+# constantly.
+get_manager().engine().register_action(
+ 'midl.compile.idl',
+ '''midl /nologo @"@($(<[1]:W).rsp:E=
+"$(>:W)"
+-D$(DEFINES)
+"-I$(INCLUDES)"
+-U$(UNDEFS)
+$(MIDLFLAGS)
+/tlb "$(<[1]:W)"
+/h "$(<[2]:W)"
+/iid "$(<[3]:W)"
+/proxy "$(<[4]:W)"
+/dlldata "$(<[5]:W)")"
+{touch} "$(<[4]:W)"
+{touch} "$(<[5]:W)"'''.format(touch=common.file_creation_command()))
diff --git a/src/boost/tools/build/src/tools/mipspro.jam b/src/boost/tools/build/src/tools/mipspro.jam
new file mode 100644
index 000000000..9e8c39693
--- /dev/null
+++ b/src/boost/tools/build/src/tools/mipspro.jam
@@ -0,0 +1,145 @@
+# Copyright Noel Belcourt 2007.
+# 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 property ;
+import generators ;
+import os ;
+import toolset : flags ;
+import feature ;
+import fortran ;
+import type ;
+import common ;
+
+feature.extend toolset : mipspro ;
+toolset.inherit mipspro : unix ;
+generators.override mipspro.prebuilt : builtin.lib-generator ;
+generators.override mipspro.searched-lib-generator : searched-lib-generator ;
+
+# Documentation and toolchain description located
+# http://www.sgi.com/products/software/irix/tools/
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [
+ common.check-init-parameters mipspro : version $(version) ] ;
+
+ command = [ common.get-invocation-command mipspro : CC : $(command) ] ;
+
+ common.handle-options mipspro : $(condition) : $(command) : $(options) ;
+
+ command_c = $(command_c[1--2]) $(command[-1]:B=cc) ;
+
+ toolset.flags mipspro CONFIG_C_COMMAND $(condition) : $(command_c) ;
+
+ # fortran support
+ local command = [
+ common.get-invocation-command mipspro : f77 : $(command) : $(install_dir) ] ;
+
+ command_f = $(command_f[1--2]) $(command[-1]:B=f77) ;
+ toolset.flags mipspro CONFIG_F_COMMAND $(condition) : $(command_f) ;
+
+ # set link flags
+ flags mipspro.link FINDLIBS-ST : [
+ feature.get-values <find-static-library> : $(options) ] : unchecked ;
+
+ flags mipspro.link FINDLIBS-SA : [
+ feature.get-values <find-shared-library> : $(options) ] : unchecked ;
+}
+
+# Declare generators
+generators.register-c-compiler mipspro.compile.c : C : OBJ : <toolset>mipspro ;
+generators.register-c-compiler mipspro.compile.c++ : CPP : OBJ : <toolset>mipspro ;
+generators.register-fortran-compiler mipspro.compile.fortran : FORTRAN : OBJ : <toolset>mipspro ;
+
+cpu-arch-32 =
+ <architecture>/<address-model>
+ <architecture>/<address-model>32 ;
+
+cpu-arch-64 =
+ <architecture>/<address-model>64 ;
+
+flags mipspro.compile OPTIONS $(cpu-arch-32) : -n32 ;
+flags mipspro.compile OPTIONS $(cpu-arch-64) : -64 ;
+
+# Declare flags and actions for compilation
+flags mipspro.compile OPTIONS <debug-symbols>on : -g ;
+# flags mipspro.compile OPTIONS <profiling>on : -xprofile=tcov ;
+flags mipspro.compile OPTIONS <warnings>off : -w ;
+flags mipspro.compile OPTIONS <warnings>on : -ansiW -diag_suppress 1429 ; # suppress long long is nonstandard warning
+flags mipspro.compile OPTIONS <warnings>all : -fullwarn ;
+flags mipspro.compile OPTIONS <optimization>speed : -Ofast ;
+flags mipspro.compile OPTIONS <optimization>space : -O2 ;
+flags mipspro.compile OPTIONS <cflags> : "-LANG:std" ;
+flags mipspro.compile.c++ OPTIONS <inlining>off : "-INLINE:none" ;
+flags mipspro.compile.c++ OPTIONS <cxxflags> ;
+flags mipspro.compile DEFINES <define> ;
+flags mipspro.compile INCLUDES <include> ;
+
+
+flags mipspro.compile.fortran OPTIONS <fflags> ;
+
+actions compile.c
+{
+ "$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -FE:template_in_elf_section -ptused $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.fortran
+{
+ "$(CONFIG_F_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+# Declare flags and actions for linking
+flags mipspro.link OPTIONS <debug-symbols>on : -g ;
+# Strip the binary when no debugging is needed
+# flags mipspro.link OPTIONS <debug-symbols>off : -s ;
+# flags mipspro.link OPTIONS <profiling>on : -xprofile=tcov ;
+# flags mipspro.link OPTIONS <threading>multi : -mt ;
+
+flags mipspro.link OPTIONS $(cpu-arch-32) : -n32 ;
+flags mipspro.link OPTIONS $(cpu-arch-64) : -64 ;
+
+flags mipspro.link OPTIONS <optimization>speed : -Ofast ;
+flags mipspro.link OPTIONS <optimization>space : -O2 ;
+flags mipspro.link OPTIONS <linkflags> ;
+flags mipspro.link LINKPATH <library-path> ;
+flags mipspro.link FINDLIBS-ST <find-static-library> ;
+flags mipspro.link FINDLIBS-SA <find-shared-library> ;
+flags mipspro.link FINDLIBS-SA <threading>multi : pthread ;
+flags mipspro.link LIBRARIES <library-file> ;
+flags mipspro.link LINK-RUNTIME <runtime-link>static : static ;
+flags mipspro.link LINK-RUNTIME <runtime-link>shared : dynamic ;
+flags mipspro.link RPATH <dll-path> ;
+
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -FE:template_in_elf_section -ptused $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME) -lm
+}
+
+# Slight mods for dlls
+rule link.dll ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
+}
+
+# Declare action for creating static libraries
+actions piecemeal archive
+{
+ ar -cr "$(<)" "$(>)"
+}
diff --git a/src/boost/tools/build/src/tools/mpi.jam b/src/boost/tools/build/src/tools/mpi.jam
new file mode 100644
index 000000000..1f1658c92
--- /dev/null
+++ b/src/boost/tools/build/src/tools/mpi.jam
@@ -0,0 +1,638 @@
+# Support for the Message Passing Interface (MPI)
+#
+# (C) Copyright 2005, 2006 Trustees of Indiana University
+# (C) Copyright 2005 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.)
+#
+# Authors: Douglas Gregor
+# Andrew Lumsdaine
+#
+# ==== MPI Configuration ====
+#
+# For many users, MPI support can be enabled simply by adding the following
+# line to your user-config.jam file:
+#
+# using mpi ;
+#
+# This should auto-detect MPI settings based on the MPI wrapper compiler in
+# your path, e.g., "mpic++". If the wrapper compiler is not in your path, or
+# has a different name, you can pass the name of the wrapper compiler as the
+# first argument to the mpi module:
+#
+# using mpi : /opt/mpich2-1.0.4/bin/mpiCC ;
+#
+# If your MPI implementation does not have a wrapper compiler, or the MPI
+# auto-detection code does not work with your MPI's wrapper compiler,
+# you can pass MPI-related options explicitly via the second parameter to the
+# mpi module:
+#
+# using mpi : : <find-shared-library>lammpio <find-shared-library>lammpi++
+# <find-shared-library>mpi <find-shared-library>lam
+# <find-shared-library>dl ;
+#
+# To see the results of MPI auto-detection, pass "--debug-configuration" on
+# the bjam command line.
+#
+# The (optional) fourth argument configures Boost.MPI for running
+# regression tests. These parameters specify the executable used to
+# launch jobs (default: "mpirun") followed by any necessary arguments
+# to this to run tests and tell the program to expect the number of
+# processors to follow (default: "-np"). With the default parameters,
+# for instance, the test harness will execute, e.g.,
+#
+# mpirun -np 4 all_gather_test
+#
+# ==== Linking Against the MPI Libraries ===
+#
+# To link against the MPI libraries, import the "mpi" module and add the
+# following requirement to your target:
+#
+# <library>/mpi//mpi
+#
+# Since MPI support is not always available, you should check
+# "mpi.configured" before trying to link against the MPI libraries.
+
+import "class" : new ;
+import common ;
+import feature : feature ;
+import generators ;
+import os ;
+import project ;
+import property ;
+import testing ;
+import toolset ;
+import type ;
+import path ;
+
+# Make this module a project
+project.initialize $(__name__) ;
+project mpi ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Assuming the first part of the command line is the given prefix
+# followed by some non-empty value, remove the first argument. Returns
+# either nothing (if there was no prefix or no value) or a pair
+#
+# <name>value rest-of-cmdline
+#
+# This is a subroutine of cmdline_to_features
+rule add_feature ( prefix name cmdline )
+{
+ local match = [ MATCH "^$(prefix)([^\" ]+|\"[^\"]+\") *(.*)$" : $(cmdline) ] ;
+
+ # If there was no value associated with the prefix, abort
+ if ! $(match) {
+ return ;
+ }
+
+ local value = $(match[1]) ;
+
+ if [ MATCH " +" : $(value) ] {
+ value = "\"$(value)\"" ;
+ }
+
+ return "<$(name)>$(value)" $(match[2]) ;
+}
+
+# Strip any end-of-line characters off the given string and return the
+# result.
+rule strip-eol ( string )
+{
+ local match = [ MATCH "^(([A-Za-z0-9~`\.!@#$%^&*()_+={};:'\",.<>/?\\| -]|[|])*).*$" : $(string) ] ;
+
+ if $(match)
+ {
+ return $(match[1]) ;
+ }
+ else
+ {
+ return $(string) ;
+ }
+}
+
+# Split a command-line into a set of features. Certain kinds of
+# compiler flags are recognized (e.g., -I, -D, -L, -l) and replaced
+# with their B2 equivalents (e.g., <include>, <define>,
+# <library-path>, <find-library>). All other arguments are introduced
+# using the features in the unknown-features parameter, because we
+# don't know how to deal with them. For instance, if your compile and
+# correct. The incoming command line should be a string starting with
+# an executable (e.g., g++ -I/include/path") and may contain any
+# number of command-line arguments thereafter. The result is a list of
+# features corresponding to the given command line, ignoring the
+# executable.
+rule cmdline_to_features ( cmdline : unknown-features ? )
+{
+ local executable ;
+ local features ;
+ local otherflags ;
+ local result ;
+
+ unknown-features ?= <cxxflags> <linkflags> ;
+
+ # Pull the executable out of the command line. At this point, the
+ # executable is just thrown away.
+ local match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$" : $(cmdline) ] ;
+ executable = $(match[1]) ;
+ cmdline = $(match[2]) ;
+
+ # List the prefix/feature pairs that we will be able to transform.
+ # Every kind of parameter not mentioned here will be placed in both
+ # cxxflags and linkflags, because we don't know where they should go.
+ local feature_kinds-D = "define" ;
+ local feature_kinds-I = "include" ;
+ local feature_kinds-L = "library-path" ;
+ local feature_kinds-l = "find-shared-library" ;
+
+ while $(cmdline) {
+
+ # Check for one of the feature prefixes we know about. If we
+ # find one (and the associated value is nonempty), convert it
+ # into a feature.
+ local match = [ MATCH "^(-.)(.*)" : $(cmdline) ] ;
+ local matched ;
+ if $(match) && $(match[2]) {
+ local prefix = $(match[1]) ;
+ if $(feature_kinds$(prefix)) {
+ local name = $(feature_kinds$(prefix)) ;
+ local add = [ add_feature $(prefix) $(name) $(cmdline) ] ;
+
+ if $(add) {
+
+ if $(add[1]) = <find-shared-library>pthread
+ {
+ # Uhm. It's not really nice that this MPI implementation
+ # uses -lpthread as opposed to -pthread. We do want to
+ # set <threading>multi, instead of -lpthread.
+ result += "<threading>multi" ;
+ MPI_EXTRA_REQUIREMENTS += "<threading>multi" ;
+ }
+ else
+ {
+ result += $(add[1]) ;
+ }
+
+ cmdline = $(add[2]) ;
+ matched = yes ;
+ }
+ }
+ }
+
+ # If we haven't matched a feature prefix, just grab the command-line
+ # argument itself. If we can map this argument to a feature
+ # (e.g., -pthread -> <threading>multi), then do so; otherwise,
+ # and add it to the list of "other" flags that we don't
+ # understand.
+ if ! $(matched) {
+ match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$" : $(cmdline) ] ;
+ local value = $(match[1]) ;
+ cmdline = $(match[2]) ;
+
+ # Check for multithreading support
+ if $(value) = "-pthread" || $(value) = "-pthreads"
+ {
+ result += "<threading>multi" ;
+
+ # DPG: This is a hack intended to work around a BBv2 bug where
+ # requirements propagated from libraries are not checked for
+ # conflicts when BBv2 determines which "common" properties to
+ # apply to a target. In our case, the <threading>single property
+ # gets propagated from the common properties to Boost.MPI
+ # targets, even though <threading>multi is in the usage
+ # requirements of <library>/mpi//mpi.
+ MPI_EXTRA_REQUIREMENTS += "<threading>multi" ;
+ }
+ else if [ MATCH "(.*[a-zA-Z0-9<>?-].*)" : $(value) ] {
+ otherflags += $(value) ;
+ }
+ }
+ }
+
+ # If there are other flags that we don't understand, add them to the
+ # result as both <cxxflags> and <linkflags>
+ if $(otherflags) {
+ for unknown in $(unknown-features)
+ {
+ result += "$(unknown)$(otherflags:J= )" ;
+ }
+ }
+
+ return $(result) ;
+}
+
+# Determine if it is safe to execute the given shell command by trying
+# to execute it and determining whether the exit code is zero or
+# not. Returns true for an exit code of zero, false otherwise.
+local rule safe-shell-command ( cmdline )
+{
+ local result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ;
+ return [ MATCH ".*(SSCOK).*" : $(result) ] ;
+}
+
+# Initialize the MPI module.
+rule init ( mpicxx ? : options * : mpirun-with-options * )
+{
+ if ! $(options) && $(.debug-configuration)
+ {
+ ECHO "===============MPI Auto-configuration===============" ;
+ }
+
+ if ! $(mpicxx) && [ os.on-windows ]
+ {
+ # Paths for Microsoft MPI
+ local ms_mpi_path_native = "C:\\Program Files\\Microsoft MPI" ;
+ local ms_mpi_sdk_path_native = "C:\\Program Files (x86)\\Microsoft SDKs\\MPI" ;
+
+ # Path for Microsoft Compute Cluster Pack
+ local cluster_pack_path_native = "C:\\Program Files\\Microsoft Compute Cluster Pack" ;
+
+ # Try to auto-configure Microsoft MPI
+ if [ GLOB $(ms_mpi_path_native)\\Bin : mpiexec.exe ] &&
+ [ GLOB $(ms_mpi_sdk_path_native)\\Include : mpi.h ]
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "Found Microsoft MPI: $(ms_mpi_path_native)" ;
+ ECHO "Found Microsoft MPI SDK: $(ms_mpi_sdk_path_native)" ;
+ }
+
+ local ms_mpi_sdk_path = [ path.make $(ms_mpi_sdk_path_native) ] ;
+
+ # Pick up either the 32-bit or 64-bit library, depending on which address
+ # model the user has selected. Default to 32-bit.
+ options = <include>$(ms_mpi_sdk_path)/Include
+ <address-model>64:<library-path>$(ms_mpi_sdk_path)/Lib/x64
+ <library-path>$(ms_mpi_sdk_path)/Lib/x86
+ <find-static-library>msmpi
+ <toolset>msvc:<define>_SECURE_SCL=0
+ ;
+
+ # Setup the "mpirun" equivalent (mpiexec)
+ .mpirun = "\"$(ms_mpi_path_native)\\Bin\\mpiexec.exe"\" ;
+ .mpirun_flags = -n ;
+ }
+ # Try to auto-configure to the Microsoft Compute Cluster Pack
+ else if [ GLOB $(cluster_pack_path_native)\\Include : mpi.h ]
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "Found Microsoft Compute Cluster Pack: $(cluster_pack_path_native)" ;
+ }
+
+ local cluster_pack_path = [ path.make $(cluster_pack_path_native) ] ;
+
+ # Pick up either the 32-bit or 64-bit library, depending on which address
+ # model the user has selected. Default to 32-bit.
+ options = <include>$(cluster_pack_path)/Include
+ <address-model>64:<library-path>$(cluster_pack_path)/Lib/amd64
+ <library-path>$(cluster_pack_path)/Lib/i386
+ <find-static-library>msmpi
+ <toolset>msvc:<define>_SECURE_SCL=0
+ ;
+
+ # Setup the "mpirun" equivalent (mpiexec)
+ .mpirun = "\"$(cluster_pack_path_native)\\Bin\\mpiexec.exe"\" ;
+ .mpirun_flags = -n ;
+ }
+ else if $(.debug-configuration)
+ {
+ ECHO "Did not find Microsoft MPI in $(ms_mpi_path_native)" ;
+ ECHO " and/or Microsoft MPI SDK in $(ms_mpi_sdk_path_native)." ;
+ ECHO "Did not find Microsoft Compute Cluster Pack in $(cluster_pack_path_native)." ;
+ }
+ }
+
+ if ! $(options)
+ {
+ # Try to auto-detect options based on the wrapper compiler
+ local command = [ common.get-invocation-command mpi : mpic++ : $(mpicxx) ] ;
+
+ if ! $(mpicxx) && ! $(command)
+ {
+ # Try "mpiCC", which is used by MPICH
+ command = [ common.get-invocation-command mpi : mpiCC ] ;
+ }
+
+ if ! $(mpicxx) && ! $(command)
+ {
+ # Try "mpicxx", which is used by OpenMPI and MPICH2
+ command = [ common.get-invocation-command mpi : mpicxx ] ;
+ }
+
+ if ! $(mpicxx) && ! $(command)
+ {
+ # Try "CC", which is used by Cray
+ command = [ common.get-invocation-command mpi : CC ] ;
+ }
+
+ local result ;
+ local compile_flags ;
+ local link_flags ;
+
+ if ! $(command)
+ {
+ # Do nothing: we'll complain later
+ }
+ # OpenMPI and newer versions of LAM-MPI have -showme:compile and
+ # -showme:link.
+ else if [ safe-shell-command "$(command) -showme:compile" ] &&
+ [ safe-shell-command "$(command) -showme:link" ]
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "Found recent LAM-MPI or Open MPI wrapper compiler: $(command)" ;
+ }
+
+ compile_flags = [ SHELL "$(command) -showme:compile" ] ;
+ link_flags = [ SHELL "$(command) -showme:link" ] ;
+
+ # Prepend COMPILER as the executable name, to match the format of
+ # other compilation commands.
+ compile_flags = "COMPILER $(compile_flags) -DOMPI_SKIP_MPICXX " ;
+ link_flags = "COMPILER $(link_flags)" ;
+ }
+ # Look for LAM-MPI's -showme
+ else if [ safe-shell-command "$(command) -showme" ]
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "Found older LAM-MPI wrapper compiler: $(command)" ;
+ }
+
+ result = [ SHELL "$(command) -showme" ] ;
+ }
+ # Look for MPICH
+ else if [ safe-shell-command "$(command) -show" ]
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "Found MPICH wrapper compiler: $(command)" ;
+ }
+ compile_flags = [ SHELL "$(command) -compile_info" ] ;
+ link_flags = [ SHELL "$(command) -link_info" ] ;
+ }
+ # Sun HPC and Ibm POE
+ else if [ SHELL "$(command) -v 2>/dev/null" ]
+ {
+ compile_flags = [ SHELL "$(command) -c -v -xtarget=native64 2>/dev/null" ] ;
+
+ local back = [ MATCH "--------------------(.*)" : $(compile_flags) ] ;
+ if $(back)
+ {
+ # Sun HPC
+ if $(.debug-configuration)
+ {
+ ECHO "Found Sun MPI wrapper compiler: $(command)" ;
+ }
+
+ compile_flags = [ MATCH "(.*)--------------------" : $(back) ] ;
+ compile_flags = [ MATCH "(.*)-v" : $(compile_flags) ] ;
+ link_flags = [ SHELL "$(command) -v -xtarget=native64 2>/dev/null" ] ;
+ link_flags = [ MATCH "--------------------(.*)" : $(link_flags) ] ;
+ link_flags = [ MATCH "(.*)--------------------" : $(link_flags) ] ;
+
+ # strip out -v from compile options
+ local front = [ MATCH "(.*)-v" : $(link_flags) ] ;
+ local back = [ MATCH "-v(.*)" : $(link_flags) ] ;
+ link_flags = "$(front) $(back)" ;
+ front = [ MATCH "(.*)-xtarget=native64" : $(link_flags) ] ;
+ back = [ MATCH "-xtarget=native64(.*)" : $(link_flags) ] ;
+ link_flags = "$(front) $(back)" ;
+ }
+ else
+ {
+ # Ibm POE
+ if $(.debug-configuration)
+ {
+ ECHO "Found IBM MPI wrapper compiler: $(command)" ;
+ }
+
+ #
+ compile_flags = [ SHELL "$(command) -c -v 2>/dev/null" ] ;
+ compile_flags = [ MATCH "(.*)exec: export.*" : $(compile_flags) ] ;
+ local front = [ MATCH "(.*)-v" : $(compile_flags) ] ;
+ local back = [ MATCH "-v(.*)" : $(compile_flags) ] ;
+ compile_flags = "$(front) $(back)" ;
+ front = [ MATCH "(.*)-c" : $(compile_flags) ] ;
+ back = [ MATCH "-c(.*)" : $(compile_flags) ] ;
+ compile_flags = "$(front) $(back)" ;
+ link_flags = $(compile_flags) ;
+
+ # get location of mpif.h from mpxlf
+ local f_flags = [ SHELL "mpxlf -v 2>/dev/null" ] ;
+ f_flags = [ MATCH "(.*)exec: export.*" : $(f_flags) ] ;
+ front = [ MATCH "(.*)-v" : $(f_flags) ] ;
+ back = [ MATCH "-v(.*)" : $(f_flags) ] ;
+ f_flags = "$(front) $(back)" ;
+ f_flags = [ MATCH "xlf_r(.*)" : $(f_flags) ] ;
+ f_flags = [ MATCH "-F:mpxlf_r(.*)" : $(f_flags) ] ;
+ compile_flags = [ strip-eol $(compile_flags) ] ;
+ compile_flags = "$(compile_flags) $(f_flags)" ;
+ }
+ }
+ # Cray
+ else if [ safe-shell-command "$(command) -v" ]
+ {
+ compile_flags = [ safe-shell-command "$(command) -###" ] ;
+ link_flags = [ safe-shell-command "$(command) -###" ] ;
+ # ECHO "Noel: compile_flags: $(compile_flags)" ;
+ # ECHO "Noel: link_flags: $(link_flags)" ;
+ result = " " ;
+ }
+
+ # Prepend COMPILER as the executable name, to match the format of
+
+ if $(result) || $(compile_flags) && $(link_flags)
+ {
+ if $(result)
+ {
+ result = [ strip-eol $(result) ] ;
+ options = [ cmdline_to_features $(result) ] ;
+ }
+ else
+ {
+ compile_flags = [ strip-eol $(compile_flags) ] ;
+ link_flags = [ strip-eol $(link_flags) ] ;
+
+ # Separately process compilation and link features, then combine
+ # them at the end.
+ local compile_features = [ cmdline_to_features $(compile_flags)
+ : "<cxxflags>" ] ;
+ local link_features = [ cmdline_to_features $(link_flags)
+ : "<linkflags>" ] ;
+ options = $(compile_features) $(link_features) ;
+ }
+
+ # If requested, display MPI configuration information.
+ if $(.debug-configuration)
+ {
+ if $(result)
+ {
+ ECHO " Wrapper compiler command line: $(result)" ;
+ }
+ else
+ {
+ local match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$"
+ : $(compile_flags) ] ;
+ ECHO "MPI compilation flags: $(match[2])" ;
+ local match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$"
+ : $(link_flags) ] ;
+ ECHO "MPI link flags: $(match[2])" ;
+ }
+ }
+ }
+ else
+ {
+ if $(command)
+ {
+ ECHO "MPI auto-detection failed: unknown wrapper compiler $(command)" ;
+ ECHO "Please report this error to the Boost mailing list: http://www.boost.org" ;
+ }
+ else if $(mpicxx)
+ {
+ ECHO "MPI auto-detection failed: unable to find wrapper compiler $(mpicxx)" ;
+ }
+ else
+ {
+ ECHO "MPI auto-detection failed: unable to find wrapper compiler `mpic++' or `mpiCC'" ;
+ }
+ ECHO "You will need to manually configure MPI support." ;
+ }
+
+ }
+
+ # Find mpirun (or its equivalent) and its flags
+ if ! $(.mpirun)
+ {
+ .mpirun =
+ [ common.get-invocation-command mpi : mpirun : $(mpirun-with-options[1]) ] ;
+ .mpirun_flags = $(mpirun-with-options[2-]) ;
+ .mpirun_flags ?= -np ;
+ }
+
+ if $(.debug-configuration)
+ {
+ if $(options)
+ {
+ echo "MPI build features: " ;
+ ECHO $(options) ;
+ }
+
+ if $(.mpirun)
+ {
+ echo "MPI launcher: $(.mpirun) $(.mpirun_flags)" ;
+ }
+
+ ECHO "====================================================" ;
+ }
+
+ if $(options)
+ {
+ .configured = true ;
+
+ # Set up the "mpi" alias
+ alias mpi : : : : $(options) ;
+ }
+}
+
+# States whether MPI has bee configured
+rule configured ( )
+{
+ return $(.configured) ;
+}
+
+# Returns the "extra" requirements needed to build MPI. These requirements are
+# part of the /mpi//mpi library target, but they need to be added to anything
+# that uses MPI directly to work around bugs in BBv2's propagation of
+# requirements.
+rule extra-requirements ( )
+{
+ return $(MPI_EXTRA_REQUIREMENTS) ;
+}
+
+# Support for testing; borrowed from Python
+type.register RUN_MPI_OUTPUT ;
+type.register RUN_MPI : : TEST ;
+
+class mpi-test-generator : generator
+{
+ import property-set ;
+
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ self.composing = true ;
+ }
+
+ rule run ( project name ? : property-set : sources * : multiple ? )
+ {
+ # Generate an executable from the sources. This is the executable we will run.
+ local executable =
+ [ generators.construct $(project) $(name) : EXE : $(property-set) : $(sources) ] ;
+
+ result =
+ [ construct-result $(executable[2-]) : $(project) $(name)-run : $(property-set) ] ;
+ }
+}
+
+# Use mpi-test-generator to generate MPI tests from sources
+generators.register
+ [ new mpi-test-generator mpi.capture-output : : RUN_MPI_OUTPUT ] ;
+
+generators.register-standard testing.expect-success
+ : RUN_MPI_OUTPUT : RUN_MPI ;
+
+# The number of processes to spawn when executing an MPI test.
+feature "mpi:processes" : : free incidental ;
+
+# The flag settings on testing.capture-output do not
+# apply to mpi.capture output at the moment.
+# Redo this explicitly.
+toolset.flags mpi.capture-output ARGS <testing.arg> ;
+toolset.uses-features mpi.capture-output :
+ <testing.launcher> <testing.execute> <dll-path> <xdll-path> <target-os>
+ <mpi:processes> ;
+
+rule capture-output ( target : sources * : properties * )
+{
+ # Use the standard capture-output rule to run the tests
+ testing.capture-output $(target) : $(sources[1]) : $(properties) ;
+
+ # Determine the number of processes we should run on.
+ local num_processes = [ property.select <mpi:processes> : $(properties) ] ;
+ num_processes = $(num_processes:G=) ;
+
+ # serialize the MPI tests to avoid overloading systems
+ JAM_SEMAPHORE on $(target) = <s>mpi-run-semaphore ;
+
+ # We launch MPI processes using the "mpirun" equivalent specified by the user.
+ LAUNCHER on $(target) =
+ [ on $(target) return $(.mpirun) $(.mpirun_flags) $(num_processes) ] ;
+}
+
+# Creates a set of test cases to be run through the MPI launcher. The name, sources,
+# and requirements are the same as for any other test generator. However, schedule is
+# a list of numbers, which indicates how many processes each test run will use. For
+# example, passing 1 2 7 will run the test with 1 process, then 2 processes, then 7
+# 7 processes. The name provided is just the base name: the actual tests will be
+# the name followed by a hyphen, then the number of processes.
+rule mpi-test ( name : sources * : requirements * : schedule * )
+{
+ sources ?= $(name).cpp ;
+ schedule ?= 1 2 3 4 7 8 13 17 ;
+
+ local result ;
+ for processes in $(schedule)
+ {
+ result += [ testing.make-test
+ run-mpi : $(sources) /boost/mpi//boost_mpi
+ : $(requirements) <toolset>msvc:<link>static <mpi:processes>$(processes) : $(name)-$(processes) ] ;
+ }
+ return $(result) ;
+}
diff --git a/src/boost/tools/build/src/tools/msvc-config.jam b/src/boost/tools/build/src/tools/msvc-config.jam
new file mode 100644
index 000000000..6c71e3b00
--- /dev/null
+++ b/src/boost/tools/build/src/tools/msvc-config.jam
@@ -0,0 +1,12 @@
+#~ Copyright 2005 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)
+
+# Automatic configuration for VisualStudio toolset. To use, just import this module.
+
+import toolset : using ;
+
+ECHO "warning: msvc-config.jam is deprecated. Use 'using msvc : all ;' instead." ;
+
+using msvc : all ;
+
diff --git a/src/boost/tools/build/src/tools/msvc.jam b/src/boost/tools/build/src/tools/msvc.jam
new file mode 100644
index 000000000..4b0fed892
--- /dev/null
+++ b/src/boost/tools/build/src/tools/msvc.jam
@@ -0,0 +1,2092 @@
+# Copyright (c) 2003 David Abrahams
+# Copyright (c) 2005 Vladimir Prus
+# Copyright (c) 2005 Alexey Pakhunov
+# Copyright (c) 2006 Bojan Resnik
+# Copyright (c) 2006 Ilya Sokolov
+# Copyright (c) 2007-2017 Rene Rivera
+# Copyright (c) 2008 Jurko Gospodnetic
+# Copyright (c) 2014 Microsoft Corporation
+# Copyright (c) 2019 Michał Janiszewski
+#
+# 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.msvc]]
+= Microsoft Visual C++
+
+The `msvc` module supports the
+http://msdn.microsoft.com/visualc/[Microsoft Visual C++] command-line
+tools on Microsoft Windows. The supported products and versions of
+command line tools are listed below:
+
+* Visual Studio 2019-14.2
+* Visual Studio 2017—14.1
+* Visual Studio 2015—14.0
+* Visual Studio 2013—12.0
+* Visual Studio 2012—11.0
+* Visual Studio 2010—10.0
+* Visual Studio 2008—9.0
+* Visual Studio 2005—8.0
+* Visual Studio .NET 2003—7.1
+* Visual Studio .NET—7.0
+* Visual Studio 6.0, Service Pack 5--6.5
+
+The user would then call the boost build executable with the toolset set
+equal to `msvc-[version number]` for example to build with Visual Studio
+2017 one could run:
+
+----
+.\b2 toolset=msvc-14.2 target
+----
+
+The `msvc` module is initialized using the following syntax:
+
+----
+using msvc : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the version is not explicitly specified, the most recent version
+found in the registry will be used instead. If the special value `all`
+is passed as the version, all versions found in the registry will be
+configured. If a version is specified, but the command is not, the
+compiler binary will be searched in standard installation paths for that
+version, followed by PATH.
+
+The compiler command should be specified using forward slashes, and
+quoted.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+`assembler`::
+The command that compiles assembler sources. If not specified, `ml`
+will be used. The command will be invoked after the setup script was
+executed and adjusted the PATH variable.
+
+`compiler`::
+The command that compiles C and C++ sources. If not specified, `cl`
+will be used. The command will be invoked after the setup script was
+executed and adjusted the PATH variable.
+
+`compiler-filter`::
+Command through which to pipe the output of running the compiler. For
+ example to pass the output to STLfilt.
+
+`idl-compiler`::
+The command that compiles Microsoft COM interface definition files. If
+not specified, `midl` will be used. The command will be invoked after
+the setup script was executed and adjusted the PATH variable.
+
+`linker`::
+The command that links executables and dynamic libraries. If not
+specified, `link` will be used. The command will be invoked after the
+setup script was executed and adjusted the PATH variable.
+
+`mc-compiler`::
+The command that compiles Microsoft message catalog files. If not
+specified, `mc` will be used. The command will be invoked after the
+setup script was executed and adjusted the PATH variable.
+
+`resource-compiler`::
+The command that compiles resource files. If not specified, `rc` will
+be used. The command will be invoked after the setup script was
+executed and adjusted the PATH variable.
+
+`setup`::
+The filename of the global environment setup script to run before
+invoking any of the tools defined in this toolset. Will not be used in
+case a target platform specific script has been explicitly specified
+for the current target platform. Used setup script will be passed the
+target platform identifier (x86, x86_amd64, x86_ia64, amd64 or ia64)
+as a parameter. If not specified a default script is chosen based on
+the used compiler binary, e.g. `vcvars32.bat` or `vsvars32.bat`.
+
+`setup-amd64`; `setup-i386`; `setup-ia64`::
+The filename of the target platform specific environment setup script
+to run before invoking any of the tools defined in this toolset. If
+not specified the global environment setup script is used.
+
+[[bbv2.reference.tools.compiler.msvc.64]]
+== 64-bit support
+
+Starting with version 8.0, Microsoft Visual Studio can generate binaries
+for 64-bit processor, both 64-bit flavours of x86 (codenamed
+AMD64/EM64T), and Itanium (codenamed IA64). In addition, compilers that
+are itself run in 64-bit mode, for better performance, are provided. The
+complete list of compiler configurations are as follows (we abbreviate
+AMD64/EM64T to just AMD64):
+
+* 32-bit x86 host, 32-bit x86 target
+* 32-bit x86 host, 64-bit AMD64 target
+* 32-bit x86 host, 64-bit IA64 target
+* 64-bit AMD64 host, 64-bit AMD64 target
+* 64-bit IA64 host, 64-bit IA64 target
+
+The 32-bit host compilers can be always used, even on 64-bit Windows. On
+the contrary, 64-bit host compilers require both 64-bit host processor
+and 64-bit Windows, but can be faster. By default, only 32-bit host,
+32-bit target compiler is installed, and additional compilers need to be
+installed explicitly.
+
+To use 64-bit compilation you should:
+
+1. Configure you compiler as usual. If you provide a path to the
+compiler explicitly, provide the path to the 32-bit compiler. If you try
+to specify the path to any of 64-bit compilers, configuration will not
+work.
+2. When compiling, use `address-model=64`, to generate AMD64 code.
+3. To generate IA64 code, use `architecture=ia64`
+
+The (AMD64 host, AMD64 target) compiler will be used automatically when
+you are generating AMD64 code and are running 64-bit Windows on AMD64.
+The (IA64 host, IA64 target) compiler will never be used, since nobody
+has an IA64 machine to test.
+
+It is believed that AMD64 and EM64T targets are essentially compatible.
+The compiler options `/favor:AMD64` and `/favor:EM64T`, which are
+accepted only by AMD64 targeting compilers, cause the generated code to
+be tuned to a specific flavor of 64-bit x86. B2 will make use
+of those options depending on the value of the`instruction-set` feature.
+
+[[bbv2.reference.tools.compiler.msvc.winrt]]
+== Windows Runtime support
+
+Starting with version 11.0, Microsoft Visual Studio can produce binaries
+for Windows Store and Phone in addition to traditional Win32 desktop. To
+specify which Windows API set to target, use the `windows-api` feature.
+Available options are `desktop`, `store`, or `phone`. If not specified,
+`desktop` will be used.
+
+When using `store` or `phone` the specified toolset determines what
+Windows version is targeted. The following options are available:
+
+* Windows 8.0: toolset=msvc-11.0 windows-api=store
+* Windows 8.1: toolset=msvc-12.0 windows-api=store
+* Windows Phone 8.0: toolset=msvc-11.0 windows-api=phone
+* Windows Phone 8.1: toolset=msvc-12.0 windows-api=phone
+
+For example use the following to build for Windows Store 8.1 with the
+ARM architecture:
+
+----
+.\b2 toolset=msvc-12.0 windows-api=store architecture=arm
+----
+
+Note that when targeting Windows Phone 8.1, version 12.0 didn't include
+the vcvars phone setup scripts. They can be separately downloaded from
+http://blogs.msdn.com/b/vcblog/archive/2014/07/18/using-boost-libraries-in-windows-store-and-phone-applications.aspx[here].
+
+|# # end::doc[]
+
+
+################################################################################
+#
+# MSVC Boost Build toolset module.
+# --------------------------------
+#
+# All toolset versions need to have their location either auto-detected or
+# explicitly specified except for the special 'default' version that expects the
+# environment to find the needed tools or report an error.
+#
+################################################################################
+
+import "class" : new ;
+import common ;
+import feature ;
+import generators ;
+import mc ;
+import midl ;
+import os ;
+import path ;
+import pch ;
+import project ;
+import property ;
+import property-set ;
+import rc ;
+import sequence ;
+import set ;
+import toolset ;
+import type ;
+import virtual-target ;
+
+
+type.register MANIFEST : manifest ;
+
+#| tag::embed-doc[]
+
+[[bbv2.builtin.features.embed-manifest]]`embed-manifest`::
+*Allowed values:* `on`, `off`.
++
+This feature is specific to the `msvc` toolset (see <<Microsoft Visual C++>>),
+and controls whether the manifest files should be embedded inside executables
+and shared libraries, or placed alongside them. This feature corresponds to the
+IDE option found in the project settings dialog, under Configuration Properties
+-> Manifest Tool -> Input and Output -> Embed manifest.
+
+|# # end::embed-doc[]
+
+feature.feature embed-manifest : on off : incidental propagated ;
+
+#| tag::embed-doc[]
+
+[[bbv2.builtin.features.embed-manifest-file]]`embed-manifest-file`::
+This feature is specific to the `msvc` toolset (see <<Microsoft Visual C++>>),
+and controls which manifest files should be embedded inside executables and
+shared libraries. This feature corresponds to the IDE option found in the
+project settings dialog, under Configuration Properties -> Manifest Tool ->
+Input and Output -> Additional Manifest Files.
+
+|# # end::embed-doc[]
+
+feature.feature embed-manifest-file : : free dependency ;
+
+type.register PDB : pdb ;
+
+
+################################################################################
+#
+# Public rules.
+#
+################################################################################
+
+# Initialize a specific toolset version configuration. As the result, path to
+# compiler and, possible, program names are set up, and will be used when that
+# version of compiler is requested. For example, you might have:
+#
+# using msvc : 6.5 : cl.exe ;
+# using msvc : 7.0 : Y:/foo/bar/cl.exe ;
+#
+# The version parameter may be omitted:
+#
+# using msvc : : Z:/foo/bar/cl.exe ;
+#
+# The following keywords have special meanings when specified as versions:
+# - all - all detected but not yet used versions will be marked as used
+# with their default options.
+# - default - this is an equivalent to an empty version.
+#
+# Depending on a supplied version, detected configurations and presence 'cl.exe'
+# in the path different results may be achieved. The following table describes
+# the possible scenarios:
+#
+# Nothing "x.y"
+# Passed Nothing "x.y" detected, detected,
+# version detected detected cl.exe in path cl.exe in path
+#
+# default Error Use "x.y" Create "default" Use "x.y"
+# all None Use all None Use all
+# x.y - Use "x.y" - Use "x.y"
+# a.b Error Error Create "a.b" Create "a.b"
+#
+# "x.y" - refers to a detected version;
+# "a.b" - refers to an undetected version.
+#
+# FIXME: Currently the command parameter and the <compiler> property parameter
+# seem to overlap in duties. Remove this duplication. This seems to be related
+# to why someone started preparing to replace init with configure rules.
+#
+rule init (
+ # The msvc version being configured. When omitted the tools invoked when no
+ # explicit version is given will be configured.
+ version ?
+
+ # The command used to invoke the compiler. If not specified:
+ # - if version is given, default location for that version will be
+ # searched
+ #
+ # - if version is not given, default locations for MSVC 9.0, 8.0, 7.1, 7.0
+ # and 6.* will be searched
+ #
+ # - if compiler is not found in the default locations, PATH will be
+ # searched.
+ : command *
+
+ # Options may include:
+ #
+ # All options shared by multiple toolset types as handled by the
+ # common.handle-options() rule, e.g. <cflags>, <compileflags>, <cxxflags>,
+ # <fflags> & <linkflags>.
+ #
+ # <assembler>
+ # <compiler>
+ # <idl-compiler>
+ # <linker>
+ # <mc-compiler>
+ # <resource-compiler>
+ # Exact tool names to be used by this msvc toolset configuration.
+ #
+ # <compiler-filter>
+ # Command through which to pipe the output of running the compiler.
+ # For example to pass the output to STLfilt.
+ #
+ # <setup>
+ # Global setup command to invoke before running any of the msvc tools.
+ # It will be passed additional option parameters depending on the actual
+ # target platform.
+ #
+ # <setup-amd64>
+ # <setup-i386>
+ # <setup-ia64>
+ # <setup-arm>
+ # <setup-phone-i386>
+ # <setup-phone-arm>
+ # Platform specific setup command to invoke before running any of the
+ # msvc tools used when builing a target for a specific platform, e.g.
+ # when building a 32 or 64 bit executable.
+ #
+ # <rewrite-setup-scripts>
+ # Whether to rewrite setup scripts. New scripts will be output in
+ # build tree and will be used instead of originals in build actions.
+ # Possible values:
+ # * on - rewrite scripts, if they do not already exist (default)
+ # * always - always rewrite scripts, even if they already exist
+ # * off - use original setup scripts
+ : options *
+)
+{
+ if $(command)
+ {
+ options += <command>$(command) ;
+ }
+ configure $(version) : $(options) ;
+}
+
+
+# 'configure' is a newer version of 'init'. The parameter 'command' is passed as
+# a part of the 'options' list. See the 'init' rule comment for more detailed
+# information.
+#
+rule configure ( version ? : options * )
+{
+ switch $(version)
+ {
+ case "all" :
+ if $(options)
+ {
+ import errors ;
+ errors.error "MSVC toolset configuration: options should be"
+ "empty when '$(version)' is specified." ;
+ }
+
+ # Configure (i.e. mark as used) all registered versions.
+ local all-versions = [ $(.versions).all ] ;
+ if ! $(all-versions)
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "notice: [msvc-cfg] Asked to configure all registered"
+ "msvc toolset versions when there are none currently"
+ "registered." ;
+ }
+ }
+ else
+ {
+ for local v in $(all-versions)
+ {
+ # Note that there is no need to skip already configured
+ # versions here as this will request configure-really rule
+ # to configure the version using default options which will
+ # in turn cause it to simply do nothing in case the version
+ # has already been configured.
+ configure-really $(v) ;
+ }
+ }
+
+ case "default" :
+ configure-really : $(options) ;
+
+ case * :
+ configure-really $(version) : $(options) ;
+ }
+}
+
+
+# Sets up flag definitions dependent on the compiler version used.
+# - 'version' is the version of compiler in N.M format.
+# - 'conditions' is the property set to be used as flag conditions.
+# - 'toolset' is the toolset for which flag settings are to be defined.
+# This makes the rule reusable for other msvc-option-compatible compilers.
+#
+rule configure-version-specific ( toolset : version : conditions )
+{
+ toolset.push-checking-for-flags-module unchecked ;
+ # Starting with versions 7.0, the msvc compiler have the /Zc:forScope and
+ # /Zc:wchar_t options that improve C++ standard conformance, but those
+ # options are off by default. If we are sure that the msvc version is at
+ # 7.*, add those options explicitly. We can be sure either if user specified
+ # version 7.* explicitly or if we auto-detected the version ourselves.
+ if ! [ MATCH ^(6\\.) : $(version) ]
+ {
+ toolset.flags $(toolset).compile CFLAGS $(conditions) : "/Zc:forScope" "/Zc:wchar_t" ;
+ toolset.flags $(toolset).compile.c++ C++FLAGS $(conditions) : /wd4675 ;
+
+ # Explicitly disable the 'function is deprecated' warning. Some msvc
+ # versions have a bug, causing them to emit the deprecation warning even
+ # with /W0.
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<warnings>off : /wd4996 ;
+
+ if [ MATCH "^([78]\\.)" : $(version) ]
+ {
+ # 64-bit compatibility warning deprecated since 9.0, see
+ # http://msdn.microsoft.com/en-us/library/yt4xw8fh.aspx
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<warnings>all : /Wp64 ;
+ }
+ }
+
+ #
+ # Processor-specific optimization.
+ #
+
+ if [ MATCH "^([67])" : $(version) ]
+ {
+ # 8.0 deprecates some of the options.
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<optimization>speed $(conditions)/<optimization>space : /Ogiy /Gs ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<optimization>speed : /Ot ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<optimization>space : /Os ;
+
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/<instruction-set> : /GB ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/<instruction-set>i486 : /G4 ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/<instruction-set>$(.cpu-type-g5) : /G5 ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/<instruction-set>$(.cpu-type-g6) : /G6 ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/<instruction-set>$(.cpu-type-g7) : /G7 ;
+
+ # Improve floating-point accuracy. Otherwise, some of C++ Boost's "math"
+ # tests will fail.
+ toolset.flags $(toolset).compile CFLAGS $(conditions) : /Op ;
+
+ # 7.1 and below have single-threaded static RTL.
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>off/<runtime-link>static/<threading>single : /ML ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>on/<runtime-link>static/<threading>single : /MLd ;
+ }
+ else
+ {
+ # 8.0 and above adds some more options.
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-amd64)/<instruction-set> : "/favor:blend" ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-amd64)/<instruction-set>$(.cpu-type-em64t) : "/favor:EM64T" ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-amd64)/<instruction-set>$(.cpu-type-amd64) : "/favor:AMD64" ;
+
+ # 8.0 and above only has multi-threaded static RTL.
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>off/<runtime-link>static/<threading>single : /MT ;
+ toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>on/<runtime-link>static/<threading>single : /MTd ;
+
+ # Specify target machine type so the linker will not need to guess.
+ toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-amd64) : "/MACHINE:X64" ;
+ toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-i386) : "/MACHINE:X86" ;
+ toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-ia64) : "/MACHINE:IA64" ;
+ toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-arm) : "/MACHINE:ARM" ;
+ toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-arm64) : "/MACHINE:ARM64" ;
+
+ # Make sure that manifest will be generated even if there is no
+ # dependencies to put there.
+ toolset.flags $(toolset).link LINKFLAGS $(conditions) : /MANIFEST ;
+ }
+
+ toolset.pop-checking-for-flags-module ;
+}
+
+# Feature for handling targeting different Windows API sets.
+feature.feature windows-api : desktop store phone : propagated composite link-incompatible ;
+feature.compose <windows-api>store : <define>WINAPI_FAMILY=WINAPI_FAMILY_APP <define>_WIN32_WINNT=0x0602
+ <linkflags>/APPCONTAINER ;
+feature.compose <windows-api>phone : <define>WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP <define>_WIN32_WINNT=0x0602
+ <linkflags>/APPCONTAINER <linkflags>"/NODEFAULTLIB:ole32.lib" <linkflags>"/NODEFAULTLIB:kernel32.lib" <linkflags>WindowsPhoneCore.lib ;
+feature.set-default windows-api : desktop ;
+
+
+# Registers this toolset including all of its flags, features & generators. Does
+# nothing on repeated calls.
+#
+rule register-toolset ( )
+{
+ if ! msvc in [ feature.values toolset ]
+ {
+ register-toolset-really ;
+ }
+}
+
+rule resolve-possible-msvc-version-alias ( version )
+{
+ if $(.version-alias-$(version))
+ {
+ version = $(.version-alias-$(version)) ;
+ }
+ return $(version) ;
+}
+
+
+# Declare action for creating static libraries. If library exists, remove it
+# before adding files. See
+# http://article.gmane.org/gmane.comp.lib.boost.build/4241 for rationale.
+if [ os.name ] in NT
+{
+ # The 'DEL' command would issue a message to stdout if the file does not
+ # exist, so need a check.
+ actions archive
+ {
+ if exist "$(<[1])" DEL "$(<[1])"
+ $(.SETUP) $(.LD) $(AROPTIONS) /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ }
+}
+else
+{
+ actions archive
+ {
+ $(.RM) "$(<[1])"
+ $(.SETUP) $(.LD) $(AROPTIONS) /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ }
+}
+
+rule compile.asm ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+}
+
+actions compile.asm
+{
+ $(.SETUP) $(.ASM) -D$(ASMDEFINES) $(ASMFLAGS) $(USER_ASMFLAGS) $(.ASM_OUTPUT) "$(<:W)" "$(>:W)"
+}
+
+
+rule compile.c ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ C++FLAGS on $(targets[1]) = ;
+ get-rspline $(targets) : -TC ;
+ compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ;
+}
+
+
+rule compile.c.preprocess ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ C++FLAGS on $(targets[1]) = ;
+ get-rspline $(targets) : -TC ;
+ preprocess-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ;
+}
+
+
+rule compile.c.pch ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ C++FLAGS on $(targets[1]) = ;
+ get-rspline $(targets[1]) : -TC ;
+ get-rspline $(targets[2]) : -TC ;
+ local pch-source = [ on $(<) return $(PCH_SOURCE) ] ;
+ if $(pch-source)
+ {
+ DEPENDS $(<) : $(pch-source) ;
+ compile-c-c++-pch-s $(targets) : $(sources) $(pch-source) ;
+ }
+ else
+ {
+ compile-c-c++-pch $(targets) : $(sources) ;
+ }
+}
+
+toolset.flags msvc YLOPTION : "-Yl" ;
+
+# Action for running the C/C++ compiler without using precompiled headers.
+#
+# WARNING: Synchronize any changes this in action with intel-win
+#
+# Notes regarding PDB generation, for when we use
+# <debug-symbols>on/<debug-store>database:
+#
+# 1. PDB_CFLAG is only set for <debug-symbols>on/<debug-store>database, ensuring
+# that the /Fd flag is dropped if PDB_CFLAG is empty.
+#
+# 2. When compiling executables's source files, PDB_NAME is set on a per-source
+# file basis by rule compile-c-c++. The linker will pull these into the
+# executable's PDB.
+#
+# 3. When compiling library's source files, PDB_NAME is updated to <libname>.pdb
+# for each source file by rule archive, as in this case compiler must be used
+# to create a single PDB for our library.
+#
+actions compile-c-c++ bind PDB_NAME
+{
+ $(.SETUP) $(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fo"$(<[1]:W)" $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" $(.CC.FILTER)
+}
+
+actions preprocess-c-c++ bind PDB_NAME
+{
+ $(.SETUP) $(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -E $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" >"$(<[1]:W)"
+}
+
+rule compile-c-c++ ( targets + : sources * )
+{
+ DEPENDS $(<[1]) : [ on $(<[1]) return $(PCH_HEADER) ] ;
+ DEPENDS $(<[1]) : [ on $(<[1]) return $(PCH_FILE) ] ;
+ PDB_NAME on $(<) = $(<[1]:S=.pdb) ;
+ LOCATE on $(<[1]:S=.pdb) = [ on $(<[1]) return $(LOCATE) ] ;
+}
+
+rule preprocess-c-c++ ( targets + : sources * )
+{
+ DEPENDS $(<[1]) : [ on $(<[1]) return $(PCH_HEADER) ] ;
+ DEPENDS $(<[1]) : [ on $(<[1]) return $(PCH_FILE) ] ;
+ PDB_NAME on $(<) = $(<:S=.pdb) ;
+ LOCATE on $(<[1]:S=.pdb) = [ on $(<[1]) return $(LOCATE) ] ;
+}
+
+# Action for running the C/C++ compiler using precompiled headers. In addition
+# to whatever else it needs to compile, this action also adds a temporary source
+# .cpp file used to compile the precompiled headers themselves.
+#
+# The global .escaped-double-quote variable is used to avoid messing up Emacs
+# syntax highlighting in the messy N-quoted code below.
+actions compile-c-c++-pch
+{
+ $(.SETUP) $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(.escaped-double-quote)$(>[1]:D=)$(.escaped-double-quote)$(.nl))" $(.CC.FILTER)
+}
+
+
+# Action for running the C/C++ compiler using precompiled headers. An already
+# built source file for compiling the precompiled headers is expected to be
+# given as one of the source parameters.
+actions compile-c-c++-pch-s
+{
+ $(.SETUP) $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" $(.CC.FILTER)
+}
+
+
+rule compile.c++ ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ get-rspline $(targets) : -TP ;
+ compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ;
+}
+
+rule compile.c++.preprocess ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ get-rspline $(targets) : -TP ;
+ preprocess-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ;
+}
+
+
+rule compile.c++.pch ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ get-rspline $(targets[1]) : -TP ;
+ get-rspline $(targets[2]) : -TP ;
+ local pch-source = [ on $(<) return $(PCH_SOURCE) ] ;
+ if $(pch-source)
+ {
+ DEPENDS $(<) : $(pch-source) ;
+ compile-c-c++-pch-s $(targets) : $(sources) $(pch-source) ;
+ }
+ else
+ {
+ compile-c-c++-pch $(targets) : $(sources) ;
+ }
+}
+
+rule compile.idl ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+}
+
+# See midl.jam for details.
+#
+actions compile.idl
+{
+ $(.SETUP) $(.IDL) /nologo @"@($(<[1]:W).rsp:E=$(.nl)"$(>:W)" $(.nl)-D$(DEFINES) $(.nl)"-I$(INCLUDES:W)" $(.nl)-U$(UNDEFS) $(.nl)$(MIDLFLAGS) $(.nl)/tlb "$(<[1]:W)" $(.nl)/h "$(<[2]:W)" $(.nl)/iid "$(<[3]:W)" $(.nl)/proxy "$(<[4]:W)" $(.nl)/dlldata "$(<[5]:W)")"
+ $(.TOUCH_FILE) "$(<[4]:W)"
+ $(.TOUCH_FILE) "$(<[5]:W)"
+}
+
+rule compile.mc ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+}
+
+actions compile.mc
+{
+ $(.SETUP) $(.MC) $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"
+}
+
+
+rule compile.rc ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+}
+
+actions compile.rc
+{
+ $(.SETUP) $(.RC) -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES:W)" -fo "$(<:W)" "$(>:W)"
+}
+
+toolset.uses-features msvc.link : <embed-manifest> <embed-manifest-file> ;
+
+rule link ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ if <embed-manifest>on in $(properties)
+ {
+ if [ feature.get-values <embed-manifest-file> : $(properties) ]
+ {
+ DEPENDS $(<) : [ on $(<) return $(EMBED_MANIFEST_FILE) ] ;
+ msvc.manifest.user $(targets) $(EMBED_MANIFEST_FILE) : $(sources) : $(properties) ;
+ }
+ else
+ {
+ msvc.manifest $(targets) : $(sources) : $(properties) ;
+ }
+ }
+}
+
+rule link.dll ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ;
+ local import-lib ;
+ if ! <suppress-import-lib>true in $(properties)
+ {
+ import-lib = $(targets[2]) ;
+ IMPORT_LIB on $(targets) = $(import-lib) ;
+ }
+ # On msvc-14.1, the linker might not touch the import library
+ # if the exports do not change. (Apparently this could also
+ # happen for incremental linking, which is why we disable it,
+ # but that no longer seems to be enough).
+ # Therefore, don't update the import library just because
+ # it's out-dated. It will be force updated, when the dll
+ # is updated. Also, make it so that anything that depends
+ # on it depends on the dll as well.
+ NOUPDATE $(import-lib) ;
+ INCLUDES $(import-lib) : $(targets[1]) ;
+ if <embed-manifest>on in $(properties)
+ {
+ if [ feature.get-values <embed-manifest-file> : $(properties) ]
+ {
+ DEPENDS $(<) : [ on $(<) return $(EMBED_MANIFEST_FILE) ] ;
+ msvc.manifest.dll.user $(targets) $(EMBED_MANIFEST_FILE) : $(sources) : $(properties) ;
+ }
+ else
+ {
+ msvc.manifest.dll $(targets) : $(sources) : $(properties) ;
+ }
+ }
+}
+
+# Incremental linking a DLL causes no end of problems: if the actual exports do
+# not change, the import .lib file is never updated. Therefore, the .lib is
+# always out-of-date and gets rebuilt every time. I am not sure that incremental
+# linking is such a great idea in general, but in this case I am sure we do not
+# want it.
+
+# Windows manifest is a new way to specify dependencies on managed DotNet
+# assemblies and Windows native DLLs. The manifests are embedded as resources
+# and are useful in any PE target (both DLL and EXE).
+
+if [ os.name ] in NT
+{
+ actions link bind DEF_FILE LIBRARIES_MENTIONED_BY_FILE
+ {
+ $(.SETUP) $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
+ }
+
+ actions manifest
+ {
+ if exist "$(<[1]).manifest" (
+ $(.SETUP) $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
+ )
+ }
+
+ actions manifest.user bind EMBED_MANIFEST_FILE
+ {
+ $(.SETUP) $(.MT) -manifest "$(EMBED_MANIFEST_FILE)" "-outputresource:$(<[1]);1"
+ }
+
+ actions link.dll bind IMPORT_LIB DEF_FILE LIBRARIES_MENTIONED_BY_FILE
+ {
+ $(.SETUP) $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(IMPORT_LIB:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
+ }
+
+ actions manifest.dll
+ {
+ if exist "$(<[1]).manifest" (
+ $(.SETUP) $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
+ )
+ }
+ actions manifest.dll.user bind EMBED_MANIFEST_FILE
+ {
+ $(.SETUP) $(.MT) -manifest "$(EMBED_MANIFEST_FILE)" "-outputresource:$(<[1]);2"
+ }
+}
+else
+{
+ actions link bind DEF_FILE LIBRARIES_MENTIONED_BY_FILE
+ {
+ $(.SETUP) $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ }
+
+ actions manifest
+ {
+ if test -e "$(<[1]).manifest"; then
+ $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);1"
+ fi
+ }
+
+ actions link.dll bind IMPORT_LIB DEF_FILE LIBRARIES_MENTIONED_BY_FILE
+ {
+ $(.SETUP) $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(IMPORT_LIB:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ }
+
+ actions manifest.dll
+ {
+ if test -e "$(<[1]).manifest"; then
+ $(.SETUP) $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);2"
+ fi
+ }
+
+ actions manifest.dll.user bind EMBED_MANIFEST_FILE
+ {
+ $(.SETUP) $(.MT) -manifest "$(EMBED_MANIFEST_FILE)" "-outputresource:$(<[1]);2"
+ }
+}
+
+# This rule sets up the pdb file that will be used when generating static
+# libraries and the debug-store option is database, so that the compiler puts
+# all the debug info into a single .pdb file named after the library.
+#
+# Poking at source targets this way is probably not clean, but it is the
+# easiest approach.
+#
+rule archive ( targets + : sources * : properties * )
+{
+ set-setup-command $(targets) : $(properties) ;
+ PDB_NAME on $(>) = $(<[1]:S=.pdb) ;
+ LOCATE on $(<[1]:S=.pdb) = [ on $(<[1]) return $(LOCATE) ] ;
+}
+
+
+################################################################################
+#
+# Classes.
+#
+################################################################################
+
+class msvc-pch-generator : pch-generator
+{
+ import property-set ;
+
+ rule run-pch ( project name ? : property-set : sources * )
+ {
+ # Searching for the header and source file in the sources.
+ local pch-header ;
+ local pch-source ;
+ for local s in $(sources)
+ {
+ if [ type.is-derived [ $(s).type ] H ]
+ {
+ pch-header = $(s) ;
+ }
+ else if
+ [ type.is-derived [ $(s).type ] CPP ] ||
+ [ type.is-derived [ $(s).type ] C ]
+ {
+ pch-source = $(s) ;
+ }
+ }
+
+ if ! $(pch-header)
+ {
+ import errors : user-error : errors.user-error ;
+ errors.user-error "can not build pch without pch-header" ;
+ }
+
+ # If we do not have the PCH source - that is fine. We will just create a
+ # temporary .cpp file in the action.
+
+ local generated = [ generator.run $(project) $(name)
+ : [ property-set.create
+ # Passing of <pch-source> is a dirty trick, needed because
+ # non-composing generators with multiple inputs are subtly
+ # broken. For more detailed information see:
+ # https://zigzag.cs.msu.su:7813/boost.build/ticket/111
+ <pch-source>$(pch-source)
+ [ $(property-set).raw ] ]
+ : $(pch-header) ] ;
+
+ local pch-file ;
+ for local g in $(generated[2-])
+ {
+ if [ type.is-derived [ $(g).type ] PCH ]
+ {
+ pch-file = $(g) ;
+ }
+ }
+
+ return [ $(generated[1]).add-raw <pch-header>$(pch-header)
+ <pch-file>$(pch-file) ] $(generated[2-]) ;
+ }
+}
+
+
+################################################################################
+#
+# Local rules.
+#
+################################################################################
+
+# Detects versions listed as '.known-versions' by checking registry information,
+# environment variables & default paths. Supports both native Windows and
+# Cygwin.
+#
+local rule auto-detect-toolset-versions ( )
+{
+ if [ os.name ] in NT CYGWIN
+ {
+ # Get installation paths from the registry.
+ for local i in $(.known-versions)
+ {
+ if $(.version-$(i)-reg)
+ {
+ local vc-path ;
+ for local x in "" "Wow6432Node\\"
+ {
+ vc-path += [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\"$(x)"\\Microsoft\\"$(.version-$(i)-reg)
+ : "ProductDir" ] ;
+ }
+
+ if $(vc-path)
+ {
+ vc-path = [ path.join [ path.make-NT $(vc-path[1]) ] "bin" ] ;
+ register-configuration $(i) : [ path.native $(vc-path[1]) ] ;
+ }
+ }
+ }
+ }
+
+ # Check environment and default installation paths.
+ for local i in $(.known-versions)
+ {
+ if ! $(i) in [ $(.versions).all ]
+ {
+ register-configuration $(i) : [ default-path $(i) ] ;
+ }
+ }
+}
+
+actions write-setup-script
+{
+ @($(STDOUT):E=$(FILE_CONTENTS:J=$(.nl))) > "$(<)"
+}
+
+if [ os.name ] = NT
+{
+ local rule call-batch-script ( command )
+ {
+ return "call $(command) >nul$(.nl)" ;
+ }
+}
+else
+{
+ # On cygwin, we need to run both the batch script
+ # and the following command in the same instance
+ # of cmd.exe.
+ local rule call-batch-script ( command )
+ {
+ return "cmd.exe /S /C call $(command) \">nul\" \"&&\" " ;
+ }
+}
+
+# Local helper rule to create the vcvars setup command for given architecture
+# and options.
+#
+local rule generate-setup-cmd ( version : command : parent : options * : cpu : global-setup ? : default-global-setup-options : default-setup )
+{
+ local setup-options ;
+ local setup = [ feature.get-values <setup-$(cpu)> : $(options) ] ;
+
+ if ! $(setup)-is-defined
+ {
+ if $(global-setup)-is-defined
+ {
+ setup = $(global-setup) ;
+
+ # If needed we can easily add using configuration flags
+ # here for overriding which options get passed to the
+ # global setup command for which target platform:
+ # setup-options = [ feature.get-values <setup-options-$(c)> : $(options) ] ;
+ setup-options ?= $(default-global-setup-options) ;
+ }
+ else
+ {
+ if [ MATCH "(14.2)" : $(version) ]
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "notice: [generate-setup-cmd] $(version) is 14.2" ;
+ }
+ parent = [ path.native [ path.join $(parent) "..\\..\\..\\..\\..\\Auxiliary\\Build" ] ] ;
+ }
+ else if [ MATCH "(14.1)" : $(version) ]
+ {
+ if $(.debug-configuration)
+ {
+ ECHO "notice: [generate-setup-cmd] $(version) is 14.1" ;
+ }
+ parent = [ path.native [ path.join $(parent) "..\\..\\..\\..\\..\\Auxiliary\\Build" ] ] ;
+ }
+ setup = [ locate-default-setup $(command) : $(parent) : $(default-setup) ] ;
+ setup ?= [ path.join $(parent) "vcvarsall.bat" ] ;
+ }
+ }
+
+ return $(setup) "$(setup-options:J= )" ;
+}
+
+# Worker for set-setup-command. Usable in a virtual-target.action.
+rule adjust-setup-command ( new-setup : setup : properties * )
+{
+ local internal = $(new-setup:S=.read) ;
+ NOTFILE $(internal) ;
+ local setup-options = [ property.select <msvc.setup-options> : $(properties) ] ;
+ setup-options = $(setup-options:G=:E=) ;
+ DEPENDS $(internal) : $(setup) ;
+ DEPENDS $(new-setup) : $(internal) ;
+ REBUILDS $(new-setup) : $(internal) ;
+ msvc.read-setup $(internal) : $(setup) ;
+ msvc.write-setup-script $(new-setup) : $(setup) ;
+ __ACTION_RULE__ on $(internal) = msvc.rewrite-setup $(setup) $(setup-options) $(new-setup) ;
+}
+
+# This doesn't actually do anything. It's merely
+# used as a trigger for __ACTION_RULE__.
+actions quietly read-setup { }
+
+# Calculates the changes to the environment make by setup-script
+# Should be used as a callback for __ACTION_RULE__
+local rule rewrite-setup ( setup-script setup-options new-setup : target : * )
+{
+ local setup-path = [ on $(setup-script) return $(LOCATE) $(SEARCH) ] ;
+ setup-path = $(setup-path[1]) ;
+ local command = "\"$(setup-script:G=:R=$(setup-path))\" $(setup-options)" ;
+ local original-vars = [ SPLIT_BY_CHARACTERS [ SHELL set ] : "\n" ] ;
+ local new-vars = [ SPLIT_BY_CHARACTERS [ SHELL "$(command) >nul && set" ] : "\n" ] ;
+ local diff-vars = [ set.difference $(new-vars) : $(original-vars) ] ;
+ if $(diff-vars)
+ {
+ FILE_CONTENTS on $(new-setup) = "REM $(command)" "SET "$(diff-vars) ;
+ }
+}
+
+IMPORT msvc : rewrite-setup : : msvc.rewrite-setup ;
+
+# Helper rule to generate a faster alternative to MSVC setup scripts.
+# We used to call MSVC setup scripts directly in every action, however in
+# newer MSVC versions (10.0+) they make long-lasting registry queries
+# which have a significant impact on build time.
+local rule set-setup-command ( targets * : properties * )
+{
+ if ! [ on $(targets) return $(.SETUP) ]
+ {
+ local setup-script = [ on $(targets) return $(.SETUP-SCRIPT) ] ;
+ # If no setup script was given, then we don't need to do anything.
+ if ! $(setup-script)
+ {
+ return ;
+ }
+ local setup-options = [ on $(targets) return $(.SETUP-OPTIONS) ] ;
+ local key = .setup-command-$(setup-script:E=)-$(setup-options:E=) ;
+ if ! $($(key))
+ {
+ properties = [ feature.expand $(properties) ] ;
+ properties = [ property.select <toolset> <toolset-msvc:version> <architecture> <address-model> <windows-api> <relevant> : $(properties) ] ;
+ local ps = [ property-set.create $(properties) <msvc.setup-options>$(setup-options) ] ;
+ local original = [ virtual-target.from-file $(setup-script) : [ path.pwd ] : $(.project) ] ;
+ local action = [ new non-scanning-action $(original) : msvc.adjust-setup-command : $(ps) ] ;
+ local new-setup = [ virtual-target.register [ new file-target msvc-setup.bat exact : : $(.project) : $(action) ] ] ;
+ local command = [ $(new-setup).actualize ] ;
+ local path = [ on $(command) return $(LOCATE) ] ;
+ local block-update = $(command:S=.nup) ;
+ NOUPDATE $(block-update) ;
+ NOTFILE $(block-update) ;
+ DEPENDS $(block-update) : $(command) ;
+ if [ on $(targets) return $(.REWRITE-SETUP) ]
+ {
+ ALWAYS $(command) ;
+ }
+ $(key) = [ call-batch-script "\"$(command:WG=:R=$(path))\" $(setup-options:E=)" ] $(block-update) ;
+ }
+ DEPENDS $(targets) : $($(key)[2]) ;
+ .SETUP on $(targets) = $($(key)[1]) ;
+ }
+}
+
+# Worker rule for toolset version configuration. Takes an explicit version id or
+# nothing in case it should configure the default toolset version (the first
+# registered one or a new 'default' one in case no toolset versions have been
+# registered yet).
+#
+local rule configure-really ( version ? : options * )
+{
+ local command = [ feature.get-values <command> : $(options) ] ;
+
+ if ! $(version) && ! $(command)
+ {
+ # We were given neither a command, nor a version.
+ # Take the best registered (i.e. auto-detected) version.
+ # FIXME: consider whether an explicitly specified setup script
+ # should disable this logic. We already won't get here if
+ # there is a user specified command.
+ version = [ $(.versions).all ] ;
+ for local known in $(.known-versions)
+ {
+ if $(known) in $(version)
+ {
+ version = $(known) ;
+ break ;
+ }
+ }
+ # version might still have multiple elements if no versions
+ # were auto-detected, but an unknown version was configured
+ # manually.
+ version = $(version[1]) ;
+ }
+
+ # Handle a user-provided command, and deduce the version if necessary.
+ # If the user-requested version was not autodetected and no command
+ # was given, attempt to find it in PATH
+ if $(command) || ! ( $(version:E=default) in [ $(.versions).all ] )
+ {
+ local found-command = [ common.get-invocation-command-nodefault msvc : cl.exe : $(command) ] ;
+
+ if $(found-command)
+ {
+ command = $(found-command) ;
+ if ! $(command:D)
+ {
+ local path = [ common.get-absolute-tool-path $(command) ] ;
+ command = $(command:R=$(path)) ;
+ }
+ }
+ else
+ {
+ # If we still failed to find cl.exe, bail out.
+ ECHO ;
+ ECHO warning\:
+ "Did not find command for MSVC toolset."
+ "If you have Visual Studio 2017 installed you will need to"
+ "specify the full path to the command,"
+ "set VS150COMNTOOLS for your installation,"
+ "or"
+ "build from the 'Visual Studio Command Prompt for VS 2017'."
+ ;
+ ECHO ;
+ command ?= cl.exe ;
+ }
+
+ if ! $(version)
+ {
+ # Even if version is not explicitly specified, try to detect the
+ # version from the path.
+ # FIXME: We currently detect both Microsoft Visual Studio 9.0 and
+ # 9.0express as 9.0 here.
+ if [ MATCH "(MSVC\\\\14.2)" : $(command) ]
+ {
+ version = 14.2 ;
+ }
+ else if [ MATCH "(MSVC\\\\14.1)" : $(command) ]
+ {
+ version = 14.1 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 14)" : $(command) ]
+ {
+ version = 14.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 12)" : $(command) ]
+ {
+ version = 12.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 11)" : $(command) ]
+ {
+ version = 11.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 10)" : $(command) ]
+ {
+ version = 10.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 9)" : $(command) ]
+ {
+ version = 9.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ]
+ {
+ version = 8.0 ;
+ }
+ else if [ MATCH "(NET 2003[\/\\]VC7)" : $(command) ]
+ {
+ version = 7.1 ;
+ }
+ else if [ MATCH "(Microsoft Visual C\\+\\+ Toolkit 2003)" :
+ $(command) ]
+ {
+ version = 7.1toolkit ;
+ }
+ else if [ MATCH "(.NET[\/\\]VC7)" : $(command) ]
+ {
+ version = 7.0 ;
+ }
+ else
+ {
+ version = 6.0 ;
+ }
+ }
+ }
+
+ # Version alias -> real version number.
+ version = [ resolve-possible-msvc-version-alias $(version) ] ;
+
+ # Check whether the selected configuration is already in use.
+ if $(version) in [ $(.versions).used ]
+ {
+ # Allow multiple 'toolset.using' calls for the same configuration if the
+ # identical sets of options are used.
+ if $(options) && ( $(options) != [ $(.versions).get $(version) : options ] )
+ {
+ import errors ;
+ errors.user-error "MSVC toolset configuration: Toolset version"
+ "'$(version)' already configured." ;
+ }
+ }
+ else
+ {
+ # Register a new configuration.
+ $(.versions).register $(version) ;
+ $(.versions).set $(version) : options : $(options) ;
+
+ # Mark the configuration as 'used'.
+ $(.versions).use $(version) ;
+
+ # Generate conditions and save them.
+ local conditions = [ common.check-init-parameters msvc : version $(version) ] ;
+
+ $(.versions).set $(version) : conditions : $(conditions) ;
+
+ command ?= [ $(.versions).get $(version) : default-command ] ;
+
+ # For 14.1+ we need the exact version as MS is planning rolling updates
+ # that will cause our `setup-cmd` to become invalid
+ exact-version = [ MATCH "(14\.[1-9][0-9]\.[0-9\.]+)" : $(command) ] ;
+
+ common.handle-options msvc : $(conditions) : $(command) : $(options) ;
+
+ # Generate and register setup command.
+
+ local below-8.0 = [ MATCH "^([67]\\.)" : $(version) ] ;
+ local below-11.0 = [ MATCH "^([6789]\\.|10\\.)" : $(version) ] ;
+
+ local cpu = i386 amd64 ia64 arm arm64 ;
+ if $(below-8.0)
+ {
+ cpu = i386 ;
+ }
+ else if $(below-11.0)
+ {
+ cpu = i386 amd64 ia64 ;
+ }
+
+ local setup-amd64 ;
+ local setup-i386 ;
+ local setup-ia64 ;
+ local setup-arm ;
+ local setup-arm64 ;
+ local setup-phone-i386 ;
+ local setup-phone-arm ;
+
+ if $(command)
+ {
+ # TODO: Note that if we specify a non-existant toolset version then
+ # this rule may find and use a corresponding compiler executable
+ # belonging to an incorrect toolset version. For example, if you
+ # have only MSVC 7.1 installed, have its executable on the path and
+ # specify you want Boost Build to use MSVC 9.0, then you want Boost
+ # Build to report an error but this may cause it to silently use the
+ # MSVC 7.1 compiler even though it thinks it is using the msvc-9.0
+ # toolset version.
+ command = [ common.get-absolute-tool-path $(command[-1]) ] ;
+ }
+
+ if $(command)
+ {
+ local parent = [ path.make $(command) ] ;
+ parent = [ path.parent $(parent) ] ;
+ parent = [ path.native $(parent) ] ;
+
+ # Setup will be used if the command name has been specified. If
+ # setup is not specified explicitly then a default setup script will
+ # be used instead. Setup scripts may be global or architecture/
+ # /platform/cpu specific. Setup options are used only in case of
+ # global setup scripts.
+
+ # Default setup scripts provided with different VC distributions:
+ #
+ # VC 7.1 had only the vcvars32.bat script specific to 32 bit i386
+ # builds. It was located in the bin folder for the regular version
+ # and in the root folder for the free VC 7.1 tools.
+ #
+ # Later 8.0 & 9.0 versions introduce separate platform specific
+ # vcvars*.bat scripts (e.g. 32 bit, 64 bit AMD or 64 bit Itanium)
+ # located in or under the bin folder. Most also include a global
+ # vcvarsall.bat helper script located in the root folder which runs
+ # one of the aforementioned vcvars*.bat scripts based on the options
+ # passed to it. So far only the version coming with some PlatformSDK
+ # distributions does not include this top level script but to
+ # support those we need to fall back to using the worker scripts
+ # directly in case the top level script can not be found.
+
+ local global-setup = [ feature.get-values <setup> : $(options) ] ;
+ global-setup = $(global-setup[1]) ;
+ local global-setup-phone = $(global-setup) ;
+ if ! $(below-8.0)
+ {
+ global-setup ?= [ locate-default-setup $(command) : $(parent) :
+ vcvarsall.bat ] ;
+ }
+
+ local default-setup-amd64 = vcvarsx86_amd64.bat ;
+ local default-setup-i386 = vcvars32.bat ;
+ local default-setup-ia64 = vcvarsx86_ia64.bat ;
+ local default-setup-arm = vcvarsx86_arm.bat ;
+ local default-setup-arm64 = vcvarsx86_arm64.bat ;
+ local default-setup-phone-i386 = vcvarsphonex86.bat ;
+ local default-setup-phone-arm = vcvarsphonex86_arm.bat ;
+
+ # http://msdn2.microsoft.com/en-us/library/x4d2c09s(VS.80).aspx and
+ # http://msdn2.microsoft.com/en-us/library/x4d2c09s(vs.90).aspx
+ # mention an x86_IPF option, that seems to be a documentation bug
+ # and x86_ia64 is the correct option.
+ local default-global-setup-options-amd64 = x86_amd64 ;
+ local default-global-setup-options-i386 = x86 ;
+ local default-global-setup-options-ia64 = x86_ia64 ;
+ local default-global-setup-options-arm = x86_arm ;
+ local default-global-setup-options-arm64 = x86_arm64 ;
+
+ # When using 64-bit Windows, and targeting 64-bit, it is possible to
+ # use a native 64-bit compiler, selected by the "amd64" & "ia64"
+ # parameters to vcvarsall.bat. There are two variables we can use --
+ # PROCESSOR_ARCHITECTURE and PROCESSOR_IDENTIFIER. The first is
+ # 'x86' when running 32-bit Windows, no matter which processor is
+ # used, and 'AMD64' on 64-bit windows on x86 (either AMD64 or EM64T)
+ # Windows.
+ #
+ if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_ARCHITECTURE ] ]
+ {
+ default-global-setup-options-amd64 = amd64 ;
+ }
+ # When B2 itself is running as a 32-bit process on 64-bit
+ # Windows, the above test will fail (since WOW64 simulates a 32-bit
+ # environment, including environment values). So check the WOW64
+ # variable PROCESSOR_ARCHITEW6432 as well.
+ if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_ARCHITEW6432 ] ]
+ {
+ default-global-setup-options-amd64 = amd64 ;
+ }
+ # TODO: The same 'native compiler usage' should be implemented for
+ # the Itanium platform by using the "ia64" parameter. For this
+ # though we need someone with access to this platform who can find
+ # out how to correctly detect this case.
+ else if $(somehow-detect-the-itanium-platform)
+ {
+ default-global-setup-options-ia64 = ia64 ;
+ }
+
+ for local c in $(cpu)
+ {
+ exact-version ?= $(version) ;
+ setup-$(c) = [ generate-setup-cmd $(exact-version) : $(command) : $(parent) : $(options) : $(c) : $(global-setup) : $(default-global-setup-options-$(c)) : $(default-setup-$(c)) ] ;
+ }
+
+ # Windows phone has different setup scripts, located in a different directory hierarchy.
+ # The 11.0 toolset can target Windows Phone 8.0 and the 12.0 toolset can target Windows Phone 8.1,
+ # each of which have a different directory for their vcvars setup scripts.
+ local phone-parent = [ path.native [ path.join $(parent) WPSDK ] ] ;
+ local phone-directory = $(phone-parent) ;
+ if [ MATCH "(11.0)" : $(version) ]
+ {
+ phone-directory = [ path.native [ path.join $(phone-directory) WP80 ] ] ;
+ }
+ else if [ MATCH "(12.0)" : $(version) ]
+ {
+ phone-directory = [ path.native [ path.join $(phone-directory) WP81 ] ] ;
+ }
+ global-setup-phone ?= [ locate-default-setup $(phone-directory) : $(phone-parent) : vcvarsphoneall.bat ] ;
+
+ # If can't locate default phone setup script then this VS version doesn't support Windows Phone.
+ if $(global-setup-phone)-is-defined
+ {
+ # i386 CPU is for the Windows Phone emulator in Visual Studio.
+ local phone-cpu = i386 arm ;
+ for local c in $(phone-cpu)
+ {
+ setup-phone-$(c) = [ generate-setup-cmd $(version) : $(phone-directory) : $(phone-parent) : $(options) : $(c) : $(global-setup-phone) : $(default-global-setup-options-$(c)) : $(default-setup-phone-$(c)) ] ;
+ }
+ }
+ }
+
+ # Get tool names (if any) and finish setup.
+
+ compiler = [ feature.get-values <compiler> : $(options) ] ;
+ compiler ?= cl ;
+
+ linker = [ feature.get-values <linker> : $(options) ] ;
+ linker ?= link ;
+
+ resource-compiler = [ feature.get-values <resource-compiler> : $(options) ] ;
+ resource-compiler ?= rc ;
+
+ # Turn on some options for i386 assembler
+ # -coff generate COFF format object file (compatible with cl.exe output)
+ local default-assembler-amd64 = ml64 ;
+ local default-assembler-i386 = "ml -coff" ;
+ local default-assembler-ia64 = ias ;
+ local default-assembler-arm = armasm ;
+ local default-assembler-arm64 = armasm64 ;
+
+ # For the assembler the following options are turned on by default:
+ #
+ # -Zp4 align structures to 4 bytes
+ # -Cp preserve case of user identifiers
+ # -Cx preserve case in publics, externs
+ #
+ local assembler-flags-amd64 = "-c -Zp4 -Cp -Cx" ;
+ local assembler-flags-i386 = "-c -Zp4 -Cp -Cx" ;
+ local assembler-flags-ia64 = "-c -Zp4 -Cp -Cx" ;
+ local assembler-flags-arm = "" ;
+ local assembler-flags-arm64 = "" ;
+
+ local assembler-output-flag-amd64 = -Fo ;
+ local assembler-output-flag-i386 = -Fo ;
+ local assembler-output-flag-ia64 = -Fo ;
+ local assembler-output-flag-arm = -o ;
+ local assembler-output-flag-arm64 = -o ;
+
+ assembler = [ feature.get-values <assembler> : $(options) ] ;
+
+ idl-compiler = [ feature.get-values <idl-compiler> : $(options) ] ;
+ idl-compiler ?= midl ;
+
+ mc-compiler = [ feature.get-values <mc-compiler> : $(options) ] ;
+ mc-compiler ?= mc ;
+
+ manifest-tool = [ feature.get-values <manifest-tool> : $(options) ] ;
+ manifest-tool ?= mt ;
+
+ local cc-filter = [ feature.get-values <compiler-filter> : $(options) ]
+ ;
+
+ for local c in $(cpu)
+ {
+ # Setup script is not required in some configurations.
+ setup-$(c) ?= "" ;
+
+ local cpu-conditions = $(conditions)/$(.cpu-arch-$(c)) ;
+
+ if $(.debug-configuration)
+ {
+ for local cpu-condition in $(cpu-conditions)
+ {
+ ECHO "notice: [msvc-cfg] condition: '$(cpu-condition)', setup: '$(setup-$(c):J= )'" ;
+ }
+ }
+
+ local cpu-assembler = $(assembler) ;
+ cpu-assembler ?= $(default-assembler-$(c)) ;
+ local assembler-flags = $(assembler-flags-$(c)) ;
+ local assembler-output-flag = $(assembler-output-flag-$(c)) ;
+
+ for local api in desktop store phone
+ {
+ local setup-script = $(setup-$(c)) ;
+ if $(api) = phone
+ {
+ setup-script = $(setup-phone-$(c)) ;
+ }
+
+ if <rewrite-setup-scripts>always in $(options)
+ {
+ toolset.flags msvc .REWRITE-SETUP <windows-api>$(api)/$(cpu-conditions) : true ;
+ }
+
+ if ! $(setup-script)
+ {
+ # Should we try to set up some error handling or fallbacks here?
+ }
+ else if <rewrite-setup-scripts>off in $(options) || [ os.name ] != NT
+ {
+ toolset.flags msvc .SETUP <windows-api>$(api)/$(cpu-conditions) : [ call-batch-script "\"$(setup-script[1]:W)\" $(setup-script[2-]:E=)" ] ;
+ }
+ else
+ {
+ toolset.flags msvc .SETUP-SCRIPT <windows-api>$(api)/$(cpu-conditions) : $(setup-script[1]) ;
+ toolset.flags msvc .SETUP-OPTIONS <windows-api>$(api)/$(cpu-conditions) : $(setup-script[2-]) ;
+ }
+
+ toolset.flags msvc.compile .RC <windows-api>$(api)/$(cpu-conditions) : $(resource-compiler) ;
+ toolset.flags msvc.compile .IDL <windows-api>$(api)/$(cpu-conditions) : $(idl-compiler) ;
+ toolset.flags msvc.compile .MC <windows-api>$(api)/$(cpu-conditions) : $(mc-compiler) ;
+ toolset.flags msvc.link .MT <windows-api>$(api)/$(cpu-conditions) : $(manifest-tool) -nologo ;
+
+ if $(api) = desktop
+ {
+ toolset.flags msvc.compile .CC <windows-api>$(api)/$(cpu-conditions) : $(compiler) /Zm800 -nologo ;
+ }
+ else
+ {
+ toolset.flags msvc.compile .CC <windows-api>$(api)/$(cpu-conditions) : $(compiler) /Zm800 /ZW /EHsc -nologo ;
+ }
+ toolset.flags msvc.compile .ASM <windows-api>$(api)/$(cpu-conditions) : $(cpu-assembler) $(assembler-flags) -nologo ;
+ toolset.flags msvc.compile .ASM_OUTPUT <windows-api>$(api)/$(cpu-conditions) : $(assembler-output-flag) ;
+ toolset.flags msvc.link .LD <windows-api>$(api)/$(cpu-conditions) : $(linker) /NOLOGO "/INCREMENTAL:NO" ;
+ toolset.flags msvc.archive .LD <windows-api>$(api)/$(cpu-conditions) : $(linker) /lib /NOLOGO ;
+ }
+
+ if $(cc-filter)
+ {
+ toolset.flags msvc .CC.FILTER $(cpu-conditions) : "|" $(cc-filter) ;
+ }
+ }
+
+ # Starting with Visual Studio 2013 the CRT is split into a desktop and app dll.
+ # If targeting WinRT and 12.0 set lib path to link against app CRT.
+ if [ MATCH "(12)" : $(version) ]
+ {
+ local storeLibPath = [ path.join $(parent) "lib/store" ] ;
+ toolset.flags msvc.link LINKPATH $(conditions)/<windows-api>store/$(.cpu-arch-i386) : [ path.native $(storeLibPath) ] ;
+ toolset.flags msvc.link LINKPATH $(conditions)/<windows-api>store/$(.cpu-arch-amd64) : [ path.native [ path.join $(storeLibPath) "amd64" ] ] ;
+ toolset.flags msvc.link LINKPATH $(conditions)/<windows-api>store/$(.cpu-arch-arm) : [ path.native [ path.join $(storeLibPath) "arm" ] ] ;
+ }
+
+ # LTO
+ toolset.flags msvc.compile OPTIONS $(conditions)/<lto>on : /GL ;
+ toolset.flags msvc.link OPTIONS $(conditions)/<lto>on : /LTCG ;
+
+ # Set version-specific flags.
+ configure-version-specific msvc : $(version) : $(conditions) ;
+ }
+}
+
+
+# Returns the default installation path for the given version.
+#
+local rule default-path ( version )
+{
+ local result ;
+ {
+ # try to use vswhere
+ local pseudo_env_VSCOMNTOOLS ;
+ local all-env-paths ;
+ local root = [ os.environ "ProgramFiles(x86)" ] ;
+ if ( ! $(root) )
+ {
+ root = [ os.environ "ProgramFiles" ] ;
+ }
+ if ( ! $(root) ) && [ os.name ] in CYGWIN
+ {
+ # We probably are in an 'env -i' Cygwin session, where the user
+ # was unable restore the "ProgramFiles(x86)" environment variable,
+ # because it is an invalid environment variable name in Cygwin.
+ # However, we can try to query cygpath instead.
+ root = [ SHELL "cygpath -w -F 42" : strip-eol ] ; # CSIDL_PROGRAM_FILESX86
+ if ( ! $(root) )
+ {
+ root = [ SHELL "cygpath -w -F 38" : strip-eol ] ; # CSIDL_PROGRAM_FILES
+ }
+ }
+ # When we are a Cygwin build, [ SHELL ] does execute using "/bin/sh -c".
+ # When /bin/sh does find a forward slash, no PATH search is performed,
+ # causing [ SHELL "C:\\...\\Installer/vswhere.exe" ] to succeed.
+ # And fortunately, forward slashes do also work in native Windows.
+ local vswhere = "$(root)/Microsoft Visual Studio/Installer/vswhere.exe" ;
+ # The check for $(root) is to avoid a segmentation fault if not found.
+ if $(version) in 14.1 14.2 default && $(root) && [ path.exists $(vswhere) ]
+ {
+ local req = "-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64" ;
+ local prop = "-property installationPath" ;
+ local limit ;
+
+ if $(version) = 14.2 || $(version) = "default"
+ {
+ limit = "-version \"[16.0,17.0)\"" ;
+ }
+ else if $(version) = 14.1
+ {
+ limit = "-version \"[15.0,16.0)\"" ;
+ }
+
+ # Quoting the "*" is for when we are a Cygwin build, to bypass /bin/sh.
+ local vswhere_cmd = "\"$(vswhere)\" -latest -products \"*\" $(req) $(prop) $(limit)" ;
+ # The split character "\r" is for when we are a Cygwin build.
+ local shell_ret = [ SPLIT_BY_CHARACTERS [ SHELL $(vswhere_cmd) ] : "\r\n" ] ;
+ pseudo_env_VSCOMNTOOLS = [ path.native [ path.join $(shell_ret) "\\Common7\\Tools" ] ] ;
+ if ! [ path.exists $(pseudo_env_VSCOMNTOOLS) ]
+ {
+ return ; # Not found. If we have vswhere, assume that it works.
+ }
+ all-env-paths = $(pseudo_env_VSCOMNTOOLS) ;
+ }
+ else
+ {
+ all-env-paths = [ sequence.transform os.environ
+ : $(.version-$(version)-env) ] ;
+ }
+
+ # Check environment or previous path_VS150
+ for local env-path in $(all-env-paths)
+ {
+ if $(env-path) && $(.version-$(version)-path)
+ {
+ for local bin-path in $(.version-$(version)-path)
+ {
+ result = [ path.glob [ path.make $(env-path) ] : $(bin-path) ] ;
+ if $(result)
+ {
+ result = [ path.native $(result[1]) ] ;
+ break ;
+ }
+ }
+ }
+ if $(result)
+ {
+ break ;
+ }
+ }
+ }
+
+ return $(result) ;
+}
+
+
+
+rule get-rspline ( target : lang-opt )
+{
+ CC_RSPLINE on $(target) = [ on $(target) return $(lang-opt) -U$(UNDEFS)
+ $(CFLAGS) $(C++FLAGS) $(OPTIONS) -c $(.nl)-D$(DEFINES)
+ $(.nl)\"-I$(INCLUDES:W)\" ] ;
+}
+
+class msvc-linking-generator : linking-generator
+{
+ # Calls the base version. If necessary, also create a target for the
+ # manifest file.specifying source's name as the name of the created
+ # target. As result, the PCH will be named whatever.hpp.gch, and not
+ # whatever.gch.
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ local result = [ linking-generator.generated-targets $(sources)
+ : $(property-set) : $(project) $(name) ] ;
+
+ if $(result)
+ {
+ local name-main = [ $(result[1]).name ] ;
+ local action = [ $(result[1]).action ] ;
+
+ if [ $(property-set).get <debug-symbols> ] = "on"
+ {
+ # We force the exact name on PDB. The reason is tagging -- the
+ # tag rule may reasonably special case some target types, like
+ # SHARED_LIB. The tag rule will not catch PDBs, and it cannot
+ # even easily figure out if a PDB is paired with a SHARED_LIB,
+ # EXE or something else. Because PDBs always get the same name
+ # as the main target, with .pdb as extension, just force it.
+ local target = [ class.new file-target $(name-main:S=.pdb) exact
+ : PDB : $(project) : $(action) ] ;
+ local registered-target = [ virtual-target.register $(target) ]
+ ;
+ if $(target) != $(registered-target)
+ {
+ $(action).replace-targets $(target) : $(registered-target) ;
+ }
+ result += $(registered-target) ;
+ }
+
+ if [ $(property-set).get <embed-manifest> ] = "off"
+ {
+ # Manifest is an evil target. It has .manifest appened to the
+ # name of the main target, including extension, e.g.
+ # a.exe.manifest. We use the 'exact' name to achieve this
+ # effect.
+ local target = [ class.new file-target $(name-main).manifest
+ exact : MANIFEST : $(project) : $(action) ] ;
+ local registered-target = [ virtual-target.register $(target) ]
+ ;
+ if $(target) != $(registered-target)
+ {
+ $(action).replace-targets $(target) : $(registered-target) ;
+ }
+ result += $(registered-target) ;
+ }
+ }
+ return $(result) ;
+ }
+}
+
+
+# Unsafe worker rule for the register-toolset() rule. Must not be called
+# multiple times.
+#
+local rule register-toolset-really ( )
+{
+ feature.extend toolset : msvc ;
+
+ # Intel and msvc supposedly have link-compatible objects.
+ feature.subfeature toolset msvc : vendor : intel : propagated optional ;
+
+ # Inherit MIDL flags.
+ toolset.inherit-flags msvc : midl ;
+
+ # Inherit MC flags.
+ toolset.inherit-flags msvc : mc ;
+
+ # Dynamic runtime comes only in MT flavour.
+ toolset.add-requirements
+ <toolset>msvc,<runtime-link>shared:<threading>multi ;
+
+ # Declare msvc toolset specific features.
+ {
+ feature.feature debug-store : object database : propagated ;
+ feature.feature pch-source : : dependency free ;
+ }
+
+ # Declare generators.
+ {
+ # TODO: Is it possible to combine these? Make the generators
+ # non-composing so that they do not convert each source into a separate
+ # .rsp file.
+ generators.register [ new msvc-linking-generator msvc.link :
+ OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : <toolset>msvc ] ;
+ generators.register [ new msvc-linking-generator msvc.link.dll :
+ OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
+ <toolset>msvc <suppress-import-lib>false ] ;
+ generators.register [ new msvc-linking-generator msvc.link.dll :
+ OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB :
+ <toolset>msvc <suppress-import-lib>true ] ;
+
+ generators.register-archiver msvc.archive : OBJ : STATIC_LIB : <toolset>msvc ;
+ generators.register-c-compiler msvc.compile.c++ : CPP : OBJ : <toolset>msvc ;
+ generators.register-c-compiler msvc.compile.c : C : OBJ : <toolset>msvc ;
+ generators.register-c-compiler msvc.compile.c++.preprocess : CPP : PREPROCESSED_CPP : <toolset>msvc ;
+ generators.register-c-compiler msvc.compile.c.preprocess : C : PREPROCESSED_C : <toolset>msvc ;
+
+ # Using 'register-c-compiler' adds the build directory to INCLUDES.
+ generators.register-c-compiler msvc.compile.rc : RC : OBJ(%_res) : <toolset>msvc ;
+ generators.override msvc.compile.rc : rc.compile.resource ;
+ generators.register-standard msvc.compile.asm : ASM : OBJ : <toolset>msvc ;
+
+ generators.register-c-compiler msvc.compile.idl : IDL : MSTYPELIB H C(%_i) C(%_proxy) C(%_dlldata) : <toolset>msvc ;
+ generators.override msvc.compile.idl : midl.compile.idl ;
+
+ generators.register-standard msvc.compile.mc : MC : H RC : <toolset>msvc ;
+ generators.override msvc.compile.mc : mc.compile ;
+
+ # Note: the 'H' source type will catch both '.h' and '.hpp' headers as
+ # the latter have their HPP type derived from H. The type of compilation
+ # is determined entirely by the destination type.
+ generators.register [ new msvc-pch-generator msvc.compile.c.pch : H : C_PCH OBJ : <pch>on <toolset>msvc ] ;
+ generators.register [ new msvc-pch-generator msvc.compile.c++.pch : H : CPP_PCH OBJ : <pch>on <toolset>msvc ] ;
+
+ generators.override msvc.compile.c.pch : pch.default-c-pch-generator ;
+ generators.override msvc.compile.c++.pch : pch.default-cpp-pch-generator ;
+ }
+
+ toolset.flags msvc.compile PCH_FILE <pch>on : <pch-file> ;
+ toolset.flags msvc.compile PCH_SOURCE <pch>on : <pch-source> ;
+ toolset.flags msvc.compile PCH_HEADER <pch>on : <pch-header> ;
+
+ #
+ # Declare flags for compilation.
+ #
+
+ toolset.flags msvc.compile CFLAGS <optimization>speed : /O2 ;
+ toolset.flags msvc.compile CFLAGS <optimization>space : /O1 ;
+
+ toolset.flags msvc.compile CFLAGS $(.cpu-arch-ia64)/<instruction-set>$(.cpu-type-itanium) : /G1 ;
+ toolset.flags msvc.compile CFLAGS $(.cpu-arch-ia64)/<instruction-set>$(.cpu-type-itanium2) : /G2 ;
+
+ toolset.flags msvc.compile CFLAGS <debug-symbols>on/<debug-store>object : /Z7 ;
+ toolset.flags msvc.compile CFLAGS <debug-symbols>on/<debug-store>database : /Zi ;
+ toolset.flags msvc.compile CFLAGS <optimization>off : /Od ;
+ toolset.flags msvc.compile CFLAGS <inlining>off : /Ob0 ;
+ toolset.flags msvc.compile CFLAGS <inlining>on : /Ob1 ;
+ toolset.flags msvc.compile CFLAGS <inlining>full : /Ob2 ;
+
+ toolset.flags msvc.compile CFLAGS <warnings>on : /W3 ;
+ toolset.flags msvc.compile CFLAGS <warnings>off : /W0 ;
+ toolset.flags msvc.compile CFLAGS <warnings>all : /W4 ;
+ toolset.flags msvc.compile CFLAGS <warnings>extra : /W4 ;
+ toolset.flags msvc.compile CFLAGS <warnings>pedantic : /W4 ;
+ toolset.flags msvc.compile CFLAGS <warnings-as-errors>on : /WX ;
+
+ toolset.flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>off : /EHs ;
+ toolset.flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>on : /EHsc ;
+ toolset.flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>on/<extern-c-nothrow>off : /EHa ;
+ toolset.flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>on/<extern-c-nothrow>on : /EHac ;
+
+ toolset.flags msvc.compile C++FLAGS <cxxstd>14 : "/std:c++14" ;
+ toolset.flags msvc.compile C++FLAGS <cxxstd>17 : "/std:c++17" ;
+ toolset.flags msvc.compile C++FLAGS <cxxstd>latest : "/std:c++latest" ;
+
+ # By default 8.0 enables rtti support while prior versions disabled it. We
+ # simply enable or disable it explicitly so we do not have to depend on this
+ # default behaviour.
+ toolset.flags msvc.compile CFLAGS <rtti>on : /GR ;
+ toolset.flags msvc.compile CFLAGS <rtti>off : /GR- ;
+ toolset.flags msvc.compile CFLAGS <runtime-debugging>off/<runtime-link>shared : /MD ;
+ toolset.flags msvc.compile CFLAGS <runtime-debugging>on/<runtime-link>shared : /MDd ;
+
+ toolset.flags msvc.compile CFLAGS <runtime-debugging>off/<runtime-link>static/<threading>multi : /MT ;
+ toolset.flags msvc.compile CFLAGS <runtime-debugging>on/<runtime-link>static/<threading>multi : /MTd ;
+
+ toolset.flags msvc.compile OPTIONS <cflags> : ;
+ toolset.flags msvc.compile.c++ OPTIONS <cxxflags> : ;
+
+ toolset.flags msvc.compile PDB_CFLAG <debug-symbols>on/<debug-store>database : /Fd ;
+
+ toolset.flags msvc.compile DEFINES <define> ;
+ toolset.flags msvc.compile UNDEFS <undef> ;
+ toolset.flags msvc.compile INCLUDES <include> ;
+
+ # Declare flags for the assembler.
+ toolset.flags msvc.compile.asm USER_ASMFLAGS <asmflags> ;
+
+ toolset.flags msvc.compile.asm ASMFLAGS <architecture>x86/<debug-symbols>on : "/Zi /Zd" ;
+
+ toolset.flags msvc.compile.asm ASMFLAGS <architecture>x86/<warnings>on : /W3 ;
+ toolset.flags msvc.compile.asm ASMFLAGS <architecture>x86/<warnings>off : /W0 ;
+ toolset.flags msvc.compile.asm ASMFLAGS <architecture>x86/<warnings>all : /W4 ;
+ toolset.flags msvc.compile.asm ASMFLAGS <architecture>x86/<warnings-as-errors>on : /WX ;
+
+ toolset.flags msvc.compile.asm ASMDEFINES <architecture>x86 : <define> ;
+
+ # Declare flags for linking.
+ {
+ toolset.flags msvc.link PDB_LINKFLAG <debug-symbols>on/<debug-store>database : "/PDB:" ; # not used yet
+ toolset.flags msvc.link LINKFLAGS <debug-symbols>on : /DEBUG ;
+ toolset.flags msvc.link DEF_FILE <def-file> ;
+
+ # The linker disables the default optimizations when using /DEBUG so we
+ # have to enable them manually for release builds with debug symbols.
+ toolset.flags msvc LINKFLAGS <debug-symbols>on/<runtime-debugging>off : "/OPT:REF,ICF" ;
+
+ toolset.flags msvc LINKFLAGS <user-interface>console : "/subsystem:console" ;
+ toolset.flags msvc LINKFLAGS <user-interface>gui : "/subsystem:windows" ;
+ toolset.flags msvc LINKFLAGS <user-interface>wince : "/subsystem:windowsce" ;
+ toolset.flags msvc LINKFLAGS <user-interface>native : "/subsystem:native" ;
+ toolset.flags msvc LINKFLAGS <user-interface>auto : "/subsystem:posix" ;
+
+ toolset.flags msvc.link OPTIONS <linkflags> ;
+ toolset.flags msvc.link LINKPATH <library-path> ;
+
+ toolset.flags msvc.link FINDLIBS_ST <find-static-library> ;
+ toolset.flags msvc.link FINDLIBS_SA <find-shared-library> ;
+ toolset.flags msvc.link LIBRARY_OPTION <toolset>msvc : "" : unchecked ;
+ toolset.flags msvc.link LIBRARIES_MENTIONED_BY_FILE : <library-file> ;
+
+ toolset.flags msvc.link.dll LINKFLAGS <suppress-import-lib>true : /NOENTRY ;
+ }
+
+ toolset.flags msvc.archive AROPTIONS <archiveflags> ;
+
+ # Create a project to allow building the setup scripts
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project msvc ;
+
+ feature.feature msvc.setup-options : : free ;
+}
+
+
+# Locates the requested setup script under the given folder and returns its full
+# path or nothing in case the script can not be found. In case multiple scripts
+# are found only the first one is returned.
+#
+# TODO: There used to exist a code comment for the msvc.init rule stating that
+# we do not correctly detect the location of the vcvars32.bat setup script for
+# the free VC7.1 tools in case user explicitly provides a path. This should be
+# tested or simply remove this whole comment in case this toolset version is no
+# longer important.
+#
+local rule locate-default-setup ( command : parent : setup-name )
+{
+ local result = [ GLOB $(command) $(parent) : $(setup-name) ] ;
+ if $(result[1])
+ {
+ return $(result[1]) ;
+ }
+}
+
+
+# Validates given path, registers found configuration and prints debug
+# information about it.
+#
+local rule register-configuration ( version : path ? )
+{
+ if $(path)
+ {
+ local command = [ GLOB $(path) : cl.exe ] ;
+
+ if $(command)
+ {
+ if $(.debug-configuration)
+ {
+ ECHO notice\: "[msvc-cfg]" msvc-$(version) detected, command\:
+ '$(command)' ;
+ }
+
+ $(.versions).register $(version) ;
+ $(.versions).set $(version) : default-command : $(command) ;
+ }
+ }
+}
+
+
+################################################################################
+#
+# Startup code executed when loading this module.
+#
+################################################################################
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+# Miscellaneous constants.
+.RM = [ common.rm-command ] ;
+.nl = "
+" ;
+.ProgramFiles = [ path.make [ common.get-program-files-dir ] ] ;
+.escaped-double-quote = "\"" ;
+.TOUCH_FILE = [ common.file-touch-command ] ;
+
+# List of all registered configurations.
+.versions = [ new configurations ] ;
+
+# Supported CPU architectures.
+.cpu-arch-i386 =
+ <architecture>/<address-model>
+ <architecture>/<address-model>32
+ <architecture>x86/<address-model>
+ <architecture>x86/<address-model>32 ;
+
+.cpu-arch-amd64 =
+ <architecture>/<address-model>64
+ <architecture>x86/<address-model>64 ;
+
+.cpu-arch-ia64 =
+ <architecture>ia64/<address-model>
+ <architecture>ia64/<address-model>64 ;
+
+.cpu-arch-arm =
+ <architecture>arm/<address-model>
+ <architecture>arm/<address-model>32 ;
+
+.cpu-arch-arm64 =
+ <architecture>arm/<address-model>
+ <architecture>arm/<address-model>64 ;
+
+# Supported CPU types (only Itanium optimization options are supported from
+# VC++ 2005 on). See
+# http://msdn2.microsoft.com/en-us/library/h66s5s0e(vs.90).aspx for more
+# detailed information.
+.cpu-type-g5 = i586 pentium pentium-mmx ;
+.cpu-type-g6 = i686 pentiumpro pentium2 pentium3 pentium3m pentium-m k6
+ k6-2 k6-3 winchip-c6 winchip2 c3 c3-2 ;
+.cpu-type-em64t = prescott nocona core2 corei7 corei7-avx core-avx-i
+ conroe conroe-xe conroe-l allendale merom
+ merom-xe kentsfield kentsfield-xe penryn wolfdale
+ yorksfield nehalem sandy-bridge ivy-bridge haswell
+ broadwell skylake skylake-avx512 cannonlake icelake ;
+.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
+ athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3
+ bdver4 btver1 btver2 znver1 ;
+.cpu-type-g7 = pentium4 pentium4m athlon athlon-tbird athlon-4 athlon-xp
+ athlon-mp $(.cpu-type-em64t) $(.cpu-type-amd64) ;
+.cpu-type-itanium = itanium itanium1 merced ;
+.cpu-type-itanium2 = itanium2 mckinley ;
+.cpu-type-arm = armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312
+ armv7 armv7s ;
+
+# Known toolset versions, in order of preference.
+.known-versions = 14.2 14.1 14.0 12.0 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1
+ 7.1toolkit 7.0 6.0 ;
+
+# Version aliases.
+.version-alias-6 = 6.0 ;
+.version-alias-6.5 = 6.0 ;
+.version-alias-7 = 7.0 ;
+.version-alias-8 = 8.0 ;
+.version-alias-9 = 9.0 ;
+.version-alias-10 = 10.0 ;
+.version-alias-11 = 11.0 ;
+.version-alias-12 = 12.0 ;
+.version-alias-14 = 14.0 ;
+
+# Names of registry keys containing the Visual C++ installation path (relative
+# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
+.version-6.0-reg = "VisualStudio\\6.0\\Setup\\Microsoft Visual C++" ;
+.version-7.0-reg = "VisualStudio\\7.0\\Setup\\VC" ;
+.version-7.1-reg = "VisualStudio\\7.1\\Setup\\VC" ;
+.version-8.0-reg = "VisualStudio\\8.0\\Setup\\VC" ;
+.version-8.0express-reg = "VCExpress\\8.0\\Setup\\VC" ;
+.version-9.0-reg = "VisualStudio\\9.0\\Setup\\VC" ;
+.version-9.0express-reg = "VCExpress\\9.0\\Setup\\VC" ;
+.version-10.0-reg = "VisualStudio\\10.0\\Setup\\VC" ;
+.version-10.0express-reg = "VCExpress\\10.0\\Setup\\VC" ;
+.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
+.version-12.0-reg = "VisualStudio\\12.0\\Setup\\VC" ;
+.version-14.0-reg = "VisualStudio\\14.0\\Setup\\VC" ;
+
+# Visual C++ Toolkit 2003 does not store its installation path in the registry.
+# The environment variable 'VCToolkitInstallDir' and the default installation
+# path will be checked instead.
+.version-7.1toolkit-path = "Microsoft Visual C++ Toolkit 2003/bin" ;
+.version-7.1toolkit-env = VCToolkitInstallDir ;
+# Visual Studio 2017 doesn't use a registry at all. And the suggested methods
+# of discovery involve having a compiled program. So as a fallback we search
+# paths for VS2017 (aka msvc >= 14.1).
+.version-14.1-path =
+ "../../VC/Tools/MSVC/*/bin/Host*/*"
+ "Microsoft Visual Studio/2017/*/VC/Tools/MSVC/*/bin/Host*/*"
+ ;
+.version-14.1-env = VS150COMNTOOLS ProgramFiles ProgramFiles(x86) ;
+.version-14.2-path =
+ "../../VC/Tools/MSVC/*/bin/Host*/*"
+ "Microsoft Visual Studio/2019/*/VC/Tools/MSVC/*/bin/Host*/*"
+ ;
+.version-14.2-env = VS160COMNTOOLS ProgramFiles ProgramFiles(x86) ;
+
+# Auto-detect all the available msvc installations on the system.
+auto-detect-toolset-versions ;
+
+
+# And finally trigger the actual Boost Build toolset registration.
+register-toolset ;
diff --git a/src/boost/tools/build/src/tools/msvc.py b/src/boost/tools/build/src/tools/msvc.py
new file mode 100644
index 000000000..efd3a908a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/msvc.py
@@ -0,0 +1,1313 @@
+# Copyright (c) 2003 David Abrahams.
+# Copyright (c) 2005 Vladimir Prus.
+# Copyright (c) 2005 Alexey Pakhunov.
+# Copyright (c) 2006 Bojan Resnik.
+# Copyright (c) 2006 Ilya Sokolov.
+# Copyright (c) 2007 Rene Rivera
+# Copyright (c) 2008 Jurko Gospodnetic
+# Copyright (c) 2011 Juraj Ivancic
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+################################################################################
+#
+# MSVC Boost Build toolset module.
+# --------------------------------
+#
+# All toolset versions need to have their location either auto-detected or
+# explicitly specified except for the special 'default' version that expects the
+# environment to find the needed tools or report an error.
+#
+################################################################################
+
+from os import environ
+import os.path
+import re
+import _winreg
+
+import bjam
+
+from b2.tools import common, rc, pch, builtin, mc, midl
+from b2.build import feature, type, toolset, generators, property_set
+from b2.build.property import Property
+from b2.util import path
+from b2.manager import get_manager
+from b2.build.generators import Generator
+from b2.build.toolset import flags
+from b2.util.utility import to_seq, on_windows
+from b2.tools.common import Configurations
+
+__debug = None
+
+def debug():
+ global __debug
+ if __debug is None:
+ __debug = "--debug-configuration" in bjam.variable("ARGV")
+ return __debug
+
+
+# It is not yet clear what to do with Cygwin on python port.
+def on_cygwin():
+ return False
+
+
+type.register('MANIFEST', ['manifest'])
+feature.feature('embed-manifest',['on','off'], ['incidental', 'propagated']) ;
+
+type.register('PDB',['pdb'])
+
+################################################################################
+#
+# Public rules.
+#
+################################################################################
+
+# Initialize a specific toolset version configuration. As the result, path to
+# compiler and, possible, program names are set up, and will be used when that
+# version of compiler is requested. For example, you might have:
+#
+# using msvc : 6.5 : cl.exe ;
+# using msvc : 7.0 : Y:/foo/bar/cl.exe ;
+#
+# The version parameter may be omitted:
+#
+# using msvc : : Z:/foo/bar/cl.exe ;
+#
+# The following keywords have special meanings when specified as versions:
+# - all - all detected but not yet used versions will be marked as used
+# with their default options.
+# - default - this is an equivalent to an empty version.
+#
+# Depending on a supplied version, detected configurations and presence 'cl.exe'
+# in the path different results may be achieved. The following table describes
+# the possible scenarios:
+#
+# Nothing "x.y"
+# Passed Nothing "x.y" detected, detected,
+# version detected detected cl.exe in path cl.exe in path
+#
+# default Error Use "x.y" Create "default" Use "x.y"
+# all None Use all None Use all
+# x.y - Use "x.y" - Use "x.y"
+# a.b Error Error Create "a.b" Create "a.b"
+#
+# "x.y" - refers to a detected version;
+# "a.b" - refers to an undetected version.
+#
+# FIXME: Currently the command parameter and the <compiler> property parameter
+# seem to overlap in duties. Remove this duplication. This seems to be related
+# to why someone started preparing to replace init with configure rules.
+
+def init(version = None, command = None, options = None):
+ # When initialized from
+ # using msvc : x.0 ;
+ # we get version as a single element list i.e. ['x.0'],
+ # but when specified from the command line we get a string i.e. 'x.0'.
+ # We want to work with a string, so unpack the list if needed.
+ is_single_element_list = (isinstance(version,list) and len(version) == 1)
+ assert(version==None or isinstance(version,str) or is_single_element_list)
+ if is_single_element_list:
+ version = version[0]
+
+ options = to_seq(options)
+ command = to_seq(command)
+
+ if command:
+ options.extend("<command>"+cmd for cmd in command)
+ configure(version,options)
+
+def configure(version=None, options=None):
+ if version == "all":
+ if options:
+ raise RuntimeError("MSVC toolset configuration: options should be empty when '{}' is specified.".format(version))
+
+ # Configure (i.e. mark as used) all registered versions.
+ all_versions = __versions.all()
+ if not all_versions:
+ if debug():
+ print "notice: [msvc-cfg] Asked to configure all registered" \
+ "msvc toolset versions when there are none currently" \
+ "registered." ;
+ else:
+ for v in all_versions:
+ # Note that there is no need to skip already configured
+ # versions here as this will request configure-really rule
+ # to configure the version using default options which will
+ # in turn cause it to simply do nothing in case the version
+ # has already been configured.
+ configure_really(v)
+ elif version == "default":
+ configure_really(None,options)
+ else:
+ configure_really(version, options)
+
+def extend_conditions(conditions,exts):
+ return [ cond + '/' + ext for cond in conditions for ext in exts ]
+
+def configure_version_specific(toolset_arg, version, conditions):
+ # Starting with versions 7.0, the msvc compiler have the /Zc:forScope and
+ # /Zc:wchar_t options that improve C++ standard conformance, but those
+ # options are off by default. If we are sure that the msvc version is at
+ # 7.*, add those options explicitly. We can be sure either if user specified
+ # version 7.* explicitly or if we auto-detected the version ourselves.
+ if not re.search('^6\\.', version):
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS',conditions, ['/Zc:forScope','/Zc:wchar_t'])
+ toolset.flags('{}.compile.c++'.format(toolset_arg), 'C++FLAGS',conditions, ['/wd4675'])
+
+ # Explicitly disable the 'function is deprecated' warning. Some msvc
+ # versions have a bug, causing them to emit the deprecation warning even
+ # with /W0.
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS',extend_conditions(conditions,['<warnings>off']), ['/wd4996'])
+ if re.search('^[78]\.', version):
+ # 64-bit compatibility warning deprecated since 9.0, see
+ # http://msdn.microsoft.com/en-us/library/yt4xw8fh.aspx
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS',extend_conditions(conditions,['<warnings>all']), ['/Wp64'])
+
+ #
+ # Processor-specific optimization.
+ #
+ if re.search('^[67]', version ):
+ # 8.0 deprecates some of the options.
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<optimization>speed','<optimization>space']), ['/Ogiy', '/Gs'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<optimization>speed']), ['/Ot'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<optimization>space']), ['/Os'])
+
+ cpu_arch_i386_cond = extend_conditions(conditions, __cpu_arch_i386)
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(cpu_arch_i386_cond,['<instruction-set>']),['/GB'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(cpu_arch_i386_cond,['<instruction-set>i486']),['/G4'])
+
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(cpu_arch_i386_cond,['<instruction-set>' + t for t in __cpu_type_g5]), ['/G5'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(cpu_arch_i386_cond,['<instruction-set>' + t for t in __cpu_type_g6]), ['/G6'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(cpu_arch_i386_cond,['<instruction-set>' + t for t in __cpu_type_g7]), ['/G7'])
+
+ # Improve floating-point accuracy. Otherwise, some of C++ Boost's "math"
+ # tests will fail.
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', conditions, ['/Op'])
+
+ # 7.1 and below have single-threaded static RTL.
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<runtime-debugging>off/<runtime-link>static/<threading>single']), ['/ML'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<runtime-debugging>on/<runtime-link>static/<threading>single']), ['/MLd'])
+ else:
+ # 8.0 and above adds some more options.
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions, [a + '/<instruction-set>' for a in __cpu_arch_amd64]), ['/favor:blend'])
+
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions, [a + '/<instruction-set>' + t for a in __cpu_arch_amd64 for t in __cpu_type_em64t]), ['/favor:EM64T'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions, [a + '/<instruction-set>' + t for a in __cpu_arch_amd64 for t in __cpu_type_amd64]), ['/favor:AMD64'])
+
+ # 8.0 and above only has multi-threaded static RTL.
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<runtime-debugging>off/<runtime-link>static/<threading>single']), ['/MT'])
+ toolset.flags('{}.compile'.format(toolset_arg), 'CFLAGS', extend_conditions(conditions,['<runtime-debugging>on/<runtime-link>static/<threading>single']), ['/MTd'])
+
+ # Specify target machine type so the linker will not need to guess.
+ toolset.flags('{}.link'.format(toolset_arg), 'LINKFLAGS', extend_conditions(conditions, __cpu_arch_amd64), ['/MACHINE:X64'])
+ toolset.flags('{}.link'.format(toolset_arg), 'LINKFLAGS', extend_conditions(conditions, __cpu_arch_i386), ['/MACHINE:X86'])
+ toolset.flags('{}.link'.format(toolset_arg), 'LINKFLAGS', extend_conditions(conditions, __cpu_arch_ia64), ['/MACHINE:IA64'])
+
+ # Make sure that manifest will be generated even if there is no
+ # dependencies to put there.
+ toolset.flags('{}.link'.format(toolset_arg), 'LINKFLAGS', conditions, ['/MANIFEST'])
+
+
+# Registers this toolset including all of its flags, features & generators. Does
+# nothing on repeated calls.
+
+def register_toolset():
+ if not 'msvc' in feature.values('toolset'):
+ register_toolset_really()
+
+
+engine = get_manager().engine()
+
+# this rule sets up the pdb file that will be used when generating static
+# libraries and the debug-store option is database, so that the compiler
+# puts all debug info into a single .pdb file named after the library
+#
+# Poking at source targets this way is probably not clean, but it's the
+# easiest approach.
+def archive(targets, sources=None, properties=None):
+ bjam.call('set-target-variable',targets,'PDB_NAME', os.path.splitext(targets[0])[0] + '.pdb')
+
+# Declare action for creating static libraries. If library exists, remove it
+# before adding files. See
+# http://article.gmane.org/gmane.comp.lib.boost.build/4241 for rationale.
+if not on_cygwin():
+ engine.register_action(
+ 'msvc.archive',
+ '''if exist "$(<[1])" DEL "$(<[1])"
+ $(.LD) $(AROPTIONS) /out:"$(<[1])" @"@($(<[1]:W).rsp:E=
+"$(>)"
+$(LIBRARIES_MENTIONED_BY_FILE)
+"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib"
+"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"''',
+ function=archive)
+else:
+ engine.register_action(
+ 'msvc.archive',
+ '''{rm} "$(<[1])"
+ $(.LD) $(AROPTIONS) /out:"$(<[1])" @"@($(<[1]:W).rsp:E=
+"$(>)"
+$(LIBRARIES_MENTIONED_BY_FILE)
+"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib"
+"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"'''.format(rm=common.rm_command()),
+ function=archive)
+
+# For the assembler the following options are turned on by default:
+#
+# -Zp4 align structures to 4 bytes
+# -Cp preserve case of user identifiers
+# -Cx preserve case in publics, externs
+#
+engine.register_action(
+ 'msvc.compile.asm',
+ '$(.ASM) -c -Zp4 -Cp -Cx -D$(DEFINES) $(ASMFLAGS) $(USER_ASMFLAGS) -Fo "$(<:W)" "$(>:W)"' )
+
+
+# Equivalent to [ on $(target) return $(prefix)$(var)$(suffix) ]. Note that $(var) can be a list.
+def expand_target_variable(target,var,prefix=None,suffix=None):
+ list = bjam.call( 'get-target-variable', target, var )
+ return " ".join([ ("" if prefix is None else prefix) + elem + ("" if suffix is None else suffix) for elem in list ])
+
+
+def get_rspline(targets, lang_opt):
+ result = lang_opt + '\n' + \
+ expand_target_variable(targets, 'UNDEFS' , '\n-U' ) + \
+ expand_target_variable(targets, 'CFLAGS' , '\n' ) + \
+ expand_target_variable(targets, 'C++FLAGS', '\n' ) + \
+ expand_target_variable(targets, 'OPTIONS' , '\n' ) + '\n-c' + \
+ expand_target_variable(targets, 'DEFINES' , '\n-D' , '\n' ) + \
+ expand_target_variable(targets, 'INCLUDES', '\n"-I', '"\n' )
+ bjam.call('set-target-variable', targets, 'CC_RSPLINE', result)
+
+def compile_c(targets, sources = [], properties = None):
+ get_manager().engine().set_target_variable( targets[0], 'C++FLAGS', '' )
+ get_rspline(targets, '-TC')
+ compile_c_cpp(targets,sources)
+
+def compile_c_preprocess(targets, sources = [], properties = None):
+ get_manager().engine().set_target_variable( targets[0], 'C++FLAGS', '' )
+ get_rspline(targets, '-TC')
+ preprocess_c_cpp(targets,sources)
+
+def compile_c_pch(targets, sources = [], properties = []):
+ get_manager().engine().set_target_variable( targets[0], 'C++FLAGS', '' )
+ get_rspline([targets[0]], '-TC')
+ get_rspline([targets[1]], '-TC')
+
+toolset.flags( 'msvc', 'YLOPTION', [], ['-Yl'] )
+
+def compile_cpp(targets,sources=[],properties=None):
+ get_rspline(targets,'-TP')
+ bjam.call('set-target-variable', targets, 'PCH_FILE', sources)
+ compile_c_cpp(targets,sources)
+
+def compile_cpp_preprocess(targets,sources=[],properties=None):
+ get_rspline(targets,'-TP')
+ preprocess_c_cpp(targets,sources)
+
+def compile_cpp_pch(targets,sources=[],properties=None):
+ get_rspline([targets[0]], '-TP')
+ get_rspline([targets[1]], '-TP')
+
+
+# Action for running the C/C++ compiler without using precompiled headers.
+#
+# WARNING: Synchronize any changes this in action with intel-win
+#
+# Notes regarding PDB generation, for when we use <debug-symbols>on/<debug-store>database
+#
+# 1. PDB_CFLAG is only set for <debug-symbols>on/<debug-store>database, ensuring that the /Fd flag is dropped if PDB_CFLAG is empty
+#
+# 2. When compiling executables's source files, PDB_NAME is set on a per-source file basis by rule compile-c-c++.
+# The linker will pull these into the executable's PDB
+#
+# 3. When compiling library's source files, PDB_NAME is updated to <libname>.pdb for each source file by rule archive,
+# as in this case the compiler must be used to create a single PDB for our library.
+#
+
+class SetupAction:
+ def __init__(self, setup_func, function):
+ self.setup_func = setup_func
+ self.function = function
+
+ def __call__(self, targets, sources, property_set):
+ assert(callable(self.setup_func))
+ # This can modify sources.
+ action_name = self.setup_func(targets, sources, property_set)
+ # 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.call("set-update-action", action_name, targets, sources, [])
+ if self.function:
+ self.function(targets, sources, property_set)
+
+def register_setup_action(action_name,setup_function,function=None):
+ global engine
+ if action_name in engine.actions:
+ raise "Bjam action %s is already defined" % action_name
+ engine.actions[action_name] = SetupAction(setup_function, function)
+
+
+engine.register_action('compile-c-c++',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fo"$(<[1]:W)" $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" $(.CC.FILTER)''',
+bound_list=['PDB_NAME'])
+
+def setup_compile_c_cpp_action(targets, sources, properties):
+ sources += bjam.call('get-target-variable',targets,'PCH_FILE')
+ sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
+ return 'compile-c-c++'
+
+
+register_setup_action(
+ 'msvc.compile.c',
+ setup_compile_c_cpp_action,
+ function=compile_c)
+
+register_setup_action(
+ 'msvc.compile.c++',
+ setup_compile_c_cpp_action,
+ function=compile_cpp)
+
+
+engine.register_action('preprocess-c-c++',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -E $(PDB_CFLAG)"$(PDB_NAME)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" >"$(<[1]:W)"',
+bound_list=['PDB_NAME'])
+
+def setup_preprocess_c_cpp_action(targets, sources, properties):
+ sources += bjam.call('get-target-variable',targets,'PCH_FILE')
+ sources += bjam.call('get-target-variable',targets,'PCH_HEADER')
+ return 'preprocess-c-c++'
+
+register_setup_action(
+ 'msvc.compile.c.preprocess',
+ setup_preprocess_c_cpp_action,
+ function=compile_c_preprocess)
+
+register_setup_action(
+ 'msvc.compile.c++.preprocess',
+ setup_preprocess_c_cpp_action,
+ function=compile_cpp_preprocess)
+
+def compile_c_cpp(targets,sources=None):
+ pch_header = bjam.call('get-target-variable',targets[0],'PCH_HEADER')
+ pch_file = bjam.call('get-target-variable',targets[0],'PCH_FILE')
+ if pch_header: get_manager().engine().add_dependency(targets[0],pch_header)
+ if pch_file: get_manager().engine().add_dependency(targets[0],pch_file)
+ bjam.call('set-target-variable',targets,'PDB_NAME', os.path.splitext(targets[0])[0] + '.pdb')
+
+def preprocess_c_cpp(targets,sources=None):
+ #same as above
+ return compile_c_cpp(targets,sources)
+
+# Action for running the C/C++ compiler using precompiled headers. In addition
+# to whatever else it needs to compile, this action also adds a temporary source
+# .cpp file used to compile the precompiled headers themselves.
+
+
+engine.register_action('compile-c-c++-pch',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include "$(>[1]:D=)"\n)" $(.CC.FILTER)')
+
+engine.register_action('compile-c-c++-pch-s',
+'$(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" $(.CC.FILTER)')
+
+def setup_c_cpp_pch(targets, sources, properties):
+ pch_source = bjam.call('get-target-variable', targets, 'PCH_SOURCE')
+ if pch_source:
+ sources += pch_source
+ get_manager().engine().add_dependency(targets,pch_source)
+ return 'compile-c-c++-pch-s'
+ else:
+ return 'compile-c-c++-pch'
+
+register_setup_action(
+ 'msvc.compile.c.pch',
+ setup_c_cpp_pch,
+ function=compile_c_pch)
+
+register_setup_action(
+ 'msvc.compile.c++.pch',
+ setup_c_cpp_pch,
+ function=compile_cpp_pch)
+
+
+# See midl.py for details.
+#
+engine.register_action(
+ 'msvc.compile.idl',
+ '''$(.IDL) /nologo @"@($(<[1]:W).rsp:E=
+"$(>:W)"
+-D$(DEFINES)
+"-I$(INCLUDES:W)"
+-U$(UNDEFS)
+$(MIDLFLAGS)
+/tlb "$(<[1]:W)"
+/h "$(<[2]:W)"
+/iid "$(<[3]:W)"
+/proxy "$(<[4]:W)"
+/dlldata "$(<[5]:W)")"
+ {touch} "$(<[4]:W)"
+ {touch} "$(<[5]:W)"'''.format(touch=common.file_creation_command()))
+
+engine.register_action(
+ 'msvc.compile.mc',
+ '$(.MC) $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"')
+
+engine.register_action(
+ 'msvc.compile.rc',
+ '$(.RC) -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES:W)" -fo "$(<:W)" "$(>:W)"')
+
+def link_dll(targets,sources=None,properties=None):
+ get_manager().engine().add_dependency(targets,bjam.call('get-target-variable',targets,'DEF_FILE'))
+ manifest(targets, sources, properties)
+
+def manifest(targets,sources=None,properties=None):
+ if 'on' in properties.get('<embed-manifest>'):
+ get_manager().engine().set_update_action('msvc.manifest', targets, sources, properties)
+
+
+# Incremental linking a DLL causes no end of problems: if the actual exports do
+# not change, the import .lib file is never updated. Therefore, the .lib is
+# always out-of-date and gets rebuilt every time. I am not sure that incremental
+# linking is such a great idea in general, but in this case I am sure we do not
+# want it.
+
+# Windows manifest is a new way to specify dependencies on managed DotNet
+# assemblies and Windows native DLLs. The manifests are embedded as resources
+# and are useful in any PE target (both DLL and EXE).
+
+if not on_cygwin():
+ engine.register_action(
+ 'msvc.link',
+ '''$(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=
+"$(>)"
+$(LIBRARIES_MENTIONED_BY_FILE)
+$(LIBRARIES)
+"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib"
+"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%''',
+ function=manifest,
+ bound_list=['PDB_NAME','DEF_FILE','LIBRARIES_MENTIONED_BY_FILE'])
+
+ engine.register_action(
+ 'msvc.manifest',
+ '''if exist "$(<[1]).manifest" (
+ $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
+ )''')
+
+ engine.register_action(
+ 'msvc.link.dll',
+ '''$(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=
+"$(>)"
+$(LIBRARIES_MENTIONED_BY_FILE)
+$(LIBRARIES)
+"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib"
+"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%''',
+ function=link_dll,
+ bound_list=['DEF_FILE','LIBRARIES_MENTIONED_BY_FILE'])
+
+ engine.register_action(
+ 'msvc.manifest.dll',
+ '''if exist "$(<[1]).manifest" (
+ $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
+ )''')
+else:
+ engine.register_action(
+ 'msvc.link',
+ '''$(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=
+"$(>)"
+$(LIBRARIES_MENTIONED_BY_FILE)
+$(LIBRARIES)
+"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib"
+"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"''',
+ function=manifest,
+ bound_list=['PDB_NAME','DEF_FILE','LIBRARIES_MENTIONED_BY_FILE'])
+
+ engine.register_action(
+ 'msvc.manifest',
+ '''if test -e "$(<[1]).manifest"; then
+ $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
+ fi''')
+
+ engine.register_action(
+ 'msvc.link.dll',
+ '''$(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=
+"$(>)"
+$(LIBRARIES_MENTIONED_BY_FILE)
+$(LIBRARIES)
+"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib"
+"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"''',
+ function=link_dll,
+ bound_list=['DEF_FILE','LIBRARIES_MENTIONED_BY_FILE'])
+
+ engine.register_action(
+ 'msvc.manifest.dll',
+ '''if test -e "$(<[1]).manifest"; then
+ $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
+ fi''')
+
+
+################################################################################
+#
+# Classes.
+#
+################################################################################
+
+class MsvcPchGenerator(pch.PchGenerator):
+
+ # Inherit the __init__ method
+ def run_pch(self, project, name, prop_set, sources):
+ # Find the header in sources. Ignore any CPP sources.
+ pch_header = None
+ pch_source = None
+ for s in sources:
+ if type.is_derived(s.type(), 'H'):
+ pch_header = s
+ elif type.is_derived(s.type(), 'CPP') or type.is_derived(s.type(), 'C'):
+ pch_source = s
+
+ if not pch_header:
+ raise RuntimeError( "can not build pch without pch-header" )
+
+ # If we do not have the PCH source - that is fine. We will just create a
+ # temporary .cpp file in the action.
+ properties = prop_set.all()
+ # Passing of <pch-source> is a dirty trick, needed because
+ # non-composing generators with multiple inputs are subtly
+ # broken. For more detailed information see:
+ # https://zigzag.cs.msu.su:7813/boost.build/ticket/111
+ if pch_source:
+ properties.append(Property('pch-source',pch_source))
+ generated = Generator.run(self,project,name,property_set.create(properties),[pch_header])
+ pch_file = None
+ for g in generated:
+ if type.is_derived(g.type(), 'PCH'):
+ pch_file = g
+ result_props = []
+ if pch_header:
+ result_props.append(Property('pch-header', pch_header))
+ if pch_file:
+ result_props.append(Property('pch-file', pch_file))
+
+ return property_set.PropertySet(result_props), generated
+
+
+################################################################################
+#
+# Local rules.
+#
+################################################################################
+
+# Detects versions listed as '_known_versions' by checking registry information,
+# environment variables & default paths. Supports both native Windows and
+# Cygwin.
+def auto_detect_toolset_versions():
+ if on_windows() or on_cygwin():
+ for version in _known_versions:
+ versionVarName = '__version_{}_reg'.format(version.replace('.','_'))
+ if versionVarName in globals():
+ vc_path = None
+ for x64elt in [ '', 'Wow6432Node\\' ]:
+ try:
+ with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\{}Microsoft\\{}'.format(x64elt, globals()[versionVarName])) as reg_key:
+ vc_path = _winreg.QueryValueEx(reg_key, "ProductDir")[0]
+ except:
+ pass
+ if vc_path:
+ vc_path = os.path.join(vc_path,'bin')
+ register_configuration(version,os.path.normpath(vc_path))
+
+ for i in _known_versions:
+ if not i in __versions.all():
+ register_configuration(i,default_path(i))
+
+
+def maybe_rewrite_setup(toolset, setup_script, setup_options, version, rewrite_setup='off'):
+ """
+ Helper rule to generate a faster alternative to MSVC setup scripts.
+
+ We used to call MSVC setup scripts directly in every action, however in
+ newer MSVC versions (10.0+) they make long-lasting registry queries
+ which have a significant impact on build time.
+ """
+ result = '"{}" {}'.format(setup_script, setup_options)
+
+ # At the moment we only know how to rewrite scripts with cmd shell.
+ if os.name == 'nt' and rewrite_setup != 'off':
+ basename = os.path.basename(setup_script)
+ filename, _ = os.path.splitext(basename)
+ setup_script_id = 'b2_{}_{}_{}'.format(toolset, version, filename)
+ if setup_options:
+ setup_script_id = '{}_{}'.format(setup_script_id, setup_options)
+
+ tempdir = os.environ.get('TEMP')
+ replacement = os.path.join(tempdir, setup_script_id + '.cmd')
+ if rewrite_setup == 'always' or not os.path.exists(replacement):
+ import subprocess
+ # call the setup script and print the environment after doing so
+ p = subprocess.Popen([
+ setup_script, setup_options, '>', 'nul', '&&', 'set',
+ ], stdout=subprocess.PIPE, shell=True
+ )
+ stdout, _ = p.communicate()
+
+ diff_vars = []
+ for var in stdout.splitlines():
+ # returns a tuple of ('var-name', '=', 'value').
+ # partition is being used here (over something like .split())
+ # for two reasons:
+ # 1) an environment variable may have a value that contains an '=';
+ # .partition() will still return the correct key and value pair.
+ # 2) if the line doesn't contain an '=' at all, then the returned
+ # tuple will contain only empty strings rather than raising
+ # an exception.
+ key, _, value = var.partition('=')
+ # os.environ handles casing differences here. Usually the
+ # call to "set" above will produce pascal-cased environment
+ # variable names, so a normal python dict can't be used here.
+ # check for the existence of key in case the partitioning() above
+ # returned an empty key value pair.
+ if key and os.environ.get(key) != value:
+ diff_vars.append('SET {}={}'.format(key, value))
+
+ if diff_vars:
+ with open(replacement, 'wb') as f:
+ f.write(os.linesep.join(diff_vars))
+
+ result = '"{}"'.format(replacement)
+ else:
+ result = '"{}"'.format(replacement)
+
+ return result
+
+
+def generate_setup_cmd(version, command, parent, options, cpu, global_setup,
+ default_global_setup_options, default_setup):
+ setup_prefix = "call "
+ setup_suffix = """ >nul\n"""
+ if on_cygwin():
+ setup_prefix = "cmd.exe /S /C call "
+ setup_suffix = " \">nul\" \"&&\" "
+
+ setup_options = ''
+ setup_cpu = feature.get_values('<setup-{}>'.format(cpu), options)
+
+ if not setup_cpu:
+ if global_setup:
+ setup_cpu = global_setup
+ # If needed we can easily add using configuration flags
+ # here for overriding which options get passed to the
+ # global setup command for which target platform:
+ # setup_options = feature.get_values('<setup-options-{}>'.format(cpu),options)
+ if not setup_options:
+ setup_options = default_global_setup_options[cpu]
+ else:
+ setup_cpu = locate_default_setup(command, parent, default_setup[cpu])
+ else:
+ setup_cpu = setup_cpu[0]
+
+ # Cygwin to Windows path translation.
+ # setup-$(c) = "\""$(setup-$(c):W)"\"" ;
+
+ # Append setup options to the setup name and add the final setup
+ # prefix & suffix.
+ rewrite = feature.get_values('<rewrite-setup-scripts>', options)
+ rewrite = rewrite[0] if rewrite else ''
+ setup = maybe_rewrite_setup(
+ 'msvc', setup_cpu, setup_options, version, rewrite)
+ return '{}{}{}'.format(setup_prefix, setup, setup_suffix)
+
+
+# Worker rule for toolset version configuration. Takes an explicit version id or
+# nothing in case it should configure the default toolset version (the first
+# registered one or a new 'default' one in case no toolset versions have been
+# registered yet).
+#
+
+def configure_really(version=None, options=[]):
+ v = version
+ if not v:
+ # Take the first registered (i.e. auto-detected) version.
+ version = __versions.first()
+ v = version
+
+ # Note: 'version' can still be empty at this point if no versions have
+ # been auto-detected.
+ if not version:
+ version = "default"
+
+ # Version alias -> real version number.
+ version = globals().get("__version_alias_{}".format(version), version)
+
+ # Check whether the selected configuration is already in use.
+ if version in __versions.used():
+ # Allow multiple 'toolset.using' calls for the same configuration if the
+ # identical sets of options are used.
+ if options and options != __versions.get(version,'options'):
+ raise RuntimeError("MSVC toolset configuration: Toolset version '$(version)' already configured.".format(version))
+ else:
+ # Register a new configuration.
+ __versions.register(version)
+
+ # Add user-supplied to auto-detected options.
+ version_opts = __versions.get(version, 'options')
+ if (version_opts):
+ options = version_opts + options
+
+ # Mark the configuration as 'used'.
+ __versions.use(version)
+ # Generate conditions and save them.
+ conditions = common.check_init_parameters('msvc', None, ('version', v))
+ __versions.set(version, 'conditions', conditions)
+ command = feature.get_values('<command>', options)
+
+ # If version is specified, we try to search first in default paths, and
+ # only then in PATH.
+ command = common.get_invocation_command('msvc', 'cl.exe', command, default_paths(version))
+ common.handle_options('msvc', conditions, command, options)
+
+ if not version:
+ # Even if version is not explicitly specified, try to detect the
+ # version from the path.
+ # FIXME: We currently detect both Microsoft Visual Studio 9.0 and
+ # 9.0express as 9.0 here.
+ if re.search("Microsoft Visual Studio[\/\\]2017", command):
+ version = '15.0'
+ elif re.search("Microsoft Visual Studio 14", command):
+ version = '14.0'
+ elif re.search("Microsoft Visual Studio 12", command):
+ version = '12.0'
+ elif re.search("Microsoft Visual Studio 11", command):
+ version = '11.0'
+ elif re.search("Microsoft Visual Studio 10", command):
+ version = '10.0'
+ elif re.search("Microsoft Visual Studio 9", command):
+ version = '9.0'
+ elif re.search("Microsoft Visual Studio 8", command):
+ version = '8.0'
+ elif re.search("NET 2003[\/\\]VC7", command):
+ version = '7.1'
+ elif re.search("Microsoft Visual C\\+\\+ Toolkit 2003", command):
+ version = '7.1toolkit'
+ elif re.search(".NET[\/\\]VC7", command):
+ version = '7.0'
+ else:
+ version = '6.0'
+
+ # Generate and register setup command.
+
+ below_8_0 = re.search("^[67]\\.",version) != None
+
+ if below_8_0:
+ cpu = ['i386']
+ else:
+ cpu = ['i386', 'amd64', 'ia64']
+
+ setup_scripts = {}
+
+ if command:
+ # TODO: Note that if we specify a non-existant toolset version then
+ # this rule may find and use a corresponding compiler executable
+ # belonging to an incorrect toolset version. For example, if you
+ # have only MSVC 7.1 installed, have its executable on the path and
+ # specify you want Boost Build to use MSVC 9.0, then you want Boost
+ # Build to report an error but this may cause it to silently use the
+ # MSVC 7.1 compiler even though it thinks it is using the msvc-9.0
+ # toolset version.
+ command = common.get_absolute_tool_path(command)
+
+ if command:
+ parent = os.path.dirname(os.path.normpath(command))
+ # Setup will be used if the command name has been specified. If
+ # setup is not specified explicitly then a default setup script will
+ # be used instead. Setup scripts may be global or arhitecture/
+ # /platform/cpu specific. Setup options are used only in case of
+ # global setup scripts.
+
+ # Default setup scripts provided with different VC distributions:
+ #
+ # VC 7.1 had only the vcvars32.bat script specific to 32 bit i386
+ # builds. It was located in the bin folder for the regular version
+ # and in the root folder for the free VC 7.1 tools.
+ #
+ # Later 8.0 & 9.0 versions introduce separate platform specific
+ # vcvars*.bat scripts (e.g. 32 bit, 64 bit AMD or 64 bit Itanium)
+ # located in or under the bin folder. Most also include a global
+ # vcvarsall.bat helper script located in the root folder which runs
+ # one of the aforementioned vcvars*.bat scripts based on the options
+ # passed to it. So far only the version coming with some PlatformSDK
+ # distributions does not include this top level script but to
+ # support those we need to fall back to using the worker scripts
+ # directly in case the top level script can not be found.
+
+ global_setup = feature.get_values('<setup>',options)
+ if global_setup:
+ global_setup = global_setup[0]
+ else:
+ global_setup = None
+
+ if not below_8_0 and not global_setup:
+ global_setup = locate_default_setup(command,parent,'vcvarsall.bat')
+
+
+ default_setup = {
+ 'amd64' : 'vcvarsx86_amd64.bat',
+ 'i386' : 'vcvars32.bat',
+ 'ia64' : 'vcvarsx86_ia64.bat' }
+
+ # http://msdn2.microsoft.com/en-us/library/x4d2c09s(VS.80).aspx and
+ # http://msdn2.microsoft.com/en-us/library/x4d2c09s(vs.90).aspx
+ # mention an x86_IPF option, that seems to be a documentation bug
+ # and x86_ia64 is the correct option.
+ default_global_setup_options = {
+ 'amd64' : 'x86_amd64',
+ 'i386' : 'x86',
+ 'ia64' : 'x86_ia64' }
+
+ somehow_detect_the_itanium_platform = None
+ # When using 64-bit Windows, and targeting 64-bit, it is possible to
+ # use a native 64-bit compiler, selected by the "amd64" & "ia64"
+ # parameters to vcvarsall.bat. There are two variables we can use --
+ # PROCESSOR_ARCHITECTURE and PROCESSOR_IDENTIFIER. The first is
+ # 'x86' when running 32-bit Windows, no matter which processor is
+ # used, and 'AMD64' on 64-bit windows on x86 (either AMD64 or EM64T)
+ # Windows.
+ #
+ if re.search( 'AMD64', environ[ "PROCESSOR_ARCHITECTURE" ] ) != None:
+ default_global_setup_options[ 'amd64' ] = 'amd64'
+ # TODO: The same 'native compiler usage' should be implemented for
+ # the Itanium platform by using the "ia64" parameter. For this
+ # though we need someone with access to this platform who can find
+ # out how to correctly detect this case.
+ elif somehow_detect_the_itanium_platform:
+ default_global_setup_options[ 'ia64' ] = 'ia64'
+
+ for c in cpu:
+ setup_scripts[c] = generate_setup_cmd(
+ version, command, parent, options, c, global_setup,
+ default_global_setup_options, default_setup
+ )
+
+ # Get tool names (if any) and finish setup.
+ compiler = feature.get_values("<compiler>", options)
+ compiler = compiler[0] if compiler else 'cl'
+
+ linker = feature.get_values("<linker>", options)
+ if not linker:
+ linker = "link"
+
+ resource_compiler = feature.get_values("<resource-compiler>", options)
+ if not resource_compiler:
+ resource_compiler = "rc"
+
+ # Turn on some options for i386 assembler
+ # -coff generate COFF format object file (compatible with cl.exe output)
+ default_assembler_amd64 = 'ml64'
+ default_assembler_i386 = 'ml -coff'
+ default_assembler_ia64 = 'ias'
+
+ assembler = feature.get_values('<assembler>',options)
+
+ idl_compiler = feature.get_values('<idl-compiler>',options)
+ if not idl_compiler:
+ idl_compiler = 'midl'
+
+ mc_compiler = feature.get_values('<mc-compiler>',options)
+ if not mc_compiler:
+ mc_compiler = 'mc'
+
+ manifest_tool = feature.get_values('<manifest-tool>',options)
+ if not manifest_tool:
+ manifest_tool = 'mt'
+
+ cc_filter = feature.get_values('<compiler-filter>',options)
+
+ for c in cpu:
+ cpu_conditions = [ condition + '/' + arch for arch in globals()['__cpu_arch_{}'.format(c)] for condition in conditions ]
+
+ setup_script = setup_scripts.get(c, '')
+
+ if debug():
+ for cpu_condition in cpu_conditions:
+ print "notice: [msvc-cfg] condition: '{}', setup: '{}'".format(cpu_condition,setup_script)
+
+ cpu_assembler = assembler
+ if not cpu_assembler:
+ cpu_assembler = locals()['default_assembler_{}'.format(c)]
+
+ toolset.flags('msvc.compile', '.CC' , cpu_conditions, ['{}{} /Zm800 -nologo' .format(setup_script, compiler)])
+ toolset.flags('msvc.compile', '.RC' , cpu_conditions, ['{}{}' .format(setup_script, resource_compiler)])
+ toolset.flags('msvc.compile', '.ASM', cpu_conditions, ['{}{} -nologo' .format(setup_script, cpu_assembler)])
+ toolset.flags('msvc.link' , '.LD' , cpu_conditions, ['{}{} /NOLOGO /INCREMENTAL:NO'.format(setup_script, linker)])
+ toolset.flags('msvc.archive', '.LD' , cpu_conditions, ['{}{} /lib /NOLOGO' .format(setup_script, linker)])
+ toolset.flags('msvc.compile', '.IDL', cpu_conditions, ['{}{}' .format(setup_script, idl_compiler)])
+ toolset.flags('msvc.compile', '.MC' , cpu_conditions, ['{}{}' .format(setup_script, mc_compiler)])
+ toolset.flags('msvc.link' , '.MT' , cpu_conditions, ['{}{} -nologo' .format(setup_script, manifest_tool)])
+
+ if cc_filter:
+ toolset.flags('msvc', '.CC.FILTER', cpu_conditions, ['"|" {}'.format(cc_filter)])
+
+ # Set version-specific flags.
+ configure_version_specific('msvc', version, conditions)
+
+
+# Returns the default installation path for the given version.
+#
+def default_path(version):
+ # Use auto-detected path if possible.
+ options = __versions.get(version, 'options')
+ tmp_path = None
+ if options:
+ tmp_path = feature.get_values('<command>', options)
+
+ if tmp_path:
+ tmp_path="".join(tmp_path)
+ tmp_path=os.path.dirname(tmp_path)
+ else:
+ env_var_var_name = '__version_{}_env'.format(version.replace('.','_'))
+ vc_path = None
+ if env_var_var_name in globals():
+ env_var_name = globals()[env_var_var_name]
+ if env_var_name in os.environ:
+ vc_path = environ[env_var_name]
+ if vc_path:
+ vc_path = os.path.join(vc_path,globals()['__version_{}_envpath'.format(version.replace('.','_'))])
+ tmp_path = os.path.normpath(vc_path)
+
+ var_name = '__version_{}_path'.format(version.replace('.','_'))
+ if not tmp_path and var_name in globals():
+ tmp_path = os.path.normpath(os.path.join(common.get_program_files_dir(), globals()[var_name]))
+ return tmp_path
+
+
+# Returns either the default installation path (if 'version' is not empty) or
+# list of all known default paths (if no version is given)
+#
+def default_paths(version = None):
+ possible_paths = []
+ if version:
+ path = default_path(version)
+ if path:
+ possible_paths.append(path)
+ else:
+ for i in _known_versions:
+ path = default_path(i)
+ if path:
+ possible_paths.append(path)
+ return possible_paths
+
+
+class MsvcLinkingGenerator(builtin.LinkingGenerator):
+ # Calls the base version. If necessary, also create a target for the
+ # manifest file.specifying source's name as the name of the created
+ # target. As result, the PCH will be named whatever.hpp.gch, and not
+ # whatever.gch.
+ def generated_targets(self, sources, prop_set, project, name):
+ result = builtin.LinkingGenerator.generated_targets(self, sources, prop_set, project, name)
+ if result:
+ name_main = result[0].name()
+ action = result[0].action()
+
+ if prop_set.get('<debug-symbols>') == 'on':
+ # We force exact name on PDB. The reason is tagging -- the tag rule may
+ # reasonably special case some target types, like SHARED_LIB. The tag rule
+ # will not catch PDB, and it cannot even easily figure if PDB is paired with
+ # SHARED_LIB or EXE or something else. Because PDB always get the
+ # same name as the main target, with .pdb as extension, just force it.
+ target = FileTarget(name_main.split_ext()[0]+'.pdb','PDB',project,action,True)
+ registered_target = virtual_target.register(target)
+ if target != registered_target:
+ action.replace_targets(target,registered_target)
+ result.append(registered_target)
+ if prop_set.get('<embed-manifest>') == 'off':
+ # Manifest is evil target. It has .manifest appened to the name of
+ # main target, including extension. E.g. a.exe.manifest. We use 'exact'
+ # name because to achieve this effect.
+ target = FileTarget(name_main+'.manifest', 'MANIFEST', project, action, True)
+ registered_target = virtual_target.register(target)
+ if target != registered_target:
+ action.replace_targets(target,registered_target)
+ result.append(registered_target)
+ return result
+
+
+# Unsafe worker rule for the register-toolset() rule. Must not be called
+# multiple times.
+
+def register_toolset_really():
+ feature.extend('toolset', ['msvc'])
+
+ # Intel and msvc supposedly have link-compatible objects.
+ feature.subfeature( 'toolset', 'msvc', 'vendor', ['intel'], ['propagated', 'optional'])
+
+ # Inherit MIDL flags.
+ toolset.inherit_flags('msvc', 'midl')
+
+ # Inherit MC flags.
+ toolset.inherit_flags('msvc','mc')
+
+ # Dynamic runtime comes only in MT flavour.
+ toolset.add_requirements(['<toolset>msvc,<runtime-link>shared:<threading>multi'])
+
+ # Declare msvc toolset specific features.
+ feature.feature('debug-store', ['object', 'database'], ['propagated'])
+ feature.feature('pch-source', [], ['dependency', 'free'])
+
+ # Declare generators.
+
+ # TODO: Is it possible to combine these? Make the generators
+ # non-composing so that they do not convert each source into a separate
+ # .rsp file.
+ generators.register(MsvcLinkingGenerator('msvc.link', True, ['OBJ', 'SEARCHED_LIB', 'STATIC_LIB', 'IMPORT_LIB'], ['EXE'], ['<toolset>msvc']))
+ generators.register(MsvcLinkingGenerator('msvc.link.dll', True, ['OBJ', 'SEARCHED_LIB', 'STATIC_LIB', 'IMPORT_LIB'], ['SHARED_LIB','IMPORT_LIB'], ['<toolset>msvc']))
+
+ builtin.register_archiver('msvc.archive', ['OBJ'], ['STATIC_LIB'], ['<toolset>msvc'])
+ builtin.register_c_compiler('msvc.compile.c++', ['CPP'], ['OBJ'], ['<toolset>msvc'])
+ builtin.register_c_compiler('msvc.compile.c', ['C'], ['OBJ'], ['<toolset>msvc'])
+ builtin.register_c_compiler('msvc.compile.c++.preprocess', ['CPP'], ['PREPROCESSED_CPP'], ['<toolset>msvc'])
+ builtin.register_c_compiler('msvc.compile.c.preprocess', ['C'], ['PREPROCESSED_C'], ['<toolset>msvc'])
+
+ # Using 'register-c-compiler' adds the build directory to INCLUDES.
+ builtin.register_c_compiler('msvc.compile.rc', ['RC'], ['OBJ(%_res)'], ['<toolset>msvc'])
+ generators.override('msvc.compile.rc', 'rc.compile.resource')
+ generators.register_standard('msvc.compile.asm', ['ASM'], ['OBJ'], ['<toolset>msvc'])
+
+ builtin.register_c_compiler('msvc.compile.idl', ['IDL'], ['MSTYPELIB', 'H', 'C(%_i)', 'C(%_proxy)', 'C(%_dlldata)'], ['<toolset>msvc'])
+ generators.override('msvc.compile.idl', 'midl.compile.idl')
+
+ generators.register_standard('msvc.compile.mc', ['MC'], ['H','RC'], ['<toolset>msvc'])
+ generators.override('msvc.compile.mc', 'mc.compile')
+
+ # Note: the 'H' source type will catch both '.h' and '.hpp' headers as
+ # the latter have their HPP type derived from H. The type of compilation
+ # is determined entirely by the destination type.
+ generators.register(MsvcPchGenerator('msvc.compile.c.pch', False, ['H'], ['C_PCH','OBJ'], ['<pch>on', '<toolset>msvc']))
+ generators.register(MsvcPchGenerator('msvc.compile.c++.pch', False, ['H'], ['CPP_PCH','OBJ'], ['<pch>on', '<toolset>msvc']))
+
+ generators.override('msvc.compile.c.pch', 'pch.default-c-pch-generator')
+ generators.override('msvc.compile.c++.pch', 'pch.default-cpp-pch-generator')
+
+ toolset.flags('msvc.compile', 'PCH_FILE' , ['<pch>on'], ['<pch-file>' ])
+ toolset.flags('msvc.compile', 'PCH_SOURCE', ['<pch>on'], ['<pch-source>'])
+ toolset.flags('msvc.compile', 'PCH_HEADER', ['<pch>on'], ['<pch-header>'])
+
+ #
+ # Declare flags for compilation.
+ #
+ toolset.flags('msvc.compile', 'CFLAGS', ['<optimization>speed'], ['/O2'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<optimization>space'], ['/O1'])
+
+ toolset.flags('msvc.compile', 'CFLAGS', [ a + '/<instruction-set>' + t for a in __cpu_arch_ia64 for t in __cpu_type_itanium ], ['/G1'])
+ toolset.flags('msvc.compile', 'CFLAGS', [ a + '/<instruction-set>' + t for a in __cpu_arch_ia64 for t in __cpu_type_itanium2 ], ['/G2'])
+
+ toolset.flags('msvc.compile', 'CFLAGS', ['<debug-symbols>on/<debug-store>object'], ['/Z7'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<debug-symbols>on/<debug-store>database'], ['/Zi'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<optimization>off'], ['/Od'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<inlining>off'], ['/Ob0'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<inlining>on'], ['/Ob1'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<inlining>full'], ['/Ob2'])
+
+ toolset.flags('msvc.compile', 'CFLAGS', ['<warnings>on'], ['/W3'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<warnings>off'], ['/W0'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<warnings>all'], ['/W4'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<warnings-as-errors>on'], ['/WX'])
+
+ toolset.flags('msvc.compile', 'C++FLAGS', ['<exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>off'], ['/EHs'])
+ toolset.flags('msvc.compile', 'C++FLAGS', ['<exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>on'], ['/EHsc'])
+ toolset.flags('msvc.compile', 'C++FLAGS', ['<exception-handling>on/<asynch-exceptions>on/<extern-c-nothrow>off'], ['/EHa'])
+ toolset.flags('msvc.compile', 'C++FLAGS', ['<exception-handling>on/<asynch-exceptions>on/<extern-c-nothrow>on'], ['/EHac'])
+
+ # By default 8.0 enables rtti support while prior versions disabled it. We
+ # simply enable or disable it explicitly so we do not have to depend on this
+ # default behaviour.
+ toolset.flags('msvc.compile', 'CFLAGS', ['<rtti>on'], ['/GR'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<rtti>off'], ['/GR-'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<runtime-debugging>off/<runtime-link>shared'], ['/MD'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<runtime-debugging>on/<runtime-link>shared'], ['/MDd'])
+
+ toolset.flags('msvc.compile', 'CFLAGS', ['<runtime-debugging>off/<runtime-link>static/<threading>multi'], ['/MT'])
+ toolset.flags('msvc.compile', 'CFLAGS', ['<runtime-debugging>on/<runtime-link>static/<threading>multi'], ['/MTd'])
+
+ toolset.flags('msvc.compile', 'OPTIONS', [], ['<cflags>'])
+ toolset.flags('msvc.compile.c++', 'OPTIONS', [], ['<cxxflags>'])
+
+ toolset.flags('msvc.compile', 'PDB_CFLAG', ['<debug-symbols>on/<debug-store>database'],['/Fd'])
+
+ toolset.flags('msvc.compile', 'DEFINES', [], ['<define>'])
+ toolset.flags('msvc.compile', 'UNDEFS', [], ['<undef>'])
+ toolset.flags('msvc.compile', 'INCLUDES', [], ['<include>'])
+
+ # Declare flags for the assembler.
+ toolset.flags('msvc.compile.asm', 'USER_ASMFLAGS', [], ['<asmflags>'])
+
+ toolset.flags('msvc.compile.asm', 'ASMFLAGS', ['<debug-symbols>on'], ['/Zi', '/Zd'])
+
+ toolset.flags('msvc.compile.asm', 'ASMFLAGS', ['<warnings>on'], ['/W3'])
+ toolset.flags('msvc.compile.asm', 'ASMFLAGS', ['<warnings>off'], ['/W0'])
+ toolset.flags('msvc.compile.asm', 'ASMFLAGS', ['<warnings>all'], ['/W4'])
+ toolset.flags('msvc.compile.asm', 'ASMFLAGS', ['<warnings-as-errors>on'], ['/WX'])
+
+ toolset.flags('msvc.compile.asm', 'DEFINES', [], ['<define>'])
+
+ # Declare flags for linking.
+ toolset.flags('msvc.link', 'PDB_LINKFLAG', ['<debug-symbols>on/<debug-store>database'], ['/PDB']) # not used yet
+ toolset.flags('msvc.link', 'LINKFLAGS', ['<debug-symbols>on'], ['/DEBUG'])
+ toolset.flags('msvc.link', 'DEF_FILE', [], ['<def-file>'])
+
+ # The linker disables the default optimizations when using /DEBUG so we
+ # have to enable them manually for release builds with debug symbols.
+ toolset.flags('msvc', 'LINKFLAGS', ['<debug-symbols>on/<runtime-debugging>off'], ['/OPT:REF,ICF'])
+
+ toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>console'], ['/subsystem:console'])
+ toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>gui'], ['/subsystem:windows'])
+ toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>wince'], ['/subsystem:windowsce'])
+ toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>native'], ['/subsystem:native'])
+ toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>auto'], ['/subsystem:posix'])
+
+ toolset.flags('msvc.link', 'OPTIONS', [], ['<linkflags>'])
+ toolset.flags('msvc.link', 'LINKPATH', [], ['<library-path>'])
+
+ toolset.flags('msvc.link', 'FINDLIBS_ST', [], ['<find-static-library>'])
+ toolset.flags('msvc.link', 'FINDLIBS_SA', [], ['<find-shared-library>'])
+ toolset.flags('msvc.link', 'LIBRARY_OPTION', ['<toolset>msvc'], [''])
+ toolset.flags('msvc.link', 'LIBRARIES_MENTIONED_BY_FILE', [], ['<library-file>'])
+
+ toolset.flags('msvc.archive', 'AROPTIONS', [], ['<archiveflags>'])
+
+
+# Locates the requested setup script under the given folder and returns its full
+# path or nothing in case the script can not be found. In case multiple scripts
+# are found only the first one is returned.
+#
+# TODO: There used to exist a code comment for the msvc.init rule stating that
+# we do not correctly detect the location of the vcvars32.bat setup script for
+# the free VC7.1 tools in case user explicitly provides a path. This should be
+# tested or simply remove this whole comment in case this toolset version is no
+# longer important.
+#
+def locate_default_setup(command, parent, setup_name):
+ for setup in [os.path.join(dir,setup_name) for dir in [command,parent]]:
+ if os.path.exists(setup):
+ return setup
+ return None
+
+
+# Validates given path, registers found configuration and prints debug
+# information about it.
+#
+def register_configuration(version, path=None):
+ if path:
+ command = os.path.join(path, 'cl.exe')
+ if os.path.exists(command):
+ if debug():
+ print "notice: [msvc-cfg] msvc-$(version) detected, command: ''".format(version,command)
+ __versions.register(version)
+ __versions.set(version,'options',['<command>{}'.format(command)])
+
+
+################################################################################
+#
+# Startup code executed when loading this module.
+#
+################################################################################
+
+# Similar to Configurations, but remembers the first registered configuration.
+class MSVCConfigurations(Configurations):
+ def __init__(self):
+ Configurations.__init__(self)
+ self.first_ = None
+
+ def register(self, id):
+ Configurations.register(self,id)
+ if not self.first_:
+ self.first_ = id
+
+ def first(self):
+ return self.first_
+
+
+# List of all registered configurations.
+__versions = MSVCConfigurations()
+
+# Supported CPU architectures.
+__cpu_arch_i386 = [
+ '<architecture>/<address-model>',
+ '<architecture>/<address-model>32',
+ '<architecture>x86/<address-model>',
+ '<architecture>x86/<address-model>32']
+
+__cpu_arch_amd64 = [
+ '<architecture>/<address-model>64',
+ '<architecture>x86/<address-model>64']
+
+__cpu_arch_ia64 = [
+ '<architecture>ia64/<address-model>',
+ '<architecture>ia64/<address-model>64']
+
+
+# Supported CPU types (only Itanium optimization options are supported from
+# VC++ 2005 on). See
+# http://msdn2.microsoft.com/en-us/library/h66s5s0e(vs.90).aspx for more
+# detailed information.
+__cpu_type_g5 = ['i586', 'pentium', 'pentium-mmx' ]
+__cpu_type_g6 = ['i686', 'pentiumpro', 'pentium2', 'pentium3', 'pentium3m', 'pentium-m', 'k6',
+ 'k6-2', 'k6-3', 'winchip-c6', 'winchip2', 'c3', 'c3-2' ]
+__cpu_type_em64t = ['prescott', 'nocona', 'core2', 'corei7', 'corei7-avx', 'core-avx-i', 'conroe', 'conroe-xe', 'conroe-l', 'allendale', 'merom',
+ 'merom-xe', 'kentsfield', 'kentsfield-xe', 'penryn', 'wolfdale',
+ 'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell' ]
+__cpu_type_amd64 = ['k8', 'opteron', 'athlon64', 'athlon-fx', 'k8-sse3', 'opteron-sse3', 'athlon64-sse3', 'amdfam10', 'barcelona',
+ 'bdver1', 'bdver2', 'bdver3', 'btver1', 'btver2' ]
+__cpu_type_g7 = ['pentium4', 'pentium4m', 'athlon', 'athlon-tbird', 'athlon-4', 'athlon-xp'
+ 'athlon-mp'] + __cpu_type_em64t + __cpu_type_amd64
+__cpu_type_itanium = ['itanium', 'itanium1', 'merced']
+__cpu_type_itanium2 = ['itanium2', 'mckinley']
+
+
+# Known toolset versions, in order of preference.
+_known_versions = ['15.0', '14.0', '12.0', '11.0', '10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
+
+# Version aliases.
+__version_alias_6 = '6.0'
+__version_alias_6_5 = '6.0'
+__version_alias_7 = '7.0'
+__version_alias_8 = '8.0'
+__version_alias_9 = '9.0'
+__version_alias_10 = '10.0'
+__version_alias_11 = '11.0'
+__version_alias_12 = '12.0'
+__version_alias_14 = '14.0'
+__version_alias_15 = '15.0'
+
+# Names of registry keys containing the Visual C++ installation path (relative
+# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
+__version_6_0_reg = "VisualStudio\\6.0\\Setup\\Microsoft Visual C++"
+__version_7_0_reg = "VisualStudio\\7.0\\Setup\\VC"
+__version_7_1_reg = "VisualStudio\\7.1\\Setup\\VC"
+__version_8_0_reg = "VisualStudio\\8.0\\Setup\\VC"
+__version_8_0express_reg = "VCExpress\\8.0\\Setup\\VC"
+__version_9_0_reg = "VisualStudio\\9.0\\Setup\\VC"
+__version_9_0express_reg = "VCExpress\\9.0\\Setup\\VC"
+__version_10_0_reg = "VisualStudio\\10.0\\Setup\\VC"
+__version_10_0express_reg = "VCExpress\\10.0\\Setup\\VC"
+__version_11_0_reg = "VisualStudio\\11.0\\Setup\\VC"
+__version_12_0_reg = "VisualStudio\\12.0\\Setup\\VC"
+__version_14_0_reg = "VisualStudio\\14.0\\Setup\\VC"
+__version_15_0_reg = "VisualStudio\\15.0\\Setup\\VC"
+
+# Visual C++ Toolkit 2003 does not store its installation path in the registry.
+# The environment variable 'VCToolkitInstallDir' and the default installation
+# path will be checked instead.
+__version_7_1toolkit_path = 'Microsoft Visual C++ Toolkit 2003\\bin'
+__version_7_1toolkit_env = 'VCToolkitInstallDir'
+
+# Path to the folder containing "cl.exe" relative to the value of the
+# corresponding environment variable.
+__version_7_1toolkit_envpath = 'bin' ;
+#
+#
+# Auto-detect all the available msvc installations on the system.
+auto_detect_toolset_versions()
+
+# And finally trigger the actual Boost Build toolset registration.
+register_toolset()
diff --git a/src/boost/tools/build/src/tools/notfile.jam b/src/boost/tools/build/src/tools/notfile.jam
new file mode 100644
index 000000000..7d0985b45
--- /dev/null
+++ b/src/boost/tools/build/src/tools/notfile.jam
@@ -0,0 +1,65 @@
+# Copyright (c) 2005 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)
+
+import "class" : new ;
+import generators ;
+import project ;
+import targets ;
+import toolset ;
+import type ;
+
+
+type.register NOTFILE_MAIN ;
+
+
+class notfile-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8)
+ : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) :
+ $(17) : $(18) : $(19) ;
+ }
+
+ rule run ( project name ? : property-set : sources * : multiple ? )
+ {
+ local action ;
+ local action-name = [ $(property-set).get <action> ] ;
+ local m = [ MATCH ^@(.*) : $(action-name) ] ;
+ if $(m)
+ {
+ action = [ new action $(sources) : $(m[1]) : $(property-set) ] ;
+ }
+ else
+ {
+ action = [ new action $(sources) : notfile.run : $(property-set) ] ;
+ }
+ local t = [ new notfile-target $(name) : $(project) : $(action) ] ;
+ return [ virtual-target.register $(t) ] ;
+ }
+}
+
+
+generators.register [ new notfile-generator notfile.main : : NOTFILE_MAIN ] ;
+
+
+toolset.flags notfile.run ACTION : <action> ;
+
+
+actions run
+{
+ $(ACTION)
+}
+
+
+rule notfile ( target-name : action + : sources * : requirements * :
+ default-build * )
+{
+ targets.create-typed-target NOTFILE_MAIN : [ project.current ] :
+ $(target-name) : $(sources) : $(requirements) <action>$(action) :
+ $(default-build) ;
+}
+
+IMPORT $(__name__) : notfile : : notfile ;
diff --git a/src/boost/tools/build/src/tools/notfile.py b/src/boost/tools/build/src/tools/notfile.py
new file mode 100644
index 000000000..afbf68fb0
--- /dev/null
+++ b/src/boost/tools/build/src/tools/notfile.py
@@ -0,0 +1,51 @@
+# Status: ported.
+# Base revision: 64429.
+#
+# Copyright (c) 2005-2010 Vladimir Prus.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+
+import b2.build.type as type
+import b2.build.generators as generators
+import b2.build.virtual_target as virtual_target
+import b2.build.toolset as toolset
+import b2.build.targets as targets
+
+from b2.manager import get_manager
+from b2.util import bjam_signature
+
+type.register("NOTFILE_MAIN")
+
+class NotfileGenerator(generators.Generator):
+
+ def run(self, project, name, ps, sources):
+ pass
+ action_name = ps.get('action')[0]
+ if action_name[0] == '@':
+ action = virtual_target.Action(get_manager(), sources, action_name[1:], ps)
+ else:
+ action = virtual_target.Action(get_manager(), sources, "notfile.run", ps)
+
+ return [get_manager().virtual_targets().register(
+ virtual_target.NotFileTarget(name, project, action))]
+
+generators.register(NotfileGenerator("notfile.main", False, [], ["NOTFILE_MAIN"]))
+
+toolset.flags("notfile.run", "ACTION", [], ["<action>"])
+
+get_manager().engine().register_action("notfile.run", "$(ACTION)")
+
+@bjam_signature((["target_name"], ["action"], ["sources", "*"], ["requirements", "*"],
+ ["default_build", "*"]))
+def notfile(target_name, action, sources, requirements, default_build):
+
+ requirements.append("<action>" + action)
+
+ return targets.create_typed_metatarget(target_name, "NOTFILE_MAIN", sources, requirements,
+ default_build, [])
+
+
+get_manager().projects().add_rule("notfile", notfile)
diff --git a/src/boost/tools/build/src/tools/openssl.jam b/src/boost/tools/build/src/tools/openssl.jam
new file mode 100644
index 000000000..8efcd69a6
--- /dev/null
+++ b/src/boost/tools/build/src/tools/openssl.jam
@@ -0,0 +1,140 @@
+# Copyright (c) 2019 Damian Jarek
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the openssl library
+#
+# After 'using openssl', the following targets are available:
+#
+# /openssl//ssl -- The SSL/TLS library
+# /openssl//crypto -- The cryptography library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import os ;
+import property ;
+import property-set ;
+
+header = openssl.h ;
+ssl_names = ssl ssleay32 ;
+crypto_names = crypto libeay32 ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+# Initializes the openssl library.
+#
+# openssl can be configured to use pre-existing binaries.
+#
+# Options for configuring a prebuilt openssl::
+#
+# <search>
+# The directory containing the openssl binaries.
+# <name>
+# Overrides the default library name.
+# <include>
+# The directory containing the openssl headers.
+#
+# If none of these options is specified, then the environmental
+# variables OPENSSL_LIBRARY_PATH, OPENSSL_NAME, and OPENSSL_INCLUDE will
+# be used instead.
+#
+# Examples::
+#
+# # Find openssl in the default system location
+# using openssl ;
+# # Find openssl in /usr/local
+# using openssl : 1.2.7
+# : <include>/usr/local/include <search>/usr/local/lib ;
+#
+rule init (
+ version ?
+ # The OpenSSL version (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the openssl target
+
+ : is-default ?
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project openssl ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+
+ if ! $(library-path) && ! $(include-path) && ! $(source-path) && ! $(library-name)
+ {
+ is-default = true ;
+ }
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ if $(.configured.$(condition))
+ {
+ if $(is-default)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [openssl] openssl is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "openssl is already configured" ;
+ }
+ return ;
+ }
+ else
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [openssl] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [openssl] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local ssl_lib = [ new ac-library ssl : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : ssl ] ;
+ $(ssl_lib).set-header openssl/ssl.h ;
+ $(ssl_lib).set-default-names $(ssl_names) ;
+
+ local crypto_lib = [ new ac-library crypto : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : crypto ] ;
+ $(crypto_lib).set-header openssl/crypto.h ;
+ $(crypto_lib).set-default-names $(crypto_names) ;
+
+ targets.main-target-alternative $(ssl_lib) ;
+ targets.main-target-alternative $(crypto_lib) ;
+ }
+ .configured.$(condition) = true ;
+}
+
diff --git a/src/boost/tools/build/src/tools/package.jam b/src/boost/tools/build/src/tools/package.jam
new file mode 100644
index 000000000..7ae9dc54a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/package.jam
@@ -0,0 +1,274 @@
+# Copyright (c) 2005 Vladimir Prus.
+# Copyright 2006 Rene Rivera.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Provides mechanism for installing whole packages into a specific directory
+# structure. This is opposed to the 'install' rule, that installs a number of
+# targets to a single directory, and does not care about directory structure at
+# all.
+
+# Example usage:
+#
+# package.install boost : <properties>
+# : <binaries>
+# : <libraries>
+# : <headers>
+# ;
+#
+# This will install binaries, libraries and headers to the 'proper' location,
+# given by command line options --prefix, --exec-prefix, --bindir, --libdir and
+# --includedir.
+#
+# The rule is just a convenient wrapper, avoiding the need to define several
+# 'install' targets.
+#
+# The only install-related feature is <install-source-root>. It will apply to
+# headers only and if present, paths of headers relatively to source root will
+# be retained after installing. If it is not specified, then "." is assumed, so
+# relative paths in headers are always preserved.
+
+import "class" : new ;
+import option ;
+import project ;
+import feature ;
+import path ;
+import property ;
+import stage ;
+import targets ;
+import modules ;
+import os ;
+
+feature.feature install-default-prefix : : free incidental ;
+
+class package-paths
+{
+ import feature ;
+ import modules ;
+ import option ;
+ import os ;
+ import path ;
+ rule __init__ ( default-prefix )
+ {
+ local explicit-options = [ MATCH --(prefix|bindir|libdir|includedir|datarootdir)=.*
+ : [ modules.peek : ARGV ] ] ;
+ self.has-$(explicit-options) = true ;
+ if prefix in $(explicit-options)
+ {
+ # If --prefix is explicitly specified on the command line,
+ # then we need wipe away any settings of libdir/includir that
+ # is specified via options in config files.
+ option.set bindir : ;
+ option.set libdir : ;
+ option.set includedir : ;
+ option.set datarootdir : ;
+ }
+
+ handle-path prefix : $(default-prefix) ;
+ handle-path libdir : $(self.prefix)/lib ;
+ handle-path bindir : $(self.prefix)/bin ;
+ handle-path includedir : $(self.prefix)/include ;
+ handle-path datarootdir : $(self.prefix)/share ;
+ }
+
+ local rule handle-path ( option : default-value )
+ {
+ local opt = [ option.get $(option) ] ;
+ if $(opt)
+ {
+ opt = [ path.root [ path.make $(opt) ] [ path.pwd ] ] ;
+ }
+ else
+ {
+ opt = $(default-value) ;
+ }
+ self.$(option) = $(opt) ;
+ }
+
+ rule prefix ( )
+ {
+ return $(self.prefix) ;
+ }
+
+ rule libdir ( )
+ {
+ return $(self.libdir) ;
+ }
+
+ rule bindir ( )
+ {
+ return $(self.bindir) ;
+ }
+
+ rule includedir ( )
+ {
+ return $(self.includedir) ;
+ }
+
+ rule datarootdir ( )
+ {
+ return $(self.datarootdir) ;
+ }
+
+ rule get ( option )
+ {
+ if ! $(self.$(option))
+ {
+ local info = [ modules.peek package : .options.$(option) ] ;
+ local default-value = $(info[1]) ;
+ local relative-to = $(info[2]) ;
+ if $(self.has-$(relative-to))
+ {
+ option.set $(option) ;
+ self.has-$(option) = true ;
+ }
+ if [ MATCH --$(option)=(.*) : [ modules.peek : ARGV ] ]
+ {
+ self.has-$(option) = true ;
+ }
+ local adjusted-default =
+ [ path.join [ get $(relative-to) ] $(default-value) ] ;
+ handle-path $(option) : $(adjusted-default) ;
+ }
+ return $(self.$(option)) ;
+ }
+}
+
+# Registers an additional path option. The option name
+# can then be used with a package-paths object.
+#
+# default-path is the default path that will be used if
+# the option is not set explicitly. It will be interpreted
+# relative to another option. This allows options to be
+# defined hierarchically with --prefix as the root.
+#
+# relative-to should be the name of another option. It defaults
+# to prefix.
+#
+# Example::
+#
+# package.add-path-option cmakedir : cmake : libdir ;
+# cmakedir = [ $(mypaths).get cmakedir ] ; # defaults to /usr/local/lib/cmake
+#
+rule add-path-option ( name : default-path : relative-to ? )
+{
+ local value = $(default-path) $(relative-to:E=prefix) ;
+ if $(.options.$(name)) && $(.options.$(name)) != $(value)
+ {
+ import errors ;
+ errors.error Duplicate definition of $(name) ;
+ }
+ .options.$(name) = $(value) ;
+}
+
+
+# Returns a package-paths object that can be used
+# to find the various install paths. If requirements
+# contains <install-default-prefix> then that will be used
+# as the default prefix, otherwise a platform specific
+# default prefix will be used. All other properties
+# in requirements are ignored.
+#
+rule paths ( package-name : requirements * )
+{
+ local default-prefix = [ feature.get-values <install-default-prefix> : $(requirements) ] ;
+ # Or some likely defaults if neither is given.
+ if ! $(default-prefix)
+ {
+ if [ os.name ] = NT { default-prefix = C:\\$(package-name) ; }
+ else { default-prefix = /usr/local ; }
+ }
+ default-prefix = [ path.make $(default-prefix) ] ;
+ if ! $(.package-paths.$(default-prefix))
+ {
+ .package-paths.$(default-prefix) = [ new package-paths $(default-prefix) ] ;
+ }
+ return $(.package-paths.$(default-prefix)) ;
+}
+
+rule install ( name package-name ? : requirements * : binaries * : libraries * : headers * )
+{
+ package-name ?= $(name) ;
+
+ # If <install-source-root> is not specified, all headers are installed to
+ # prefix/include, no matter what their relative path is. Sometimes that is
+ # what is needed.
+ local install-source-root = [ property.select <install-source-root> :
+ $(requirements) ] ;
+ install-source-root = $(install-source-root:G=) ;
+ requirements = [ property.change $(requirements) : <install-source-root> ] ;
+
+ local install-header-subdir = [ property.select <install-header-subdir> :
+ $(requirements) ] ;
+ install-header-subdir = /$(install-header-subdir:G=) ;
+ install-header-subdir ?= "" ;
+ requirements = [ property.change $(requirements) : <install-header-subdir> ]
+ ;
+
+ # First, figure out all locations. Use the default if no prefix option
+ # given.
+ local paths = [ paths $(package-name) : $(requirements) ] ;
+
+ # Binaries.
+ local bin-locate = [ $(paths).bindir ] ;
+
+ # Object code libraries.
+ local lib-locate = [ $(paths).libdir ] ;
+
+ # Source header files.
+ local include-locate = [ $(paths).includedir ] ;
+
+ stage.install $(name)-bin : $(binaries) : $(requirements)
+ <location>$(bin-locate) ;
+ alias $(name)-lib : $(name)-lib-shared $(name)-lib-static ;
+
+ # Since the install location of shared libraries differs on universe
+ # and cygwin, use target alternatives to make different targets.
+ # We should have used indirection conditioanl requirements, but it's
+ # awkward to pass bin-locate and lib-locate from there to another rule.
+ alias $(name)-lib-shared : $(name)-lib-shared-universe ;
+ alias $(name)-lib-shared : $(name)-lib-shared-cygwin : <target-os>cygwin ;
+
+ # For shared libraries, we install both explicitly specified one and the
+ # shared libraries that the installed executables depend on.
+ stage.install $(name)-lib-shared-universe : $(binaries) $(libraries) : $(requirements)
+ <location>$(lib-locate) <install-dependencies>on <install-type>SHARED_LIB ;
+ stage.install $(name)-lib-shared-cygwin : $(binaries) $(libraries) : $(requirements)
+ <location>$(bin-locate) <install-dependencies>on <install-type>SHARED_LIB ;
+
+ # For static libraries, we do not care about executable dependencies, since
+ # static libraries are already incorporated into them.
+ stage.install $(name)-lib-static : $(libraries) : $(requirements)
+ <location>$(lib-locate) <install-dependencies>on <install-type>STATIC_LIB ;
+ stage.install $(name)-headers : $(headers) : $(requirements)
+ <location>$(include-locate)$(install-header-subdir)
+ <install-source-root>$(install-source-root) ;
+ alias $(name) : $(name)-bin $(name)-lib $(name)-headers ;
+
+ local c = [ project.current ] ;
+ modules.call-in [ $(c).project-module ] : explicit $(name) $(name)-bin
+ $(name)-lib $(name)-headers $(name)-lib-shared $(name)-lib-static
+ $(name)-lib-shared-universe $(name)-lib-shared-cygwin ;
+}
+
+rule install-data ( target-name : package-name : data * : requirements * )
+{
+ package-name ?= target-name ;
+
+ local paths = [ paths $(package-name) : $(requirements) ] ;
+ local datadir = [ $(paths).datarootdir ] ;
+
+ stage.install $(target-name)
+ : $(data)
+ : $(requirements) <location>$(datadir)/$(package-name)
+ ;
+
+ local c = [ project.current ] ;
+ local project-module = [ $(c).project-module ] ;
+ module $(project-module)
+ {
+ explicit $(1) ;
+ }
+}
diff --git a/src/boost/tools/build/src/tools/package.py b/src/boost/tools/build/src/tools/package.py
new file mode 100644
index 000000000..a3b1baef4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/package.py
@@ -0,0 +1,168 @@
+# Status: ported
+# Base revision: 64488
+#
+# Copyright (c) 2005, 2010 Vladimir Prus.
+# Copyright 2006 Rene Rivera.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Provides mechanism for installing whole packages into a specific directory
+# structure. This is opposed to the 'install' rule, that installs a number of
+# targets to a single directory, and does not care about directory structure at
+# all.
+
+# Example usage:
+#
+# package.install boost : <properties>
+# : <binaries>
+# : <libraries>
+# : <headers>
+# ;
+#
+# This will install binaries, libraries and headers to the 'proper' location,
+# given by command line options --prefix, --exec-prefix, --bindir, --libdir and
+# --includedir.
+#
+# The rule is just a convenient wrapper, avoiding the need to define several
+# 'install' targets.
+#
+# The only install-related feature is <install-source-root>. It will apply to
+# headers only and if present, paths of headers relatively to source root will
+# be retained after installing. If it is not specified, then "." is assumed, so
+# relative paths in headers are always preserved.
+
+import b2.build.feature as feature
+import b2.build.property as property
+import b2.util.option as option
+import b2.tools.stage as stage
+
+from b2.build.alias import alias
+
+from b2.manager import get_manager
+
+from b2.util import bjam_signature
+from b2.util.utility import ungrist
+
+
+import os
+
+feature.feature("install-default-prefix", [], ["free", "incidental"])
+
+@bjam_signature((["name", "package_name", "?"], ["requirements", "*"],
+ ["binaries", "*"], ["libraries", "*"], ["headers", "*"]))
+def install(name, package_name=None, requirements=[], binaries=[], libraries=[], headers=[]):
+
+ requirements = requirements[:]
+ binaries = binaries[:]
+ libraries
+
+ if not package_name:
+ package_name = name
+
+ if option.get("prefix"):
+ # If --prefix is explicitly specified on the command line,
+ # then we need wipe away any settings of libdir/includir that
+ # is specified via options in config files.
+ option.set("bindir", None)
+ option.set("libdir", None)
+ option.set("includedir", None)
+
+ # If <install-source-root> is not specified, all headers are installed to
+ # prefix/include, no matter what their relative path is. Sometimes that is
+ # what is needed.
+ install_source_root = property.select('install-source-root', requirements)
+ if install_source_root:
+ requirements = property.change(requirements, 'install-source-root', None)
+
+ install_header_subdir = property.select('install-header-subdir', requirements)
+ if install_header_subdir:
+ install_header_subdir = ungrist(install_header_subdir[0])
+ requirements = property.change(requirements, 'install-header-subdir', None)
+
+ # First, figure out all locations. Use the default if no prefix option
+ # given.
+ prefix = get_prefix(name, requirements)
+
+ # Architecture dependent files.
+ exec_locate = option.get("exec-prefix", prefix)
+
+ # Binaries.
+ bin_locate = option.get("bindir", os.path.join(prefix, "bin"))
+
+ # Object code libraries.
+ lib_locate = option.get("libdir", os.path.join(prefix, "lib"))
+
+ # Source header files.
+ include_locate = option.get("includedir", os.path.join(prefix, "include"))
+
+ stage.install(name + "-bin", binaries, requirements + ["<location>" + bin_locate])
+
+ alias(name + "-lib", [name + "-lib-shared", name + "-lib-static"])
+
+ # Since the install location of shared libraries differs on universe
+ # and cygwin, use target alternatives to make different targets.
+ # We should have used indirection conditioanl requirements, but it's
+ # awkward to pass bin-locate and lib-locate from there to another rule.
+ alias(name + "-lib-shared", [name + "-lib-shared-universe"])
+ alias(name + "-lib-shared", [name + "-lib-shared-cygwin"], ["<target-os>cygwin"])
+
+ # For shared libraries, we install both explicitly specified one and the
+ # shared libraries that the installed executables depend on.
+ stage.install(name + "-lib-shared-universe", binaries + libraries,
+ requirements + ["<location>" + lib_locate, "<install-dependencies>on",
+ "<install-type>SHARED_LIB"])
+ stage.install(name + "-lib-shared-cygwin", binaries + libraries,
+ requirements + ["<location>" + bin_locate, "<install-dependencies>on",
+ "<install-type>SHARED_LIB"])
+
+ # For static libraries, we do not care about executable dependencies, since
+ # static libraries are already incorporated into them.
+ stage.install(name + "-lib-static", libraries, requirements +
+ ["<location>" + lib_locate, "<install-dependencies>on", "<install-type>STATIC_LIB"])
+ stage.install(name + "-headers", headers, requirements \
+ + ["<location>" + os.path.join(include_locate, s) for s in install_header_subdir]
+ + install_source_root)
+
+ alias(name, [name + "-bin", name + "-lib", name + "-headers"])
+
+ pt = get_manager().projects().current()
+
+ for subname in ["bin", "lib", "headers", "lib-shared", "lib-static", "lib-shared-universe", "lib-shared-cygwin"]:
+ pt.mark_targets_as_explicit([name + "-" + subname])
+
+@bjam_signature((["target_name"], ["package_name"], ["data", "*"], ["requirements", "*"]))
+def install_data(target_name, package_name, data, requirements):
+ if not package_name:
+ package_name = target_name
+
+ if option.get("prefix"):
+ # If --prefix is explicitly specified on the command line,
+ # then we need wipe away any settings of datarootdir
+ option.set("datarootdir", None)
+
+ prefix = get_prefix(package_name, requirements)
+ datadir = option.get("datarootdir", os.path.join(prefix, "share"))
+
+ stage.install(target_name, data,
+ requirements + ["<location>" + os.path.join(datadir, package_name)])
+
+ get_manager().projects().current().mark_targets_as_explicit([target_name])
+
+def get_prefix(package_name, requirements):
+
+ specified = property.select("install-default-prefix", requirements)
+ if specified:
+ specified = ungrist(specified[0])
+ prefix = option.get("prefix", specified)
+ requirements = property.change(requirements, "install-default-prefix", None)
+ # Or some likely defaults if neither is given.
+ if not prefix:
+ if os.name == "nt":
+ prefix = "C:\\" + package_name
+ elif os.name == "posix":
+ prefix = "/usr/local"
+
+ return prefix
+
diff --git a/src/boost/tools/build/src/tools/pathscale.jam b/src/boost/tools/build/src/tools/pathscale.jam
new file mode 100644
index 000000000..94abcf1c8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/pathscale.jam
@@ -0,0 +1,178 @@
+# Copyright 2006 Noel Belcourt
+# 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 property ;
+import generators ;
+import toolset : flags ;
+import feature ;
+import type ;
+import os ;
+import common ;
+import fortran ;
+
+feature.extend toolset : pathscale ;
+toolset.inherit pathscale : unix ;
+generators.override pathscale.prebuilt : builtin.prebuilt ;
+generators.override pathscale.searched-lib-generator : searched-lib-generator ;
+
+# Documentation and toolchain description located
+# http://www.pathscale.com/docs.html
+
+rule init ( version ? : command * : options * )
+{
+ command = [ common.get-invocation-command pathscale : pathCC : $(command)
+ : /opt/ekopath/bin ] ;
+
+ # Determine the version
+ local command-string = $(command:J=" ") ;
+ if $(command)
+ {
+ version ?= [ MATCH "^([0-9.]+)"
+ : [ SHELL "$(command-string) -dumpversion" ] ] ;
+ }
+
+ local condition = [ common.check-init-parameters pathscale
+ : version $(version) ] ;
+
+ common.handle-options pathscale : $(condition) : $(command) : $(options) ;
+
+ toolset.flags pathscale.compile.fortran90 OPTIONS $(condition) :
+ [ feature.get-values <fflags> : $(options) ] : unchecked ;
+
+ command_c = $(command_c[1--2]) $(command[-1]:B=pathcc) ;
+
+ toolset.flags pathscale CONFIG_C_COMMAND $(condition) : $(command_c) ;
+
+ # fortran support
+ local f-command = [ common.get-invocation-command pathscale : pathf90 : $(command) ] ;
+ local command_f = $(command_f[1--2]) $(f-command[-1]:B=pathf90) ;
+ local command_f90 = $(command_f[1--2]) $(f-command[-1]:B=pathf90) ;
+
+ toolset.flags pathscale CONFIG_F_COMMAND $(condition) : $(command_f) ;
+ toolset.flags pathscale CONFIG_F90_COMMAND $(condition) : $(command_f90) ;
+
+ # always link lib rt to resolve clock_gettime()
+ flags pathscale.link FINDLIBS-SA : rt : unchecked ;
+
+ switch [ os.name ]
+ {
+ case SOLARIS :
+ toolset.flags pathscale.link RPATH_OPTION $(condition) : -Wl,-R, -Wl, : unchecked ;
+
+ case * : # GNU
+ toolset.flags pathscale.link RPATH_OPTION $(condition) : -Wl,-rpath= : unchecked ;
+ }
+}
+
+# Declare generators
+generators.register-c-compiler pathscale.compile.c : C : OBJ : <toolset>pathscale ;
+generators.register-c-compiler pathscale.compile.c++ : CPP : OBJ : <toolset>pathscale ;
+generators.register-fortran-compiler pathscale.compile.fortran : FORTRAN : OBJ : <toolset>pathscale ;
+generators.register-fortran90-compiler pathscale.compile.fortran90 : FORTRAN90 : OBJ : <toolset>pathscale ;
+
+# Declare flags and actions for compilation
+flags pathscale.compile OPTIONS <optimization>off : -O0 ;
+flags pathscale.compile OPTIONS <optimization>speed : -O3 ;
+flags pathscale.compile OPTIONS <optimization>space : -Os ;
+
+flags pathscale.compile OPTIONS <inlining>off : -noinline ;
+flags pathscale.compile OPTIONS <inlining>on : -inline ;
+flags pathscale.compile OPTIONS <inlining>full : -inline ;
+
+flags pathscale.compile OPTIONS <warnings>off : -woffall ;
+flags pathscale.compile OPTIONS <warnings>on : -Wall ;
+flags pathscale.compile OPTIONS <warnings>all : -Wall -pedantic ;
+flags pathscale.compile OPTIONS <warnings-as-errors>on : -Werror ;
+
+flags pathscale.compile OPTIONS <debug-symbols>on : -ggdb ;
+flags pathscale.compile OPTIONS <profiling>on : -pg ;
+flags pathscale.compile OPTIONS <link>shared : -fPIC ;
+flags pathscale.compile OPTIONS <address-model>32 : -m32 ;
+flags pathscale.compile OPTIONS <address-model>64 : -m64 ;
+
+flags pathscale.compile USER_OPTIONS <cflags> ;
+flags pathscale.compile.c++ USER_OPTIONS <cxxflags> ;
+flags pathscale.compile DEFINES <define> ;
+flags pathscale.compile INCLUDES <include> ;
+
+flags pathscale.compile.fortran USER_OPTIONS <fflags> ;
+flags pathscale.compile.fortran90 USER_OPTIONS <fflags> ;
+
+actions compile.c
+{
+ "$(CONFIG_C_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.fortran
+{
+ "$(CONFIG_F_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+rule compile.fortran90 ( targets * : sources * : properties * )
+{
+ # the space rule inserts spaces between targets and it's necessary
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the compile.fortran90 action
+ # F90 source must be compiled in a particular order so we
+ # serialize the build as a parallel F90 compile might fail
+ JAM_SEMAPHORE on $(targets) = <s>pathscale-f90-semaphore ;
+}
+
+actions compile.fortran90
+{
+ "$(CONFIG_F90_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -module $(<[1]:D) -c -o "$(<)" "$(>)"
+}
+
+# Declare flags and actions for linking
+flags pathscale.link OPTIONS <debug-symbols>on : -ggdb -rdynamic ;
+# Strip the binary when no debugging is needed
+flags pathscale.link OPTIONS <debug-symbols>off : -g0 ;
+flags pathscale.link OPTIONS <profiling>on : -pg ;
+flags pathscale.link USER_OPTIONS <linkflags> ;
+flags pathscale.link LINKPATH <library-path> ;
+flags pathscale.link FINDLIBS-ST <find-static-library> ;
+flags pathscale.link FINDLIBS-SA <find-shared-library> ;
+flags pathscale.link FINDLIBS-SA <threading>multi : pthread ;
+flags pathscale.link LIBRARIES <library-file> ;
+flags pathscale.link LINK-RUNTIME <runtime-link>static : static ;
+flags pathscale.link LINK-RUNTIME <runtime-link>shared : dynamic ;
+flags pathscale.link RPATH <dll-path> ;
+# On gcc, there are separate options for dll path at runtime and
+# link time. On Solaris, there's only one: -R, so we have to use
+# it, even though it's bad idea.
+flags pathscale.link RPATH <xdll-path> ;
+
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -L"$(LINKPATH)" $(RPATH_OPTION:E=-Wl,-rpath=)"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
+}
+
+# Slight mods for dlls
+rule link.dll ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -L"$(LINKPATH)" $(RPATH_OPTION:E=-Wl,-rpath=)"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
+}
+
+# Declare action for creating static libraries
+# "$(CONFIG_COMMAND)" -ar -o "$(<)" "$(>)"
+actions piecemeal archive
+{
+ ar $(ARFLAGS) ru "$(<)" "$(>)"
+}
diff --git a/src/boost/tools/build/src/tools/pch.jam b/src/boost/tools/build/src/tools/pch.jam
new file mode 100644
index 000000000..4737bda30
--- /dev/null
+++ b/src/boost/tools/build/src/tools/pch.jam
@@ -0,0 +1,95 @@
+# Copyright (c) 2005 Reece H. Dunn.
+# Copyright 2006 Ilya Sokolov
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+##### Using Precompiled Headers (Quick Guide) #####
+#
+# Make precompiled mypch.hpp:
+#
+# import pch ;
+#
+# cpp-pch mypch
+# : # sources
+# mypch.hpp
+# : # requiremnts
+# <toolset>msvc:<source>mypch.cpp
+# ;
+#
+# Add cpp-pch to sources:
+#
+# exe hello
+# : main.cpp hello.cpp mypch
+# ;
+
+import "class" : new ;
+import type ;
+import feature ;
+import generators ;
+
+type.register PCH : pch ;
+
+type.register C_PCH : : PCH ;
+type.register CPP_PCH : : PCH ;
+
+# Control precompiled header (PCH) generation.
+feature.feature pch :
+ on
+ off
+ : propagated ;
+
+
+feature.feature pch-header : : free dependency ;
+feature.feature pch-file : : free dependency ;
+
+# Base PCH generator. The 'run' method has the logic to prevent this generator
+# from being run unless it's being used for a top-level PCH target.
+class pch-generator : generator
+{
+ import property-set ;
+
+ rule action-class ( )
+ {
+ return compile-action ;
+ }
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ if ! $(name)
+ {
+ # Unless this generator is invoked as the top-most generator for a
+ # main target, fail. This allows using 'H' type as input type for
+ # this generator, while preventing B2 to try this generator
+ # when not explicitly asked for.
+ #
+ # One bad example is msvc, where pch generator produces both PCH
+ # target and OBJ target, so if there's any header generated (like by
+ # bison, or by msidl), we'd try to use pch generator to get OBJ from
+ # that H, which is completely wrong. By restricting this generator
+ # only to pch main target, such problem is solved.
+ }
+ else
+ {
+ local r = [ run-pch $(project) $(name)
+ : [ $(property-set).add-raw <define>BOOST_BUILD_PCH_ENABLED ]
+ : $(sources) ] ;
+ return [ generators.add-usage-requirements $(r)
+ : <define>BOOST_BUILD_PCH_ENABLED ] ;
+ }
+ }
+
+ # This rule must be overridden by the derived classes.
+ rule run-pch ( project name ? : property-set : sources + )
+ {
+ }
+}
+
+
+# NOTE: requirements are empty, default pch generator can be applied when
+# pch=off.
+generators.register
+ [ new dummy-generator pch.default-c-pch-generator : : C_PCH ] ;
+generators.register
+ [ new dummy-generator pch.default-cpp-pch-generator : : CPP_PCH ] ;
diff --git a/src/boost/tools/build/src/tools/pch.py b/src/boost/tools/build/src/tools/pch.py
new file mode 100644
index 000000000..71cb7166e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/pch.py
@@ -0,0 +1,83 @@
+# Status: Being ported by Steven Watanabe
+# Base revision: 47077
+#
+# Copyright (c) 2005 Reece H. Dunn.
+# Copyright 2006 Ilya Sokolov
+# Copyright (c) 2008 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+##### Using Precompiled Headers (Quick Guide) #####
+#
+# Make precompiled mypch.hpp:
+#
+# import pch ;
+#
+# cpp-pch mypch
+# : # sources
+# mypch.hpp
+# : # requiremnts
+# <toolset>msvc:<source>mypch.cpp
+# ;
+#
+# Add cpp-pch to sources:
+#
+# exe hello
+# : main.cpp hello.cpp mypch
+# ;
+
+from b2.build import type, feature, generators
+from b2.tools import builtin
+
+type.register('PCH', ['pch'])
+type.register('C_PCH', [], 'PCH')
+type.register('CPP_PCH', [], 'PCH')
+
+# Control precompiled header (PCH) generation.
+feature.feature('pch',
+ ['on', 'off'],
+ ['propagated'])
+
+feature.feature('pch-header', [], ['free', 'dependency'])
+feature.feature('pch-file', [], ['free', 'dependency'])
+
+class PchGenerator(generators.Generator):
+ """
+ Base PCH generator. The 'run' method has the logic to prevent this generator
+ from being run unless it's being used for a top-level PCH target.
+ """
+ def action_class(self):
+ return builtin.CompileAction
+
+ def run(self, project, name, prop_set, sources):
+ if not name:
+ # Unless this generator is invoked as the top-most generator for a
+ # main target, fail. This allows using 'H' type as input type for
+ # this generator, while preventing Boost.Build to try this generator
+ # when not explicitly asked for.
+ #
+ # One bad example is msvc, where pch generator produces both PCH
+ # target and OBJ target, so if there's any header generated (like by
+ # bison, or by msidl), we'd try to use pch generator to get OBJ from
+ # that H, which is completely wrong. By restricting this generator
+ # only to pch main target, such problem is solved.
+ pass
+ else:
+ r = self.run_pch(project, name,
+ prop_set.add_raw(['<define>BOOST_BUILD_PCH_ENABLED']),
+ sources)
+ return generators.add_usage_requirements(
+ r, ['<define>BOOST_BUILD_PCH_ENABLED'])
+
+ # This rule must be overridden by the derived classes.
+ def run_pch(self, project, name, prop_set, sources):
+ pass
+
+# NOTE: requirements are empty, default pch generator can be applied when
+# pch=off.
+generators.register(builtin.DummyGenerator(
+ "pch.default-c-pch-generator", False, [], ['C_PCH'], []))
+generators.register(builtin.DummyGenerator(
+ "pch.default-cpp-pch-generator", False, [], ['CPP_PCH'], []))
diff --git a/src/boost/tools/build/src/tools/pgi.jam b/src/boost/tools/build/src/tools/pgi.jam
new file mode 100644
index 000000000..e40fcd09a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/pgi.jam
@@ -0,0 +1,138 @@
+# Copyright Noel Belcourt 2007.
+# Copyright 2017, NVIDIA CORPORATION.
+# 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 property ;
+import generators ;
+import os ;
+import toolset : flags ;
+import feature ;
+import fortran ;
+import type ;
+import common ;
+import gcc ;
+
+feature.extend toolset : pgi ;
+toolset.inherit pgi : unix ;
+generators.override pgi.prebuilt : builtin.lib-generator ;
+generators.override pgi.searched-lib-generator : searched-lib-generator ;
+
+# Documentation and toolchain description located
+# http://www.pgroup.com/resources/docs.htm
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters pgi : version $(version) ] ;
+
+ local l_command = [ common.get-invocation-command pgi : pgc++ : $(command) ] ;
+
+ common.handle-options pgi : $(condition) : $(l_command) : $(options) ;
+
+ command_c = $(command_c[1--2]) $(l_command[-1]:B=pgcc) ;
+
+ toolset.flags pgi CONFIG_C_COMMAND $(condition) : $(command_c) ;
+
+ flags pgi.compile DEFINES $(condition) :
+ [ feature.get-values <define> : $(options) ] : unchecked ;
+
+ # set link flags
+ flags pgi.link FINDLIBS-ST : [
+ feature.get-values <find-static-library> : $(options) ] : unchecked ;
+}
+
+# Declare generators
+generators.register-c-compiler pgi.compile.c : C : OBJ : <toolset>pgi ;
+generators.register-c-compiler pgi.compile.c++ : CPP : OBJ : <toolset>pgi ;
+generators.register-fortran-compiler pgi.compile.fortran : FORTRAN : OBJ : <toolset>pgi ;
+
+# Declare flags and actions for compilation
+flags pgi.compile.c++ OPTIONS <cxxstd>98 : -std=c++03 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>03 : -std=c++03 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>0x : -std=c++11 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>11 : -std=c++11 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>1y : -std=c++14 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>14 : -std=c++14 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>1z : -std=c++17 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>17 : -std=c++17 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>2a : -std=c++17 ;
+flags pgi.compile.c++ OPTIONS <cxxstd>latest : -std=c++17 ;
+
+flags pgi.compile OPTIONS <link>shared : -fpic ;
+flags pgi.compile OPTIONS <debug-symbols>on : -gopt ;
+flags pgi.compile OPTIONS <optimization>off : -O0 ;
+flags pgi.compile OPTIONS <optimization>speed : -fast ;
+flags pgi.compile OPTIONS <optimization>space : -fast ;
+
+flags pgi.compile OPTIONS <warnings>off : -Minform=severe ;
+flags pgi.compile OPTIONS <warnings>on : -Minform=warn ;
+flags pgi.compile OPTIONS <warnings>all : -Minform=warn ;
+flags pgi.compile OPTIONS <warnings-as-errors>on : -Werror ;
+
+flags pgi.compile.c++ OPTIONS <rtti>off : --no_rtti ;
+flags pgi.compile.c++ OPTIONS <exception-handling>off : --no_exceptions ;
+
+flags pgi.compile OPTIONS <cflags> ;
+flags pgi.compile.c++ OPTIONS <cxxflags> ;
+flags pgi.compile DEFINES <define> ;
+flags pgi.compile INCLUDES <include> ;
+
+flags pgi.compile.fortran OPTIONS <fflags> ;
+
+actions compile.c
+{
+ "$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.fortran
+{
+ "$(CONFIG_F_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+# Declare flags and actions for linking
+flags pgi.link OPTIONS <debug-symbols>on : -gopt ;
+# Strip the binary when no debugging is needed
+flags pgi.link OPTIONS <debug-symbols>off : -s ;
+flags pgi.link OPTIONS <linkflags> ;
+flags pgi.link OPTIONS <link>shared : -fpic ;
+flags pgi.link LINKPATH <library-path> ;
+flags pgi.link FINDLIBS-ST <find-static-library> ;
+flags pgi.link FINDLIBS-SA <find-shared-library> ;
+flags pgi.link FINDLIBS-SA <threading>multi : pthread rt ;
+flags pgi.link LIBRARIES <library-file> ;
+flags pgi.link LINK-RUNTIME <runtime-link>static : static ;
+flags pgi.link LINK-RUNTIME <runtime-link>shared : dynamic ;
+flags pgi.link RPATH <dll-path> ;
+
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
+}
+
+# Slight mods for dlls
+rule link.dll ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -shared -L"$(LINKPATH)" -R"$(RPATH)" -soname $(<[-1]:D=) -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
+}
+
+actions updated together piecemeal pgi.archive
+{
+ ar -rc$(ARFLAGS:E=) "$(<)" "$(>)"
+}
+
diff --git a/src/boost/tools/build/src/tools/pkg-config.jam b/src/boost/tools/build/src/tools/pkg-config.jam
new file mode 100644
index 000000000..2efa9cf3a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/pkg-config.jam
@@ -0,0 +1,485 @@
+#|
+Copyright 2019 Dmitry Arkhipov
+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 "class" : new ;
+import common ;
+import errors ;
+import feature ;
+import os ;
+import param ;
+import project ;
+import regex ;
+import sequence ;
+import string ;
+import targets ;
+
+
+#| tag::doc[]
+
+= pkg-config
+The *pkg-config* program is used to retrieve information about installed
+libraries in the system. It retrieves information about packages from special
+metadata files. These files are named after the package, and have a `.pc`
+extension. The package name specified to *pkg-config* is defined to be the name
+of the metadata file, minus the `.pc` extension.
+
+|# # end::doc[]
+
+
+#| tag::doc[]
+
+== Feature: `pkg-config`
+
+Selects one of the initialized `pkg-config` configurations. This feature is
+`propagated` to dependencies. Its use is dicussed in
+section <<pkg-config-init>>.
+
+|# # end::doc[]
+
+feature.feature pkg-config : : propagated ;
+
+
+#| tag::doc[]
+
+== Feature: `pkg-config-define`
+
+This `free` feature adds a variable assignment to pkg-config invocation. For
+example,
+
+[source, jam]
+----
+pkg-config.import mypackage : requirements <pkg-config-define>key=value ;
+----
+
+is equivalent to invoking on the comand line
+
+[source, shell]
+----
+pkg-config --define-variable=key=value mypackage ;
+----
+
+|# # end::doc[]
+
+feature.feature pkg-config-define : : free ;
+
+
+#| tag::doc[]
+
+== Rule: `import`
+
+Main target rule that imports a *pkg-config* package. When its consumer targets
+are built, *pkg-config* command will be invoked with arguments that depend on
+current property set. The features that have an effect are:
+
+* `<pkg-config-define>`: adds a `--define-variable` argument;
+* `<link>`: adds `--static` argument when `<link>static`;
+* `<link>`: adds `--static` argument when `<link>static`;
+* `<name>`: specifies package name (target name is used instead if the property
+ is not present);
+* `<version>`: specifies package version range, can be used multiple times and
+ should be a dot-separated sequence of numbers optionally prefixed with `=`,
+ `<`, `>`, `<=` or `>=`.
+
+Example:
+
+[source, jam]
+----
+pkg-config.import my-package
+ : requirements <name>my_package <version><4 <version>>=3.1 ;
+----
+
+|# # end::doc[]
+
+
+rule import
+ ( target-name
+ : sources *
+ : requirements *
+ : default-build *
+ : usage-requirements *
+ )
+{
+ param.handle-named-params
+ sources requirements default-build usage-requirements ;
+ targets.create-metatarget pkg-config-target
+ : [ project.current ]
+ : $(target-name)
+ : $(sources)
+ : $(requirements)
+ : $(default-build)
+ : $(usage-requirements)
+ ;
+}
+
+
+#| tag::doc[]
+
+== Initialization [[ pkg-config-init ]]
+
+To use the `pkg-config` tool you need to declare it in a configuration file
+with the `using` rule:
+
+[source, jam]
+----
+using pkg-config : [config] : [command] ... : [ options ] ... ;
+----
+
+
+* `config`: the name of initialized configuration. The name can be omitted, in
+ which case the configuration will become the default one.
+* `command`: the command, with any extra arguments, to execute. If no command
+ is given, first `PKG_CONFIG` environment variable is checked, and if its
+ empty the string `pkg-config` is used.
+* `options`: options that modify `pkg-config` behavior. Allowed options are:
+ * `<path>`: sets `PKG_CONFIG_PATH` environment variable;
+ multiple occurences are allowed.
+ * `<libdir>`: sets `PKG_CONFIG_LIBDIR` environment variable;
+ multiple occurences are allowed.
+ * `<allow-system-cflags>`: sets `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS`
+ environment variable; multiple occurences are allowed.
+ * `<allow-system-libs>`: sets `PKG_CONFIG_ALLOW_SYSTEM_LIBS`
+ environment variable; multiple occurences are allowed.
+ * `<sysroot>`: sets `PKG_CONFIG_SYSROOT_DIR` environment variable;
+ multiple occurences are allowed.
+ * `<variable>`: adds a variable definition argument to command invocation;
+ multiple occurences are allowed.
+
+|# # end::doc[]
+
+rule init ( config ? : command * : options * )
+{
+ config ?= [ default-config ] ;
+
+ local tool = [ os.environ PKG_CONFIG ] ;
+ tool ?= pkg-config ;
+ command =
+ [ common.get-invocation-command pkg-config : $(tool) : $(command) ] ;
+
+ configure $(config) : $(command) : $(options) ;
+ $(.configs).use $(config) ;
+}
+
+
+rule run ( config ? : args * )
+{
+ config ?= [ default-config ] ;
+
+ local command = [ $(.configs).get $(config) : command ] ;
+ command = "$(command) $(args:J= )" ;
+
+ local output = [ SHELL "$(command)" : exit-status ] ;
+ if 0 != $(output[2])
+ {
+ errors.error "pkg-config: command '$(command)' resulted in error:"
+ [ common.newline-char ] $(output[1]) ;
+ }
+
+ local ws = [ string.whitespace ] ;
+ output = [ regex.split $(output[1]) "[$(ws)]" ] ;
+ return [ sequence.filter non-empty : $(output) ] ;
+}
+
+
+#| tag::doc[]
+
+== Class `pkg-config-target`
+
+[source, jam]
+----
+class pkg-config-target : alias-target-class {
+ rule construct ( name : sources * : property-set )
+ rule version ( property-set )
+ rule variable ( name : property-set )
+}
+----
+
+The class of objects returned by `import` rule. The objects themselves could be
+useful in situations that require more complicated logic for consuming a
+package. See <<pkg-config-tips>> for examples.
+
+. `rule construct ( name : sources * : property-set )`
+ Overrides `alias-target.construct`.
+
+. `rule version ( property-set )`
+ Returns the package's version, in the context of `property-set`.
+
+. `rule variable ( name : property-set )`
+ Returns the value of variable `name` in the package, in the context of
+ `property-set`.
+
+
+|# # end::doc[]
+
+class pkg-config-target : alias-target-class
+{
+ import pkg-config ;
+ import regex ;
+
+ rule construct ( name : sources * : property-set )
+ {
+ local config = [ $(property-set).get <pkg-config> ] ;
+ local args = [ common-arguments $(name) : $(property-set) ] ;
+ return
+ [ property-set.create
+ [ compile-flags $(config) $(property-set) : $(args) ]
+ [ link-flags $(config) $(property-set) : $(args) ]
+ ] ;
+ }
+
+ rule version ( property-set )
+ {
+ local config = [ $(property-set).get <pkg-config> ] ;
+ local args = [ common-arguments [ name ] : $(property-set) ] ;
+ local version = [ pkg-config.run $(config) : --modversion $(args) ] ;
+ return [ regex.split $(version) "\\." ] ;
+ }
+
+ rule variable ( name : property-set )
+ {
+ local config = [ $(property-set).get <pkg-config> ] ;
+ local args = [ common-arguments [ name ] : $(property-set) ] ;
+ return [ pkg-config.run $(config) : --variable=$(name) $(args) ] ;
+ }
+
+ local rule common-arguments ( name : property-set )
+ {
+ local defines = [ $(property-set).get <pkg-config-define> ] ;
+ local args = --define-variable=$(defines) ;
+ if [ $(property-set).get <link> ] = static
+ {
+ args += --static ;
+ }
+ return $(args) [ get-package-request $(property-set) $(name) ] ;
+ }
+
+ local rule get-package-request ( property-set name )
+ {
+ local pkg-name = [ $(property-set).get <name> ] ;
+ pkg-name ?= $(name) ;
+ if $(pkg-name[2])
+ {
+ errors.error "multiple package names were specified for target "
+ "'$(name)': $(pkg-name)" ;
+ }
+
+ local versions ;
+ for local version in [ $(property-set).get <version> ]
+ {
+ local match = [ MATCH "^(<=)(.*)" : $(version) ] ;
+ match ?= [ MATCH "^(>=)(.*)" : $(version) ] ;
+ match ?= [ MATCH "^([><=])(.*)" : $(version) ] ;
+ if $(match)
+ {
+ version = " $(match:J= )" ;
+ }
+ else
+ {
+ version = " = $(version)" ;
+ }
+ versions += $(version) ;
+ }
+ versions ?= "" ;
+
+ return "'$(pkg-name)"$(versions)"'" ;
+ }
+
+ local rule link-flags ( config property-set : args * )
+ {
+ local flags = [ pkg-config.run $(config) : --libs $(args) ] ;
+ return <linkflags>$(flags) ;
+ }
+
+ local rule compile-flags ( config property-set : args * )
+ {
+ local flags = [ pkg-config.run $(config) : --cflags $(args) ] ;
+ return <cflags>$(flags) ;
+ }
+}
+
+
+local rule default-config ( )
+{
+ return default ;
+}
+
+
+local rule configure ( config : command + : options * )
+{
+ $(.configs).register $(config) ;
+
+ local path ;
+ local libdir ;
+ local allow-system-cflags ;
+ local allow-system-libs ;
+ local sysroot ;
+ local defines ;
+ for local opt in $(options)
+ {
+ switch $(opt:G)
+ {
+ case <path> : path += $(opt:G=) ;
+ case <libdir> : libdir += $(opt:G=) ;
+ case <allow-system-cflags> : allow-system-cflags += $(opt:G=) ;
+ case <allow-system-libs> : allow-system-libs += $(opt:G=) ;
+ case <sysroot> : sysroot += $(opt:G=) ;
+ case <variable> : defines += $(opt:G=) ;
+ case * :
+ errors.error "pkg-config: invalid property '$(opt)' was "
+ "specified for configuration '$(config)'." ;
+ }
+ }
+
+ for local opt in allow-system-cflags allow-system-libs
+ {
+ if ! $($(opt)) in "on" off
+ {
+ errors.error "pkg-config: invalid value '$($(opt))' was specified "
+ "for option <$(opt)> of configuration '$(config)'."
+ [ common.newline-char ] "Available values are 'on' and 'off'" ;
+ }
+ }
+
+ if $(sysroot[2])
+ {
+ errors.error "pkg-config: several values were specified for option "
+ "<sysroot> of configuration '$(config)'."
+ [ common.newline-char ] "Only one value is allowed." ;
+ }
+
+ local sep = [ os.path-separator ] ;
+ path = [ envar-set-command PKG_CONFIG_PATH : $(path:J=$(sep)) ] ;
+ libdir = [ envar-set-command PKG_CONFIG_LIBDIR : $(libdir:J=$(sep)) ] ;
+ sysroot = [ envar-set-command PKG_CONFIG_SYSROOT_DIR : $(sysroot) ] ;
+ allow-cflags =
+ [ envar-set-command PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
+ : $(allow-cflags)
+ : 1
+ ] ;
+ allow-libs =
+ [ envar-set-command PKG_CONFIG_ALLOW_SYSTEM_LIBS
+ : $(allow-libs)
+ : 1
+ ] ;
+
+ command += --print-errors --errors-to-stdout --define-variable=$(defines) ;
+ $(.configs).set $(config)
+ : command
+ : "$(path)$(libdir)$(sysroot)$(allow-cflags)$(allow-libs)$(command:J= )"
+ ;
+
+ feature.extend pkg-config : $(config) ;
+}
+
+
+local rule envar-set-command ( envar : value * : implied-value * )
+{
+ if $(value)
+ {
+ if $(implied-value)
+ {
+ value = $(implied-value) ;
+ }
+ return [ common.path-variable-setting-command $(envar) : $(value) ] ;
+ }
+ else
+ {
+ return "" ;
+ }
+}
+
+
+local rule non-empty ( string )
+{
+ if $(string) != "" { return true ; }
+}
+
+
+.configs = [ new configurations ] ;
+
+
+#| tag::doc[]
+
+== Tips [[pkg-config-tips]]
+
+
+=== Using several configurations
+
+Suppose, you have 2 collections of `.pc` files: one for platform A, and another
+for platform B. You can initialize 2 configurations of `pkg-config` tool each
+corresponding to specific collection:
+
+[source, jam]
+----
+using pkg-config : A : : <libdir>path/to/collection/A ;
+using pkg-config : B : : <libdir>path/to/collection/B ;
+----
+
+Then, you can specify that builds for platform A should use configuration A,
+while builds for B should use configuration B:
+
+[source, jam]
+----
+project
+ : requirements
+ <target-os>A-os,<architecture>A-arch:<pkg-config>A
+ <target-os>B-os,<architecture>B-arch:<pkg-config>B
+ ;
+----
+
+Thanks to the fact, that `project-config`, `user-config` and `site-config`
+modules are parents of jamroot module, you can put it in any of those files.o
+
+
+=== Choosing the package name based on the property set
+
+Since a file for a package should be named after the package suffixed with
+`.pc`, some projects came up with naming schemes in order to allow simultaneous
+installation of several major versions or build variants. In order to pick the
+specific name corresponding to the build request you can use `<conditional>`
+property in requirements:
+
+[source, jam]
+----
+pkg-config.import mypackage : requirements <conditional>@infer-name ;
+
+rule infer-name ( properties * )
+{
+ local name = mypackage ;
+ local variant = [ property.select <variant> : $(properties) ] ;
+ if $(variant) = debug
+ {
+ name += -d ;
+ }
+ return <name>$(name) ;
+}
+----
+
+The `common.format-name` rule can be very useful in this situation.
+
+
+=== Modify usage requirements based on package version or variable
+
+Sometimes you need to apply some logic based on package's version or a
+variable that it defines. For that you can use `<conditional>` property in
+usage requirements:
+
+----
+mypackage =
+ [ pkg-config.import mypackage : usage-requirements <conditional>@define_ns
+ ] ;
+
+rule extra-props ( properties * )
+{
+ local ps = [ property-set.create $(properties) ] ;
+ local prefix = [ $(mypackage).variable name_prefix : $(ps) ] ;
+ prefix += [ $(mypackage).version $(ps) ] ;
+ return <define>$(prefix:J=_) ;
+}
+----
+
+|# # end::doc[]
diff --git a/src/boost/tools/build/src/tools/python-config.jam b/src/boost/tools/build/src/tools/python-config.jam
new file mode 100644
index 000000000..40aa825bc
--- /dev/null
+++ b/src/boost/tools/build/src/tools/python-config.jam
@@ -0,0 +1,27 @@
+#~ Copyright 2005 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)
+
+# Automatic configuration for Python tools and librries. To use, just import this module.
+
+import os ;
+import toolset : using ;
+
+if [ os.name ] = NT
+{
+ for local R in 2.4 2.3 2.2
+ {
+ local python-path = [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\$(R)\\InstallPath" ] ;
+ local python-version = $(R) ;
+
+ if $(python-path)
+ {
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice:" using python ":" $(python-version) ":" $(python-path) ;
+ }
+ using python : $(python-version) : $(python-path) ;
+ }
+ }
+}
diff --git a/src/boost/tools/build/src/tools/python.jam b/src/boost/tools/build/src/tools/python.jam
new file mode 100644
index 000000000..d510fcfb8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/python.jam
@@ -0,0 +1,1333 @@
+# Copyright 2004 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)
+
+# Support for Python and the the Boost.Python library.
+#
+# This module defines
+#
+# - a project 'python' with a target 'python' in it, that corresponds to the
+# python library
+#
+# - a main target rule 'python-extension' which can be used to build a python
+# extension.
+#
+# Extensions that use Boost.Python must explicitly link to it.
+
+import type ;
+import testing ;
+import generators ;
+import project ;
+import errors ;
+import targets ;
+import "class" : new ;
+import os ;
+import common ;
+import toolset ;
+import regex ;
+import numbers ;
+import string ;
+import property ;
+import sequence ;
+import path ;
+import feature ;
+import set ;
+import builtin ;
+import property-set ;
+
+
+# Make this module a project.
+project.initialize $(__name__) ;
+project python ;
+
+# Save the project so that if 'init' is called several times we define new
+# targets in the python project, not in whatever project we were called by.
+.project = [ project.current ] ;
+
+# Dynamic linker lib. Necessary to specify it explicitly on some platforms.
+lib dl ;
+# This contains 'openpty' function need by python. Again, on some system need to
+# pass this to linker explicitly.
+lib util ;
+# Python uses pthread symbols.
+lib pthread ;
+# Extra library needed by phtread on some platforms.
+lib rt ;
+
+# The pythonpath feature specifies additional elements for the PYTHONPATH
+# environment variable, set by run-pyd. For example, pythonpath can be used to
+# access Python modules that are part of the product being built, but are not
+# installed in the development system's default paths.
+feature.feature pythonpath : : free optional path ;
+
+# The best configured version of Python 2 and 3.
+py2-version = ;
+py3-version = ;
+
+# Initializes the Python toolset. Note that all parameters are optional.
+#
+# - version -- the version of Python to use. Should be in Major.Minor format,
+# for example 2.3. Do not include the subminor version.
+#
+# - cmd-or-prefix: Preferably, a command that invokes a Python interpreter.
+# Alternatively, the installation prefix for Python libraries and includes. If
+# empty, will be guessed from the version, the platform's installation
+# patterns, and the python executables that can be found in PATH.
+#
+# - includes: the include path to Python headers. If empty, will be guessed.
+#
+# - libraries: the path to Python library binaries. If empty, will be guessed.
+# On MacOS/Darwin, you can also pass the path of the Python framework.
+#
+# - condition: if specified, should be a set of properties that are matched
+# against the build configuration when B2 selects a Python
+# configuration to use.
+#
+# - extension-suffix: A string to append to the name of extension modules before
+# the true filename extension. Ordinarily we would just compute this based on
+# the value of the <python-debugging> feature. However ubuntu's python-dbg
+# package uses the windows convention of appending _d to debug-build extension
+# modules. We have no way of detecting ubuntu, or of probing python for the
+# "_d" requirement, and if you configure and build python using
+# --with-pydebug, you'll be using the standard *nix convention. Defaults to ""
+# (or "_d" when targeting windows and <python-debugging> is set).
+#
+# Example usage:
+#
+# using python : 2.3 ;
+# using python : 2.3 : /usr/local/bin/python ;
+#
+rule init ( version ? : cmd-or-prefix ? : includes * : libraries ?
+ : condition * : extension-suffix ? )
+{
+ project.push-current $(.project) ;
+
+ debug-message Configuring python... ;
+ for local v in version cmd-or-prefix includes libraries condition
+ {
+ if $($(v))
+ {
+ debug-message " user-specified $(v):" \"$($(v))\" ;
+ }
+ }
+
+ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ;
+
+ project.pop-current ;
+}
+
+# A simpler version of SHELL that grabs stderr as well as stdout, but returns
+# nothing if there was an error.
+#
+local rule shell-cmd ( cmd )
+{
+ debug-message running command '$(cmd)" 2>&1"' ;
+ x = [ SHELL $(cmd)" 2>&1" : exit-status ] ;
+ if $(x[2]) = 0
+ {
+ return $(x[1]) ;
+ }
+ else
+ {
+ return ;
+ }
+}
+
+
+# Try to identify Cygwin symlinks. Invoking such a file directly as an NT
+# executable from a native Windows build of bjam would be fatal to the bjam
+# process. One /can/ invoke them through sh.exe or bash.exe, if you can prove
+# that those are not also symlinks. ;-)
+#
+# If a symlink is found returns non-empty; we try to extract the target of the
+# symlink from the file and return that.
+#
+# Note: 1. only works on NT 2. path is a native path.
+local rule is-cygwin-symlink ( path )
+{
+ local is-symlink = ;
+
+ # Look for a file with the given path having the S attribute set, as cygwin
+ # symlinks do. /-C means "do not use thousands separators in file sizes."
+ local dir-listing = [ shell-cmd "DIR /-C /A:S \""$(path)"\"" ] ;
+
+ if $(dir-listing)
+ {
+ # Escape any special regex characters in the base part of the path.
+ local base-pat = [ regex.escape $(path:D=) : "].[()*+?|\\$^" : \\ ] ;
+
+ # Extract the file's size from the directory listing.
+ local size-of-system-file = [ MATCH "([0-9]+) "$(base-pat) : $(dir-listing) : 1 ] ;
+
+ # If the file has a reasonably small size, look for the special symlink
+ # identification text.
+ if $(size-of-system-file) && [ numbers.less $(size-of-system-file) 1000 ]
+ {
+ local link = [ SHELL "FIND /OFF \"!<symlink>\" \""$(path)"\" 2>&1" ] ;
+ if $(link[2]) != 0
+ {
+ local nl = "
+
+" ;
+ is-symlink = [ MATCH ".*!<symlink>([^"$(nl)"]*)" : $(link[1]) : 1 ] ;
+ if $(is-symlink)
+ {
+ is-symlink = [ *nix-path-to-native $(is-symlink) ] ;
+ is-symlink = $(is-symlink:R=$(path:D)) ;
+ }
+
+ }
+ }
+ }
+ return $(is-symlink) ;
+}
+
+
+# Append ext to each member of names that does not contain '.'.
+#
+local rule default-extension ( names * : ext * )
+{
+ local result ;
+ for local n in $(names)
+ {
+ switch $(n)
+ {
+ case *.* : result += $(n) ;
+ case * : result += $(n)$(ext) ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# Tries to determine whether invoking "cmd" would actually attempt to launch a
+# cygwin symlink.
+#
+# Note: only works on NT.
+#
+local rule invokes-cygwin-symlink ( cmd )
+{
+ local dirs = $(cmd:D) ;
+ if ! $(dirs)
+ {
+ dirs = . [ os.executable-path ] ;
+ }
+ local base = [ default-extension $(cmd:D=) : .exe .cmd .bat ] ;
+ local paths = [ GLOB $(dirs) : $(base) ] ;
+ if $(paths)
+ {
+ # Make sure we have not run into a Cygwin symlink. Invoking such a file
+ # as an NT executable would be fatal for the bjam process.
+ return [ is-cygwin-symlink $(paths[1]) ] ;
+ }
+}
+
+
+local rule debug-message ( message * )
+{
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice:" "[python-cfg]" $(message) ;
+ }
+}
+
+
+# Like W32_GETREG, except prepend HKEY_CURRENT_USER\SOFTWARE and
+# HKEY_LOCAL_MACHINE\SOFTWARE to the first argument, returning the first result
+# found. Also accounts for the fact that on 64-bit machines, 32-bit software has
+# its own area, under SOFTWARE\Wow6432node.
+#
+local rule software-registry-value ( path : data ? )
+{
+ local result ;
+ for local root in HKEY_CURRENT_USER HKEY_LOCAL_MACHINE
+ {
+ for local x64elt in "" Wow6432node\\ # Account for 64-bit windows
+ {
+ if ! $(result)
+ {
+ result = [ W32_GETREG $(root)\\SOFTWARE\\$(x64elt)$(path) : $(data) ] ;
+ }
+ }
+
+ }
+ return $(result) ;
+}
+
+
+.windows-drive-letter-re = "^([A-Za-z]):[\\/](.*)" ;
+.cygwin-drive-letter-re = "^/cygdrive/([a-z])/(.*)" ;
+
+.working-directory = [ PWD ] ;
+.working-drive-letter = [ SUBST $(.working-directory) $(.windows-drive-letter-re) $1 ] ;
+.working-drive-letter ?= [ SUBST $(.working-directory) $(.cygwin-drive-letter-re) $1 ] ;
+
+
+local rule windows-to-cygwin-path ( path )
+{
+ # If path is rooted with a drive letter, rewrite it using the /cygdrive
+ # mountpoint.
+ local p = [ SUBST $(path:T) $(.windows-drive-letter-re) /cygdrive/$1/$2 ] ;
+
+ # Else if path is rooted without a drive letter, use the working directory.
+ p ?= [ SUBST $(path:T) ^/(.*) /cygdrive/$(.working-drive-letter:L)/$2 ] ;
+
+ # Else return the path unchanged.
+ return $(p:E=$(path:T)) ;
+}
+
+
+# :W only works in Cygwin builds of bjam. This one works on NT builds as well.
+#
+local rule cygwin-to-windows-path ( path )
+{
+ path = $(path:R="") ; # strip any trailing slash
+
+ local drive-letter = [ SUBST $(path) $(.cygwin-drive-letter-re) "$1:/$2" ] ;
+ if $(drive-letter)
+ {
+ path = $(drive-letter) ;
+ }
+ else if $(path:R=/x) = $(path) # already rooted?
+ {
+ # Look for a cygwin mount that includes each head sequence in $(path).
+ local head = $(path) ;
+ local tail = "" ;
+
+ while $(head)
+ {
+ local root = [ software-registry-value
+ "Cygnus Solutions\\Cygwin\\mounts v2\\"$(head) : native ] ;
+
+ if $(root)
+ {
+ path = $(tail:R=$(root)) ;
+ head = ;
+ }
+ tail = $(tail:R=$(head:D=)) ;
+
+ if $(head) = /
+ {
+ head = ;
+ }
+ else
+ {
+ head = $(head:D) ;
+ }
+ }
+ }
+ return [ regex.replace $(path:R="") / \\ ] ;
+}
+
+
+# Convert a *nix path to native.
+#
+local rule *nix-path-to-native ( path )
+{
+ if [ os.name ] = NT
+ {
+ path = [ cygwin-to-windows-path $(path) ] ;
+ }
+ return $(path) ;
+}
+
+
+# Convert an NT path to native.
+#
+local rule windows-path-to-native ( path )
+{
+ if [ os.name ] = NT
+ {
+ return $(path) ;
+ }
+ else
+ {
+ return [ windows-to-cygwin-path $(path) ] ;
+ }
+}
+
+
+# Return nonempty if path looks like a windows path, i.e. it starts with a drive
+# letter or contains backslashes.
+#
+local rule guess-windows-path ( path )
+{
+ return [ SUBST $(path) "($(.windows-drive-letter-re)|.*([\\]).*)" $1 ] ;
+}
+
+
+local rule path-to-native ( paths * )
+{
+ local result ;
+
+ for local p in $(paths)
+ {
+ if [ guess-windows-path $(p) ]
+ {
+ result += [ windows-path-to-native $(p) ] ;
+ }
+ else
+ {
+ result += [ *nix-path-to-native $(p:T) ] ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# Validate the version string and extract the major/minor part we care about.
+#
+local rule split-version ( version )
+{
+ local major-minor = [ MATCH "^([0-9]+)\.([0-9]+)(.*)$" : $(version) : 1 2 3 ] ;
+ if ! $(major-minor[2]) || $(major-minor[3])
+ {
+ ECHO "Warning: \"using python\" expects a two part (major, minor) version number; got" $(version) instead ;
+
+ # Add a zero to account for the missing digit if necessary.
+ major-minor += 0 ;
+ }
+
+ return $(major-minor[1]) $(major-minor[2]) ;
+}
+
+
+# Build a list of versions from 3.4 down to 1.5. Because bjam can not enumerate
+# registry sub-keys, we have no way of finding a version with a 2-digit minor
+# version, e.g. 2.10 -- let us hope that never happens.
+#
+.version-countdown = ;
+for local v in [ numbers.range 15 34 ]
+{
+ .version-countdown = [ SUBST $(v) (.)(.*) $1.$2 ] $(.version-countdown) ;
+}
+
+
+local rule windows-installed-pythons ( version ? )
+{
+ version ?= $(.version-countdown) ;
+ local interpreters ;
+
+ for local v in $(version)
+ {
+ local install-path = [
+ software-registry-value "Python\\PythonCore\\"$(v)"\\InstallPath" ] ;
+
+ if $(install-path)
+ {
+ install-path = [ windows-path-to-native $(install-path) ] ;
+ debug-message Registry indicates Python $(v) installed at \"$(install-path)\" ;
+ }
+
+ interpreters += $(:E=python:R=$(install-path)) ;
+ }
+ return $(interpreters) ;
+}
+
+
+local rule darwin-installed-pythons ( version ? )
+{
+ version ?= $(.version-countdown) ;
+
+ local prefix
+ = [ GLOB /System/Library/Frameworks /Library/Frameworks
+ : Python.framework ] ;
+
+ return $(prefix)/Versions/$(version)/bin/python ;
+}
+
+
+# Assume "python-cmd" invokes a python interpreter and invoke it to extract all
+# the information we care about from its "sys" module. Returns void if
+# unsuccessful.
+#
+local rule probe ( python-cmd )
+{
+ # Avoid invoking a Cygwin symlink on NT.
+ local skip-symlink ;
+ if [ os.name ] = NT
+ {
+ skip-symlink = [ invokes-cygwin-symlink $(python-cmd) ] ;
+ }
+
+ if $(skip-symlink)
+ {
+ debug-message -------------------------------------------------------------------- ;
+ debug-message \"$(python-cmd)\" would attempt to invoke a Cygwin symlink, ;
+ debug-message causing a bjam built for Windows to hang. ;
+ debug-message ;
+ debug-message If you intend to target a Cygwin build of Python, please ;
+ debug-message replace the path to the link with the path to a real executable ;
+ debug-message "(guessing:" \"$(skip-symlink)\") "in" your 'using python' line ;
+ debug-message "in" user-config.jam or site-config.jam. Do not forget to escape ;
+ debug-message backslashes ;
+ debug-message -------------------------------------------------------------------- ;
+ }
+ else
+ {
+ # Prepare a List of Python format strings and expressions that can be
+ # used to print the constants we want from the sys module.
+
+ # We do not really want sys.version since that is a complicated string,
+ # so get the information from sys.version_info instead.
+ local format = "version=%d.%d" ;
+ local exprs = "version_info[0]" "version_info[1]" ;
+
+ for local s in $(sys-elements[2-])
+ {
+ format += $(s)=%s ;
+ exprs += $(s) ;
+ }
+
+ # Invoke Python and ask it for all those values.
+ local full-cmd =
+ $(python-cmd)" -c \"from sys import *; print('"$(format:J=\\n)"' % ("$(exprs:J=,)"))\"" ;
+
+ local output = [ shell-cmd $(full-cmd) ] ;
+ if $(output)
+ {
+ # Parse the output to get all the results.
+ local nl = "
+
+" ;
+ for s in $(sys-elements)
+ {
+ # These variables are expected to be declared local in the
+ # caller, so Jam's dynamic scoping will set their values there.
+ sys.$(s) = [ SUBST $(output) "\\<$(s)=([^$(nl)]+)" $1 ] ;
+ }
+ }
+ return $(output) ;
+ }
+}
+
+
+# Make sure the "libraries" and "includes" variables (in an enclosing scope)
+# have a value based on the information given.
+#
+local rule compute-default-paths ( target-os : version ? : prefix ? :
+ exec-prefix ? )
+{
+ exec-prefix ?= $(prefix) ;
+
+ if $(target-os) = windows
+ {
+ # The exec_prefix is where you're supposed to look for machine-specific
+ # libraries.
+ local default-library-path = $(exec-prefix)\\libs ;
+ local default-include-path = $(:E=Include:R=$(prefix)) ;
+
+ # If the interpreter was found in a directory called "PCBuild" or
+ # "PCBuild8," assume we're looking at a Python built from the source
+ # distro, and go up one additional level to the default root. Otherwise,
+ # the default root is the directory where the interpreter was found.
+
+ # We ask Python itself what the executable path is in case of
+ # intermediate symlinks or shell scripts.
+ local executable-dir = $(sys.executable:D) ;
+
+ if [ MATCH ^(PCBuild) : $(executable-dir:D=) ]
+ {
+ debug-message "This Python appears to reside in a source distribution;" ;
+ debug-message "prepending \""$(executable-dir)"\" to default library search path" ;
+
+ default-library-path = $(executable-dir) $(default-library-path) ;
+
+ default-include-path = $(:E=PC:R=$(executable-dir:D)) $(default-include-path) ;
+
+ debug-message "and \""$(default-include-path[1])"\" to default #include path" ;
+ }
+
+ libraries ?= $(default-library-path) ;
+ includes ?= $(default-include-path) ;
+ }
+ else
+ {
+ includes ?= $(prefix)/include/python$(version) ;
+
+ local lib = $(exec-prefix)/lib ;
+ libraries ?= $(lib)/python$(version)/config $(lib) ;
+ }
+}
+
+# The version of the python interpreter to use.
+feature.feature python : : propagated symmetric ;
+feature.feature python.interpreter : : free ;
+
+toolset.flags python.capture-output PYTHON : <python.interpreter> ;
+
+#
+# Support for Python configured --with-pydebug
+#
+feature.feature python-debugging : off on : propagated ;
+variant debug-python : debug : <python-debugging>on ;
+
+
+# Return a list of candidate commands to try when looking for a Python
+# interpreter. prefix is expected to be a native path.
+#
+local rule candidate-interpreters ( version ? : prefix ? : target-os )
+{
+ local bin-path = bin ;
+ if $(target-os) = windows
+ {
+ # On Windows, look in the root directory itself and, to work with the
+ # result of a build-from-source, the PCBuild directory.
+ bin-path = PCBuild8 PCBuild "" ;
+ }
+
+ bin-path = $(bin-path:R=$(prefix)) ;
+
+ if $(target-os) in windows darwin
+ {
+ return # Search:
+ $(:E=python:R=$(bin-path)) # Relative to the prefix, if any
+ python # In the PATH
+ [ $(target-os)-installed-pythons $(version) ] # Standard install locations
+ ;
+ }
+ else
+ {
+ # Search relative to the prefix, or if none supplied, in PATH.
+ local unversioned = $(:E=python:R=$(bin-path:E=)) ;
+
+ # If a version was specified, look for a python with that specific
+ # version appended before looking for one called, simply, "python"
+ return $(unversioned)$(version) $(unversioned) ;
+ }
+}
+
+
+# Compute system library dependencies for targets linking with static Python
+# libraries.
+#
+# On many systems, Python uses libraries such as pthreads or libdl. Since static
+# libraries carry no library dependency information of their own that the linker
+# can extract, these extra dependencies have to be given explicitly on the link
+# line of the client. The information about these dependencies is packaged into
+# the "python" target below.
+#
+# Even where Python itself uses pthreads, it never allows extension modules to
+# be entered concurrently (unless they explicitly give up the interpreter lock).
+# Therefore, extension modules do not need the efficiency overhead of threadsafe
+# code as produced by <threading>multi, and we handle libpthread along with
+# other libraries here. Note: this optimization is based on an assumption that
+# the compiler generates link-compatible code in both the single- and
+# multi-threaded cases, and that system libraries do not change their ABIs
+# either.
+#
+# Returns a list of usage-requirements that link to the necessary system
+# libraries.
+#
+local rule system-library-dependencies ( target-os )
+{
+ switch $(target-os)
+ {
+ case s[uo][nl]* : # solaris, sun, sunos
+ # Add a librt dependency for the gcc toolset on SunOS (the sun
+ # toolset adds -lrt unconditionally). While this appears to
+ # duplicate the logic already in gcc.jam, it does not as long as
+ # we are not forcing <threading>multi.
+
+ # On solaris 10, distutils.sysconfig.get_config_var('LIBS') yields
+ # '-lresolv -lsocket -lnsl -lrt -ldl'. However, that does not seem
+ # to be the right list for extension modules. For example, on my
+ # installation, adding -ldl causes at least one test to fail because
+ # the library can not be found and removing it causes no failures.
+
+ # Apparently, though, we need to add -lrt for gcc.
+ return <toolset>gcc:<library>rt ;
+
+ case osf : return <library>pthread <toolset>gcc:<library>rt ;
+
+ case qnx* : return ;
+ case darwin : return ;
+ case windows : return ;
+ case haiku : return ;
+
+ case hpux : return <library>rt ;
+ case *bsd : return <library>pthread <toolset>gcc:<library>util ;
+
+ case aix : return <library>pthread <library>dl ;
+
+ case * : return <library>pthread <library>dl
+ <toolset>gcc:<library>util <toolset-intel:platform>linux:<library>util ;
+ }
+}
+
+
+# Define a version suffix for libraries depending on Python.
+# For example, Boost.Python built for Python 2.7 uses the suffix "27"
+rule version-suffix ( version )
+{
+ local major-minor = [ split-version $(version) ] ;
+ local suffix = $(major-minor:J="") ;
+ return $(suffix) ;
+}
+
+# Declare a target to represent Python's library.
+#
+local rule declare-libpython-target ( version ? : requirements * )
+{
+ # Compute the representation of Python version in the name of Python's
+ # library file.
+ local lib-version = $(version) ;
+ if <target-os>windows in $(requirements)
+ {
+ local major-minor = [ split-version $(version) ] ;
+ lib-version = $(major-minor:J="") ;
+ if <python-debugging>on in $(requirements)
+ {
+ lib-version = $(lib-version)_d ;
+ }
+ }
+
+ if ! $(lib-version)
+ {
+ ECHO *** "warning:" could not determine Python version, which will ;
+ ECHO *** "warning:" probably prevent us from linking with the python ;
+ ECHO *** "warning:" library. Consider explicitly passing the version ;
+ ECHO *** "warning:" to 'using python'. ;
+ }
+
+ # Declare it.
+ lib python.lib : : <name>python$(lib-version) $(requirements) ;
+}
+
+
+# Implementation of init.
+local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
+ condition * : extension-suffix ? )
+{
+ local prefix ;
+ local exec-prefix ;
+ local cmds-to-try ;
+ local interpreter-cmd ;
+
+ local target-os = [ feature.get-values target-os : $(condition) ] ;
+ target-os ?= [ feature.defaults target-os ] ;
+ target-os = $(target-os:G=) ;
+
+ if $(target-os) = windows && <python-debugging>on in $(condition)
+ {
+ extension-suffix ?= _d ;
+ }
+ extension-suffix ?= "" ;
+
+ local cmds-to-try ;
+
+ if ! $(cmd-or-prefix) || [ GLOB $(cmd-or-prefix) : * ]
+ {
+ # If the user did not pass a command, whatever we got was a prefix.
+ prefix = $(cmd-or-prefix) ;
+ cmds-to-try = [ candidate-interpreters $(version) : $(prefix) : $(target-os) ] ;
+ }
+ else
+ {
+ # Work with the command the user gave us.
+ cmds-to-try = $(cmd-or-prefix) ;
+
+ # On Windows, do not nail down the interpreter command just yet in case
+ # the user specified something that turns out to be a cygwin symlink,
+ # which could bring down bjam if we invoke it.
+ if $(target-os) != windows
+ {
+ interpreter-cmd = $(cmd-or-prefix) ;
+ }
+ }
+
+ # Values to use in case we can not really find anything in the system.
+ local fallback-cmd = $(cmds-to-try[1]) ;
+ local fallback-version ;
+
+ # Anything left to find or check?
+ if ! ( $(interpreter-cmd) && $(version) && $(includes) && $(libraries) )
+ {
+ # Values to be extracted from python's sys module. These will be set by
+ # the probe rule, above, using Jam's dynamic scoping.
+ local sys-elements = version platform prefix exec_prefix executable ;
+ local sys.$(sys-elements) ;
+
+ # Compute the string Python's sys.platform needs to match. If not
+ # targeting Windows or cygwin we will assume only native builds can
+ # possibly run, so we will not require a match and we leave sys.platform
+ # blank.
+ local platform ;
+ switch $(target-os)
+ {
+ case windows : platform = win32 ;
+ case cygwin : platform = cygwin ;
+ }
+
+ while $(cmds-to-try)
+ {
+ # Pop top command.
+ local cmd = $(cmds-to-try[1]) ;
+ cmds-to-try = $(cmds-to-try[2-]) ;
+
+ debug-message Checking interpreter command \"$(cmd)\"... ;
+ if [ probe $(cmd) ]
+ {
+ fallback-version ?= $(sys.version) ;
+
+ # Check for version/platform validity.
+ for local x in version platform
+ {
+ if $($(x)) && $($(x)) != $(sys.$(x))
+ {
+ debug-message ...$(x) "mismatch (looking for"
+ $($(x)) but found $(sys.$(x))")" ;
+ cmd = ;
+ }
+ }
+
+ if $(cmd)
+ {
+ debug-message ...requested configuration matched! ;
+
+ exec-prefix = $(sys.exec_prefix) ;
+
+ compute-default-paths $(target-os) : $(sys.version) :
+ $(sys.prefix) : $(sys.exec_prefix) ;
+
+ version = $(sys.version) ;
+ interpreter-cmd ?= $(cmd) ;
+ cmds-to-try = ; # All done.
+ }
+ }
+ else
+ {
+ debug-message ...does not invoke a working interpreter ;
+ }
+ }
+ }
+
+ # Check whether configuration succeeded.
+ if ! ( $(includes) && $(libraries) )
+ {
+ debug-message Python headers and libraries not found. ;
+ return ;
+ }
+
+ .configured = true ;
+
+ if ! $(interpreter-cmd)
+ {
+ fallback-cmd ?= python ;
+ debug-message No working Python interpreter found. ;
+ if [ os.name ] != NT || ! [ invokes-cygwin-symlink $(fallback-cmd) ]
+ {
+ interpreter-cmd = $(fallback-cmd) ;
+ debug-message falling back to \"$(interpreter-cmd)\" ;
+ }
+ }
+
+ includes = [ path-to-native $(includes) ] ;
+ libraries = [ path-to-native $(libraries) ] ;
+
+ debug-message "Details of this Python configuration:" ;
+ debug-message " interpreter command:" \"$(interpreter-cmd:E=<empty>)\" ;
+ debug-message " include path:" \"$(includes:E=<empty>)\" ;
+ debug-message " library path:" \"$(libraries:E=<empty>)\" ;
+ if $(target-os) = windows
+ {
+ debug-message " DLL search path:" \"$(exec-prefix:E=<empty>)\" ;
+ }
+
+ #
+ # Discover the presence of NumPy
+ #
+ debug-message "Checking for NumPy..." ;
+ local full-cmd = "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())" ;
+ local full-cmd = $(interpreter-cmd)" -c \"$(full-cmd)\"" ;
+ debug-message "running command '$(full-cmd)'" ;
+ local result = [ SHELL $(full-cmd) : strip-eol : exit-status ] ;
+ if $(result[2]) = 0
+ {
+ .numpy = true ;
+ .numpy-include = $(result[1]) ;
+ debug-message "NumPy enabled" ;
+ }
+ else
+ {
+ debug-message "NumPy disabled. Reason:" ;
+ debug-message " $(full-cmd) aborted with " ;
+ debug-message " $(result[1])" ;
+ }
+
+ #
+ # End autoconfiguration sequence.
+ #
+
+ # Normalize and dissect any version number.
+ local major-minor ;
+ if $(version)
+ {
+ major-minor = [ split-version $(version) ] ;
+ version = $(major-minor:J=.) ;
+ }
+
+
+ local target-requirements = $(condition) ;
+
+ # Add the version, if any, to the target requirements.
+ if $(version)
+ {
+ if ! $(version) in [ feature.values python ]
+ {
+ feature.extend python : $(version) ;
+ py$(major-minor[1])-version ?= $(version) ;
+ if $(py$(major-minor[1])-version) < $(version)
+ {
+ py$(major-minor[1])-version = $(version) ;
+ }
+ }
+ target-requirements += <python>$(version:E=default) ;
+ }
+
+ target-requirements += <target-os>$(target-os) ;
+
+ # See if we can find a framework directory on darwin.
+ local framework-directory ;
+ if $(target-os) = darwin
+ {
+ # Search upward for the framework directory.
+ local framework-directory = $(libraries[-1]) ;
+ while $(framework-directory:D=) && $(framework-directory:D=) != Python.framework
+ {
+ framework-directory = $(framework-directory:D) ;
+ }
+
+ if $(framework-directory:D=) = Python.framework
+ {
+ debug-message framework directory is \"$(framework-directory)\" ;
+ }
+ else
+ {
+ debug-message "no framework directory found; using library path" ;
+ framework-directory = ;
+ }
+ }
+
+ local dll-path = $(libraries) ;
+
+ # Make sure that we can find the Python DLL on Windows.
+ if ( $(target-os) = windows ) && $(exec-prefix)
+ {
+ dll-path += $(exec-prefix) ;
+ }
+
+ #
+ # Prepare usage requirements.
+ #
+ local usage-requirements = [ system-library-dependencies $(target-os) ] ;
+ usage-requirements += <include>$(includes) <python.interpreter>$(interpreter-cmd) ;
+ if <python-debugging>on in $(condition)
+ {
+ if $(target-os) = windows
+ {
+ # In pyconfig.h, Py_DEBUG is set if _DEBUG is set. If we define
+ # Py_DEBUG we will get multiple definition warnings.
+ usage-requirements += <define>_DEBUG ;
+ }
+ else
+ {
+ usage-requirements += <define>Py_DEBUG ;
+ }
+ }
+
+ # In case we added duplicate requirements from what the user specified.
+ target-requirements = [ sequence.unique $(target-requirements) ] ;
+
+ # Global, but conditional, requirements to give access to the interpreter
+ # for general utilities, like other toolsets, that run Python scripts.
+ toolset.add-requirements
+ "$(target-requirements:J=,):<python.interpreter>$(interpreter-cmd)" ;
+
+ # Register the right suffix for extensions.
+ register-extension-suffix $(extension-suffix) : $(target-requirements) ;
+
+ # Make sure that the python feature is always considered
+ # relevant for any targets that depend on python. Without
+ # this, it would only be considered relevant when there are
+ # multiple configurations defined within the same build.
+ target-requirements += <relevant>python ;
+
+ #
+ # Declare the "python" target. This should really be called
+ # python_for_embedding.
+ #
+
+ if $(framework-directory)
+ {
+ alias python
+ :
+ : $(target-requirements)
+ :
+ : $(usage-requirements) <framework>$(framework-directory)
+ ;
+ }
+ else
+ {
+ declare-libpython-target $(version) : $(target-requirements) ;
+
+ # This is an evil hack. On, Windows, when Python is embedded, nothing
+ # seems to set up sys.path to include Python's standard library
+ # (http://article.gmane.org/gmane.comp.python.general/544986). The evil
+ # here, aside from the workaround necessitated by Python's bug, is that:
+ #
+ # a. we're guessing the location of the python standard library from the
+ # location of pythonXX.lib
+ #
+ # b. we're hijacking the <testing.launcher> property to get the
+ # environment variable set up, and the user may want to use it for
+ # something else (e.g. launch the debugger).
+ local set-PYTHONPATH ;
+ if $(target-os) = windows
+ {
+ set-PYTHONPATH = [ common.prepend-path-variable-command PYTHONPATH :
+ $(libraries:D)/Lib ] ;
+ }
+
+ alias python
+ :
+ : $(target-requirements)
+ :
+ # Why python.lib must be listed here instead of along with the
+ # system libs is a mystery, but if we do not do it, on cygwin,
+ # -lpythonX.Y never appears in the command line (although it does on
+ # linux).
+ : $(usage-requirements)
+ <testing.launcher>$(set-PYTHONPATH)
+ <library-path>$(libraries) <dll-path>$(dll-path) <library>python.lib
+ ;
+ }
+
+ # On *nix, we do not want to link either Boost.Python or Python extensions
+ # to libpython, because the Python interpreter itself provides all those
+ # symbols. If we linked to libpython, we would get duplicate symbols. So
+ # declare two targets -- one for building extensions and another for
+ # embedding.
+ if $(target-os) in windows cygwin
+ {
+ alias python_for_extensions : python : $(target-requirements) ;
+ }
+ else if $(target-os) = darwin {
+ alias python_for_extensions
+ :
+ : $(target-requirements)
+ :
+ : $(usage-requirements) <linkflags>"-undefined dynamic_lookup"
+ ;
+ }
+ # On AIX we need Python extensions and Boost.Python to import symbols from
+ # the Python interpreter. Dynamic libraries opened with dlopen() do not
+ # inherit the symbols from the Python interpreter.
+ else if $(target-os) = aix
+ {
+ alias python_for_extensions
+ :
+ : $(target-requirements)
+ :
+ : $(usage-requirements) <linkflags>"-Wl,-bI:$(libraries[1])/python.exp"
+ ;
+ }
+ else
+ {
+ alias python_for_extensions
+ :
+ : $(target-requirements)
+ :
+ : $(usage-requirements)
+ ;
+ }
+
+}
+
+# Conditional rule specification that will prevent building of a target
+# if there is no matching python configuration available with the given
+# required properties.
+rule require-py ( properties * )
+{
+ local py-ext-target = [ $(.project).find python_for_extensions : no-error ] ;
+ if ! $(py-ext-target)
+ {
+ return <build>no ;
+ }
+ local property-set = [ property-set.create $(properties) ] ;
+ property-set = [ $(property-set).expand ] ;
+ local py-ext-alternative = [ $(py-ext-target).select-alternatives $(property-set) ] ;
+ if ! $(py-ext-alternative)
+ {
+ return <build>no ;
+ }
+}
+
+
+rule configured ( )
+{
+ return $(.configured) ;
+}
+
+rule numpy ( )
+{
+ return $(.numpy) ;
+}
+
+rule numpy-include ( )
+{
+ return $(.numpy-include) ;
+}
+
+
+type.register PYTHON_EXTENSION : : SHARED_LIB ;
+
+
+local rule register-extension-suffix ( root : condition * )
+{
+ local suffix ;
+
+ switch [ feature.get-values target-os : $(condition) ]
+ {
+ case windows : suffix = pyd ;
+ case cygwin : suffix = dll ;
+ case hpux :
+ {
+ if [ feature.get-values python : $(condition) ] in 1.5 1.6 2.0 2.1 2.2 2.3 2.4
+ {
+ suffix = sl ;
+ }
+ else
+ {
+ suffix = so ;
+ }
+ }
+ case * : suffix = so ;
+ }
+
+ type.set-generated-target-suffix PYTHON_EXTENSION : $(condition) : <$(root).$(suffix)> ;
+}
+
+
+# Unset 'lib' prefix for PYTHON_EXTENSION
+type.set-generated-target-prefix PYTHON_EXTENSION : : "" ;
+
+
+rule python-extension ( name : sources * : requirements * : default-build * :
+ usage-requirements * )
+{
+ if [ configured ]
+ {
+ requirements += <use>/python//python_for_extensions ;
+ }
+ requirements += <suppress-import-lib>true ;
+
+ local project = [ project.current ] ;
+
+ targets.main-target-alternative
+ [ new typed-target $(name) : $(project) : PYTHON_EXTENSION
+ : [ targets.main-target-sources $(sources) : $(name) ]
+ : [ targets.main-target-requirements $(requirements) : $(project) ]
+ : [ targets.main-target-default-build $(default-build) : $(project) ]
+ ] ;
+}
+
+IMPORT python : python-extension : : python-extension ;
+
+# Support for testing.
+type.register PY : py ;
+type.register RUN_PYD_OUTPUT ;
+type.register RUN_PYD : : TEST ;
+
+
+class python-test-generator : generator
+{
+ import set ;
+
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ self.composing = true ;
+ }
+
+ rule run ( project name ? : property-set : sources * : multiple ? )
+ {
+ local pyversion = [ $(property-set).get <python> ] ;
+ local python ;
+ local other-pythons ;
+
+ for local s in $(sources)
+ {
+ if [ $(s).type ] = PY
+ {
+ if ! $(python)
+ {
+ # First Python source ends up on command line.
+ python = $(s) ;
+
+ }
+ else
+ {
+ # Other Python sources become dependencies.
+ other-pythons += $(s) ;
+ }
+ }
+ }
+
+ local extensions ;
+ for local s in $(sources)
+ {
+ if [ $(s).type ] = PYTHON_EXTENSION
+ {
+ extensions += $(s) ;
+ }
+ }
+
+ local libs ;
+ for local s in $(sources)
+ {
+ if [ type.is-derived [ $(s).type ] LIB ]
+ && ! $(s) in $(extensions)
+ {
+ libs += $(s) ;
+ }
+ }
+
+ local new-sources ;
+ for local s in $(sources)
+ {
+ if [ type.is-derived [ $(s).type ] CPP ]
+ {
+ local name = [ utility.basename [ $(s).name ] ] ;
+ if $(name) = [ utility.basename [ $(python).name ] ]
+ {
+ name = $(name)_ext ;
+ }
+ local extension = [ generators.construct $(project) $(name) :
+ PYTHON_EXTENSION : $(property-set) : $(s) $(libs) ] ;
+
+ # The important part of usage requirements returned from
+ # PYTHON_EXTENSION generator are xdll-path properties that will
+ # allow us to find the python extension at runtime.
+ property-set = [ $(property-set).add $(extension[1]) ] ;
+
+ # Ignore usage requirements. We're a top-level generator and
+ # nobody is going to use what we generate.
+ new-sources += $(extension[2-]) ;
+ }
+ }
+
+ property-set = [ $(property-set).add-raw <dependency>$(other-pythons) ] ;
+
+ return [ construct-result $(python) $(extensions) $(new-sources) :
+ $(project) $(name) : $(property-set) ] ;
+ }
+}
+
+
+generators.register
+ [ new python-test-generator python.capture-output : : RUN_PYD_OUTPUT ] ;
+
+generators.register-standard testing.expect-success
+ : RUN_PYD_OUTPUT : RUN_PYD ;
+
+
+# There are two different ways of spelling OS names. One is used for [ os.name ]
+# and the other is used for the <host-os> and <target-os> properties. Until that
+# is remedied, this sets up a crude mapping from the latter to the former, that
+# will work *for the purposes of cygwin/NT cross-builds only*. Could not think
+# of a better name than "translate".
+#
+.translate-os-windows = NT ;
+.translate-os-cygwin = CYGWIN ;
+local rule translate-os ( src-os )
+{
+ local x = $(.translate-os-$(src-os)) [ os.name ] ;
+ return $(x[1]) ;
+}
+
+
+# Extract the path to a single ".pyd" source. This is used to build the
+# PYTHONPATH for running bpl tests.
+#
+local rule pyd-pythonpath ( source )
+{
+ return [ on $(source) return $(LOCATE) $(SEARCH) ] ;
+}
+
+
+# The flag settings on testing.capture-output do not apply to python.capture
+# output at the moment. Redo this explicitly.
+toolset.flags python.capture-output ARGS <testing.arg> ;
+toolset.flags python.capture-output INPUT_FILES <testing.input-file> ;
+
+toolset.uses-features python.capture-output :
+ <testing.launcher> <testing.execute> <dll-path> <xdll-path> <target-os>
+ <pythonpath> ;
+
+rule capture-output ( target : sources * : properties * )
+{
+ # Setup up a proper DLL search path. Here, $(sources[1]) is a python module
+ # and $(sources[2]) is a DLL. Only $(sources[1]) is passed to
+ # testing.capture-output, so RUN_PATH variable on $(sources[2]) is not
+ # consulted. Move it over explicitly.
+ RUN_PATH on $(sources[1]) = [ on $(sources[2-]) return $(RUN_PATH) ] ;
+
+ PYTHONPATH = [ sequence.transform pyd-pythonpath : $(sources[2-]) ] ;
+ PYTHONPATH += [ feature.get-values pythonpath : $(properties) ] ;
+
+ # After test is run, we remove the Python module, but not the Python script.
+ testing.capture-output $(target) : $(sources[1]) : $(properties) ;
+
+ # PYTHONPATH is different; it will be interpreted by whichever Python is
+ # invoked and so must follow path rules for the target os. The only OSes
+ # where we can run python for other OSes currently are NT and CYGWIN so we
+ # only need to handle those cases.
+ local target-os = [ feature.get-values target-os : $(properties) ] ;
+ # Oddly, host-os is not in properties, so grab the default value.
+ local host-os = [ feature.defaults host-os ] ;
+ host-os = $(host-os:G=) ;
+ if $(target-os) != $(host-os) && $(target-os) in windows cygwin && $(host-os) in windows cygwin
+ {
+ PYTHONPATH = [ sequence.transform $(host-os)-to-$(target-os)-path :
+ $(PYTHONPATH) ] ;
+ }
+ local path-separator = [ os.path-separator [ translate-os $(target-os) ] ] ;
+ local set-PYTHONPATH = [ common.variable-setting-command PYTHONPATH :
+ $(PYTHONPATH:E=:J=$(path-separator)) ] ;
+ LAUNCHER on $(target) = $(set-PYTHONPATH) [ on $(target) return \"$(PYTHON)\" ] ;
+}
+
+
+rule bpl-test ( name : sources * : requirements * )
+{
+ local s ;
+ sources ?= $(name).py $(name).cpp ;
+ return [ testing.make-test run-pyd : $(sources) /boost/python//boost_python
+ : $(requirements) : $(name) ] ;
+}
+
+# The same as bpl-test but additionally require (and link to) boost_numpy.
+# Masked whenever NumPy is not enabled.
+rule numpy-test ( name : sources * : requirements * )
+{
+ numpy-include = [ python.numpy-include ] ;
+ # yuk !
+ if ! $(.numpy) { requirements += <build>no ; }
+ sources ?= $(name).py $(name).cpp ;
+ name = [ regex.replace $(name) "[/]" "~" ] ;
+ return [ testing.make-test run-pyd
+ : $(sources) /boost/python//boost_numpy /boost/python//boost_python
+ : $(requirements) <include>$(numpy-include)
+ : $(name) ] ;
+}
+
+rule py-version ( n )
+{
+ return $(py$(n)-version) ;
+}
+
+IMPORT $(__name__) : bpl-test : : bpl-test ;
+IMPORT $(__name__) : numpy-test : : numpy-test ;
+IMPORT $(__name__) : py-version : : py-version ;
diff --git a/src/boost/tools/build/src/tools/qcc.jam b/src/boost/tools/build/src/tools/qcc.jam
new file mode 100644
index 000000000..155b1ac3d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/qcc.jam
@@ -0,0 +1,242 @@
+# Copyright (c) 2001 David Abrahams.
+# Copyright (c) 2002-2003 Rene Rivera.
+# Copyright (c) 2002-2003 Vladimir Prus.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import "class" : new ;
+import common ;
+import errors ;
+import feature ;
+import generators ;
+import os ;
+import property ;
+import set ;
+import toolset ;
+import type ;
+import unix ;
+
+feature.extend toolset : qcc ;
+
+toolset.inherit-generators qcc : unix : unix.link unix.link.dll ;
+toolset.inherit-flags qcc : unix ;
+toolset.inherit-rules qcc : unix ;
+
+# Initializes the qcc toolset for the given version. If necessary, command may
+# be used to specify where the compiler is located. The parameter 'options' is a
+# space-delimited list of options, each one being specified as
+# <option-name>option-value. Valid option names are: cxxflags, linkflags and
+# linker-type. Accepted values for linker-type are gnu and sun, gnu being the
+# default.
+#
+# Example:
+# using qcc : 3.4 : : <cxxflags>foo <linkflags>bar <linker-type>sun ;
+#
+rule init ( version ? : command * : options * )
+{
+ local condition = [ common.check-init-parameters qcc : version $(version) ] ;
+ local command = [ common.get-invocation-command qcc : QCC : $(command) ] ;
+ common.handle-options qcc : $(condition) : $(command) : $(options) ;
+}
+
+
+generators.register-c-compiler qcc.compile.c++ : CPP : OBJ : <toolset>qcc ;
+generators.register-c-compiler qcc.compile.c : C : OBJ : <toolset>qcc ;
+generators.register-c-compiler qcc.compile.asm : ASM : OBJ : <toolset>qcc ;
+
+
+# Declare flags for compilation.
+toolset.flags qcc.compile OPTIONS <debug-symbols>on : -gstabs+ ;
+
+# Declare flags and action for compilation.
+toolset.flags qcc.compile OPTIONS <optimization>off : -O0 ;
+toolset.flags qcc.compile OPTIONS <optimization>speed : -O3 ;
+toolset.flags qcc.compile OPTIONS <optimization>space : -Os ;
+
+toolset.flags qcc.compile OPTIONS <inlining>off : -Wc,-fno-inline ;
+toolset.flags qcc.compile OPTIONS <inlining>on : -Wc,-Wno-inline ;
+toolset.flags qcc.compile OPTIONS <inlining>full : -Wc,-finline-functions -Wc,-Wno-inline ;
+
+toolset.flags qcc.compile OPTIONS <warnings>off : -w ;
+toolset.flags qcc.compile OPTIONS <warnings>all : -Wc,-Wall ;
+toolset.flags qcc.compile OPTIONS <warnings-as-errors>on : -Wc,-Werror ;
+
+toolset.flags qcc.compile OPTIONS <profiling>on : -p ;
+
+toolset.flags qcc.compile OPTIONS <local-visibility>hidden : -fvisibility=hidden ;
+toolset.flags qcc.compile.c++ OPTIONS <local-visibility>hidden : -fvisibility-inlines-hidden ;
+toolset.flags qcc.compile OPTIONS <local-visibility>protected : -fvisibility=protected ;
+toolset.flags qcc.compile OPTIONS <local-visibility>global : -fvisibility=default ;
+
+toolset.flags qcc.compile OPTIONS <cflags> ;
+toolset.flags qcc.compile.c++ OPTIONS <cxxflags> ;
+toolset.flags qcc.compile DEFINES <define> ;
+toolset.flags qcc.compile INCLUDES <include> ;
+
+toolset.flags qcc.compile OPTIONS <link>shared : -shared ;
+
+toolset.flags qcc.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
+
+
+rule compile.c++
+{
+ # Here we want to raise the template-depth parameter value to something
+ # higher than the default value of 17. Note that we could do this using the
+ # feature.set-default rule but we do not want to set the default value for
+ # all toolsets as well.
+ #
+ # TODO: This 'modified default' has been inherited from some 'older Boost
+ # Build implementation' and has most likely been added to make some Boost
+ # library parts compile correctly. We should see what exactly prompted this
+ # and whether we can get around the problem more locally.
+ local template-depth = [ on $(1) return $(TEMPLATE_DEPTH) ] ;
+ if ! $(template-depth)
+ {
+ TEMPLATE_DEPTH on $(1) = 128 ;
+ }
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" -Wc,-ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c
+{
+ "$(CONFIG_COMMAND)" -lang-c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.asm
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+
+# The class checking that we do not try to use the <runtime-link>static property
+# while creating or using a shared library, since it is not supported by qcc/
+# /libc.
+#
+class qcc-linking-generator : unix-linking-generator
+{
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ if <runtime-link>static in [ $(property-set).raw ]
+ {
+ local m ;
+ if [ id ] = "qcc.link.dll"
+ {
+ m = "on qcc, DLL can't be build with <runtime-link>static" ;
+ }
+ if ! $(m)
+ {
+ for local s in $(sources)
+ {
+ local type = [ $(s).type ] ;
+ if $(type) && [ type.is-derived $(type) SHARED_LIB ]
+ {
+ m = "on qcc, using DLLS together with the <runtime-link>static options is not possible " ;
+ }
+ }
+ }
+ if $(m)
+ {
+ errors.user-error $(m) : "It is suggested to use"
+ "<runtime-link>static together with <link>static." ;
+ }
+ }
+
+ return [ unix-linking-generator.generated-targets
+ $(sources) : $(property-set) : $(project) $(name) ] ;
+ }
+}
+
+generators.register [ new qcc-linking-generator qcc.link : LIB OBJ : EXE
+ : <toolset>qcc ] ;
+
+generators.register [ new qcc-linking-generator qcc.link.dll : LIB OBJ
+ : SHARED_LIB : <toolset>qcc ] ;
+
+generators.override qcc.prebuilt : builtin.prebuilt ;
+generators.override qcc.searched-lib-generator : searched-lib-generator ;
+
+
+# Declare flags for linking.
+# First, the common flags.
+toolset.flags qcc.link OPTIONS <debug-symbols>on : -gstabs+ ;
+toolset.flags qcc.link OPTIONS <profiling>on : -p ;
+toolset.flags qcc.link OPTIONS <linkflags> ;
+toolset.flags qcc.link LINKPATH <library-path> ;
+toolset.flags qcc.link FINDLIBS-ST <find-static-library> ;
+toolset.flags qcc.link FINDLIBS-SA <find-shared-library> ;
+toolset.flags qcc.link LIBRARIES <library-file> ;
+
+toolset.flags qcc.link FINDLIBS-SA : m ;
+
+# For <runtime-link>static we made sure there are no dynamic libraries in the
+# link.
+toolset.flags qcc.link OPTIONS <runtime-link>static : -static ;
+
+# Assuming this is just like with gcc.
+toolset.flags qcc.link RPATH : <dll-path> : unchecked ;
+toolset.flags qcc.link RPATH_LINK : <xdll-path> : unchecked ;
+
+
+# Declare actions for linking.
+#
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ # Serialize execution of the 'link' action, since running N links in
+ # parallel is just slower. For now, serialize only qcc links while it might
+ # be a good idea to serialize all links.
+ JAM_SEMAPHORE on $(targets) = <s>qcc-link-semaphore ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(OPTIONS)
+}
+
+
+# Always remove archive and start again. Here is the rationale from Andre Hentz:
+# I had a file, say a1.c, that was included into liba.a. I moved a1.c to a2.c,
+# updated my Jamfiles and rebuilt. My program was crashing with absurd errors.
+# After some debugging I traced it back to the fact that a1.o was *still* in
+# liba.a
+RM = [ common.rm-command ] ;
+if [ os.name ] = NT
+{
+ RM = "if exist \"$(<[1])\" DEL \"$(<[1])\"" ;
+}
+
+
+# Declare action for creating static libraries. The 'r' letter means to add
+# files to the archive with replacement. Since we remove the archive, we do not
+# care about replacement, but there is no option to "add without replacement".
+# The 'c' letter suppresses warnings in case the archive does not exists yet.
+# That warning is produced only on some platforms, for whatever reasons.
+#
+# Use qcc driver to create archive, see
+# http://www.qnx.com/developers/docs/6.3.2/neutrino/utilities/q/qcc.html
+actions piecemeal archive
+{
+ $(RM) "$(<)"
+ "$(CONFIG_COMMAND)" -A "$(<)" "$(>)"
+}
+
+
+rule link.dll ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>qcc-link-semaphore ;
+}
+
+
+# Differ from 'link' above only by -shared.
+#
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(OPTIONS)
+}
diff --git a/src/boost/tools/build/src/tools/qt.jam b/src/boost/tools/build/src/tools/qt.jam
new file mode 100644
index 000000000..8aa7ca266
--- /dev/null
+++ b/src/boost/tools/build/src/tools/qt.jam
@@ -0,0 +1,17 @@
+# Copyright (c) 2006 Vladimir Prus.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Forwarning toolset file to Qt GUI library. Forwards to the toolset file
+# for the current version of Qt.
+
+import qt4 ;
+
+rule init ( prefix : full_bin ? : full_inc ? : full_lib ? : version ? : condition * )
+{
+ qt4.init $(prefix) : $(full_bin) : $(full_inc) : $(full_lib) : $(version) : $(condition) ;
+}
+
+
diff --git a/src/boost/tools/build/src/tools/qt3.jam b/src/boost/tools/build/src/tools/qt3.jam
new file mode 100644
index 000000000..9b2e8f6f4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/qt3.jam
@@ -0,0 +1,209 @@
+# 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)
+
+# Support for the Qt GUI library version 3
+# (http://www.trolltech.com/products/qt3/index.html).
+# For new developments, it is recommended to use Qt4 via the qt4 B2
+# module.
+
+import modules ;
+import feature ;
+import errors ;
+import type ;
+import "class" : new ;
+import generators ;
+import project ;
+import toolset : flags ;
+
+# Convert this module into a project, so that we can declare targets here.
+project.initialize $(__name__) ;
+project qt3 ;
+
+
+# Initialized the QT support module. The 'prefix' parameter tells where QT is
+# installed. When not given, environmental variable QTDIR should be set.
+#
+rule init ( prefix ? )
+{
+ if ! $(prefix)
+ {
+ prefix = [ modules.peek : QTDIR ] ;
+ if ! $(prefix)
+ {
+ errors.error
+ "QT installation prefix not given and QTDIR variable is empty" ;
+ }
+ }
+
+ if $(.initialized)
+ {
+ if $(prefix) != $(.prefix)
+ {
+ errors.error
+ "Attempt the reinitialize QT with different installation prefix" ;
+ }
+ }
+ else
+ {
+ .initialized = true ;
+ .prefix = $(prefix) ;
+
+ generators.register-standard qt3.moc : H : CPP(moc_%) : <allow>qt3 ;
+ # Note: the OBJ target type here is fake, take a look at
+ # qt4.jam/uic-h-generator for explanations that apply in this case as
+ # well.
+ generators.register [ new moc-h-generator-qt3
+ qt3.moc.cpp : MOCCABLE_CPP : OBJ : <allow>qt3 ] ;
+
+ # The UI type is defined in types/qt.jam, and UIC_H is only used in
+ # qt.jam, but not in qt4.jam, so define it here.
+ type.register UIC_H : : H ;
+
+ generators.register-standard qt3.uic-h : UI : UIC_H : <allow>qt3 ;
+
+ # The following generator is used to convert UI files to CPP. It creates
+ # UIC_H from UI, and constructs CPP from UI/UIC_H. In addition, it also
+ # returns UIC_H target, so that it can be mocced.
+ class "qt::uic-cpp-generator" : generator
+ {
+ rule __init__ ( )
+ {
+ generator.__init__ qt3.uic-cpp : UI UIC_H : CPP : <allow>qt3 ;
+ }
+
+ rule run ( project name ? : properties * : sources + )
+ {
+ # Consider this:
+ # obj test : test_a.cpp : <optimization>off ;
+ #
+ # This generator will somehow be called in this case, and,
+ # will fail -- which is okay. However, if there are <library>
+ # properties they will be converted to sources, so the size of
+ # 'sources' will be more than 1. In this case, the base generator
+ # will just crash -- and that's not good. Just use a quick test
+ # here.
+
+ local result ;
+ if ! $(sources[2])
+ {
+ # Construct CPP as usual
+ result = [ generator.run $(project) $(name)
+ : $(properties) : $(sources) ] ;
+
+ # If OK, process UIC_H with moc. It's pretty clear that
+ # the object generated with UIC will have Q_OBJECT macro.
+ if $(result)
+ {
+ local action = [ $(result[1]).action ] ;
+ local sources = [ $(action).sources ] ;
+ local mocced = [ generators.construct $(project) $(name)
+ : CPP : $(properties) : $(sources[2]) ] ;
+ result += $(mocced[2-]) ;
+ }
+ }
+
+ return $(result) ;
+ }
+ }
+
+ generators.register [ new "qt::uic-cpp-generator" ] ;
+
+ # Finally, declare prebuilt target for QT library.
+ local usage-requirements =
+ <include>$(.prefix)/include
+ <dll-path>$(.prefix)/lib
+ <library-path>$(.prefix)/lib
+ <allow>qt3
+ ;
+ lib qt : : <name>qt-mt <threading>multi : : $(usage-requirements) ;
+ lib qt : : <name>qt <threading>single : : $(usage-requirements) ;
+ }
+}
+
+class moc-h-generator-qt3 : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_CPP
+ {
+ name = [ $(sources[1]).name ] ;
+ name = $(name:B) ;
+
+ local a = [ new action $(sources[1]) : qt3.moc.cpp :
+ $(property-set) ] ;
+
+ local target = [
+ new file-target $(name) : MOC : $(project) : $(a) ] ;
+
+ local r = [ virtual-target.register $(target) ] ;
+
+ # Since this generator will return a H target, the linking generator
+ # won't use it at all, and won't set any dependency on it. However,
+ # we need the target to be seen by bjam, so that the dependency from
+ # sources to this generated header is detected -- if Jam does not
+ # know about this target, it won't do anything.
+ DEPENDS all : [ $(r).actualize ] ;
+
+ return $(r) ;
+ }
+ }
+}
+
+
+# Query the installation directory. This is needed in at least two scenarios.
+# First, when re-using sources from the Qt-Tree. Second, to "install" custom Qt
+# plugins to the Qt-Tree.
+#
+rule directory
+{
+ return $(.prefix) ;
+}
+
+# -f forces moc to include the processed source file. Without it, it would think
+# that .qpp is not a header and would not include it from the generated file.
+#
+actions moc
+{
+ $(.prefix)/bin/moc -f $(>) -o $(<)
+}
+
+# When moccing .cpp files, we don't need -f, otherwise generated code will
+# include .cpp and we'll get duplicated symbols.
+#
+actions moc.cpp
+{
+ $(.prefix)/bin/moc $(>) -o $(<)
+}
+
+
+space = " " ;
+
+# Sometimes it's required to make 'plugins' available during uic invocation. To
+# help with this we add paths to all dependency libraries to uic commane line.
+# The intention is that it's possible to write
+#
+# exe a : ... a.ui ... : <uses>some_plugin ;
+#
+# and have everything work. We'd add quite a bunch of unrelated paths but it
+# won't hurt.
+#
+flags qt3.uic-h LIBRARY_PATH <xdll-path> ;
+actions uic-h
+{
+ $(.prefix)/bin/uic $(>) -o $(<) -L$(space)$(LIBRARY_PATH)
+}
+
+
+flags qt3.uic-cpp LIBRARY_PATH <xdll-path> ;
+# The second target is uic-generated header name. It's placed in build dir, but
+# we want to include it using only basename.
+actions uic-cpp
+{
+ $(.prefix)/bin/uic $(>[1]) -i $(>[2]:D=) -o $(<) -L$(space)$(LIBRARY_PATH)
+}
diff --git a/src/boost/tools/build/src/tools/qt4.jam b/src/boost/tools/build/src/tools/qt4.jam
new file mode 100644
index 000000000..69b13bd55
--- /dev/null
+++ b/src/boost/tools/build/src/tools/qt4.jam
@@ -0,0 +1,755 @@
+# Copyright 2002-2006 Vladimir Prus
+# Copyright 2005 Alo Sarv
+# Copyright 2005-2009 Juergen Hunold
+#
+# 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)
+
+# Qt4 library support module
+#
+# The module attempts to auto-detect QT installation location from QTDIR
+# environment variable; failing that, installation location can be passed as
+# argument:
+#
+# toolset.using qt4 : /usr/local/Trolltech/Qt-4.0.0 ;
+#
+# The module supports code generation from .ui and .qrc files, as well as
+# running the moc preprocessor on headers. Note that you must list all your
+# moc-able headers in sources.
+#
+# Example:
+#
+# exe myapp : myapp.cpp myapp.h myapp.ui myapp.qrc
+# /qt4//QtGui /qt4//QtNetwork ;
+#
+# It's also possible to run moc on cpp sources:
+#
+# import cast ;
+#
+# exe myapp : myapp.cpp [ cast _ moccable-cpp : myapp.cpp ] /qt4//QtGui ;
+#
+# When moccing source file myapp.cpp you need to include "myapp.moc" from
+# myapp.cpp. When moccing .h files, the output of moc will be automatically
+# compiled and linked in, you don't need any includes.
+#
+# This is consistent with Qt guidelines:
+# http://qt-project.org/doc/qt-4.8/moc.html
+#
+# The .qrc processing utility supports various command line option (see
+# http://qt-project.org/doc/qt-4.8/rcc.html for a complete list). The
+# module provides default arguments for the "output file" and
+# "initialization function name" options. Other options can be set through
+# the <rccflags> build property. E.g. if you wish the compression settings
+# to be more aggressive than the defaults, you can apply them too all .qrc
+# files like this:
+#
+# project my-qt-project :
+# requirements
+# <rccflags>"-compress 9 -threshold 10"
+# ;
+#
+# Of course, this property can also be specified on individual targets.
+
+
+import modules ;
+import feature ;
+import errors ;
+import type ;
+import "class" : new ;
+import generators ;
+import project ;
+import toolset : flags ;
+import os ;
+import virtual-target ;
+import scanner ;
+
+# Qt3Support control feature
+#
+# Qt4 configure defaults to build Qt4 libraries with Qt3Support.
+# The autodetection is missing, so we default to disable Qt3Support.
+# This prevents the user from inadvertedly using a deprecated API.
+#
+# The Qt3Support library can be activated by adding
+# "<qt3support>on" to requirements
+#
+# Use "<qt3support>on:<define>QT3_SUPPORT_WARNINGS"
+# to get warnings about deprecated Qt3 support functions and classes.
+# Files ported by the "qt3to4" conversion tool contain _tons_ of
+# warnings, so this define is not set as default.
+#
+# Todo: Detect Qt3Support from Qt's configure data.
+# Or add more auto-configuration (like python).
+feature.feature qt3support : off on : propagated link-incompatible ;
+
+# The Qt version used for requirements
+# Valid are <qt>4.4 or <qt>4.5.0
+# Auto-detection via qmake sets '<qt>major.minor.patch'
+feature.feature qt : : propagated ;
+
+# Extra flags for rcc
+feature.feature rccflags : : free ;
+
+project.initialize $(__name__) ;
+project qt ;
+
+# Save the project so that we tolerate 'import + using' combo.
+.project = [ project.current ] ;
+
+# Helper utils for easy debug output
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = TRUE ;
+}
+
+local rule debug-message ( message * )
+{
+ if $(.debug-configuration) = TRUE
+ {
+ ECHO notice\: "[qt4-cfg]" $(message) ;
+ }
+}
+
+# Capture qmake output line by line
+local rule read-output ( content )
+{
+ local lines ;
+ local nl = "
+" ;
+ local << = "([^$(nl)]*)[$(nl)](.*)" ;
+ local line+ = [ MATCH "$(<<)" : "$(content)" ] ;
+ while $(line+)
+ {
+ lines += $(line+[1]) ;
+ line+ = [ MATCH "$(<<)" : "$(line+[2])" ] ;
+ }
+ return $(lines) ;
+}
+
+# Capture Qt version from qmake
+local rule check-version ( bin_prefix )
+{
+ full-cmd = $(bin_prefix)"/qmake -v" ;
+ debug-message Running '$(full-cmd)' ;
+ local output = [ SHELL $(full-cmd) ] ;
+ for line in [ read-output $(output) ]
+ {
+ # Parse the output to get all the results.
+ if [ MATCH "QMake" : $(line) ]
+ {
+ # Skip first line of output
+ }
+ else
+ {
+ temp = [ MATCH "([0-9]*)\\.([0-9]*)\\.([0-9]*)" : $(line) ] ;
+ }
+ }
+ return $(temp) ;
+}
+
+# Validate the version string and extract the major/minor part we care about.
+#
+local rule split-version ( version )
+{
+ local major-minor = [ MATCH "^([0-9]+)\.([0-9]+)(.*)$" : $(version) : 1 2 3 ] ;
+ if ! $(major-minor[2]) || $(major-minor[3])
+ {
+ ECHO "Warning: 'using qt' expects a two part (major, minor) version number; got" $(version) instead ;
+
+ # Add a zero to account for the missing digit if necessary.
+ major-minor += 0 ;
+ }
+
+ return $(major-minor[1]) $(major-minor[2]) ;
+}
+
+# Initialize the QT support module.
+# Parameters:
+# - 'prefix' parameter tells where Qt is installed.
+# - 'full_bin' optional full path to Qt binaries (qmake,moc,uic,rcc)
+# - 'full_inc' optional full path to Qt top-level include directory
+# - 'full_lib' optional full path to Qt library directory
+# - 'version' optional version of Qt, else autodetected via 'qmake -v'
+# - 'condition' optional requirements
+rule init ( prefix : full_bin ? : full_inc ? : full_lib ? : version ? : condition * )
+{
+ project.push-current $(.project) ;
+
+ debug-message "==== Configuring Qt ... ====" ;
+ for local v in version cmd-or-prefix includes libraries condition
+ {
+ if $($(v))
+ {
+ debug-message " user-specified $(v):" '$($(v))' ;
+ }
+ }
+
+ # Needed as default value
+ .prefix = $(prefix) ;
+
+ # 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 ;
+ }
+
+ # Globally needed variables
+ .incprefix = $(inc_prefix) ;
+ .libprefix = $(lib_prefix) ;
+ .binprefix = $(bin_prefix) ;
+
+ if ! $(.initialized)
+ {
+ # Make sure this is initialised only once
+ .initialized = true ;
+
+ # Generates cpp files from header files using "moc" tool
+ generators.register-standard qt4.moc : H : CPP(moc_%) : <allow>qt4 ;
+
+ # The OBJ result type is a fake, 'H' will be really produced. See
+ # comments on the generator class, defined below the 'init' function.
+ generators.register [ new uic-generator qt4.uic : UI : OBJ :
+ <allow>qt4 ] ;
+
+ # The OBJ result type is a fake here too.
+ generators.register [ new moc-h-generator
+ qt4.moc.inc : MOCCABLE_CPP : OBJ : <allow>qt4 ] ;
+
+ generators.register [ new moc-inc-generator
+ qt4.moc.inc : MOCCABLE_H : OBJ : <allow>qt4 ] ;
+
+ # Generates .cpp files from .qrc files.
+ generators.register-standard qt4.rcc : QRC : CPP(qrc_%) : <allow>qt4 ;
+
+ # dependency scanner for wrapped files.
+ type.set-scanner QRC : qrc-scanner ;
+
+ # Save value of first occurring prefix
+ .PREFIX = $(prefix) ;
+ }
+
+ if $(version)
+ {
+ major-minor = [ split-version $(version) ] ;
+ version = $(major-minor:J=.) ;
+ }
+ else
+ {
+ version = [ check-version $(bin_prefix) ] ;
+ if $(version)
+ {
+ version = $(version:J=.) ;
+ }
+ debug-message Detected version '$(version)' ;
+ }
+
+ local target-requirements = $(condition) ;
+
+ # Add the version, if any, to the target requirements.
+ if $(version)
+ {
+ if ! $(version) in [ feature.values qt ]
+ {
+ feature.extend qt : $(version) ;
+ }
+ target-requirements += <qt>$(version:E=default) ;
+ }
+
+ local target-os = [ feature.get-values target-os : $(condition) ] ;
+ if ! $(target-os)
+ {
+ target-os ?= [ feature.defaults target-os ] ;
+ target-os = $(target-os:G=) ;
+ target-requirements += <target-os>$(target-os) ;
+ }
+
+ # Build exact requirements for the tools
+ local tools-requirements = $(target-requirements:J=/) ;
+
+ debug-message "Details of this Qt configuration:" ;
+ debug-message " prefix: " '$(prefix:E=<empty>)' ;
+ debug-message " binary path: " '$(bin_prefix:E=<empty>)' ;
+ debug-message " include path:" '$(inc_prefix:E=<empty>)' ;
+ debug-message " library path:" '$(lib_prefix:E=<empty>)' ;
+ debug-message " target requirements:" '$(target-requirements)' ;
+ debug-message " tool requirements: " '$(tools-requirements)' ;
+
+ # setup the paths for the tools
+ toolset.flags qt4.moc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
+ toolset.flags qt4.rcc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
+ toolset.flags qt4.uic .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
+
+ # TODO: 2009-02-12: Better support for directories
+ # Most likely needed are separate getters for: include,libraries,binaries and sources.
+ toolset.flags qt4.directory .PREFIX $(tools-requirements) : $(prefix) ;
+
+ # Test for a buildable Qt.
+ if [ glob $(.prefix)/Jamroot ]
+ {
+ .bjam-qt = true
+
+ # this will declare QtCore (and qtmain on <target-os>windows)
+ add-shared-library QtCore ;
+ }
+ else
+ # Setup common pre-built Qt.
+ # Special setup for QtCore on which everything depends
+ {
+ local link = [ feature.get-values link : $(condition) ] ;
+
+ local usage-requirements =
+ <include>$(.incprefix)
+ <library-path>$(.libprefix)
+ <threading>multi
+ <allow>qt4 ;
+
+ if $(link) in shared
+ {
+ usage-requirements += <dll-path>$(.libprefix) ;
+ }
+
+ local suffix ;
+
+ # Since Qt-4.2, debug versions on unix have to be built
+ # separately and therefore have no suffix.
+ .suffix_version = "" ;
+ .suffix_debug = "" ;
+
+ # Control flag for auto-configuration of the debug libraries.
+ # This setup requires Qt 'configure -debug-and-release'.
+ # Only available on some platforms.
+ # ToDo: 2009-02-12: Maybe throw this away and
+ # require separate setup with <variant>debug as condition.
+ .have_separate_debug = FALSE ;
+
+ # Setup other platforms
+ if $(target-os) in windows cygwin
+ {
+ .have_separate_debug = TRUE ;
+
+ # On NT, the shared libs have "4" suffix, and "d" suffix in debug builds.
+ if $(link) in shared
+ {
+ .suffix_version = "4" ;
+ }
+ .suffix_debug = "d" ;
+
+ # On Windows we must link against the qtmain library
+ lib qtmain
+ : # sources
+ : # requirements
+ <name>qtmain$(.suffix_debug)
+ <variant>debug
+ $(target-requirements)
+ ;
+
+ lib qtmain
+ : # sources
+ : # requirements
+ <name>qtmain
+ $(target-requirements)
+ ;
+ }
+ else if $(target-os) = darwin
+ {
+ # On MacOS X, both debug and release libraries are available.
+ .suffix_debug = "_debug" ;
+
+ .have_separate_debug = TRUE ;
+
+ alias qtmain ;
+ }
+ else
+ {
+ alias qtmain : : $(target-requirements) ;
+ }
+
+ lib QtCore : qtmain
+ : # requirements
+ <name>QtCore$(.suffix_version)
+ $(target-requirements)
+ : # default-build
+ : # usage-requirements
+ <define>QT_CORE_LIB
+ <define>QT_NO_DEBUG
+ <include>$(.incprefix)/QtCore
+ $(usage-requirements)
+ ;
+
+ if $(.have_separate_debug) = TRUE
+ {
+ debug-message Configure debug libraries with suffix '$(.suffix_debug)' ;
+
+ lib QtCore : $(main)
+ : # requirements
+ <name>QtCore$(.suffix_debug)$(.suffix_version)
+ <variant>debug
+ $(target-requirements)
+ : # default-build
+ : # usage-requirements
+ <define>QT_CORE_LIB
+ <include>$(.incprefix)/QtCore
+ $(usage-requirements)
+ ;
+ }
+ }
+
+ # Initialising the remaining libraries is canonical
+ # parameters 'module' : 'depends-on' : 'usage-define' : 'requirements' : 'include'
+ # 'include' only for non-canonical include paths.
+ add-shared-library QtGui : QtCore : QT_GUI_LIB : $(target-requirements) ;
+ add-shared-library QtNetwork : QtCore : QT_NETWORK_LIB : $(target-requirements) ;
+ add-shared-library QtSql : QtCore : QT_SQL_LIB : $(target-requirements) ;
+ add-shared-library QtXml : QtCore : QT_XML_LIB : $(target-requirements) ;
+
+ add-shared-library Qt3Support : QtGui QtNetwork QtXml QtSql
+ : QT_QT3SUPPORT_LIB QT3_SUPPORT
+ : <qt3support>on $(target-requirements) ;
+
+ # Dummy target to enable "<qt3support>off" and
+ # "<library>/qt//Qt3Support" at the same time. This enables quick
+ # switching from one to the other for test/porting purposes.
+ alias Qt3Support : : <qt3support>off $(target-requirements) ;
+
+ # OpenGl Support
+ add-shared-library QtOpenGL : QtGui : QT_OPENGL_LIB : $(target-requirements) ;
+
+ # SVG-Support (Qt 4.1)
+ add-shared-library QtSvg : QtXml QtOpenGL : QT_SVG_LIB : $(target-requirements) ;
+
+ # Test-Support (Qt 4.1)
+ add-shared-library QtTest : QtCore : : $(target-requirements) ;
+
+ # Qt designer library
+ add-shared-library QtDesigner : QtGui QtXml : : $(target-requirements) ;
+ add-shared-library QtDesignerComponents : QtGui QtXml : : $(target-requirements) ;
+
+ # Support for dynamic Widgets (Qt 4.1)
+ add-static-library QtUiTools : QtGui QtXml : $(target-requirements) ;
+
+ # DBus-Support (Qt 4.2)
+ add-shared-library QtDBus : QtXml : : $(target-requirements) ;
+
+ # Script-Engine (Qt 4.3)
+ add-shared-library QtScript : QtGui QtXml : QT_SCRIPT_LIB : $(target-requirements) ;
+
+ # Tools for the Script-Engine (Qt 4.5)
+ add-shared-library QtScriptTools : QtScript : QT_SCRIPTTOOLS_LIB : $(target-requirements) ;
+
+ # WebKit (Qt 4.4)
+ add-shared-library QtWebKit : QtGui : QT_WEBKIT_LIB : $(target-requirements) ;
+
+ # Phonon Multimedia (Qt 4.4)
+ add-shared-library phonon : QtGui QtXml : QT_PHONON_LIB : $(target-requirements) ;
+
+ # Multimedia engine (Qt 4.6)
+ add-shared-library QtMultimedia : QtGui : QT_MULTIMEDIA_LIB : $(target-requirements) ;
+
+ # XmlPatterns-Engine (Qt 4.4)
+ add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB : $(target-requirements) ;
+
+ # Help-Engine (Qt 4.4)
+ add-shared-library QtHelp : QtGui QtSql QtXml : : $(target-requirements) ;
+ add-shared-library QtCLucene : QCore QtSql QtXml : : $(target-requirements) ;
+
+ # QML-Engine (Qt 4.7)
+ add-shared-library QtDeclarative : QtGui QtXml : : $(target-requirements) ;
+
+ # AssistantClient Support
+ # Compat library removed in 4.7.0
+ # Pre-4.4 help system, use QtHelp for new programs
+ if $(version) < "4.7"
+ {
+ add-shared-library QtAssistantClient : QtGui : : $(target-requirements) : QtAssistant ;
+ }
+ debug-message "==== Configured Qt-$(version) ====" ;
+
+ project.pop-current ;
+}
+
+rule initialized ( )
+{
+ return $(.initialized) ;
+}
+
+
+
+# This custom generator is needed because in QT4, UI files are translated only
+# into H files, and no C++ files are created. Further, the H files need not be
+# passed via MOC. The header is used only via inclusion. If we define a standard
+# UI -> H generator, B2 will run MOC on H, and then compile the
+# resulting cpp. It will give a warning, since output from moc will be empty.
+#
+# This generator is declared with a UI -> OBJ signature, so it gets invoked when
+# linking generator tries to convert sources to OBJ, but it produces target of
+# type H. This is non-standard, but allowed. That header won't be mocced.
+#
+class uic-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if ! $(name)
+ {
+ name = [ $(sources[0]).name ] ;
+ name = $(name:B) ;
+ }
+
+ local a = [ new action $(sources[1]) : qt4.uic : $(property-set) ] ;
+
+ # The 'ui_' prefix is to match qmake's default behavior.
+ local target = [ new file-target ui_$(name) : H : $(project) : $(a) ] ;
+
+ local r = [ virtual-target.register $(target) ] ;
+
+ # Since this generator will return a H target, the linking generator
+ # won't use it at all, and won't set any dependency on it. However, we
+ # need the target to be seen by bjam, so that dependency from sources to
+ # this generated header is detected -- if jam does not know about this
+ # target, it won't do anything.
+ DEPENDS all : [ $(r).actualize ] ;
+
+ return $(r) ;
+ }
+}
+
+
+class moc-h-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_CPP
+ {
+ name = [ $(sources[0]).name ] ;
+ name = $(name:B) ;
+
+ local a = [ new action $(sources[1]) : qt4.moc.inc :
+ $(property-set) ] ;
+
+ local target = [ new file-target $(name) : MOC : $(project) : $(a)
+ ] ;
+
+ local r = [ virtual-target.register $(target) ] ;
+
+ # Since this generator will return a H target, the linking generator
+ # won't use it at all, and won't set any dependency on it. However,
+ # we need the target to be seen by bjam, so that dependency from
+ # sources to this generated header is detected -- if jam does not
+ # know about this target, it won't do anything.
+ DEPENDS all : [ $(r).actualize ] ;
+
+ return $(r) ;
+ }
+ }
+}
+
+
+class moc-inc-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_H
+ {
+ name = [ $(sources[0]).name ] ;
+ name = $(name:B) ;
+
+ local a = [ new action $(sources[1]) : qt4.moc.inc :
+ $(property-set) ] ;
+
+ local target = [ new file-target moc_$(name) : CPP : $(project) :
+ $(a) ] ;
+
+ # Since this generator will return a H target, the linking generator
+ # won't use it at all, and won't set any dependency on it. However,
+ # we need the target to be seen by bjam, so that dependency from
+ # sources to this generated header is detected -- if jam does not
+ # know about this target, it won't do anything.
+ DEPENDS all : [ $(target).actualize ] ;
+
+ return [ virtual-target.register $(target) ] ;
+ }
+ }
+}
+
+
+# Query the installation directory. This is needed in at least two scenarios.
+# First, when re-using sources from the Qt-Tree. Second, to "install" custom Qt
+# plugins to the Qt-Tree.
+#
+rule directory
+{
+ return $(.PREFIX) ;
+}
+
+# Add a shared Qt library.
+rule add-shared-library ( lib-name : depends-on * : usage-defines * : requirements * : include ? )
+{
+ add-library $(lib-name) : $(.suffix_version) : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
+}
+
+# Add a static Qt library.
+rule add-static-library ( lib-name : depends-on * : usage-defines * : requirements * : include ? )
+{
+ add-library $(lib-name) : : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
+}
+
+# Add a Qt library.
+# Static libs are unversioned, whereas shared libs have the major number as suffix.
+# Creates both release and debug versions on platforms where both are enabled by Qt configure.
+# Flags:
+# - lib-name Qt library Name
+# - version Qt major number used as shared library suffix (QtCore4.so)
+# - depends-on other Qt libraries
+# - usage-defines those are set by qmake, so set them when using this library
+# - requirements additional requirements
+# - include non-canonical include path. The canonical path is $(.incprefix)/$(lib-name).
+rule add-library ( lib-name : version ? : depends-on * : usage-defines * : requirements * : include ? )
+{
+ if $(.bjam-qt)
+ {
+ # Import Qt module
+ # Eveything will be setup there
+ alias $(lib-name)
+ : $(.prefix)//$(lib-name)
+ :
+ :
+ : <allow>qt4 ;
+ }
+ else
+ {
+ local real_include ;
+ real_include ?= $(include) ;
+ real_include ?= $(lib-name) ;
+
+ lib $(lib-name)
+ : # sources
+ $(depends-on)
+ : # requirements
+ <name>$(lib-name)$(version)
+ $(requirements)
+ : # default-build
+ : # usage-requirements
+ <define>$(usage-defines)
+ <include>$(.incprefix)/$(real_include)
+ ;
+
+ if $(.have_separate_debug) = TRUE
+ {
+ lib $(lib-name)
+ : # sources
+ $(depends-on)
+ : # requirements
+ <name>$(lib-name)$(.suffix_debug)$(version)
+ $(requirements)
+ <variant>debug
+ : # default-build
+ : # usage-requirements
+ <define>$(usage-defines)
+ <include>$(.incprefix)/$(real_include)
+ ;
+ }
+ }
+
+ # Make library explicit so that a simple <use>qt4 will not bring in everything.
+ # And some components like QtDBus/Phonon may not be available on all platforms.
+ explicit $(lib-name) ;
+}
+
+# Use $(.BINPREFIX[-1]) for the paths as several tools-requirements can match.
+# The exact match is the last one.
+
+# Get <include> and <defines> from current toolset.
+flags qt4.moc INCLUDES <include> ;
+flags qt4.moc DEFINES <define> ;
+
+# need a newline for expansion of DEFINES and INCLUDES in the response file.
+.nl = "
+" ;
+
+# Processes headers to create Qt MetaObject information. Qt4-moc has its
+# c++-parser, so pass INCLUDES and DEFINES.
+# We use response file with one INCLUDE/DEFINE per line
+#
+actions moc
+{
+ $(.BINPREFIX[-1])/moc -f $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
+}
+
+# When moccing files for include only, we don't need -f, otherwise the generated
+# code will include the .cpp and we'll get duplicated symbols.
+#
+actions moc.inc
+{
+ $(.BINPREFIX[-1])/moc $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
+}
+
+
+# Get extra options for RCC
+flags qt4.rcc RCC_OPTIONS <rccflags> ;
+
+# Generates source files from resource files.
+#
+actions rcc
+{
+ $(.BINPREFIX[-1])/rcc $(>) -name $(>:B) $(RCC_OPTIONS) -o $(<)
+}
+
+
+# Generates user-interface source from .ui files.
+#
+actions uic
+{
+ $(.BINPREFIX[-1])/uic $(>) -o $(<)
+}
+
+
+# Scanner for .qrc files. Look for the CDATA section of the <file> tag. Ignore
+# the "alias" attribute. See http://doc.trolltech.com/qt/resources.html for
+# detailed documentation of the Qt Resource System.
+#
+class qrc-scanner : common-scanner
+{
+ rule pattern ( )
+ {
+ return "<file.*>(.*)</file>" ;
+ }
+}
+
+
+# Wrapped files are "included".
+scanner.register qrc-scanner : include ;
diff --git a/src/boost/tools/build/src/tools/qt5.jam b/src/boost/tools/build/src/tools/qt5.jam
new file mode 100644
index 000000000..eb2d6ddf3
--- /dev/null
+++ b/src/boost/tools/build/src/tools/qt5.jam
@@ -0,0 +1,800 @@
+# Copyright 2002-2006 Vladimir Prus
+# Copyright 2005 Alo Sarv
+# Copyright 2005-2012 Juergen Hunold
+#
+# 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)
+
+# Qt5 library support module
+#
+# The module attempts to auto-detect QT installation location from QTDIR
+# environment variable; failing that, installation location can be passed as
+# argument:
+#
+# toolset.using qt5 : /usr/local/Trolltech/Qt-5.0.0 ;
+#
+# The module supports code generation from .ui and .qrc files, as well as
+# running the moc preprocessor on headers. Note that you must list all your
+# moc-able headers in sources.
+#
+# Example:
+#
+# exe myapp : myapp.cpp myapp.h myapp.ui myapp.qrc
+# /qt5//QtGui /qt5//QtNetwork ;
+#
+# It's also possible to run moc on cpp sources:
+#
+# import cast ;
+#
+# exe myapp : myapp.cpp [ cast _ moccable-cpp : myapp.cpp ] /qt5//QtGui ;
+#
+# When moccing source file myapp.cpp you need to include "myapp.moc" from
+# myapp.cpp. When moccing .h files, the output of moc will be automatically
+# compiled and linked in, you don't need any includes.
+#
+# This is consistent with Qt guidelines:
+# http://qt-project.org/doc/qt-5.0/moc.html
+
+# The .qrc processing utility supports various command line option (see
+# http://qt-project.org/doc/qt-5.0/rcc.html for a complete list). The
+# module provides default arguments for the "output file" and
+# "initialization function name" options. Other options can be set through
+# the <rccflags> build property. E.g. if you wish the compression settings
+# to be more aggressive than the defaults, you can apply them too all .qrc
+# files like this:
+#
+# project my-qt-project :
+# requirements
+# <rccflags>"-compress 9 -threshold 10"
+# ;
+#
+# Of course, this property can also be specified on individual targets.
+
+
+import modules ;
+import feature ;
+import errors ;
+import type ;
+import "class" : new ;
+import generators ;
+import project ;
+import toolset : flags ;
+import os ;
+import virtual-target ;
+import scanner ;
+
+# The Qt version used for requirements
+# Valid are <qt>5.0 or <qt>5.1.0
+# Auto-detection via qmake sets '<qt>major.minor.patch'
+feature.feature qt5 : : propagated ;
+
+# Extra flags for rcc
+# $TODO: figure out how to declare this only once
+# feature.feature rccflags : : free ;
+
+project.initialize $(__name__) ;
+project qt5 ;
+
+# Save the project so that we tolerate 'import + using' combo.
+.project = [ project.current ] ;
+
+# Helper utils for easy debug output
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = TRUE ;
+}
+
+local rule debug-message ( message * )
+{
+ if $(.debug-configuration) = TRUE
+ {
+ ECHO notice\: "[qt5-cfg]" $(message) ;
+ }
+}
+
+# Capture qmake output line by line
+local rule read-output ( content )
+{
+ local lines ;
+ local nl = "
+" ;
+ local << = "([^$(nl)]*)[$(nl)](.*)" ;
+ local line+ = [ MATCH "$(<<)" : "$(content)" ] ;
+ while $(line+)
+ {
+ lines += $(line+[1]) ;
+ line+ = [ MATCH "$(<<)" : "$(line+[2])" ] ;
+ }
+ return $(lines) ;
+}
+
+# Capture Qt version from qmake
+local rule check-version ( bin_prefix )
+{
+ full-cmd = $(bin_prefix)"/qmake -v" ;
+ debug-message Running '$(full-cmd)' ;
+ local output = [ SHELL $(full-cmd) ] ;
+ for line in [ read-output $(output) ]
+ {
+ # Parse the output to get all the results.
+ if [ MATCH "QMake" : $(line) ]
+ {
+ # Skip first line of output
+ }
+ else
+ {
+ temp = [ MATCH "([0-9]*)\\.([0-9]*)\\.([0-9]*)" : $(line) ] ;
+ }
+ }
+ return $(temp) ;
+}
+
+# Validate the version string and extract the major/minor part we care about.
+#
+local rule split-version ( version )
+{
+ local major-minor = [ MATCH "^([0-9]+)\.([0-9]+)(.*)$" : $(version) : 1 2 3 ] ;
+ if ! $(major-minor[2]) || $(major-minor[3])
+ {
+ ECHO "Warning: 'using qt' expects a two part (major, minor) version number; got" $(version) instead ;
+
+ # Add a zero to account for the missing digit if necessary.
+ major-minor += 0 ;
+ }
+
+ return $(major-minor[1]) $(major-minor[2]) ;
+}
+
+# Initialize the QT support module.
+# Parameters:
+# - 'prefix' parameter tells where Qt is installed.
+# - 'version' optional version of Qt, else autodetected via 'qmake -v'
+# - 'condition' optional requirements
+# - 'namespace' optional support for configure -qtnamespace
+# - 'infix' optional support for configure -qtlibinfix
+# - 'full_bin' optional full path to Qt binaries (qmake,moc,uic,rcc)
+# - 'full_inc' optional full path to Qt top-level include directory
+# - 'full_lib' optional full path to Qt library directory
+rule init ( prefix : version ? : condition * : namespace ? : infix ? : full_bin ? : full_inc ? : full_lib ? )
+{
+ project.push-current $(.project) ;
+
+ debug-message "==== Configuring Qt ... ====" ;
+ for local v in version prefix condition namespace infix full_bin full_inc full_lib
+ {
+ if $($(v))
+ {
+ debug-message " user-specified $(v):" '$($(v))' ;
+ }
+ }
+
+ # Needed as default value
+ .prefix = $(prefix) ;
+
+ # 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 ;
+ }
+
+ # Globally needed variables
+ .incprefix = $(inc_prefix) ;
+ .libprefix = $(lib_prefix) ;
+ .binprefix = $(bin_prefix) ;
+
+ if ! $(.initialized)
+ {
+ # Make sure this is initialised only once
+ .initialized = true ;
+
+ # Generates cpp files from header files using "moc" tool
+ generators.register-standard qt5.moc : H : CPP(moc_%) : <allow>qt5 ;
+
+ # The OBJ result type is a fake, 'H' will be really produced. See
+ # comments on the generator class, defined below the 'init' function.
+ generators.register [ new uic-5-generator qt5.uic : UI : OBJ :
+ <allow>qt5 ] ;
+
+ # The OBJ result type is a fake here too.
+ generators.register [ new moc-h-5-generator
+ qt5.moc.inc : MOCCABLE5_CPP : OBJ : <allow>qt5 ] ;
+
+ generators.register [ new moc-inc-5-generator
+ qt5.moc.inc : MOCCABLE5_H : OBJ : <allow>qt5 ] ;
+
+ # Generates .cpp files from .qrc files.
+ generators.register-standard qt5.rcc : QRC : CPP(qrc_%) : <allow>qt5 ;
+
+ # dependency scanner for wrapped files.
+ type.set-scanner QRC : qrc-5-scanner ;
+
+ # Save value of first occurring prefix
+ .PREFIX = $(prefix) ;
+ }
+
+ if $(version)
+ {
+ major-minor = [ split-version $(version) ] ;
+ version = $(major-minor:J=.) ;
+ }
+ else
+ {
+ version = [ check-version $(bin_prefix) ] ;
+ if $(version)
+ {
+ version = $(version:J=.) ;
+ }
+ debug-message Detected version '$(version)' ;
+ }
+
+ local target-requirements = $(condition) ;
+
+ # Add the version, if any, to the target requirements.
+ if $(version)
+ {
+ if ! $(version) in [ feature.values qt5 ]
+ {
+ feature.extend qt5 : $(version) ;
+ }
+ target-requirements += <qt5>$(version:E=default) ;
+ }
+
+ local target-os = [ feature.get-values target-os : $(condition) ] ;
+ if ! $(target-os)
+ {
+ target-os ?= [ feature.defaults target-os ] ;
+ target-os = $(target-os:G=) ;
+ target-requirements += <target-os>$(target-os) ;
+ }
+
+ # Build exact requirements for the tools
+ local tools-requirements = $(target-requirements:J=/) ;
+
+ debug-message "Details of this Qt configuration:" ;
+ debug-message " prefix: " '$(prefix:E=<empty>)' ;
+ debug-message " binary path: " '$(bin_prefix:E=<empty>)' ;
+ debug-message " include path:" '$(inc_prefix:E=<empty>)' ;
+ debug-message " library path:" '$(lib_prefix:E=<empty>)' ;
+ debug-message " target requirements:" '$(target-requirements)' ;
+ debug-message " tool requirements: " '$(tools-requirements)' ;
+
+ # setup the paths for the tools
+ toolset.flags qt5.moc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
+ toolset.flags qt5.rcc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
+ toolset.flags qt5.uic .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
+
+ # TODO: 2009-02-12: Better support for directories
+ # Most likely needed are separate getters for: include,libraries,binaries and sources.
+ toolset.flags qt5.directory .PREFIX $(tools-requirements) : $(prefix) ;
+
+ # Test for a buildable Qt.
+ if [ glob $(.prefix)/Jamroot ]
+ {
+ .bjam-qt = true
+
+ # this will declare QtCore (and qtmain on <target-os>windows)
+ add-shared-library QtCore ;
+ }
+ else
+ # Setup common pre-built Qt.
+ # Special setup for QtCore on which everything depends
+ {
+ local link = [ feature.get-values link : $(condition) ] ;
+
+ local usage-requirements =
+ <include>$(.incprefix)
+ <library-path>$(.libprefix)
+ <threading>multi
+ <allow>qt5 ;
+
+ if $(link) in shared
+ {
+ usage-requirements += <dll-path>$(.libprefix) ;
+ usage-requirements += <target-os>windows:<dll-path>$(.binprefix) ;
+ }
+
+ local suffix ;
+
+ # debug versions on unix have to be built
+ # separately and therefore have no suffix.
+ .infix_version = "" ;
+ .suffix_debug = "" ;
+
+ # Control flag for auto-configuration of the debug libraries.
+ # This setup requires Qt 'configure -debug-and-release'.
+ # Only available on some platforms.
+ # ToDo: 2009-02-12: Maybe throw this away and
+ # require separate setup with <variant>debug as condition.
+ .have_separate_debug = FALSE ;
+
+ # Setup other platforms
+ if $(target-os) in windows cygwin
+ {
+ .have_separate_debug = TRUE ;
+
+ # On NT, the libs have "d" suffix in debug builds.
+ .suffix_debug = "d" ;
+
+ .infix_version = "5" ;
+
+ # On Windows we must link against the qtmain library
+ lib qtmain
+ : # sources
+ : # requirements
+ <name>qtmain$(.suffix_debug)
+ <variant>debug
+ $(target-requirements)
+ ;
+
+ lib qtmain
+ : # sources
+ : # requirements
+ <name>qtmain
+ $(target-requirements)
+ ;
+ }
+ else if $(target-os) = darwin
+ {
+ # On MacOS X, both debug and release libraries are available.
+ .suffix_debug = "_debug" ;
+
+ .have_separate_debug = TRUE ;
+
+ alias qtmain ;
+ }
+ else
+ {
+ alias qtmain : : $(target-requirements) ;
+ .infix_version = "5" ;
+ }
+
+ lib QtCore : qtmain
+ : # requirements
+ <name>Qt$(.infix_version)Core
+ $(target-requirements)
+ : # default-build
+ : # usage-requirements
+ <define>QT_CORE_LIB
+ <define>QT_NO_DEBUG
+ <include>$(.incprefix)/QtCore
+ $(usage-requirements)
+ ;
+
+ if $(.have_separate_debug) = TRUE
+ {
+ debug-message Configure debug libraries with suffix '$(.suffix_debug)' ;
+
+ lib QtCore : $(main)
+ : # requirements
+ <name>Qt$(.infix_version)Core$(.suffix_debug)
+ <variant>debug
+ $(target-requirements)
+ : # default-build
+ : # usage-requirements
+ <define>QT_CORE_LIB
+ <include>$(.incprefix)/QtCore
+ $(usage-requirements)
+ ;
+ }
+ }
+
+ if [ glob $(.incprefix)/QtAngle ]
+ {
+ # Setup support of ANGLE builds.
+ alias QtAngle
+ : # sources
+ : # requirements
+ $(target-requirements)
+ : # default-build
+ : # usage-requirements
+ <define>QT_OPENGL_ES_2
+ <define>QT_OPENGL_ES_2_ANGLE
+ <include>$(.incprefix)/QtAngle
+ $(usage-requirements)
+ ;
+ }
+ else
+ {
+ alias QtAngle
+ : # sources
+ : # requirements
+ $(target-requirements)
+ ;
+ }
+
+ # Initialising the remaining libraries is canonical
+ # parameters 'module' : 'depends-on' : 'usage-define' : 'requirements' : 'include'
+ # 'include' only for non-canonical include paths.
+ add-shared-library QtGui : QtCore QtAngle : QT_GUI_LIB : $(target-requirements) ;
+ add-shared-library QtWidgets : QtGui : QT_WIDGETS_LIB : $(target-requirements) ;
+ add-shared-library QtNetwork : QtCore : QT_NETWORK_LIB : $(target-requirements) ;
+ add-shared-library QtSql : QtCore : QT_SQL_LIB : $(target-requirements) ;
+ add-shared-library QtXml : QtCore : QT_XML_LIB : $(target-requirements) ;
+ add-shared-library QtPrintSupport : QtGui : QT_PRINTSUPPORT_LIB : $(target-requirements) ;
+ add-shared-library QtConcurrent : QtCore : QT_CONCURRENT_LIB : $(target-requirements) ;
+
+ add-shared-library QtPositioning : QtCore : QT_POSITIONING_LIB : $(target-requirements) ;
+
+ add-shared-library QtOpenGL : QtGui : QT_OPENGL_LIB : $(target-requirements) ;
+ add-shared-library QtSvg : QtXml QtOpenGL : QT_SVG_LIB : $(target-requirements) ;
+
+ add-shared-library QtTest : QtCore : : $(target-requirements) ;
+
+ # Qt designer library et. al.
+ add-shared-library QtDesigner : QtGui QtXml : : $(target-requirements) ;
+ add-shared-library QtDesignerComponents : QtGui QtXml : : $(target-requirements) ;
+ add-static-library QtUiTools : QtGui QtXml : $(target-requirements) ;
+
+ # DBus-Support
+ add-shared-library QtDBus : QtXml : : $(target-requirements) ;
+
+ # Script-Engine and Tools
+ add-shared-library QtScript : QtGui QtXml : QT_SCRIPT_LIB : $(target-requirements) ;
+ add-shared-library QtScriptTools : QtScript : QT_SCRIPTTOOLS_LIB : $(target-requirements) ;
+
+ # WebKit
+ add-shared-library QtWebKit : QtGui : QT_WEBKIT_LIB : $(target-requirements) ;
+ add-shared-library QtWebKitWidgets : QtGui : QT_WEBKITWIDGETS_LIB : $(target-requirements) ;
+
+ # Multimedia engine
+ add-shared-library QtMultimedia : QtGui : QT_MULTIMEDIA_LIB : $(target-requirements) ;
+ add-shared-library QtMultimediaWidgets : QtMultimedia : QT_MULTIMEDIAWIDGETS_LIB : $(target-requirements) ;
+
+ #
+ add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB : $(target-requirements) ;
+
+ # Help-Engine
+ add-shared-library QtHelp : QtGui QtSql QtXml : : $(target-requirements) ;
+ add-shared-library QtCLucene : QCore QtSql QtXml : : $(target-requirements) ;
+
+ # QtQuick
+ add-shared-library QtQml : QtCore QtNetwork QtGui : QT_QML_LIB : $(target-requirements) ;
+ add-shared-library QtQuick : QtQml : QT_QUICK_LIB : $(target-requirements) ;
+ add-shared-library QtQuickParticles : QtQml : : $(target-requirements) ;
+ add-shared-library QtQuickTest : QtQml : : $(target-requirements) ;
+
+ add-shared-library QtSerialPort : QtCore : QT_SERIALPORT_LIB : $(target-requirements) ;
+
+ # QtLocation (since 5.4)
+ add-shared-library QtLocation : QtQuick QtPositioning : QT_LOCATION_LIB : $(target-requirements) ;
+
+ # Webengine support (since 5.4)
+ add-shared-library QtWebEngine : QtGui : QT_WEBENGINE_LIB : $(target-requirements) ;
+ add-shared-library QtWebEngineCore : QtWebEngine : QT_WEBENGINECORE_LIB : $(target-requirements) ;
+ add-shared-library QtWebEngineWidgets : QtWebEngineCore QtWidgets : QT_WEBENGINEWIDGETS_LIB : $(target-requirements) ;
+
+ add-shared-library QtWebChannel : QtQml : QT_WEBCHANNEL_LIB : $(target-requirements) ;
+ add-shared-library QtWebSockets : QtNetwork : QT_WEBSOCKETS_LIB : $(target-requirements) ;
+
+ add-shared-library QtWebView : QtWebEngineCore QtWebChannel : QT_WEBVIEW_LIB : $(target-requirements) ;
+
+ # Qt3d libraries (since 5.6)
+ add-shared-library Qt3DCore : QtGui : QT_3DCORE_LIB : $(target-requirements) ;
+ add-shared-library Qt3DRender : Qt3DCore QtConcurrent : QT_3DRENDER_LIB : $(target-requirements) ;
+ add-shared-library Qt3DLogic : Qt3DCore : QT_3DLOGIC_LIB : $(target-requirements) ;
+ add-shared-library Qt3DInput : Qt3DRender : QT_3DINPUT_LIB : $(target-requirements) ;
+
+ # QtCharts (since 5.7)
+ add-shared-library QtCharts : QtWidgets : QT_CHARTS_LIB : $(target-requirements) ;
+
+ # 3D data visualization (since 5.7)
+ add-shared-library QtDataVisualization : QtGui : QT_DATAVISUALIZATION_LIB : $(target-requirements) ;
+
+ # In-App purchase API (since 5.7)
+ add-shared-library QtPurchasing : QtCore : QT_PURCHASING_LIB : $(target-requirements) ;
+
+ # Qt Connectivity (since 5.3)
+ add-shared-library QtBluetooth : QtCore : QT_BLUETOOTH_LIB : $(target-requirements) ;
+ add-shared-library QtNfc : QtCore : QT_NFC_LIB : $(target-requirements) ;
+
+ # Gamepad (since 5.7)
+ add-shared-library QtGamepad : QtCore : QT_GAMEPAD_LIB : $(target-requirements) ;
+
+ # SCXML state machine (since 5.7)
+ add-shared-library QtScxml : QtCore : QT_SCXML_LIB : $(target-requirements) ;
+
+ # Tech Preview QtQuick
+ # SerialBus (since 5.7)
+ add-shared-library QtSerialBus : QtCore : QT_SERIALBUS_LIB : $(target-requirements) ;
+
+ # Platform dependent libraries
+ # Regular expression support
+ add-shared-library QtV8 : QtCore : : $(target-requirements) ;
+
+ # QML-Engine version1
+ add-shared-library QtDeclarative : QtXml : : $(target-requirements) ;
+
+ debug-message "==== Configured Qt-$(version) ====" ;
+
+ project.pop-current ;
+}
+
+rule initialized ( )
+{
+ return $(.initialized) ;
+}
+
+
+
+# This custom generator is needed because in QT5, UI files are translated only
+# into H files, and no C++ files are created. Further, the H files need not be
+# passed via MOC. The header is used only via inclusion. If we define a standard
+# UI -> H generator, B2 will run MOC on H, and then compile the
+# resulting cpp. It will give a warning, since output from moc will be empty.
+#
+# This generator is declared with a UI -> OBJ signature, so it gets invoked when
+# linking generator tries to convert sources to OBJ, but it produces target of
+# type H. This is non-standard, but allowed. That header won't be mocced.
+#
+class uic-5-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if ! $(name)
+ {
+ name = [ $(sources[0]).name ] ;
+ name = $(name:B) ;
+ }
+
+ local a = [ new action $(sources[1]) : qt5.uic : $(property-set) ] ;
+
+ # The 'ui_' prefix is to match qmake's default behavior.
+ local target = [ new file-target ui_$(name) : H : $(project) : $(a) ] ;
+
+ local r = [ virtual-target.register $(target) ] ;
+
+ # Since this generator will return a H target, the linking generator
+ # won't use it at all, and won't set any dependency on it. However, we
+ # need the target to be seen by bjam, so that dependency from sources to
+ # this generated header is detected -- if jam does not know about this
+ # target, it won't do anything.
+ DEPENDS all : [ $(r).actualize ] ;
+
+ return $(r) ;
+ }
+}
+
+
+class moc-h-5-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE5_CPP
+ {
+ name = [ $(sources[0]).name ] ;
+ name = $(name:B) ;
+
+ local a = [ new action $(sources[1]) : qt5.moc.inc :
+ $(property-set) ] ;
+
+ local target = [ new file-target $(name) : MOC : $(project) : $(a)
+ ] ;
+
+ local r = [ virtual-target.register $(target) ] ;
+
+ # Since this generator will return a H target, the linking generator
+ # won't use it at all, and won't set any dependency on it. However,
+ # we need the target to be seen by bjam, so that dependency from
+ # sources to this generated header is detected -- if jam does not
+ # know about this target, it won't do anything.
+ DEPENDS all : [ $(r).actualize ] ;
+
+ return $(r) ;
+ }
+ }
+}
+
+
+class moc-inc-5-generator : generator
+{
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE5_H
+ {
+ name = [ $(sources[0]).name ] ;
+ name = $(name:B) ;
+
+ local a = [ new action $(sources[1]) : qt5.moc.inc :
+ $(property-set) ] ;
+
+ local target = [ new file-target moc_$(name) : CPP : $(project) :
+ $(a) ] ;
+
+ # Since this generator will return a H target, the linking generator
+ # won't use it at all, and won't set any dependency on it. However,
+ # we need the target to be seen by bjam, so that dependency from
+ # sources to this generated header is detected -- if jam does not
+ # know about this target, it won't do anything.
+ DEPENDS all : [ $(target).actualize ] ;
+
+ return [ virtual-target.register $(target) ] ;
+ }
+ }
+}
+
+
+# Query the installation directory. This is needed in at least two scenarios.
+# First, when re-using sources from the Qt-Tree. Second, to "install" custom Qt
+# plugins to the Qt-Tree.
+#
+rule directory
+{
+ return $(.PREFIX) ;
+}
+
+# Add a shared Qt library.
+rule add-shared-library ( lib-name : depends-on * : usage-defines * : requirements * : include ? )
+{
+ add-library $(lib-name) : $(.infix_version) : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
+}
+
+# Add a static Qt library.
+rule add-static-library ( lib-name : depends-on * : usage-defines * : requirements * : include ? )
+{
+ add-library $(lib-name) : $(.infix_version) : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
+}
+
+# Add a Qt library.
+# Static libs are unversioned, whereas shared libs have the major number as suffix.
+# Creates both release and debug versions on platforms where both are enabled by Qt configure.
+# Flags:
+# - lib-name Qt library Name
+# - version Qt major number used as shared library suffix (QtCore5.so)
+# - depends-on other Qt libraries
+# - usage-defines those are set by qmake, so set them when using this library
+# - requirements additional requirements
+# - include non-canonical include path. The canonical path is $(.incprefix)/$(lib-name).
+rule add-library ( lib-name : version ? : depends-on * : usage-defines * : requirements * : include ? )
+{
+ if $(.bjam-qt)
+ {
+ # Import Qt module
+ # Eveything will be setup there
+ alias $(lib-name)
+ : $(.prefix)//$(lib-name)
+ :
+ :
+ : <allow>qt5 ;
+ }
+ else
+ {
+ local real_include ;
+ real_include ?= $(include) ;
+ real_include ?= $(lib-name) ;
+
+ local real_name = [ MATCH ^Qt(.*) : $(lib-name) ] ;
+
+ lib $(lib-name)
+ : # sources
+ $(depends-on)
+ : # requirements
+ <name>Qt$(version)$(real_name)
+ $(requirements)
+ : # default-build
+ : # usage-requirements
+ <define>$(usage-defines)
+ <include>$(.incprefix)/$(real_include)
+ ;
+
+ if $(.have_separate_debug) = TRUE
+ {
+ lib $(lib-name)
+ : # sources
+ $(depends-on)
+ : # requirements
+ <name>Qt$(version)$(real_name)$(.suffix_debug)
+ $(requirements)
+ <variant>debug
+ : # default-build
+ : # usage-requirements
+ <define>$(usage-defines)
+ <include>$(.incprefix)/$(real_include)
+ ;
+ }
+ }
+
+ # Make library explicit so that a simple <use>qt5 will not bring in everything.
+ # And some components like QtDBus/Phonon may not be available on all platforms.
+ explicit $(lib-name) ;
+}
+
+# Use $(.BINPREFIX[-1]) for the paths as several tools-requirements can match.
+# The exact match is the last one.
+
+# Get <include> and <defines> from current toolset.
+flags qt5.moc INCLUDES <include> ;
+flags qt5.moc DEFINES <define> ;
+
+# need a newline for expansion of DEFINES and INCLUDES in the response file.
+.nl = "
+" ;
+
+# Processes headers to create Qt MetaObject information. Qt5-moc has its
+# c++-parser, so pass INCLUDES and DEFINES.
+# We use response file with one INCLUDE/DEFINE per line
+#
+actions moc
+{
+ $(.BINPREFIX[-1])/moc $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
+}
+
+# When moccing files for include only, we don't need -f, otherwise the generated
+# code will include the .cpp and we'll get duplicated symbols.
+#
+actions moc.inc
+{
+ $(.BINPREFIX[-1])/moc $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
+}
+
+
+# Get extra options for RCC
+flags qt5.rcc RCC_OPTIONS <rccflags> ;
+
+# Generates source files from resource files.
+#
+actions rcc
+{
+ $(.BINPREFIX[-1])/rcc $(>) -name $(>:B) $(RCC_OPTIONS) -o $(<)
+}
+
+
+# Generates user-interface source from .ui files.
+#
+actions uic
+{
+ $(.BINPREFIX[-1])/uic $(>) -o $(<)
+}
+
+
+# Scanner for .qrc files. Look for the CDATA section of the <file> tag. Ignore
+# the "alias" attribute. See http://doc.trolltech.com/qt/resources.html for
+# detailed documentation of the Qt Resource System.
+#
+class qrc-5-scanner : common-scanner
+{
+ rule pattern ( )
+ {
+ return "<file.*>(.*)</file>" ;
+ }
+}
+
+
+# Wrapped files are "included".
+scanner.register qrc-5-scanner : include ;
diff --git a/src/boost/tools/build/src/tools/quickbook-config.jam b/src/boost/tools/build/src/tools/quickbook-config.jam
new file mode 100644
index 000000000..e983a78a8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/quickbook-config.jam
@@ -0,0 +1,44 @@
+#~ Copyright 2005 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)
+
+# Automatic configuration for BoostBook tools. To use, just import this module.
+
+import os ;
+import toolset : using ;
+
+if [ os.name ] = NT
+{
+ local boost-dir = ;
+ for local R in snapshot cvs 1.33.0
+ {
+ boost-dir += [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Boost.org\\$(R)"
+ : "InstallRoot" ] ;
+ }
+ local quickbook-path = [ GLOB "$(boost-dir)\\bin" "\\Boost\\bin" : quickbook.exe ] ;
+ quickbook-path = $(quickbook-path[1]) ;
+
+ if $(quickbook-path)
+ {
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice:" using quickbook ":" $(quickbook-path) ;
+ }
+ using quickbook : $(quickbook-path) ;
+ }
+}
+else
+{
+ local quickbook-path = [ GLOB "/usr/local/bin" "/usr/bin" "/opt/bin" : quickbook ] ;
+ quickbook-path = $(quickbook-path[1]) ;
+
+ if $(quickbook-path)
+ {
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice:" using quickbook ":" $(quickbook-path) ;
+ }
+ using quickbook : $(quickbook-path) ;
+ }
+}
diff --git a/src/boost/tools/build/src/tools/quickbook.jam b/src/boost/tools/build/src/tools/quickbook.jam
new file mode 100644
index 000000000..9870e9e41
--- /dev/null
+++ b/src/boost/tools/build/src/tools/quickbook.jam
@@ -0,0 +1,363 @@
+#
+# Copyright (c) 2005 Joo Abecasis
+# Copyright (c) 2005 Vladimir Prus
+# Copyright (c) 2006 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)
+#
+
+# This toolset defines a generator to translate QuickBook to BoostBook. It can
+# be used to generate nice (!) user documentation in different formats
+# (pdf/html/...), from a single text file with simple markup.
+#
+# The toolset defines the QUICKBOOK type (file extension 'qbk') and
+# a QUICKBOOK to XML (BOOSTBOOK) generator.
+#
+#
+# ===========================================================================
+# Q & A
+# ===========================================================================
+#
+# If you don't know what this is all about, some Q & A will hopefully get you
+# up to speed with QuickBook and this toolset.
+#
+#
+# What is QuickBook ?
+#
+# 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.
+#
+#
+# Where can I get QuickBook ?
+#
+# Quickbook can be found in Boost's repository, under the tools/quickbook
+# directory it was added there on Jan 2005, some time after the release of
+# Boost v1.32.0 and has been an integral part of the Boost distribution
+# since v1.33.
+#
+# Here's a link to the SVN repository:
+# https://svn.boost.org/svn/boost/trunk/tools/quickbook
+#
+# And to QuickBook's QuickBook-generated docs:
+# http://www.boost.org/doc/libs/release/tools/quickbook/index.html
+#
+#
+# How do I use QuickBook and this toolset in my projects ?
+#
+# The minimal example is:
+#
+# using boostbook ;
+# import quickbook ;
+#
+# boostbook my_docs : my_docs_source.qbk ;
+#
+# where my_docs is a target name and my_docs_source.qbk is a QuickBook
+# file. The documentation format to be generated is determined by the
+# boostbook toolset. By default html documentation should be generated,
+# but you should check BoostBook's docs to be sure.
+#
+#
+# What do I need ?
+#
+# You should start by setting up the BoostBook toolset. Please refer to
+# boostbook.jam and the BoostBook documentation for information on how to
+# do this.
+#
+# A QuickBook executable is also needed. The toolset will generate this
+# executable if it can find the QuickBook sources. The following
+# directories will be searched:
+#
+# BOOST_ROOT/tools/quickbook/
+# BOOST_BUILD_PATH/../../quickbook/
+#
+# (BOOST_ROOT and BOOST_BUILD_PATH are environment variables)
+#
+# If QuickBook sources are not found the toolset will then try to use
+# the shell command 'quickbook'.
+#
+#
+# How do I provide a custom QuickBook executable ?
+#
+# You may put the following in your user-config.jam or site-config.jam:
+#
+# using quickbook : /path/to/quickbook ;
+#
+# or, if 'quickbook' can be found in your PATH,
+#
+# using quickbook : quickbook ;
+#
+#
+# For convenience three alternatives are tried to get a QuickBook executable:
+#
+# 1. If the user points us to the a QuickBook executable, that is used.
+#
+# 2. Otherwise, we search for the QuickBook sources and compile QuickBook
+# using the default toolset.
+#
+# 3. As a last resort, we rely on the shell for finding 'quickbook'.
+#
+
+import boostbook ;
+import "class" : new ;
+import feature ;
+import generators ;
+import toolset ;
+import type ;
+import scanner ;
+import project ;
+import targets ;
+import build-system ;
+import path ;
+import common ;
+import errors ;
+
+# The one and only QUICKBOOK type!
+type.register QUICKBOOK : qbk ;
+
+# <quickbook-binary> shell command to run QuickBook
+# <quickbook-binary-dependencies> targets to build QuickBook from sources.
+feature.feature <quickbook-binary> : : free ;
+feature.feature <quickbook-binary-dependencies> : : free dependency ;
+feature.feature <quickbook-define> : : free ;
+feature.feature <quickbook-indent> : : free ;
+feature.feature <quickbook-line-width> : : free ;
+feature.feature <quickbook-strict-mode> : : free ;
+
+
+# quickbook-binary-generator handles generation of the QuickBook executable, by
+# marking it as a dependency for QuickBook docs.
+#
+# If the user supplied the QuickBook command that will be used.
+#
+# Otherwise we search some sensible places for the QuickBook sources and compile
+# from scratch using the default toolset.
+#
+# As a last resort we rely on the shell to find 'quickbook'.
+#
+class quickbook-binary-generator : generator
+{
+ import modules path targets quickbook ;
+
+ rule run ( project name ? : property-set : sources * : multiple ? )
+ {
+ quickbook.freeze-config ;
+ # QuickBook invocation command and dependencies.
+ local quickbook-binary = [ modules.peek quickbook : .quickbook-binary ] ;
+ local quickbook-binary-dependencies ;
+
+ if ! $(quickbook-binary)
+ {
+ # If the QuickBook source directory was found, mark its main target
+ # as a dependency for the current project. Otherwise, try to find
+ # 'quickbook' in user's PATH
+ local quickbook-dir = [ modules.peek quickbook : .quickbook-dir ] ;
+ if $(quickbook-dir)
+ {
+ # Get the main-target in QuickBook directory.
+ local quickbook-main-target = [ targets.resolve-reference $(quickbook-dir) : $(project) ] ;
+
+ # The first element are actual targets, the second are
+ # properties found in target-id. We do not care about these
+ # since we have passed the id ourselves.
+ quickbook-main-target =
+ [ $(quickbook-main-target[1]).main-target quickbook ] ;
+
+ quickbook-binary-dependencies =
+ [ $(quickbook-main-target).generate [ $(property-set).propagated ] ] ;
+
+ # Ignore usage-requirements returned as first element.
+ quickbook-binary-dependencies = $(quickbook-binary-dependencies[2-]) ;
+
+ # Some toolsets generate extra targets (e.g. RSP). We must mark
+ # all targets as dependencies for the project, but we will only
+ # use the EXE target for quickbook-to-boostbook translation.
+ for local target in $(quickbook-binary-dependencies)
+ {
+ if [ $(target).type ] = EXE
+ {
+ quickbook-binary =
+ [ path.native
+ [ path.join
+ [ $(target).path ]
+ [ $(target).name ]
+ ]
+ ] ;
+ }
+ }
+ }
+ }
+
+ # Add $(quickbook-binary-dependencies) as a dependency of the current
+ # project and set it as the <quickbook-binary> feature for the
+ # quickbook-to-boostbook rule, below.
+ property-set = [ $(property-set).add-raw
+ <dependency>$(quickbook-binary-dependencies)
+ <quickbook-binary>$(quickbook-binary)
+ <quickbook-binary-dependencies>$(quickbook-binary-dependencies)
+ ] ;
+
+ return [ generator.run $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ }
+}
+
+
+# Define a scanner for tracking QBK include dependencies.
+#
+class qbk-scanner : common-scanner
+{
+ rule pattern ( )
+ {
+ return "\\[[ ]*include[ ]+([^]]+)\\]"
+ "\\[[ ]*include:[a-zA-Z0-9_]+[ ]+([^]]+)\\]"
+ "\\[[ ]*import[ ]+([^]]+)\\]" ;
+ }
+}
+
+
+scanner.register qbk-scanner : include ;
+
+type.set-scanner QUICKBOOK : qbk-scanner ;
+
+
+# Initialization of toolset.
+#
+# Parameters:
+# command ? -> path to QuickBook executable.
+#
+# When command is not supplied toolset will search for QuickBook directory and
+# compile the executable from source. If that fails we still search the path for
+# 'quickbook'.
+#
+rule init (
+ command ? # path to the QuickBook executable.
+ )
+{
+ if $(command)
+ {
+ if $(.config-frozen)
+ {
+ errors.user-error "quickbook: configuration cannot be changed after it has been used." ;
+ }
+ .command = $(command) ;
+ }
+}
+
+rule freeze-config ( )
+{
+ if ! $(.config-frozen)
+ {
+ .config-frozen = true ;
+
+ # QuickBook invocation command and dependencies.
+
+ .quickbook-binary = $(.command) ;
+
+ if $(.quickbook-binary)
+ {
+ # Use user-supplied command.
+ .quickbook-binary = [ common.get-invocation-command quickbook : quickbook : $(.quickbook-binary) ] ;
+ }
+ else
+ {
+ # Search for QuickBook sources in sensible places, like
+ # $(BOOST_ROOT)/tools/quickbook
+ # $(BOOST_BUILD_PATH)/../../quickbook
+
+ # And build quickbook executable from sources.
+
+ local boost-root = [ modules.peek : BOOST_ROOT ] ;
+ local boost-build-path = [ build-system.location ] ;
+
+ if $(boost-root)
+ {
+ .quickbook-dir += [ path.join $(boost-root) tools ] ;
+ }
+
+ if $(boost-build-path)
+ {
+ .quickbook-dir += $(boost-build-path)/../.. ;
+ }
+
+ .quickbook-dir = [ path.glob $(.quickbook-dir) : quickbook ] ;
+
+ # If the QuickBook source directory was found, mark its main target
+ # as a dependency for the current project. Otherwise, try to find
+ # 'quickbook' in user's PATH
+ if $(.quickbook-dir)
+ {
+ .quickbook-dir = [ path.make $(.quickbook-dir[1]) ] ;
+ }
+ else
+ {
+ ECHO "QuickBook warning: The path to the quickbook executable was" ;
+ ECHO " not provided. Additionally, couldn't find QuickBook" ;
+ ECHO " sources searching in" ;
+ ECHO " * BOOST_ROOT/tools/quickbook" ;
+ ECHO " * BOOST_BUILD_PATH/../../quickbook" ;
+ ECHO " Will now try to find a precompiled executable by searching" ;
+ ECHO " the PATH for 'quickbook'." ;
+ ECHO " To disable this warning in the future, or to completely" ;
+ ECHO " avoid compilation of quickbook, you can explicitly set the" ;
+ ECHO " path to a quickbook executable command in user-config.jam" ;
+ ECHO " or site-config.jam with the call" ;
+ ECHO " using quickbook : /path/to/quickbook ;" ;
+
+ # As a last resort, search for 'quickbook' command in path. Note
+ # that even if the 'quickbook' command is not found,
+ # get-invocation-command will still return 'quickbook' and might
+ # generate an error while generating the virtual-target.
+
+ .quickbook-binary = [ common.get-invocation-command quickbook : quickbook ] ;
+ }
+ }
+ }
+}
+
+
+generators.register [ new quickbook-binary-generator quickbook.quickbook-to-boostbook : QUICKBOOK : XML ] ;
+
+
+# <quickbook-binary> shell command to run QuickBook
+# <quickbook-binary-dependencies> targets to build QuickBook from sources.
+toolset.flags quickbook.quickbook-to-boostbook QB-COMMAND <quickbook-binary> ;
+toolset.flags quickbook.quickbook-to-boostbook QB-DEPENDENCIES <quickbook-binary-dependencies> ;
+toolset.flags quickbook.quickbook-to-boostbook INCLUDES <include> ;
+toolset.flags quickbook.quickbook-to-boostbook QB-DEFINES <quickbook-define> ;
+toolset.flags quickbook.quickbook-to-boostbook QB-INDENT <quickbook-indent> ;
+toolset.flags quickbook.quickbook-to-boostbook QB-LINE-WIDTH <quickbook-line-width> ;
+toolset.flags quickbook.quickbook-to-boostbook QB-OPTIONS <quickbook-strict-mode>on : --strict ;
+
+
+rule quickbook-to-boostbook ( target : source : properties * )
+{
+ # Signal dependency of quickbook sources on <quickbook-binary-dependencies>
+ # upon invocation of quickbook-to-boostbook.
+ DEPENDS $(target) : [ on $(target) return $(QB-DEPENDENCIES) ] ;
+}
+
+
+actions quickbook-to-boostbook
+{
+ "$(QB-COMMAND)" -I"$(INCLUDES)" -D"$(QB-DEFINES)" --indent="$(QB-INDENT)" --linewidth="$(QB-LINE-WIDTH)" $(QB-OPTIONS) --output-file="$(1)" "$(2)"
+}
+
+
+# Declare a main target to convert a quickbook source into a boostbook XML file.
+#
+rule to-boostbook ( target-name : sources * : requirements * : default-build * )
+{
+ local project = [ project.current ] ;
+
+ targets.main-target-alternative
+ [ new typed-target $(target-name) : $(project) : XML
+ : [ targets.main-target-sources $(sources) : $(target-name) ]
+ : [ targets.main-target-requirements $(requirements) : $(project) ]
+ : [ targets.main-target-default-build $(default-build) : $(project) ]
+ ] ;
+}
diff --git a/src/boost/tools/build/src/tools/rc.jam b/src/boost/tools/build/src/tools/rc.jam
new file mode 100644
index 000000000..d7534bc6f
--- /dev/null
+++ b/src/boost/tools/build/src/tools/rc.jam
@@ -0,0 +1,155 @@
+# Copyright (C) Andre Hentz 2003. 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.
+#
+# Copyright (c) 2006 Rene Rivera.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import generators ;
+import feature ;
+import scanner ;
+import toolset : flags ;
+import type ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+type.register RC : rc ;
+
+rule init ( )
+{
+}
+
+# Configures a new resource compilation command specific to a condition,
+# usually a toolset selection condition. The possible options are:
+#
+# * <rc-type>(rc|windres) - Indicates the type of options the command
+# accepts.
+#
+# Even though the arguments are all optional, only when a command, condition,
+# and at minimum the rc-type option are given will the command be configured.
+# This is so that callers don't have to check auto-configuration values before
+# calling this. And still get the functionality of build failures when the
+# resource compiler can not be found.
+#
+rule configure ( command ? : condition ? : options * )
+{
+ local rc-type = [ feature.get-values <rc-type> : $(options) ] ;
+
+ if $(command) && $(condition) && $(rc-type)
+ {
+ flags rc.compile.resource .RC $(condition) : $(command) ;
+ flags rc.compile.resource .RC_TYPE $(condition) : $(rc-type:L) ;
+ flags rc.compile.resource DEFINES <define> ;
+ flags rc.compile.resource INCLUDES <include> ;
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" using rc compiler "::" $(condition) "::" $(command) ;
+ }
+ }
+}
+
+rule compile.resource ( target : sources * : properties * )
+{
+ local rc-type = [ on $(target) return $(.RC_TYPE) ] ;
+ rc-type ?= null ;
+ compile.resource.$(rc-type) $(target) : $(sources[1]) ;
+}
+
+actions compile.resource.rc
+{
+ "$(.RC)" -l 0x409 "-U$(UNDEFS)" "-D$(DEFINES)" -I"$(>:D)" -I"$(<:D)" -I"$(INCLUDES)" -fo "$(<)" "$(>)"
+}
+
+actions compile.resource.windres
+{
+ "$(.RC)" "-U$(UNDEFS)" "-D$(DEFINES)" -I"$(>:D)" -I"$(<:D)" -I"$(INCLUDES)" -o "$(<)" -i "$(>)"
+}
+
+actions quietly compile.resource.null
+{
+ as /dev/null -o "$(<)"
+}
+
+# Since it is common practice to write
+# exe hello : hello.cpp hello.rc
+# we change the name of object created from RC file, to avoid conflict with
+# hello.cpp. The reason we generate OBJ and not RES, is that gcc does not seem
+# to like RES files, but works OK with OBJ (see
+# http://article.gmane.org/gmane.comp.lib.boost.build/5643).
+#
+# Using 'register-c-compiler' adds the build directory to INCLUDES
+generators.register-c-compiler rc.compile.resource : RC : OBJ(%_res) ;
+
+# Register scanner for resources
+class res-scanner : scanner
+{
+ import path ;
+ import regex ;
+ import scanner ;
+ import virtual-target ;
+
+ rule __init__ ( includes * )
+ {
+ scanner.__init__ ;
+ self.includes = $(includes) ;
+ }
+
+ rule pattern ( )
+ {
+ return "(([^ ]+[ ]+(BITMAP|CURSOR|FONT|ICON|MESSAGETABLE|RT_MANIFEST)[ ]+([^ \"]+|\"[^\"]+\"))|(#include[ ]*(<[^<]+>|\"[^\"]+\")))" ;
+ }
+
+ rule process ( target : matches * : binding )
+ {
+ local angle = [ regex.transform $(matches) : "#include[ ]*<([^<]+)>" ] ;
+ local quoted = [ regex.transform $(matches) : "#include[ ]*\"([^\"]+)\"" ] ;
+ local res = [ regex.transform $(matches) : "[^ ]+[ ]+(BITMAP|CURSOR|FONT|ICON|MESSAGETABLE|RT_MANIFEST)[ ]+(([^ \"]+)|\"([^\"]+)\")" : 3 4 ] ;
+
+ # Icons and other includes may be referenced as
+ #
+ # IDR_MAINFRAME ICON "res\\icon.ico"
+ #
+ # so we have to replace double backslashes with single ones.
+ res = [ regex.replace-list $(res) : "\\\\\\\\" : "/" ] ;
+
+ # CONSIDER: the new scoping rules seem to defeat "on target" variables.
+ local g = [ on $(target) return $(HDRGRIST) ] ;
+ local b = [ NORMALIZE_PATH $(binding:D) ] ;
+
+ # Attach binding of including file to included targets. When a target is
+ # directly created from a virtual target this extra information is
+ # unnecessary. But in other cases, it allows us to distinguish between
+ # two headers of the same name included from different places. We do not
+ # need this extra information for angle includes, since they should not
+ # depend on the including file (we can not get literal "." in the
+ # include path).
+ local g2 = $(g)"#"$(b) ;
+
+ angle = $(angle:G=$(g)) ;
+ quoted = $(quoted:G=$(g2)) ;
+ res = $(res:G=$(g2)) ;
+
+ local all = $(angle) $(quoted) $(res) ;
+
+ INCLUDES $(target) : $(all) ;
+ NOCARE $(all) ;
+ SEARCH on $(angle) = $(self.includes:G=) ;
+ SEARCH on $(quoted) $(res) = $(b) $(self.includes:G=) ;
+
+ # Just propagate the current scanner to includes, in hope that includes
+ # do not change scanners.
+ scanner.propagate $(__name__) : $(angle) $(quoted) : $(target) ;
+
+ ISFILE $(all) ;
+ }
+}
+
+scanner.register res-scanner : include ;
+type.set-scanner RC : res-scanner ;
diff --git a/src/boost/tools/build/src/tools/rc.py b/src/boost/tools/build/src/tools/rc.py
new file mode 100644
index 000000000..c7a02dbb6
--- /dev/null
+++ b/src/boost/tools/build/src/tools/rc.py
@@ -0,0 +1,197 @@
+# Status: being ported by Steven Watanabe
+# Base revision: 47077
+#
+# Copyright (C) Andre Hentz 2003. 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.
+#
+# Copyright (c) 2006 Rene Rivera.
+#
+# Copyright (c) 2008 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+##import type ;
+##import generators ;
+##import feature ;
+##import errors ;
+##import scanner ;
+##import toolset : flags ;
+
+import os.path
+import re
+
+import bjam
+
+from b2.build import type, toolset, generators, scanner, feature
+from b2.exceptions import AlreadyDefined
+from b2.tools import builtin
+from b2.util import regex
+from b2.build.toolset import flags
+from b2.manager import get_manager
+from b2.util import utility
+
+__debug = None
+
+def debug():
+ global __debug
+ if __debug is None:
+ __debug = "--debug-configuration" in bjam.variable("ARGV")
+ return __debug
+
+type.register('RC', ['rc'])
+
+def init():
+ pass
+
+def configure (command = None, condition = None, options = None):
+ """
+ Configures a new resource compilation command specific to a condition,
+ usually a toolset selection condition. The possible options are:
+
+ * <rc-type>(rc|windres) - Indicates the type of options the command
+ accepts.
+
+ Even though the arguments are all optional, only when a command, condition,
+ and at minimum the rc-type option are given will the command be configured.
+ This is so that callers don't have to check auto-configuration values
+ before calling this. And still get the functionality of build failures when
+ the resource compiler can't be found.
+ """
+ rc_type = feature.get_values('<rc-type>', options)
+ if rc_type:
+ assert(len(rc_type) == 1)
+ rc_type = rc_type[0]
+
+ if command and condition and rc_type:
+ flags('rc.compile.resource', '.RC', condition, command)
+ flags('rc.compile.resource', '.RC_TYPE', condition, [rc_type.lower()])
+ flags('rc.compile.resource', 'DEFINES', [], ['<define>'])
+ flags('rc.compile.resource', 'INCLUDES', [], ['<include>'])
+ if debug():
+ print 'notice: using rc compiler ::', condition, '::', command
+
+engine = get_manager().engine()
+
+class RCAction:
+ """Class representing bjam action defined from Python.
+ The function must register the action to execute."""
+
+ def __init__(self, action_name, function):
+ self.action_name = action_name
+ self.function = function
+
+ def __call__(self, targets, sources, property_set):
+ if self.function:
+ self.function(targets, sources, property_set)
+
+# FIXME: What is the proper way to dispatch actions?
+def rc_register_action(action_name, function = None):
+ global engine
+ if action_name in engine.actions:
+ raise AlreadyDefined("Bjam action %s is already defined" % action_name)
+ engine.actions[action_name] = RCAction(action_name, function)
+
+def rc_compile_resource(targets, sources, properties):
+ rc_type = bjam.call('get-target-variable', targets, '.RC_TYPE')
+ rc_type = rc_type[0] if rc_type else ''
+ global engine
+ engine.set_update_action('rc.compile.resource.' + rc_type, targets, sources, properties)
+
+rc_register_action('rc.compile.resource', rc_compile_resource)
+
+
+engine.register_action(
+ 'rc.compile.resource.rc',
+ '"$(.RC)" -l 0x409 "-U$(UNDEFS)" "-D$(DEFINES)" -I"$(>:D)" -I"$(<:D)" -I"$(INCLUDES)" -fo "$(<)" "$(>)"')
+
+engine.register_action(
+ 'rc.compile.resource.windres',
+ '"$(.RC)" "-U$(UNDEFS)" "-D$(DEFINES)" -I"$(>:D)" -I"$(<:D)" -I"$(INCLUDES)" -o "$(<)" -i "$(>)"')
+
+# FIXME: this was originally declared quietly
+engine.register_action(
+ 'compile.resource.null',
+ 'as /dev/null -o "$(<)"')
+
+# Since it's a common practice to write
+# exe hello : hello.cpp hello.rc
+# we change the name of object created from RC file, to
+# avoid conflict with hello.cpp.
+# The reason we generate OBJ and not RES, is that gcc does not
+# seem to like RES files, but works OK with OBJ.
+# See http://article.gmane.org/gmane.comp.lib.boost.build/5643/
+#
+# Using 'register-c-compiler' adds the build directory to INCLUDES
+# FIXME: switch to generators
+builtin.register_c_compiler('rc.compile.resource', ['RC'], ['OBJ(%_res)'], [])
+
+__angle_include_re = "#include[ ]*<([^<]+)>"
+
+# Register scanner for resources
+class ResScanner(scanner.Scanner):
+
+ def __init__(self, includes):
+ scanner.__init__ ;
+ self.includes = includes
+
+ def pattern(self):
+ return "(([^ ]+[ ]+(BITMAP|CURSOR|FONT|ICON|MESSAGETABLE|RT_MANIFEST)" +\
+ "[ ]+([^ \"]+|\"[^\"]+\"))|(#include[ ]*(<[^<]+>|\"[^\"]+\")))" ;
+
+ def process(self, target, matches, binding):
+ binding = binding[0]
+ angle = regex.transform(matches, "#include[ ]*<([^<]+)>")
+ quoted = regex.transform(matches, "#include[ ]*\"([^\"]+)\"")
+ res = regex.transform(matches,
+ "[^ ]+[ ]+(BITMAP|CURSOR|FONT|ICON|MESSAGETABLE|RT_MANIFEST)" +\
+ "[ ]+(([^ \"]+)|\"([^\"]+)\")", [3, 4])
+
+ # Icons and other includes may referenced as
+ #
+ # IDR_MAINFRAME ICON "res\\icon.ico"
+ #
+ # so we have to replace double backslashes to single ones.
+ res = [ re.sub(r'\\\\', '/', match) for match in res if match is not None ]
+
+ # CONSIDER: the new scoping rule seem to defeat "on target" variables.
+ g = bjam.call('get-target-variable', target, 'HDRGRIST')[0]
+ b = os.path.normpath(os.path.dirname(binding))
+
+ # Attach binding of including file to included targets.
+ # When target is directly created from virtual target
+ # this extra information is unnecessary. But in other
+ # cases, it allows to distinguish between two headers of the
+ # same name included from different places.
+ # We don't need this extra information for angle includes,
+ # since they should not depend on including file (we can't
+ # get literal "." in include path).
+ g2 = g + "#" + b
+
+ g = "<" + g + ">"
+ g2 = "<" + g2 + ">"
+ angle = [g + x for x in angle]
+ quoted = [g2 + x for x in quoted]
+ res = [g2 + x for x in res]
+
+ all = angle + quoted
+
+ bjam.call('mark-included', target, all)
+
+ engine = get_manager().engine()
+
+ engine.add_dependency(target, res)
+ bjam.call('NOCARE', all + res)
+ engine.set_target_variable(angle, 'SEARCH', [utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(quoted, 'SEARCH', [b + utility.get_value(inc) for inc in self.includes])
+ engine.set_target_variable(res, 'SEARCH', [b + utility.get_value(inc) for inc in self.includes])
+
+ # Just propagate current scanner to includes, in a hope
+ # that includes do not change scanners.
+ get_manager().scanners().propagate(self, angle + quoted)
+
+scanner.register(ResScanner, 'include')
+type.set_scanner('RC', ResScanner)
diff --git a/src/boost/tools/build/src/tools/sass.jam b/src/boost/tools/build/src/tools/sass.jam
new file mode 100644
index 000000000..be56487ff
--- /dev/null
+++ b/src/boost/tools/build/src/tools/sass.jam
@@ -0,0 +1,193 @@
+#|
+Copyright 2017 Dmitry Arkhipov
+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 common ;
+import feature ;
+import generators ;
+import modules ;
+import sequence ;
+import toolset ;
+import "class" : new ;
+
+#| tag::doc[]
+
+= Sass
+
+This tool converts SASS and SCSS files into CSS. This tool explicitly supports
+both the version written in C (sassc) and the original Ruby implementation
+(scss) but other variants might also work. In addition to tool-specific
+features, described in this section, the tool recognizes features `<flags>`
+and `<include>`.
+
+|# # end::doc[]
+
+feature.feature sass : : implicit propagated symmetric ;
+
+#| tag::doc[]
+
+== Feature: `sass-style`
+
+Sets the output style. Available values are
+
+* `nested`: each property is put on its own line, rules are indented based on
+ how deeply they are nested;
+* `expanded`: each property is put on its own line, rules are not indented;
+* `compact`: each rule is put on a single line, nested rules occupy adjacent
+ lines, while groups of unrelated rules are separated by newlines;
+* `compressed`: takes minimum amount of space: all unnecessary whitespace is
+ removed, property values are compressed to have minimal representation.
+
+The feature is `optional` and is not `propagated` to dependent targets. If no
+style is specified, then, if property set contains property `<optimization>on`,
+`compressed` style is selected. Otherwise, `nested` style is selected.
+
+|# # end::doc[]
+
+feature.subfeature sass
+ : style
+ : nested expanded compact compressed
+ : optional
+ ;
+
+#| tag::doc[]
+
+== Feature: `sass-line-numbers`
+
+Enables emitting comments showing original line numbers for rules. This can be
+useful for debugging a stylesheet. Available values are `on` and `off`. The
+feature is `optional` and is not `propagated` to dependent targets. If no value
+for this feature is specified, then one is copied from the feature
+`debug-symbols`.
+
+|# # end::doc[]
+
+feature.subfeature sass : line-numbers : on off : optional ;
+
+#| tag::doc[]
+
+== Initialization
+
+To use the `sass` tool you need to declare it in a configuration file with the
+`using` rule. The initialization takes the following arguments:
+
+* `command`: the command, with any extra arguments, to execute.
+
+For example you could insert the following in your `user-config.jam`:
+
+```
+using sass : /usr/local/bin/psass -p2 ; # Perl libsass-based version
+```
+
+If no `command` is given, `sassc` is tried, after which `scss` is tried.
+
+|# # end::doc[]
+
+rule init ( command * )
+{
+ if ! $(.initialized)
+ {
+ # Setup only if we were called via "using .. ;"
+ .initialized = true ;
+
+ # Register generators
+ generators.register [ new sass-generator sass.convert : SASS : CSS ] ;
+ }
+
+ # Setting up command
+ if ! $(command)
+ {
+ # If none was specified by the user, first try sassc, then scss
+ SASS = [ common.find-tool sassc ] ;
+ SASS ?= [ common.find-tool scss ] ;
+ }
+ else
+ {
+ # Otherwise we attempt to resolve each component of the command to
+ # account for script interpreter wrappers.
+ SASS = [ sequence.transform maybe-find-tool : $(command) ] ;
+ }
+}
+
+class sass-generator : generator
+{
+ import property-set ;
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ local style = [ $(property-set).get <sass-style> ] ;
+ local line-numbers = [ $(property-set).get <sass-line-numbers> ] ;
+
+ # Only one source file is sensible; we accept only sass and scss files
+ if ( ! $(sources[2]) ) && ( [ $(sources[1]).type ] in SASS )
+ {
+ # If no output name was given, guess it from sources
+ if ! $(name)
+ {
+ name = [ generator.determine-output-name $(sources) ] ;
+ }
+
+ # If output style was not given, then it is determined by
+ # <optimization> feature
+ if ! $(style)
+ {
+ switch [ $(property-set).get <optimization> ]
+ {
+ case "off" : style = nested ;
+ case * : style = compressed ;
+ }
+ }
+
+ # If line-numbers feature wasn't specified, copy it from
+ # <debug-symbols>
+ line-numbers ?= [ $(property-set).get <debug-symbols> ] ;
+ }
+
+ # We build a reduced property set so that we are not toolset dependent.
+ local raw-set
+ = <sass-style>$(style)
+ <sass-line-numbers>$(line-numbers)
+ ;
+ raw-set +=
+ [ sequence.filter recognized-feature : [ $(property-set).raw ] ] ;
+ raw-set = [ feature.expand-composites $(raw-set) ] ;
+ raw-set += [ $(property-set).incidental ] ;
+ property-set = [ property-set.create $(raw-set) ] ;
+ return
+ [ generator.run $(project) $(name)
+ : $(property-set)
+ : $(sources)
+ ] ;
+ }
+
+ local rule recognized-feature ( feature )
+ {
+ local result ;
+ if $(feature:G) in <include> <flags>
+ {
+ result = true ;
+ }
+ return $(result) ;
+ }
+}
+
+_ = " " ;
+toolset.flags sass STYLE : <sass-style> ;
+toolset.flags sass LINE_NUMBERS <sass-line-numbers>on : --line-numbers ;
+toolset.flags sass INCLUDES : <include> ;
+toolset.flags sass FLAGS : <flags> ;
+
+actions convert
+{
+ "$(SASS)" -t$(_)"$(STYLE)" $(LINE_NUMBERS) -I$(_)"$(INCLUDES)" $(FLAGS) "$(>)" $(_)"$(<)"
+}
+
+local rule maybe-find-tool ( command )
+{
+ local tool = [ common.find-tool $(command) ] ;
+ tool ?= $(command) ;
+ return $(tool) ;
+}
diff --git a/src/boost/tools/build/src/tools/saxonhe.jam b/src/boost/tools/build/src/tools/saxonhe.jam
new file mode 100644
index 000000000..01213193b
--- /dev/null
+++ b/src/boost/tools/build/src/tools/saxonhe.jam
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2018 Damian Jarek (damian dot jarek93 at gmail dot com)
+# Copyright (c) 2019 Richard Hodges (hodges dot r at gmail dot 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)
+#
+
+import common ;
+import os ;
+
+rule init ( saxonhe_jar ? : java_exe ? )
+{
+ .java_exe = [ common.get-invocation-command saxonhe : java : $(java_exe) : ] ;
+ if $(saxonhe_jar)
+ {
+ .saxonhe_jar = $(saxonhe_jar) ;
+ }
+ else
+ {
+ local jar = [ GLOB "/usr/share/java/saxon/" "/usr/share/java/" : Saxon-HE.jar ] ;
+ .saxonhe_jar = $(jar[1]) ;
+ }
+}
+
+#
+# execute the saxonhe jar file passing files as inputs and outputs.
+#
+actions saxonhe
+{
+ "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
+}
+
+#
+# execute the saxonhe jar file passing directories as inputs and outputs.
+# saxonhe requires that the output directory already exists
+#
+if [ os.on-windows ]
+{
+ actions saxonhe_dir
+ {
+ if not exist "$(<)\\" mkdir "$(<)"
+ "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
+ }
+}
+else
+{
+ actions saxonhe_dir
+ {
+ mkdir -p "$(<)"
+ "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
+ }
+}
diff --git a/src/boost/tools/build/src/tools/stage.jam b/src/boost/tools/build/src/tools/stage.jam
new file mode 100644
index 000000000..a20482f6d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/stage.jam
@@ -0,0 +1,519 @@
+# 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_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# This module defines the 'install' rule, used to copy a set of targets to a
+# single location.
+
+import "class" : new ;
+import feature ;
+import generators ;
+import path ;
+import project ;
+import targets ;
+import type ;
+import types/register ;
+import virtual-target ;
+
+
+feature.feature <install-dependencies> : off on : incidental ;
+feature.feature <install-type> : : free incidental ;
+feature.feature <install-source-root> : : free path ;
+feature.feature <so-version> : : free incidental ;
+
+# If 'on', version symlinks for shared libraries will not be created. Affects
+# Unix builds only.
+feature.feature <install-no-version-symlinks> : on : optional incidental ;
+
+
+class install-target-class : basic-target
+{
+ import "class" : new ;
+ import feature ;
+ import generators ;
+ import path ;
+ import project ;
+ import property ;
+ import property-set ;
+ import stage ;
+ import type ;
+
+ rule __init__ ( name-and-dir : project : sources * : requirements * :
+ default-build * : usage-requirements * )
+ {
+ # The usage-requirements specified here are ignored but are taken as a
+ # parameter to have this metatarget class have the same standard
+ # instantiation interface as all the other Boost Build metatarget
+ # classes.
+ basic-target.__init__ $(name-and-dir) : $(project) : $(sources) :
+ $(requirements) : $(default-build) ;
+ }
+
+ # If <location> is not set, sets it based on the project data.
+ #
+ rule update-location ( property-set )
+ {
+ local loc = [ $(property-set).get <location> ] ;
+ if ! $(loc)
+ {
+ loc = [ path.root $(self.name) [ $(self.project).get location ] ] ;
+ property-set = [ $(property-set).add-raw $(loc:G=<location>) ] ;
+ }
+
+ return $(property-set) ;
+ }
+
+ # Takes a target that is installed and a property set which is used when
+ # installing.
+ #
+ rule adjust-properties ( target : build-property-set )
+ {
+ local ps-raw ;
+ local a = [ $(target).action ] ;
+ if $(a)
+ {
+ local ps = [ $(a).properties ] ;
+ ps-raw = [ $(ps).raw ] ;
+
+ # Unless <hardcode-dll-paths>true is in properties, which can happen
+ # only if the user has explicitly requested it, nuke all <dll-path>
+ # properties.
+ if [ $(build-property-set).get <hardcode-dll-paths> ] != true
+ {
+ ps-raw = [ property.change $(ps-raw) : <dll-path> ] ;
+ }
+
+ # If any <dll-path> properties were specified for installing, add
+ # them.
+ local l = [ $(build-property-set).get <dll-path> ] ;
+ ps-raw += $(l:G=<dll-path>) ;
+
+ # Also copy <linkflags> feature from current build set, to be used
+ # for relinking.
+ local l = [ $(build-property-set).get <linkflags> ] ;
+ ps-raw += $(l:G=<linkflags>) ;
+
+ # Remove the <tag> feature on original targets.
+ ps-raw = [ property.change $(ps-raw) : <tag> ] ;
+
+ # And <location>. If stage target has another stage target in
+ # sources, then we shall get virtual targets with the <location>
+ # property set.
+ ps-raw = [ property.change $(ps-raw) : <location> ] ;
+ }
+
+ local d = [ $(build-property-set).get <dependency> ] ;
+ ps-raw += $(d:G=<dependency>) ;
+
+ local d = [ $(build-property-set).get <location> ] ;
+ ps-raw += $(d:G=<location>) ;
+
+ local ns = [ $(build-property-set).get <install-no-version-symlinks> ] ;
+ ps-raw += $(ns:G=<install-no-version-symlinks>) ;
+
+ local d = [ $(build-property-set).get <install-source-root> ] ;
+ # Make the path absolute: we shall use it to compute relative paths and
+ # making the path absolute will help.
+ if $(d)
+ {
+ d = [ path.root $(d) [ path.pwd ] ] ;
+ ps-raw += $(d:G=<install-source-root>) ;
+ }
+
+ if $(ps-raw)
+ {
+ return [ property-set.create $(ps-raw) ] ;
+ }
+ else
+ {
+ return [ property-set.empty ] ;
+ }
+ }
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ source-targets = [ targets-to-stage $(source-targets) :
+ $(property-set) ] ;
+
+ property-set = [ update-location $(property-set) ] ;
+
+ local ename = [ $(property-set).get <name> ] ;
+
+ if $(ename) && $(source-targets[2])
+ {
+ import errors : error : $(__name__) : errors.error ;
+ errors.error When <name> property is used "in" 'install', only one
+ source is allowed. ;
+ }
+
+ local result ;
+ for local i in $(source-targets)
+ {
+ local staged-targets ;
+
+ local new-properties = [ adjust-properties $(i) :
+ $(property-set) ] ;
+
+ # See if something special should be done when staging this type. It
+ # is indicated by the presence of a special "INSTALLED_" type.
+ local t = [ $(i).type ] ;
+ if $(t) && [ type.registered INSTALLED_$(t) ]
+ {
+ if $(ename)
+ {
+ import errors : error : $(__name__) : errors.error ;
+ errors.error In "'install':" <name> property specified with
+ target that requires relinking. ;
+ }
+ else
+ {
+ local targets = [ generators.construct $(self.project)
+ $(name) : INSTALLED_$(t) : $(new-properties) : $(i) ] ;
+ staged-targets += $(targets[2-]) ;
+ }
+ }
+ else
+ {
+ staged-targets = [ stage.copy-file $(self.project) $(ename) :
+ $(i) : $(new-properties) ] ;
+ }
+
+ if ! $(staged-targets)
+ {
+ import errors : error : $(__name__) : errors.error ;
+ errors.error Unable to generate staged version of
+ [ $(source).str ] ;
+ }
+
+ for t in $(staged-targets)
+ {
+ result += [ virtual-target.register $(t) ] ;
+ }
+ }
+
+ return [ property-set.empty ] $(result) ;
+ }
+
+ # Given the list of source targets explicitly passed to 'stage', returns the
+ # list of targets which must be staged.
+ #
+ rule targets-to-stage ( source-targets * : property-set )
+ {
+ local result ;
+
+ # Traverse the dependencies, if needed.
+ if [ $(property-set).get <install-dependencies> ] = "on"
+ {
+ source-targets = [ collect-targets $(source-targets) ] ;
+ }
+
+ # Filter the target types, if needed.
+ local included-types = [ $(property-set).get <install-type> ] ;
+ for local r in $(source-targets)
+ {
+ local ty = [ $(r).type ] ;
+ if $(ty)
+ {
+ # Do not stage searched libs.
+ if $(ty) != SEARCHED_LIB
+ {
+ if $(included-types)
+ {
+ if [ include-type $(ty) : $(included-types) ]
+ {
+ result += $(r) ;
+ }
+ }
+ else
+ {
+ result += $(r) ;
+ }
+ }
+ }
+ else if ! $(included-types)
+ {
+ # Do not install typeless targets if there is an explicit list
+ # of allowed types.
+ result += $(r) ;
+ }
+ }
+
+ return $(result) ;
+ }
+
+ # CONSIDER: figure out why we can not use virtual-target.traverse here.
+ #
+ 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) != <use>
+ {
+ result2 += $(r:G=) ;
+ }
+ }
+ DELETE_MODULE $(result) ;
+ return [ sequence.unique $(result2) ] ;
+ }
+
+ # Returns true iff 'type' is subtype of some element of 'types-to-include'.
+ #
+ local rule include-type ( type : types-to-include * )
+ {
+ local found ;
+ while $(types-to-include) && ! $(found)
+ {
+ if [ type.is-subtype $(type) $(types-to-include[1]) ]
+ {
+ found = true ;
+ }
+ types-to-include = $(types-to-include[2-]) ;
+ }
+
+ return $(found) ;
+ }
+}
+
+
+# Creates a copy of target 'source'. The 'properties' object should have a
+# <location> property which specifies where the target must be placed.
+#
+rule copy-file ( project name ? : source : properties )
+{
+ name ?= [ $(source).name ] ;
+ local relative ;
+
+ local new-a = [ new non-scanning-action $(source) : common.copy :
+ $(properties) ] ;
+ local source-root = [ $(properties).get <install-source-root> ] ;
+ if $(source-root)
+ {
+ # Get the real path of the target. We probably need to strip relative
+ # path from the target name at construction.
+ local path = [ $(source).path ] ;
+ path = [ path.root $(name:D) $(path) ] ;
+ # Make the path absolute. Otherwise, it would be hard to compute the
+ # relative path. The 'source-root' is already absolute, see the
+ # 'adjust-properties' method above.
+ path = [ path.root $(path) [ path.pwd ] ] ;
+
+ relative = [ path.relative-to $(source-root) $(path) ] ;
+ }
+
+ # Note: Using $(name:D=$(relative)) might be faster here, but then we would
+ # need to explicitly check that relative is not ".", otherwise we might get
+ # paths like '<prefix>/boost/.', try to create it and mkdir would obviously
+ # fail.
+ name = [ path.join $(relative) $(name:D=) ] ;
+
+ return [ new file-target $(name) exact : [ $(source).type ] : $(project) :
+ $(new-a) ] ;
+}
+
+
+rule symlink ( name : project : source : properties )
+{
+ local a = [ new action $(source) : symlink.ln : $(properties) ] ;
+ local t = [ new file-target $(name) exact : [ $(source).type ] : $(project)
+ : $(a) ] ;
+ return [ virtual-target.register $(t) ] ;
+}
+
+
+rule relink-file ( project : source : property-set )
+{
+ local action = [ $(source).action ] ;
+ local cloned-action = [ virtual-target.clone-action $(action) : $(project) :
+ "" : $(property-set) ] ;
+ return [ $(cloned-action).targets ] ;
+}
+
+
+# Declare installed version of the EXE type. Generator for this type will cause
+# relinking to the new location.
+type.register INSTALLED_EXE : : EXE ;
+
+
+class installed-exe-generator : generator
+{
+ import type ;
+ import property-set ;
+ import modules ;
+ import stage ;
+
+ rule __init__ ( )
+ {
+ generator.__init__ install-exe : EXE : INSTALLED_EXE ;
+ }
+
+ rule run ( project name ? : property-set : source : multiple ? )
+ {
+ local stage-rule = stage.copy-file ;
+
+ if ! [ $(property-set).get <os> ] in NT CYGWIN &&
+ ! [ $(property-set).get <target-os> ] in windows cygwin
+ {
+ # If dll-path properties have been changed for the stage target,
+ # relink instead of copying.
+ local a = [ $(source).action ] ;
+ local p = [ $(a).properties ] ;
+ local original = [ $(p).get <dll-path> ] ;
+ local current = [ $(property-set).get <dll-path> ] ;
+
+ if $(current) != $(original)
+ {
+ stage-rule = stage.relink-file ;
+ }
+ }
+
+ return [ $(stage-rule) $(project) : $(source) : $(property-set) ] ;
+ }
+}
+
+
+generators.register [ new installed-exe-generator ] ;
+
+
+# Installing a shared link on Unix might cause a creation of versioned symbolic
+# links.
+type.register INSTALLED_SHARED_LIB : : SHARED_LIB ;
+
+
+class installed-shared-lib-generator : generator
+{
+ import type ;
+ import property-set ;
+ import modules ;
+ import stage ;
+
+ rule __init__ ( )
+ {
+ generator.__init__ install-shared-lib : SHARED_LIB :
+ INSTALLED_SHARED_LIB ;
+ }
+
+ rule run ( project name ? : property-set : source : multiple ? )
+ {
+ if [ $(property-set).get <os> ] in NT CYGWIN ||
+ [ $(property-set).get <target-os> ] in windows cygwin
+ {
+ local copied = [ stage.copy-file $(project) : $(source) :
+ $(property-set) ] ;
+ return [ virtual-target.register $(copied) ] ;
+ }
+ else
+ {
+ local a = [ $(source).action ] ;
+ local copied ;
+ if ! $(a)
+ {
+ # Non-derived file, just copy.
+ copied = [ stage.copy-file $(project) : $(source) :
+ $(property-set) ] ;
+ }
+ else
+ {
+ local cp = [ $(a).properties ] ;
+ local current-dll-path = [ $(cp).get <dll-path> ] ;
+ local new-dll-path = [ $(property-set).get <dll-path> ] ;
+
+ if $(current-dll-path) != $(new-dll-path)
+ {
+ # Rpath changed, need to relink.
+ copied = [ stage.relink-file $(project) : $(source) :
+ $(property-set) ] ;
+ }
+ else
+ {
+ copied = [ stage.copy-file $(project) : $(source) :
+ $(property-set) ] ;
+ }
+ }
+
+ copied = [ virtual-target.register $(copied) ] ;
+
+ local result = $(copied) ;
+ # If the name is in the form NNN.XXX.YYY.ZZZ, where all 'X', 'Y' and
+ # 'Z' are numbers, we need to create NNN.XXX and NNN.XXX.YYY
+ # symbolic links.
+ local m = [ MATCH
+ "(.*)\\.([0123456789]+)\\.([0123456789]+)\\.([0123456789]+)$" :
+ [ $(copied).name ] ] ;
+ if $(m)
+ {
+ # Symlink without version at all is used to make
+ # -lsome_library work.
+ result += [ stage.symlink $(m[1]) : $(project) : $(copied) :
+ $(property-set) ] ;
+
+ # Symlinks of some libfoo.N and libfoo.N.M are used so that
+ # library can found at runtime, if libfoo.N.M.X has soname of
+ # libfoo.N. That happens when the library makes some binary
+ # compatibility guarantees. If not, it is possible to skip those
+ # symlinks.
+ local suppress = [ $(property-set).get
+ <install-no-version-symlinks> ] ;
+
+ if $(suppress) != "on"
+ {
+ result += [ stage.symlink $(m[1]).$(m[2]) : $(project) :
+ $(copied) : $(property-set) ] ;
+ result += [ stage.symlink $(m[1]).$(m[2]).$(m[3]) :
+ $(project) : $(copied) : $(property-set) ] ;
+ }
+ }
+
+ return $(result) ;
+ }
+ }
+}
+
+generators.register [ new installed-shared-lib-generator ] ;
+
+
+# Main target rule for 'install'.
+#
+rule install ( name : sources * : requirements * : default-build * )
+{
+ local project = [ project.current ] ;
+
+ # Unless the user has explicitly asked us to hardcode dll paths, add
+ # <hardcode-dll-paths>false in requirements, to override default value.
+ if ! <hardcode-dll-paths>true in $(requirements)
+ {
+ requirements += <hardcode-dll-paths>false ;
+ }
+
+ if <tag> in $(requirements:G)
+ {
+ import errors ;
+ errors.user-error The <tag> property is not allowed for the 'install'
+ rule. ;
+ }
+
+ targets.create-metatarget install-target-class : $(project) : $(name) :
+ $(sources) : $(requirements) : $(default-build) ;
+}
+
+
+IMPORT $(__name__) : install : : install ;
+IMPORT $(__name__) : install : : stage ;
diff --git a/src/boost/tools/build/src/tools/stage.py b/src/boost/tools/build/src/tools/stage.py
new file mode 100644
index 000000000..2a15dd18a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/stage.py
@@ -0,0 +1,350 @@
+# Status: ported.
+# Base revision 64444.
+#
+# Copyright 2003 Dave Abrahams
+# Copyright 2005, 2006 Rene Rivera
+# Copyright 2002, 2003, 2004, 2005, 2006, 2010 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 module defines the 'install' rule, used to copy a set of targets to a
+# single location.
+
+import b2.build.feature as feature
+import b2.build.targets as targets
+import b2.build.property as property
+import b2.build.property_set as property_set
+import b2.build.generators as generators
+import b2.build.virtual_target as virtual_target
+
+from b2.manager import get_manager
+from b2.util.sequence import unique
+from b2.util import bjam_signature
+
+import b2.build.type
+
+import os.path
+import re
+import types
+
+feature.feature('install-dependencies', ['off', 'on'], ['incidental'])
+feature.feature('install-type', [], ['free', 'incidental'])
+feature.feature('install-source-root', [], ['free', 'path'])
+feature.feature('so-version', [], ['free', 'incidental'])
+
+# If 'on', version symlinks for shared libraries will not be created. Affects
+# Unix builds only.
+feature.feature('install-no-version-symlinks', ['on'], ['optional', 'incidental'])
+
+class InstallTargetClass(targets.BasicTarget):
+
+ def update_location(self, ps):
+ """If <location> is not set, sets it based on the project data."""
+
+ loc = ps.get('location')
+ if not loc:
+ loc = os.path.join(self.project().get('location'), self.name())
+ ps = ps.add_raw(["<location>" + loc])
+
+ return ps
+
+ def adjust_properties(self, target, build_ps):
+ a = target.action()
+ properties = []
+ if a:
+ ps = a.properties()
+ properties = ps.all()
+
+ # Unless <hardcode-dll-paths>true is in properties, which can happen
+ # only if the user has explicitly requested it, nuke all <dll-path>
+ # properties.
+
+ if build_ps.get('hardcode-dll-paths') != ['true']:
+ properties = [p for p in properties if p.feature.name != 'dll-path']
+
+ # If any <dll-path> properties were specified for installing, add
+ # them.
+ properties.extend(build_ps.get_properties('dll-path'))
+
+ # Also copy <linkflags> feature from current build set, to be used
+ # for relinking.
+ properties.extend(build_ps.get_properties('linkflags'))
+
+ # Remove the <tag> feature on original targets.
+ # And <location>. If stage target has another stage target in
+ # sources, then we shall get virtual targets with the <location>
+ # property set.
+ properties = [p for p in properties
+ if not p.feature.name in ['tag', 'location']]
+
+ properties.extend(build_ps.get_properties('dependency'))
+
+ properties.extend(build_ps.get_properties('location'))
+
+
+ properties.extend(build_ps.get_properties('install-no-version-symlinks'))
+
+ d = build_ps.get_properties('install-source-root')
+
+ # Make the path absolute: we shall use it to compute relative paths and
+ # making the path absolute will help.
+ if d:
+ p = d[0]
+ properties.append(property.Property(p.feature, os.path.abspath(p.value)))
+
+ return property_set.create(properties)
+
+
+ def construct(self, name, source_targets, ps):
+
+ source_targets = self.targets_to_stage(source_targets, ps)
+ ps = self.update_location(ps)
+
+ ename = ps.get('name')
+ if ename:
+ ename = ename[0]
+ if ename and len(source_targets) > 1:
+ get_manager().errors()("When <name> property is used in 'install', only one source is allowed")
+
+ result = []
+
+ for i in source_targets:
+
+ staged_targets = []
+ new_ps = self.adjust_properties(i, ps)
+
+ # See if something special should be done when staging this type. It
+ # is indicated by the presence of a special "INSTALLED_" type.
+ t = i.type()
+ if t and b2.build.type.registered("INSTALLED_" + t):
+
+ if ename:
+ get_manager().errors()("In 'install': <name> property specified with target that requires relinking.")
+ else:
+ (r, targets) = generators.construct(self.project(), name, "INSTALLED_" + t,
+ new_ps, [i])
+ assert isinstance(r, property_set.PropertySet)
+ staged_targets.extend(targets)
+
+ else:
+ staged_targets.append(copy_file(self.project(), ename, i, new_ps))
+
+ if not staged_targets:
+ get_manager().errors()("Unable to generate staged version of " + i)
+
+ result.extend(get_manager().virtual_targets().register(t) for t in staged_targets)
+
+ return (property_set.empty(), result)
+
+ def targets_to_stage(self, source_targets, ps):
+ """Given the list of source targets explicitly passed to 'stage', returns the
+ list of targets which must be staged."""
+
+ result = []
+
+ # Traverse the dependencies, if needed.
+ if ps.get('install-dependencies') == ['on']:
+ source_targets = self.collect_targets(source_targets)
+
+ # Filter the target types, if needed.
+ included_types = ps.get('install-type')
+ for r in source_targets:
+ ty = r.type()
+ if ty:
+ # Do not stage searched libs.
+ if ty != "SEARCHED_LIB":
+ if included_types:
+ if self.include_type(ty, included_types):
+ result.append(r)
+ else:
+ result.append(r)
+ elif not included_types:
+ # Don't install typeless target if there is an explicit list of
+ # allowed types.
+ result.append(r)
+
+ return result
+
+ # CONSIDER: figure out why we can not use virtual-target.traverse here.
+ #
+ def collect_targets(self, targets):
+
+ s = [t.creating_subvariant() for t in targets]
+ s = unique(filter(lambda l: l != None,s))
+
+ result = set(targets)
+ for i in s:
+ i.all_referenced_targets(result)
+
+ result2 = []
+ for r in result:
+ if isinstance(r, property.Property):
+
+ if r.feature.name != 'use':
+ result2.append(r.value)
+ else:
+ result2.append(r)
+ result2 = unique(result2)
+ return result2
+
+ # Returns true iff 'type' is subtype of some element of 'types-to-include'.
+ #
+ def include_type(self, type, types_to_include):
+ return any(b2.build.type.is_subtype(type, ti) for ti in types_to_include)
+
+# Creates a copy of target 'source'. The 'properties' object should have a
+# <location> property which specifies where the target must be placed.
+#
+def copy_file(project, name, source, ps):
+
+ if not name:
+ name = source.name()
+
+ relative = ""
+
+ new_a = virtual_target.NonScanningAction([source], "common.copy", ps)
+ source_root = ps.get('install-source-root')
+ if source_root:
+ source_root = source_root[0]
+ # Get the real path of the target. We probably need to strip relative
+ # path from the target name at construction.
+ path = os.path.join(source.path(), os.path.dirname(name))
+ # Make the path absolute. Otherwise, it would be hard to compute the
+ # relative path. The 'source-root' is already absolute, see the
+ # 'adjust-properties' method above.
+ path = os.path.abspath(path)
+
+ relative = os.path.relpath(path, source_root)
+
+ name = os.path.join(relative, os.path.basename(name))
+ return virtual_target.FileTarget(name, source.type(), project, new_a, exact=True)
+
+def symlink(name, project, source, ps):
+ a = virtual_target.Action([source], "symlink.ln", ps)
+ return virtual_target.FileTarget(name, source.type(), project, a, exact=True)
+
+def relink_file(project, source, ps):
+ action = source[0].action()
+ cloned_action = virtual_target.clone_action(action, project, "", ps)
+ targets = cloned_action.targets()
+ # We relink only on Unix, where exe or shared lib is always a single file.
+ assert len(targets) == 1
+ return targets[0]
+
+
+# Declare installed version of the EXE type. Generator for this type will cause
+# relinking to the new location.
+b2.build.type.register('INSTALLED_EXE', [], 'EXE')
+
+class InstalledExeGenerator(generators.Generator):
+
+ def __init__(self):
+ generators.Generator.__init__(self, "install-exe", False, ['EXE'], ['INSTALLED_EXE'])
+
+ def run(self, project, name, ps, source):
+
+ need_relink = False;
+
+ if ps.get('os') in ['NT', 'CYGWIN'] or ps.get('target-os') in ['windows', 'cygwin']:
+ # Never relink
+ pass
+ else:
+ # See if the dll-path properties are not changed during
+ # install. If so, copy, don't relink.
+ need_relink = source[0].action() and ps.get('dll-path') != source[0].action().properties().get('dll-path')
+
+ if need_relink:
+ return [relink_file(project, source, ps)]
+ else:
+ return [copy_file(project, None, source[0], ps)]
+
+generators.register(InstalledExeGenerator())
+
+
+# Installing a shared link on Unix might cause a creation of versioned symbolic
+# links.
+b2.build.type.register('INSTALLED_SHARED_LIB', [], 'SHARED_LIB')
+
+class InstalledSharedLibGenerator(generators.Generator):
+
+ def __init__(self):
+ generators.Generator.__init__(self, 'install-shared-lib', False, ['SHARED_LIB'], ['INSTALLED_SHARED_LIB'])
+
+ def run(self, project, name, ps, source):
+
+ source = source[0]
+ if ps.get('os') in ['NT', 'CYGWIN'] or ps.get('target-os') in ['windows', 'cygwin']:
+ copied = copy_file(project, None, source, ps)
+ return [get_manager().virtual_targets().register(copied)]
+ else:
+ a = source.action()
+ if not a:
+ # Non-derived file, just copy.
+ copied = copy_file(project, None, source, ps)
+ else:
+
+ need_relink = ps.get('dll-path') != source.action().properties().get('dll-path')
+
+ if need_relink:
+ # Rpath changed, need to relink.
+ copied = relink_file(project, source, ps)
+ else:
+ copied = copy_file(project, None, source, ps)
+
+ result = [get_manager().virtual_targets().register(copied)]
+ # If the name is in the form NNN.XXX.YYY.ZZZ, where all 'X', 'Y' and
+ # 'Z' are numbers, we need to create NNN.XXX and NNN.XXX.YYY
+ # symbolic links.
+ m = re.match("(.*)\\.([0123456789]+)\\.([0123456789]+)\\.([0123456789]+)$",
+ copied.name());
+ if m:
+ # Symlink without version at all is used to make
+ # -lsome_library work.
+ result.append(symlink(m.group(1), project, copied, ps))
+
+ # Symlinks of some libfoo.N and libfoo.N.M are used so that
+ # library can found at runtime, if libfoo.N.M.X has soname of
+ # libfoo.N. That happens when the library makes some binary
+ # compatibility guarantees. If not, it is possible to skip those
+ # symlinks.
+ if ps.get('install-no-version-symlinks') != ['on']:
+
+ result.append(symlink(m.group(1) + '.' + m.group(2), project, copied, ps))
+ result.append(symlink(m.group(1) + '.' + m.group(2) + '.' + m.group(3),
+ project, copied, ps))
+
+ return result
+
+generators.register(InstalledSharedLibGenerator())
+
+
+# Main target rule for 'install'.
+#
+@bjam_signature((["name"], ["sources", "*"], ["requirements", "*"],
+ ["default_build", "*"], ["usage_requirements", "*"]))
+def install(name, sources, requirements=[], default_build=[], usage_requirements=[]):
+
+ requirements = requirements[:]
+ # Unless the user has explicitly asked us to hardcode dll paths, add
+ # <hardcode-dll-paths>false in requirements, to override default value.
+ if not '<hardcode-dll-paths>true' in requirements:
+ requirements.append('<hardcode-dll-paths>false')
+
+ if any(r.startswith('<tag>') for r in requirements):
+ get_manager().errors()("The <tag> property is not allowed for the 'install' rule")
+
+ from b2.manager import get_manager
+ t = get_manager().targets()
+
+ project = get_manager().projects().current()
+
+ return t.main_target_alternative(
+ InstallTargetClass(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)))
+
+get_manager().projects().add_rule("install", install)
+get_manager().projects().add_rule("stage", install)
+
diff --git a/src/boost/tools/build/src/tools/stlport.jam b/src/boost/tools/build/src/tools/stlport.jam
new file mode 100644
index 000000000..4a08c8c9b
--- /dev/null
+++ b/src/boost/tools/build/src/tools/stlport.jam
@@ -0,0 +1,312 @@
+# Copyright Gennadiy Rozental
+# Copyright 2006 Rene Rivera
+# Copyright 2003, 2004, 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)
+
+# The STLPort is usable by means of 'stdlib' feature. When
+# stdlib=stlport is specified, default version of STLPort will be used,
+# while stdlib=stlport-4.5 will use specific version.
+# The subfeature value 'hostios' means to use host compiler's iostreams.
+#
+# The specific version of stlport is selected by features:
+# The <runtime-link> feature selects between static and shared library
+# The <runtime-debugging>on selects STLPort with debug symbols
+# and stl debugging.
+# There's no way to use STLPort with debug symbols but without
+# stl debugging.
+
+# TODO: must implement selection of different STLPort installations based
+# on used toolset.
+# Also, finish various flags:
+#
+# This is copied from V1 toolset, "+" means "implemented"
+#+flags $(CURR_TOOLSET) DEFINES <stlport-iostream>off : _STLP_NO_OWN_IOSTREAMS=1 _STLP_HAS_NO_NEW_IOSTREAMS=1 ;
+#+flags $(CURR_TOOLSET) DEFINES <stlport-extensions>off : _STLP_NO_EXTENSIONS=1 ;
+# flags $(CURR_TOOLSET) DEFINES <stlport-anachronisms>off : _STLP_NO_ANACHRONISMS=1 ;
+# flags $(CURR_TOOLSET) DEFINES <stlport-cstd-namespace>global : _STLP_VENDOR_GLOBAL_CSTD=1 ;
+# flags $(CURR_TOOLSET) DEFINES <exception-handling>off : _STLP_NO_EXCEPTIONS=1 ;
+# flags $(CURR_TOOLSET) DEFINES <stlport-debug-alloc>on : _STLP_DEBUG_ALLOC=1 ;
+#+flags $(CURR_TOOLSET) DEFINES <runtime-build>debug : _STLP_DEBUG=1 _STLP_DEBUG_UNINITIALIZED=1 ;
+#+flags $(CURR_TOOLSET) DEFINES <runtime-link>dynamic : _STLP_USE_DYNAMIC_LIB=1 ;
+
+
+import feature : feature subfeature ;
+import project ;
+import "class" : new ;
+import targets ;
+import property-set ;
+import common ;
+import type ;
+
+# Make this module into a project.
+project.initialize $(__name__) ;
+project stlport ;
+
+# The problem: how to request to use host compiler's iostreams?
+#
+# Solution 1: Global 'stlport-iostream' feature.
+# That's ugly. Subfeature make more sense for stlport-specific thing.
+# Solution 2: Use subfeature with two values, one of which ("use STLPort iostream")
+# is default.
+# The problem is that such subfeature will appear in target paths, and that's ugly
+# Solution 3: Use optional subfeature with only one value.
+
+feature.extend stdlib : stlport ;
+feature.compose <stdlib>stlport : <library>/stlport//stlport ;
+
+# STLport iostreams or native iostreams
+subfeature stdlib stlport : iostream : hostios : optional propagated ;
+
+# STLport extensions
+subfeature stdlib stlport : extensions : noext : optional propagated ;
+
+# STLport anachronisms -- NOT YET SUPPORTED
+# subfeature stdlib stlport : anachronisms : on off ;
+
+# STLport debug allocation -- NOT YET SUPPORTED
+#subfeature stdlib stlport : debug-alloc : off on ;
+
+# Declare a special target class to handle the creation of search-lib-target
+# instances for STLport. We need a special class, because otherwise we'll have
+# - declare prebuilt targets for all possible toolsets. And by the time 'init'
+# is called we don't even know the list of toolsets that are registered
+# - when host iostreams are used, we really should produce nothing. It would
+# be hard/impossible to achieve this using prebuilt targets.
+
+class stlport-target-class : basic-target
+{
+ import feature project type errors generators ;
+ import set : difference ;
+
+ rule __init__ ( project : headers ? : libraries * : version ? )
+ {
+ basic-target.__init__ stlport : $(project) ;
+ self.headers = $(headers) ;
+ self.libraries = $(libraries) ;
+ self.version = $(version) ;
+ self.version.5 = [ MATCH "^(5[.][0123456789]+).*" : $(version) ] ;
+
+ local requirements ;
+ requirements += <stdlib-stlport:version>$(self.version) ;
+ requirements += <relevant>runtime-debugging ;
+ requirements += <relevant>toolset ;
+ requirements += <relevant>runtime-link ;
+ self.requirements = [ property-set.create $(requirements) ] ;
+ }
+
+ rule generate ( property-set )
+ {
+ # Since this target is built with <stdlib>stlport, it will also
+ # have <library>/stlport//stlport in requirements, which will
+ # cause a loop in main target references. Remove that property
+ # manually.
+
+ property-set = [ property-set.create
+ [ difference
+ [ $(property-set).raw ] :
+ <library>/stlport//stlport
+ <stdlib>stlport
+ ]
+ ] ;
+ return [ basic-target.generate $(property-set) ] ;
+ }
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ # Deduce the name of stlport library, based on toolset and
+ # debug setting.
+ local raw = [ $(property-set).raw ] ;
+ local hostios = [ feature.get-values <stdlib-stlport:iostream> : $(raw) ] ;
+ local toolset = [ feature.get-values <toolset> : $(raw) ] ;
+
+ if $(self.version.5)
+ {
+ # Version 5.x
+
+ # STLport host IO streams no longer supported. So we always
+ # need libraries.
+
+ # name: stlport(stl)?[dg]?(_static)?.M.R
+ local name = stlport ;
+ if [ feature.get-values <runtime-debugging> : $(raw) ] = "on"
+ {
+ name += stl ;
+ switch $(toolset)
+ {
+ case gcc* : name += g ;
+ case darwin* : name += g ;
+ case * : name += d ;
+ }
+ }
+
+ if [ feature.get-values <runtime-link> : $(raw) ] = "static"
+ {
+ name += _static ;
+ }
+
+ # Starting with version 5.2.0, the STLport static libraries no
+ # longer include a version number in their name
+ local version.pre.5.2 = [ MATCH "^(5[.][01]+).*" : $(version) ] ;
+ if $(version.pre.5.2) || [ feature.get-values <runtime-link> :
+ $(raw) ] != "static"
+ {
+ name += .$(self.version.5) ;
+ }
+
+ name = $(name:J=) ;
+
+ if [ feature.get-values <install-dependencies> : $(raw) ] = "on"
+ {
+ #~ Allow explicitly asking to install the STLport lib by
+ #~ referring to it directly:
+ #~ /stlport//stlport/<install-dependencies>on
+ #~ This allows for install packaging of all libs one might need
+ #~ for a standalone distribution.
+ import path : make : path-make ;
+ local runtime-link
+ = [ feature.get-values <runtime-link> : $(raw) ] ;
+ local lib-file.props
+ = [ property-set.create $(raw) <link>$(runtime-link) ] ;
+ local lib-file.prefix
+ = [ type.generated-target-prefix $(runtime-link:U)_LIB :
+ $(lib-file.props) ] ;
+ local lib-file.suffix
+ = [ type.generated-target-suffix $(runtime-link:U)_LIB :
+ $(lib-file.props) ] ;
+ lib-file.prefix
+ ?= "" "lib" ;
+ lib-file.suffix
+ ?= "" ;
+ local lib-file
+ = [ GLOB $(self.libraries) [ modules.peek : PATH ] :
+ $(lib-file.prefix)$(name).$(lib-file.suffix) ] ;
+ lib-file
+ = [ new file-reference [ path-make $(lib-file[1]) ] :
+ $(self.project) ] ;
+ lib-file
+ = [ $(lib-file).generate "" ] ;
+ local lib-file.requirements
+ = [ targets.main-target-requirements
+ [ $(lib-file.props).raw ] <file>$(lib-file[-1])
+ : $(self.project) ] ;
+ return [ generators.construct $(self.project) $(name) : LIB :
+ $(lib-file.requirements) ] ;
+ }
+ else
+ {
+ #~ Otherwise, it is just regular library usage.
+ return [ generators.construct
+ $(self.project) $(name) : SEARCHED_LIB : $(property-set) ] ;
+ }
+ }
+ else if ! $(hostios) && $(toolset) != msvc
+ {
+ # We don't need libraries if host istreams are used. For
+ # msvc, automatic library selection will be used.
+
+ # name: stlport_<toolset>(_stldebug)?
+ local name = stlport ;
+ name = $(name)_$(toolset) ;
+ if [ feature.get-values <runtime-debugging> : $(raw) ] = "on"
+ {
+ name = $(name)_stldebug ;
+ }
+
+ return [ generators.construct
+ $(self.project) $(name) : SEARCHED_LIB : $(property-set) ] ;
+ }
+ else
+ {
+ return [ property-set.empty ] ;
+ }
+ }
+
+ rule compute-usage-requirements ( subvariant )
+ {
+ local usage-requirements =
+ <include>$(self.headers)
+ <dll-path>$(self.libraries)
+ <library-path>$(self.libraries)
+ ;
+
+ local rproperties = [ $(subvariant).build-properties ] ;
+ # CONSIDER: should this "if" sequence be replaced with
+ # some use of 'property-map' class?
+ if [ $(rproperties).get <runtime-debugging> ] = "on"
+ {
+ usage-requirements +=
+ <define>_STLP_DEBUG=1
+ <define>_STLP_DEBUG_UNINITIALIZED=1 ;
+ }
+ if [ $(rproperties).get <runtime-link> ] = "shared"
+ {
+ usage-requirements +=
+ <define>_STLP_USE_DYNAMIC_LIB=1 ;
+ }
+ if [ $(rproperties).get <stdlib-stlport:extensions> ] = noext
+ {
+ usage-requirements +=
+ <define>_STLP_NO_EXTENSIONS=1 ;
+ }
+ if [ $(rproperties).get <stdlib-stlport:iostream> ] = hostios
+ {
+ usage-requirements +=
+ <define>_STLP_NO_OWN_IOSTREAMS=1
+ <define>_STLP_HAS_NO_NEW_IOSTREAMS=1 ;
+ }
+ if $(self.version.5)
+ {
+ # Version 5.x
+ if [ $(rproperties).get <threading> ] = "single"
+ {
+ # Since STLport5 doesn't normally support single-thread
+ # we force STLport5 into the multi-thread mode. Hence
+ # getting what other libs provide of single-thread code
+ # linking against a multi-thread lib.
+ usage-requirements +=
+ <define>_STLP_THREADS=1 ;
+ }
+ }
+
+ return [ property-set.create $(usage-requirements) ] ;
+ }
+}
+
+rule stlport-target ( headers ? : libraries * : version ? )
+{
+ local project = [ project.current ] ;
+
+ targets.main-target-alternative
+ [ new stlport-target-class $(project) : $(headers) : $(libraries)
+ : $(version)
+ ] ;
+}
+
+local .version-subfeature-defined ;
+
+# Initialize stlport support.
+rule init (
+ version ? :
+ headers : # Location of header files
+ libraries * # Location of libraries, lib and bin subdirs of STLport.
+ )
+{
+ # FIXME: need to use common.check-init-parameters here.
+ # At the moment, that rule always tries to define subfeature
+ # of the 'toolset' feature, while we need to define subfeature
+ # of <stdlib>stlport, so tweaks to check-init-parameters are needed.
+ if $(version)
+ {
+ if ! $(.version-subfeature-defined)
+ {
+ feature.subfeature stdlib stlport : version : : propagated ;
+ .version-subfeature-defined = true ;
+ }
+ feature.extend-subfeature stdlib stlport : version : $(version) ;
+ }
+
+ # Declare the main target for this STLPort version.
+ stlport-target $(headers) : $(libraries) : $(version) ;
+}
+
diff --git a/src/boost/tools/build/src/tools/sun.jam b/src/boost/tools/build/src/tools/sun.jam
new file mode 100644
index 000000000..da7d7fe82
--- /dev/null
+++ b/src/boost/tools/build/src/tools/sun.jam
@@ -0,0 +1,224 @@
+# Copyright (C) Christopher Currie 2003. 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.
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.sun]]
+= Sun Studio
+
+The `sun` module supports the
+http://developers.sun.com/sunstudio/index.jsp[Sun Studio] C++ compilers
+for the Solaris OS.
+
+The module is initialized using the following syntax:
+
+----
+using sun : [version] : [c++-compile-command] : [compiler options] ;
+----
+
+This statement may be repeated several times, if you want to configure
+several versions of the compiler.
+
+If the command is not specified, B2 will search for a binary
+named `CC` in `/opt/SUNWspro/bin` and in PATH.
+
+When using this compiler on complex C++ code, such as the
+http://boost.org[Boost C++ library], it is recommended to specify the
+following options when initializing the `sun` module:
+
+----
+-library=stlport4 -features=tmplife -features=tmplrefstatic
+----
+
+See the http://blogs.sun.com/sga/entry/command_line_options[Sun C++
+Frontend Tales] for details.
+
+The following options can be provided, using
+_`<option-name>option-value syntax`_:
+
+`cflags`::
+Specifies additional compiler flags that will be used when compiling C
+sources.
+
+`cxxflags`::
+Specifies additional compiler flags that will be used when compiling C++
+sources.
+
+`compileflags`::
+Specifies additional compiler flags that will be used when compiling both C
+and C++ sources.
+
+`linkflags`::
+Specifies additional command line options that will be passed to the linker.
+
+Starting with Sun Studio 12, you can create 64-bit applications by using
+the `address-model=64` property.
+
+|# # end::doc[]
+
+import property ;
+import generators ;
+import os ;
+import toolset : flags ;
+import feature ;
+import type ;
+import common ;
+
+feature.extend toolset : sun ;
+toolset.inherit sun : unix ;
+generators.override sun.prebuilt : builtin.lib-generator ;
+generators.override sun.prebuilt : builtin.prebuilt ;
+generators.override sun.searched-lib-generator : searched-lib-generator ;
+
+
+rule init ( version ? : command * : options * )
+{
+ local condition = [
+ common.check-init-parameters sun : version $(version) ] ;
+
+ command = [ common.get-invocation-command sun : CC
+ : $(command) : "/opt/SUNWspro/bin" ] ;
+
+ # Even if the real compiler is not found, put CC to
+ # command line so that user see command line that would have being executed.
+ command ?= CC ;
+
+ common.handle-options sun : $(condition) : $(command) : $(options) ;
+
+ command_c = $(command[1--2]) $(command[-1]:B=cc) ;
+
+ toolset.flags sun CONFIG_C_COMMAND $(condition) : $(command_c) ;
+}
+
+# Declare generators
+generators.register-c-compiler sun.compile.c : C : OBJ : <toolset>sun ;
+generators.register-c-compiler sun.compile.c++ : CPP : OBJ : <toolset>sun ;
+
+# Declare flags and actions for compilation
+flags sun.compile OPTIONS <debug-symbols>on : -g ;
+flags sun.compile OPTIONS <profiling>on : -xprofile=tcov ;
+flags sun.compile OPTIONS <optimization>speed : -xO4 ;
+flags sun.compile OPTIONS <optimization>space : -xO2 -xspace ;
+flags sun.compile OPTIONS <threading>multi : -mt ;
+flags sun.compile OPTIONS <warnings>off : -erroff ;
+flags sun.compile OPTIONS <warnings>on : -erroff=%none ;
+flags sun.compile OPTIONS <warnings>all : -erroff=%none ;
+flags sun.compile OPTIONS <warnings-as-errors>on : -errwarn ;
+
+flags sun.compile OPTIONS <local-visibility>hidden : -xldscope=hidden ;
+flags sun.compile OPTIONS <local-visibility>protected : -xldscope=symbolic ;
+flags sun.compile OPTIONS <local-visibility>global : -xldscope=global ;
+
+flags sun.compile.c++ OPTIONS <inlining>off : +d ;
+
+# There are no less than 5 standard library options:
+# 1) The default, which uses an old version of the Rogue Wave std lib,
+# also available via -std=sun03.
+# 2) C++03 mode + STLport, selected via the -library option.
+# 3) C++03 mode plus the Apache std lib, selected via the -library option.
+# 4) C++03 or C++11 in g++ compatibility mode, and GNU libstdc++3, selected via -std=c++03/11.
+#
+# Note that the -std, -library and -compat compiler switches appear to be largely mutually
+# incompatible, and that going forward the -std switch seems to be the preferred one.
+#
+# See http://docs.oracle.com/cd/E37069_01/html/E37075/bkamw.html#OSSCPgnaof
+#
+
+flags sun.compile.c++ OPTIONS <stdlib>sun-stlport : -library=stlport4 -compat=5 -features=zla ;
+flags sun.link OPTIONS <stdlib>sun-stlport : -library=stlport4 -compat=5 ;
+
+flags sun.compile.c++ OPTIONS <stdlib>apache : -library=stdcxx4 -compat=5 -features=zla ;
+flags sun.link OPTIONS <stdlib>apache : -library=stdcxx4 -compat=5 ;
+
+flags sun.compile.c++ OPTIONS <stdlib>gnu : -std=c++03 ;
+flags sun.compile.c++ DEFINES <stdlib>gnu : _GLIBCXX_USE_CXX11_ABI=0 ;
+flags sun.link OPTIONS <stdlib>gnu : -std=c++03 ;
+
+flags sun.compile.c++ OPTIONS <stdlib>gnu11 : -std=c++11 ;
+flags sun.compile.c++ DEFINES <stdlib>gnu11 : _GLIBCXX_USE_CXX11_ABI=1 ;
+flags sun.link OPTIONS <stdlib>gnu11 : -std=c++11 ;
+
+# The -m32 and -m64 options are supported starting
+# with Sun Studio 12. On earlier compilers, the
+# 'address-model' feature is not supported and should not
+# be used. Instead, use -xarch=generic64 command line
+# option.
+# See http://svn.boost.org/trac/boost/ticket/1186
+# for details.
+flags sun OPTIONS <address-model>32 : -m32 ;
+flags sun OPTIONS <address-model>64 : -m64 ;
+# On sparc, there's a difference between -Kpic
+# and -KPIC. The first is slightly more efficient,
+# but has the limits on the size of GOT table.
+# For minimal fuss on user side, we use -KPIC here.
+# See http://svn.boost.org/trac/boost/ticket/1186#comment:6
+# for detailed explanation.
+flags sun OPTIONS <link>shared : -KPIC ;
+
+flags sun.compile OPTIONS <cflags> ;
+flags sun.compile.c++ OPTIONS <cxxflags> ;
+flags sun.compile DEFINES <define> ;
+flags sun.compile INCLUDES <include> ;
+
+actions compile.c
+{
+ "$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+actions compile.c++
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+}
+
+# Declare flags and actions for linking
+flags sun.link OPTIONS <debug-symbols>on : -g ;
+# Strip the binary when no debugging is needed
+flags sun.link OPTIONS <debug-symbols>off : -s ;
+flags sun.link OPTIONS <profiling>on : -xprofile=tcov ;
+flags sun.link OPTIONS <threading>multi : -mt ;
+flags sun.link OPTIONS <linkflags> ;
+flags sun.link LINKPATH <library-path> ;
+flags sun.link FINDLIBS-ST <find-static-library> ;
+flags sun.link FINDLIBS-SA <find-shared-library> ;
+flags sun.link LIBRARIES <library-file> ;
+flags sun.link LINK-RUNTIME <runtime-link>static : static ;
+flags sun.link LINK-RUNTIME <runtime-link>shared : dynamic ;
+flags sun.link RPATH <dll-path> ;
+# On gcc, there are separate options for dll path at runtime and
+# link time. On Solaris, there's only one: -R, so we have to use
+# it, even though it's bad idea.
+flags sun.link RPATH <xdll-path> ;
+
+# The POSIX real-time library is always needed (nanosleep, clock_gettime etc.)
+flags sun.link FINDLIBS-SA : rt ;
+
+rule link ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
+}
+
+# Slight mods for dlls
+rule link.dll ( targets * : sources * : properties * )
+{
+ SPACE on $(targets) = " " ;
+}
+
+actions link.dll bind LIBRARIES
+{
+ "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" -h$(<[1]:D=) -G "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
+}
+
+# Declare action for creating static libraries
+actions piecemeal archive
+{
+ "$(CONFIG_COMMAND)" -xar -o "$(<)" "$(>)"
+}
+
diff --git a/src/boost/tools/build/src/tools/symlink.jam b/src/boost/tools/build/src/tools/symlink.jam
new file mode 100644
index 000000000..b33e8260c
--- /dev/null
+++ b/src/boost/tools/build/src/tools/symlink.jam
@@ -0,0 +1,140 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003 Rene Rivera
+# Copyright 2002, 2003, 2004, 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)
+
+# Defines the "symlink" special target. 'symlink' targets make symbolic links
+# to the sources.
+
+import targets modules path class os feature project property-set ;
+
+.count = 0 ;
+
+feature.feature symlink-location : project-relative build-relative : incidental ;
+
+# The class representing "symlink" targets.
+#
+class symlink-targets : basic-target
+{
+ import numbers modules class property project path ;
+
+ rule __init__ (
+ project
+ : targets *
+ : sources *
+ )
+ {
+ # Generate a fake name for now. Need unnamed targets eventually.
+ local c = [ modules.peek symlink : .count ] ;
+ modules.poke symlink : .count : [ numbers.increment $(c) ] ;
+ local fake-name = symlink#$(c) ;
+
+ basic-target.__init__ $(fake-name) : $(project) : $(sources) ;
+
+ # Remember the targets to map the sources onto. Pad or truncate
+ # to fit the sources given.
+ self.targets = ;
+ for local source in $(sources)
+ {
+ if $(targets)
+ {
+ self.targets += $(targets[1]) ;
+ targets = $(targets[2-]) ;
+ }
+ else
+ {
+ self.targets += $(source) ;
+ }
+ }
+
+ # The virtual targets corresponding to the given targets.
+ self.virtual-targets = ;
+ }
+
+ rule construct ( name : source-targets * : property-set )
+ {
+ local i = 1 ;
+ for local t in $(source-targets)
+ {
+ local s = $(self.targets[$(i)]) ;
+ local a = [ class.new action $(t) : symlink.ln : $(property-set) ] ;
+ local vt = [ class.new file-target $(s:D=)
+ : [ $(t).type ] : $(self.project) : $(a) ] ;
+
+ # Place the symlink in the directory relative to the project
+ # location, instead of placing it in the build directory.
+ if [ property.select <symlink-location> : [ $(property-set).raw ] ] = <symlink-location>project-relative
+ {
+ $(vt).set-path [ path.root $(s:D) [ $(self.project).get location ] ] ;
+ }
+
+ self.virtual-targets += $(vt) ;
+ i = [ numbers.increment $(i) ] ;
+ }
+ return [ property-set.empty ] $(self.virtual-targets) ;
+ }
+}
+
+# Creates a symbolic link from a set of targets to a set of sources.
+# The targets and sources map one to one. The symlinks generated are
+# limited to be the ones given as the sources. That is, the targets
+# are either padded or trimmed to equate to the sources. The padding
+# is done with the name of the corresponding source. For example::
+#
+# symlink : one two ;
+#
+# Is equal to::
+#
+# symlink one two : one two ;
+#
+# Names for symlink are relative to the project location. They cannot
+# include ".." path components.
+rule symlink (
+ targets *
+ : sources *
+ )
+{
+ local project = [ project.current ] ;
+
+ return [ targets.main-target-alternative
+ [ class.new symlink-targets $(project) : $(targets) :
+ # Note: inline targets are not supported for symlink, intentionally,
+ # since it's used to linking existing non-local targets.
+ $(sources) ] ] ;
+}
+
+rule ln
+{
+ local os ;
+ if [ modules.peek : UNIX ] { os = UNIX ; }
+ else { os ?= [ os.name ] ; }
+ # Remember the path to make the link relative to where the symlink is located.
+ local path-to-source = [ path.relative-to
+ [ path.make [ on $(<) return $(LOCATE) ] ]
+ [ path.make [ on $(>) return $(LOCATE) ] ] ] ;
+ if $(path-to-source) = .
+ {
+ PATH_TO_SOURCE on $(<) = "" ;
+ }
+ else
+ {
+ PATH_TO_SOURCE on $(<) = [ path.native $(path-to-source) ] ;
+ }
+ ln-$(os) $(<) : $(>) ;
+}
+
+actions ln-UNIX
+{
+ ln -f -s '$(>:D=:R=$(PATH_TO_SOURCE))' '$(<)'
+}
+
+# there is a way to do this; we fall back to a copy for now
+actions ln-NT
+{
+ echo "NT symlinks not supported yet, making copy"
+ del /f /q "$(<)" 2>nul >nul
+ copy "$(>)" "$(<)" $(NULL_OUT)
+}
+
+IMPORT $(__name__) : symlink : : symlink ;
diff --git a/src/boost/tools/build/src/tools/symlink.py b/src/boost/tools/build/src/tools/symlink.py
new file mode 100644
index 000000000..ed5388977
--- /dev/null
+++ b/src/boost/tools/build/src/tools/symlink.py
@@ -0,0 +1,112 @@
+# Status: ported.
+# Base revision: 64488.
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003 Rene Rivera
+# Copyright 2002, 2003, 2004, 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)
+
+# Defines the "symlink" special target. 'symlink' targets make symbolic links
+# to the sources.
+
+import b2.build.feature as feature
+import b2.build.targets as targets
+import b2.build.property_set as property_set
+import b2.build.virtual_target as virtual_target
+import b2.build.targets
+
+from b2.manager import get_manager
+
+import bjam
+
+import os
+
+
+feature.feature("symlink-location", ["project-relative", "build-relative"], ["incidental"])
+
+class SymlinkTarget(targets.BasicTarget):
+
+ _count = 0
+
+ def __init__(self, project, targets, sources):
+
+ # Generate a fake name for now. Need unnamed targets eventually.
+ fake_name = "symlink#%s" % SymlinkTarget._count
+ SymlinkTarget._count = SymlinkTarget._count + 1
+
+ b2.build.targets.BasicTarget.__init__(self, fake_name, project, sources)
+
+ # Remember the targets to map the sources onto. Pad or truncate
+ # to fit the sources given.
+ assert len(targets) <= len(sources)
+ self.targets = targets[:] + sources[len(targets):]
+
+ # The virtual targets corresponding to the given targets.
+ self.virtual_targets = []
+
+ def construct(self, name, source_targets, ps):
+ i = 0
+ for t in source_targets:
+ s = self.targets[i]
+ a = virtual_target.Action(self.manager(), [t], "symlink.ln", ps)
+ vt = virtual_target.FileTarget(os.path.basename(s), t.type(), self.project(), a)
+
+ # Place the symlink in the directory relative to the project
+ # location, instead of placing it in the build directory.
+ if not ps.get('symlink-location') == "project-relative":
+ vt.set_path(os.path.join(self.project().get('location'), os.path.dirname(s)))
+
+ vt = get_manager().virtual_targets().register(vt)
+ self.virtual_targets.append(vt)
+ i = i + 1
+
+ return (property_set.empty(), self.virtual_targets)
+
+# Creates a symbolic link from a set of targets to a set of sources.
+# The targets and sources map one to one. The symlinks generated are
+# limited to be the ones given as the sources. That is, the targets
+# are either padded or trimmed to equate to the sources. The padding
+# is done with the name of the corresponding source. For example::
+#
+# symlink : one two ;
+#
+# Is equal to::
+#
+# symlink one two : one two ;
+#
+# Names for symlink are relative to the project location. They cannot
+# include ".." path components.
+def symlink(targets, sources):
+
+ from b2.manager import get_manager
+ t = get_manager().targets()
+ p = get_manager().projects().current()
+
+ return t.main_target_alternative(
+ SymlinkTarget(p, targets,
+ # Note: inline targets are not supported for symlink, intentionally,
+ # since it's used to linking existing non-local targets.
+ sources))
+
+
+def setup_ln(targets, sources, ps):
+
+ source_path = bjam.call("get-target-variable", sources[0], "LOCATE")[0]
+ target_path = bjam.call("get-target-variable", targets[0], "LOCATE")[0]
+ rel = os.path.relpath(source_path, target_path)
+ if rel == ".":
+ bjam.call("set-target-variable", targets, "PATH_TO_SOURCE", "")
+ else:
+ bjam.call("set-target-variable", targets, "PATH_TO_SOURCE", rel)
+
+if os.name == 'nt':
+ ln_action = """echo "NT symlinks not supported yet, making copy"
+del /f /q "$(<)" 2>nul >nul
+copy "$(>)" "$(<)" $(NULL_OUT)"""
+else:
+ ln_action = "ln -f -s '$(>:D=:R=$(PATH_TO_SOURCE))' '$(<)'"
+
+get_manager().engine().register_action("symlink.ln", ln_action, function=setup_ln)
+
+get_manager().projects().add_rule("symlink", symlink)
diff --git a/src/boost/tools/build/src/tools/testing-aux.jam b/src/boost/tools/build/src/tools/testing-aux.jam
new file mode 100644
index 000000000..30309fbb8
--- /dev/null
+++ b/src/boost/tools/build/src/tools/testing-aux.jam
@@ -0,0 +1,344 @@
+import feature ;
+
+# This module is imported by testing.py. The definitions here are
+# too tricky to do in Python
+
+# Causes the 'target' to exist after bjam invocation if and only if all the
+# dependencies were successfully built.
+#
+rule expect-success ( target : dependency + : requirements * )
+{
+ **passed** $(target) : $(sources) ;
+}
+IMPORT testing : expect-success : : testing.expect-success ;
+
+# Causes the 'target' to exist after bjam invocation if and only if all some of
+# the dependencies were not successfully built.
+#
+rule expect-failure ( target : dependency + : properties * )
+{
+ local grist = [ MATCH ^<(.*)> : $(dependency:G) ] ;
+ local marker = $(dependency:G=$(grist)*fail) ;
+ (failed-as-expected) $(marker) ;
+ FAIL_EXPECTED $(dependency) ;
+ LOCATE on $(marker) = [ on $(dependency) return $(LOCATE) ] ;
+ RMOLD $(marker) ;
+ DEPENDS $(marker) : $(dependency) ;
+ DEPENDS $(target) : $(marker) ;
+ **passed** $(target) : $(marker) ;
+}
+IMPORT testing : expect-failure : : testing.expect-failure ;
+
+# The rule/action combination used to report successful passing of a test.
+#
+rule **passed**
+{
+ # Force deletion of the target, in case any dependencies failed to build.
+ RMOLD $(<) ;
+}
+
+
+# Used to create test files signifying passed tests.
+#
+actions **passed**
+{
+ echo passed > "$(<)"
+}
+
+
+# Used to create replacement object files that do not get created during tests
+# that are expected to fail.
+#
+actions (failed-as-expected)
+{
+ echo failed as expected > "$(<)"
+}
+
+
+if [ os.name ] = VMS
+{
+ actions **passed**
+ {
+ PIPE WRITE SYS$OUTPUT "passed" > $(<:W)
+ }
+
+ actions (failed-as-expected)
+ {
+ PIPE WRITE SYS$OUTPUT "failed as expected" > $(<:W)
+ }
+}
+
+
+# Runs executable 'sources' and stores stdout in file 'target'. Unless
+# --preserve-test-targets command line option has been specified, removes the
+# executable. The 'target-to-remove' parameter controls what should be removed:
+# - if 'none', does not remove anything, ever
+# - if empty, removes 'source'
+# - if non-empty and not 'none', contains a list of sources to remove.
+#
+rule capture-output ( target : source : properties * : targets-to-remove * )
+{
+ output-file on $(target) = $(target:S=.output) ;
+ LOCATE on $(target:S=.output) = [ on $(target) return $(LOCATE) ] ;
+
+ # The INCLUDES kill a warning about independent target...
+ INCLUDES $(target) : $(target:S=.output) ;
+ # but it also puts .output into dependency graph, so we must tell jam it is
+ # OK if it cannot find the target or updating rule.
+ NOCARE $(target:S=.output) ;
+
+ # This has two-fold effect. First it adds input files to the dependency
+ # graph, preventing a warning. Second, it causes input files to be bound
+ # before target is created. Therefore, they are bound using SEARCH setting
+ # on them and not LOCATE setting of $(target), as in other case (due to jam
+ # bug).
+ DEPENDS $(target) : [ on $(target) return $(INPUT_FILES) ] ;
+
+ if $(targets-to-remove) = none
+ {
+ targets-to-remove = ;
+ }
+ else if ! $(targets-to-remove)
+ {
+ targets-to-remove = $(source) ;
+ }
+
+ if [ on $(target) return $(REMOVE_TEST_TARGETS) ]
+ {
+ TEMPORARY $(targets-to-remove) ;
+ # Set a second action on target that will be executed after capture
+ # output action. The 'RmTemps' rule has the 'ignore' modifier so it is
+ # always considered succeeded. This is needed for 'run-fail' test. For
+ # that test the target will be marked with FAIL_EXPECTED, and without
+ # 'ignore' successful execution will be negated and be reported as
+ # failure. With 'ignore' we do not detect a case where removing files
+ # fails, but it is not likely to happen.
+ RmTemps $(target) : $(targets-to-remove) ;
+ }
+
+ if ! [ feature.get-values testing.launcher : $(properties) ]
+ {
+ ## On VMS set default launcher to MCR
+ if [ os.name ] = VMS { LAUNCHER on $(target) = MCR ; }
+ }
+}
+
+
+if [ os.name ] = NT
+{
+ .STATUS = %status% ;
+ .SET_STATUS = "set status=%ERRORLEVEL%" ;
+ .RUN_OUTPUT_NL = "echo." ;
+ .THEN = "(" ;
+ .EXIT_SUCCESS = "0" ;
+ .STATUS_0 = "%status% EQU 0 $(.THEN)" ;
+ .STATUS_NOT_0 = "%status% NEQ 0 $(.THEN)" ;
+ .VERBOSE = "%verbose% EQU 1 $(.THEN)" ;
+ .ENDIF = ")" ;
+ .SHELL_SET = "set " ;
+ .CATENATE = type ;
+ .CP = copy ;
+ .NULLIN = ;
+}
+else if [ os.name ] = VMS
+{
+ local nl = "
+" ;
+
+ .STATUS = "''status'" ;
+ .SET_STATUS = "status=$STATUS" ;
+ .SAY = "pipe write sys$output" ; ## not really echo
+ .RUN_OUTPUT_NL = "$(.SAY) \"\"" ;
+ .THEN = "$(nl)then" ;
+ .EXIT_SUCCESS = "1" ;
+ .SUCCESS = "status .eq. $(.EXIT_SUCCESS) $(.THEN)" ;
+ .STATUS_0 = "status .eq. 0 $(.THEN)" ;
+ .STATUS_NOT_0 = "status .ne. 0 $(.THEN)" ;
+ .VERBOSE = "verbose .eq. 1 $(.THEN)" ;
+ .ENDIF = "endif" ;
+ .SHELL_SET = "" ;
+ .CATENATE = type ;
+ .CP = copy ;
+ .NULLIN = ;
+}
+else
+{
+ .STATUS = "$status" ;
+ .SET_STATUS = "status=$?" ;
+ .RUN_OUTPUT_NL = "echo" ;
+ .THEN = "; then" ;
+ .EXIT_SUCCESS = "0" ;
+ .STATUS_0 = "test $status -eq 0 $(.THEN)" ;
+ .STATUS_NOT_0 = "test $status -ne 0 $(.THEN)" ;
+ .VERBOSE = "test $verbose -eq 1 $(.THEN)" ;
+ .ENDIF = "fi" ;
+ .SHELL_SET = "" ;
+ .CATENATE = cat ;
+ .CP = cp ;
+ .NULLIN = "<" "/dev/null" ;
+}
+
+
+.VERBOSE_TEST = 0 ;
+if --verbose-test in [ modules.peek : ARGV ]
+{
+ .VERBOSE_TEST = 1 ;
+}
+
+
+.RM = [ common.rm-command ] ;
+
+
+actions capture-output bind INPUT_FILES output-file
+{
+ $(PATH_SETUP)
+ $(LAUNCHER) "$(>)" $(ARGS) "$(INPUT_FILES)" > "$(output-file)" 2>&1
+ $(.SET_STATUS)
+ $(.RUN_OUTPUT_NL) >> "$(output-file)"
+ echo EXIT STATUS: $(.STATUS) >> "$(output-file)"
+ if $(.STATUS_0)
+ $(.CP) "$(output-file)" "$(<)"
+ $(.ENDIF)
+ $(.SHELL_SET)verbose=$(.VERBOSE_TEST)
+ if $(.STATUS_NOT_0)
+ $(.SHELL_SET)verbose=1
+ $(.ENDIF)
+ if $(.VERBOSE)
+ echo ====== BEGIN OUTPUT ======
+ $(.CATENATE) "$(output-file)"
+ echo ====== END OUTPUT ======
+ $(.ENDIF)
+ exit $(.STATUS)
+}
+
+IMPORT testing : capture-output : : testing.capture-output ;
+
+
+actions quietly updated ignore piecemeal together RmTemps
+{
+ $(.RM) "$(>)"
+}
+
+
+if [ os.name ] = VMS
+{
+ actions capture-output bind INPUT_FILES output-file
+ {
+ $(PATH_SETUP)
+ !! Execute twice - first for status, second for output
+ set noon
+ pipe $(LAUNCHER) $(>:W) $(ARGS) $(INPUT_FILES:W) 2>NL: >NL:
+ $(.SET_STATUS)
+ pipe $(LAUNCHER) $(>:W) $(ARGS) $(INPUT_FILES:W) | type sys$input /out=$(output-file:W)
+ set on
+ !! Harmonize VMS success status with POSIX
+ if $(.SUCCESS)
+ $(.SHELL_SET)status="0"
+ $(.ENDIF)
+ $(.RUN_OUTPUT_NL) | append /new sys$input $(output-file:W)
+ $(.SAY) "EXIT STATUS: $(.STATUS)" | append /new sys$input $(output-file:W)
+ if $(.STATUS_0)
+ $(.CP) $(output-file:W) $(<:W)
+ $(.ENDIF)
+ $(.SHELL_SET)verbose=$(.VERBOSE_TEST)
+ if $(.STATUS_NOT_0)
+ $(.SHELL_SET)verbose=1
+ $(.ENDIF)
+ if $(.VERBOSE)
+ $(.SAY) "====== BEGIN OUTPUT ======"
+ $(.CATENATE) $(output-file:W)
+ $(.SAY) "====== END OUTPUT ======"
+ $(.ENDIF)
+ !! Harmonize VMS success status with POSIX on exit
+ if $(.STATUS_0)
+ $(.SHELL_SET)status="$(.EXIT_SUCCESS)"
+ $(.ENDIF)
+ exit "$(.STATUS)"
+ }
+
+ actions quietly updated ignore piecemeal together RmTemps
+ {
+ $(.RM) $(>:WJ=;*,);*
+ }
+}
+
+
+.MAKE_FILE = [ common.file-creation-command ] ;
+
+
+rule unit-test ( target : source : properties * )
+{
+ if ! [ feature.get-values testing.launcher : $(properties) ]
+ {
+ ## On VMS set default launcher to MCR
+ if [ os.name ] = VMS { LAUNCHER on $(target) = MCR ; }
+ }
+}
+
+actions unit-test
+{
+ $(PATH_SETUP)
+ $(LAUNCHER) "$(>)" $(ARGS) && $(.MAKE_FILE) "$(<)"
+}
+
+if [ os.name ] = VMS
+{
+ actions unit-test
+ {
+ $(PATH_SETUP)
+ pipe $(LAUNCHER) $(>:W) $(ARGS) && $(.MAKE_FILE) $(<:W)
+ }
+}
+
+# Note that this rule may be called multiple times for a single target in case
+# there are multiple actions operating on the same target in sequence. One such
+# example are msvc exe targets first created by a linker action and then updated
+# with an embedded manifest file by a separate action.
+rule record-time ( target : source : start end user system )
+{
+ local src-string = [$(source:G=:J=",")"] " ;
+ USER_TIME on $(target) += $(src-string)$(user) ;
+ SYSTEM_TIME on $(target) += $(src-string)$(system) ;
+
+ # We need the following variables because attempting to perform such
+ # variable expansion in actions would not work due to quotes getting treated
+ # as regular characters.
+ USER_TIME_SECONDS on $(target) += $(src-string)$(user)" seconds" ;
+ SYSTEM_TIME_SECONDS on $(target) += $(src-string)$(system)" seconds" ;
+}
+
+# Calling this rule requests that Boost Build time how long it takes to build
+# the 'source' target and display the results both on the standard output and in
+# the 'target' file.
+#
+rule time ( target : sources + : properties * )
+{
+ # Set up rule for recording timing information.
+ __TIMING_RULE__ on $(sources) = testing.record-time $(target) ;
+
+ # Make sure the sources get rebuilt any time we need to retrieve that
+ # information.
+ REBUILDS $(target) : $(sources) ;
+}
+
+
+actions time
+{
+ echo user: $(USER_TIME)
+ echo system: $(SYSTEM_TIME)
+
+ echo user: $(USER_TIME_SECONDS) > "$(<)"
+ echo system: $(SYSTEM_TIME_SECONDS) >> "$(<)"
+}
+
+if [ os.name ] = VMS
+{
+ actions time
+ {
+ WRITE SYS$OUTPUT "user: ", "$(USER_TIME)"
+ WRITE SYS$OUTPUT "system: ", "(SYSTEM_TIME)"
+
+ PIPE WRITE SYS$OUTPUT "user: ", "$(USER_TIME_SECONDS)" | TYPE SYS$INPUT /OUT=$(<:W)
+ PIPE WRITE SYS$OUTPUT "system: ", "$(SYSTEM_TIME_SECONDS)" | APPEND /NEW SYS$INPUT $(<:W)
+ }
+}
diff --git a/src/boost/tools/build/src/tools/testing.jam b/src/boost/tools/build/src/tools/testing.jam
new file mode 100644
index 000000000..a6c5cc3d3
--- /dev/null
+++ b/src/boost/tools/build/src/tools/testing.jam
@@ -0,0 +1,847 @@
+# Copyright 2005 Dave Abrahams
+# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus
+# Copyright 2014-2015 Rene Rivera
+# Copyright 2014 Microsoft Corporation
+# 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 module implements regression testing framework. It declares a number of
+# main target rules which perform some action and, if the results are OK,
+# creates an output file.
+#
+# The exact list of rules is:
+# 'compile' -- creates .test file if compilation of sources was
+# successful.
+# 'compile-fail' -- creates .test file if compilation of sources failed.
+# 'run' -- creates .test file is running of executable produced from
+# sources was successful. Also leaves behind .output file
+# with the output from program run.
+# 'run-fail' -- same as above, but .test file is created if running fails.
+#
+# In all cases, presence of .test file is an indication that the test passed.
+# For more convenient reporting, you might want to use C++ Boost regression
+# testing utilities (see http://www.boost.org/more/regression.html).
+#
+# For historical reason, a 'unit-test' rule is available which has the same
+# syntax as 'exe' and behaves just like 'run'.
+
+# Things to do:
+# - Teach compiler_status handle Jamfile.v2.
+# Notes:
+# - <no-warn> is not implemented, since it is Como-specific, and it is not
+# clear how to implement it
+# - std::locale-support is not implemented (it is used in one test).
+
+
+import alias ;
+import build-system ;
+import "class" ;
+import common ;
+import errors ;
+import feature ;
+import generators ;
+import os ;
+import param ;
+import path ;
+import project ;
+import property ;
+import property-set ;
+import regex ;
+import sequence ;
+import targets ;
+import toolset ;
+import type ;
+import virtual-target ;
+
+
+rule init ( )
+{
+}
+
+
+# Feature controlling the command used to launch test programs.
+feature.feature testing.launcher : : free optional ;
+
+feature.feature test-info : : free incidental ;
+feature.feature testing.arg : : free incidental ;
+feature.feature testing.input-file : : free dependency ;
+
+feature.feature preserve-test-targets : on off : incidental propagated ;
+
+# Feature to control whether executable binaries are run as part of test.
+# This can be used to just compile test cases in cross compilation situations.
+feature.feature testing.execute : on off : incidental propagated ;
+feature.set-default testing.execute : on ;
+
+# Register target types.
+type.register TEST : test ;
+type.register COMPILE : : TEST ;
+type.register COMPILE_FAIL : : TEST ;
+type.register RUN_OUTPUT : run ;
+type.register RUN : : TEST ;
+type.register RUN_FAIL : : TEST ;
+type.register LINK_FAIL : : TEST ;
+type.register LINK : : TEST ;
+type.register UNIT_TEST : passed : TEST ;
+
+
+# Suffix to denote test target directory
+#
+.TEST-DIR-SUFFIX = ".test" ;
+if [ os.name ] = VMS
+{
+ .TEST-DIR-SUFFIX = "$test" ;
+}
+
+# Declare the rules which create main targets. While the 'type' module already
+# creates rules with the same names for us, we need extra convenience: default
+# name of main target, so write our own versions.
+
+# Helper rule. Create a test target, using basename of first source if no target
+# name is explicitly passed. Remembers the created target in a global variable.
+#
+rule make-test ( target-type : sources + : requirements * : target-name ? )
+{
+ target-name ?= $(sources[1]:D=:S=) ;
+
+ # Having periods (".") in the target name is problematic because the typed
+ # generator will strip the suffix and use the bare name for the file
+ # targets. Even though the location-prefix averts problems most times it
+ # does not prevent ambiguity issues when referring to the test targets. For
+ # example when using the XML log output. So we rename the target to remove
+ # the periods, and provide an alias for users.
+ local real-name = [ regex.replace $(target-name) "[.]" "~" ] ;
+
+ local project = [ project.current ] ;
+ # The <location-prefix> forces the build system for generate paths in the
+ # form '$build_dir/array1$(.TEST-DIR-SUFFIX)/gcc/debug'. This is necessary
+ # to allow post-processing tools to work.
+ local t = [ targets.create-typed-target [ type.type-from-rule-name
+ $(target-type) ] : $(project) : $(real-name) : $(sources) :
+ $(requirements) <location-prefix>$(real-name)$(.TEST-DIR-SUFFIX)
+ <relevant>toolset ] ;
+
+ # The alias to the real target, per period replacement above.
+ if $(real-name) != $(target-name)
+ {
+ alias $(target-name) : $(t) ;
+ }
+
+ # Remember the test (for --dump-tests). A good way would be to collect all
+ # given a project. This has some technical problems: e.g. we can not call
+ # this dump from a Jamfile since projects referred by 'build-project' are
+ # not available until the whole Jamfile has been loaded.
+ .all-tests += $(t) ;
+ return $(t) ;
+}
+
+
+# Note: passing more that one cpp file here is known to fail. Passing a cpp file
+# and a library target works.
+#
+rule compile ( sources + : requirements * : target-name ? )
+{
+ param.handle-named-params sources requirements target-name ;
+ return [ make-test compile : $(sources) : $(requirements) : $(target-name) ]
+ ;
+}
+
+
+rule compile-fail ( sources + : requirements * : target-name ? )
+{
+ param.handle-named-params sources requirements target-name ;
+ return [ make-test compile-fail : $(sources) : $(requirements) :
+ $(target-name) ] ;
+}
+
+
+rule link ( sources + : requirements * : target-name ? )
+{
+ param.handle-named-params sources requirements target-name ;
+ return [ make-test link : $(sources) : $(requirements) : $(target-name) ] ;
+}
+
+
+rule link-fail ( sources + : requirements * : target-name ? )
+{
+ param.handle-named-params sources requirements target-name ;
+ return [ make-test link-fail : $(sources) : $(requirements) : $(target-name)
+ ] ;
+}
+
+
+rule handle-input-files ( input-files * )
+{
+ if $(input-files[2])
+ {
+ # Check that sorting made when creating property-set instance will not
+ # change the ordering.
+ if [ sequence.insertion-sort $(input-files) ] != $(input-files)
+ {
+ errors.user-error "Names of input files must be sorted alphabetically"
+ : "due to internal limitations" ;
+ }
+ }
+ return <testing.input-file>$(input-files) ;
+}
+
+
+rule run ( sources + : args * : input-files * : requirements * : target-name ? :
+ default-build * )
+{
+ param.handle-named-params sources args input-files requirements
+ target-name default-build ;
+ requirements += <testing.arg>$(args:J=" ") ;
+ requirements += [ handle-input-files $(input-files) ] ;
+ return [ make-test run : $(sources) : $(requirements) : $(target-name) ] ;
+}
+
+
+rule run-fail ( sources + : args * : input-files * : requirements * :
+ target-name ? : default-build * )
+{
+ param.handle-named-params sources args input-files requirements
+ target-name default-build ;
+ requirements += <testing.arg>$(args:J=" ") ;
+ requirements += [ handle-input-files $(input-files) ] ;
+ return [ make-test run-fail : $(sources) : $(requirements) : $(target-name)
+ ] ;
+}
+
+
+# Use 'test-suite' as a synonym for 'alias', for backward compatibility.
+IMPORT : alias : : test-suite ;
+
+
+# For all main targets in 'project-module', which are typed targets with type
+# derived from 'TEST', produce some interesting information.
+#
+rule dump-tests
+{
+ for local t in $(.all-tests)
+ {
+ dump-test $(t) ;
+ }
+}
+
+if ( --dump-tests in [ modules.peek : ARGV ] )
+{
+ IMPORT testing : dump-tests : : testing.dump-tests ;
+ build-system.add-pre-build-hook testing.dump-tests ;
+}
+
+# Given a project location in normalized form (slashes are forward), compute the
+# name of the Boost library.
+#
+local rule get-library-name ( path )
+{
+ # Path is in normalized form, so all slashes are forward.
+ local match1 = [ MATCH /(tools|libs)/(.*)/(test|example) : $(path) ] ;
+ local match2 = [ MATCH /(tools|libs)/(.*)$ : $(path) ] ;
+ local match3 = [ MATCH (/status$) : $(path) ] ;
+
+ if $(match1) { return $(match1[2]) ; }
+ else if $(match2) { return $(match2[2]) ; }
+ else if $(match3) { return "" ; }
+ else if --dump-tests in [ modules.peek : ARGV ]
+ {
+ # The 'run' rule and others might be used outside boost. In that case,
+ # just return the path, since the 'library name' makes no sense.
+ return $(path) ;
+ }
+}
+
+
+# Was an XML dump requested?
+.out-xml = [ MATCH --out-xml=(.*) : [ modules.peek : ARGV ] ] ;
+
+
+# Takes a target (instance of 'basic-target') and prints
+# - its type
+# - its name
+# - comments specified via the <test-info> property
+# - relative location of all source from the project root.
+#
+rule dump-test ( target )
+{
+ local type = [ $(target).type ] ;
+ local name = [ $(target).name ] ;
+ local project = [ $(target).project ] ;
+
+ local project-root = [ $(project).get project-root ] ;
+ local library = [ get-library-name [ path.root [ $(project).get location ]
+ [ path.pwd ] ] ] ;
+ if $(library)
+ {
+ name = $(library)/$(name) ;
+ }
+
+ local sources = [ $(target).sources ] ;
+ local source-files ;
+ for local s in $(sources)
+ {
+ if [ class.is-a $(s) : file-reference ]
+ {
+ local location = [ path.root [ path.root [ $(s).name ]
+ [ $(s).location ] ] [ path.pwd ] ] ;
+
+ source-files += [ path.relative-to [ path.root $(project-root)
+ [ path.pwd ] ] $(location) ] ;
+ }
+ }
+
+ local target-name =
+ [ $(project).get location ] // [ $(target).name ] $(.TEST-DIR-SUFFIX) ;
+ target-name = $(target-name:J=) ;
+
+ local r = [ $(target).requirements ] ;
+ # Extract values of the <test-info> feature.
+ local test-info = [ $(r).get <test-info> ] ;
+
+ # If the user requested XML output on the command-line, add the test info to
+ # that XML file rather than dumping them to stdout.
+ if $(.out-xml)
+ {
+ local nl = "
+" ;
+ .contents on $(.out-xml) +=
+ "$(nl) <test type=\"$(type)\" name=\"$(name)\">"
+ "$(nl) <target><![CDATA[$(target-name)]]></target>"
+ "$(nl) <info><![CDATA[$(test-info)]]></info>"
+ "$(nl) <source><![CDATA[$(source-files)]]></source>"
+ "$(nl) </test>"
+ ;
+ }
+ else
+ {
+ # Format them into a single string of quoted strings.
+ test-info = \"$(test-info:J=\"\ \")\" ;
+
+ ECHO boost-test($(type)) \"$(name)\" "[$(test-info)]" ":"
+ \"$(source-files)\" ;
+ }
+}
+
+class testing.expect-failure-generator : generator
+{
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ for local s in $(sources)
+ {
+ local a = [ $(s).action ] ;
+ if $(a)
+ {
+ for local t in [ $(a).targets ]
+ {
+ $(t).fail-expected ;
+ }
+ }
+ }
+ return [ generator.generated-targets $(sources)
+ : $(property-set) : $(project) $(name) ] ;
+ }
+}
+
+local rule register-fail-expected ( source-type : test-type )
+{
+ generators.register [ class.new testing.expect-failure-generator
+ testing.expect-failure : $(source-type) : $(test-type) ] ;
+}
+
+# Register generators. Depending on target type, either 'expect-success' or
+# 'expect-failure' rule will be used.
+generators.register-standard testing.expect-success : OBJ : COMPILE ;
+register-fail-expected OBJ : COMPILE_FAIL ;
+generators.register-standard testing.expect-success : RUN_OUTPUT : RUN ;
+register-fail-expected RUN_OUTPUT : RUN_FAIL ;
+generators.register-standard testing.expect-success : EXE : LINK ;
+register-fail-expected EXE : LINK_FAIL ;
+
+# Generator which runs an EXE and captures output.
+generators.register-standard testing.capture-output : EXE : RUN_OUTPUT ;
+
+# Generator which creates a target if sources run successfully. Differs from RUN
+# in that run output is not captured. The reason why it exists is that the 'run'
+# rule is much better for automated testing, but is not user-friendly (see
+# http://article.gmane.org/gmane.comp.lib.boost.build/6353).
+generators.register-standard testing.unit-test : EXE : UNIT_TEST ;
+
+toolset.uses-features testing.expect-success : <preserve-test-targets> ;
+toolset.uses-features testing.expect-failure : <preserve-test-targets> ;
+
+# The action rules called by generators.
+
+# Causes the 'target' to exist after bjam invocation if and only if all the
+# dependencies were successfully built.
+#
+rule expect-success ( target : dependency + : requirements * )
+{
+ **passed** $(target) : $(dependency) : $(requirements) ;
+}
+
+
+# Causes the 'target' to exist after bjam invocation if and only if all some of
+# the dependencies were not successfully built.
+#
+rule expect-failure ( target : dependency + : properties * )
+{
+ local grist = [ MATCH ^<(.*)> : $(dependency:G) ] ;
+ local marker = $(dependency:G=$(grist)*fail) ;
+ (failed-as-expected) $(marker) ;
+ LOCATE on $(marker) = [ on $(dependency) return $(LOCATE) ] ;
+ RMOLD $(marker) ;
+ DEPENDS $(marker) : $(dependency) ;
+ DEPENDS $(target) : $(marker) ;
+ **passed** $(target) : $(marker) : $(properties) ;
+}
+
+
+# The rule/action combination used to report successful passing of a test.
+#
+rule **passed** ( target : sources * : properties * )
+{
+ if [ feature.get-values preserve-test-targets : $(properties) ] = off
+ {
+ remove-test-targets $(<) ;
+ }
+ # Force deletion of the target, in case any dependencies failed to build.
+ RMOLD $(<) ;
+}
+
+
+
+# Used to create test files signifying passed tests.
+#
+actions **passed**
+{
+ echo passed > "$(<)"
+}
+
+# Used to create replacement object files that do not get created during tests
+# that are expected to fail.
+#
+actions (failed-as-expected)
+{
+ echo failed as expected > "$(<)"
+}
+
+
+if [ os.name ] = VMS
+{
+ actions **passed**
+ {
+ PIPE WRITE SYS$OUTPUT "passed" > $(<:W)
+ }
+
+ actions (failed-as-expected)
+ {
+ PIPE WRITE SYS$OUTPUT "failed as expected" > $(<:W)
+ }
+}
+
+rule run-path-setup ( target : source : properties * )
+{
+ # For testing, we need to make sure that all dynamic libraries needed by the
+ # test are found. So, we collect all paths from dependency libraries (via
+ # xdll-path property) and add whatever explicit dll-path user has specified.
+ # The resulting paths are added to the environment on each test invocation.
+ local target-os = [ feature.get-values <target-os> : $(properties) ] ;
+ local dll-paths = [ feature.get-values <dll-path> : $(properties) ] ;
+ dll-paths += [ feature.get-values <xdll-path> : $(properties) ] ;
+ if $(target-os) != vxworks
+ {
+ dll-paths += [ on $(source) return $(RUN_PATH) ] ;
+ }
+ dll-paths = [ sequence.unique $(dll-paths) ] ;
+ if $(dll-paths)
+ {
+ translate-to-os = path.native ;
+ if [ os.name ] = VMS
+ {
+ translate-to-os = path.to-VMS ;
+ }
+ if $(target-os) = vxworks
+ {
+ # map <build-os> paths to <target-os> paths
+ local save-os = [ modules.peek os : .name ] ;
+ modules.poke os : .name : VXWORKS ;
+ local parent = [ os.environ PKG_SRC_BUILD_DIR ] ;
+ local prefix = [ os.environ LAYER_SRC_PATH ] ;
+ local target-dll-paths ;
+ for local e in $(dll-paths)
+ {
+ target-dll-paths += [ path.join $(prefix) [ path.relative $(e) $(parent) : noerror ] ] ;
+ }
+ PATH_SETUP on $(target) = [ common.prepend-path-variable-command
+ [ os.shared-library-path-variable ] : $(target-dll-paths) ] ;
+ modules.poke os : .name : $(save-os) ;
+ }
+ else
+ {
+ dll-paths = [ sequence.transform $(translate-to-os) : $(dll-paths) ] ;
+ PATH_SETUP on $(target) = [ common.prepend-path-variable-command
+ [ os.shared-library-path-variable ] : $(dll-paths) ] ;
+ }
+ }
+}
+
+
+local argv = [ modules.peek : ARGV ] ;
+
+toolset.flags testing.capture-output ARGS <testing.arg> ;
+toolset.flags testing.capture-output INPUT_FILES <testing.input-file> ;
+toolset.flags testing.capture-output LAUNCHER <testing.launcher> ;
+
+toolset.uses-features testing.capture-output :
+ <testing.launcher> <testing.execute> <dll-path> <xdll-path> <target-os> ;
+
+if --remove-test-targets in [ modules.peek : ARGV ]
+{
+ feature.set-default preserve-test-targets : off ;
+}
+
+
+# Runs executable 'sources' and stores stdout in file 'target'. Unless
+# --preserve-test-targets command line option has been specified, removes the
+# executable.
+#
+rule capture-output ( target : source : properties * )
+{
+ output-file on $(target) = $(target:S=.output) ;
+ LOCATE on $(target:S=.output) = [ on $(target) return $(LOCATE) ] ;
+
+ # The INCLUDES kill a warning about independent target...
+ INCLUDES $(target) : $(target:S=.output) ;
+ # but it also puts .output into dependency graph, so we must tell jam it is
+ # OK if it cannot find the target or updating rule.
+ NOCARE $(target:S=.output) ;
+
+ # This has two-fold effect. First it adds input files to the dependency
+ # graph, preventing a warning. Second, it causes input files to be bound
+ # before target is created. Therefore, they are bound using SEARCH setting
+ # on them and not LOCATE setting of $(target), as in other case (due to jam
+ # bug).
+ DEPENDS $(target) : [ on $(target) return $(INPUT_FILES) ] ;
+
+ run-path-setup $(target) : $(source) : $(properties) ;
+
+ DISABLE_TEST_EXECUTION on $(target) = 0 ;
+ if [ feature.get-values testing.execute : $(properties) ] = off
+ {
+ DISABLE_TEST_EXECUTION on $(target) = 1 ;
+ }
+
+ if ! [ feature.get-values testing.launcher : $(properties) ]
+ {
+ ## On VMS set default launcher to MCR
+ if [ os.name ] = VMS { LAUNCHER on $(target) = MCR ; }
+ }
+}
+
+.types-to-remove = EXE OBJ ;
+
+local rule remove-test-targets ( target )
+{
+ local action = [ on $(target) return $(.action) ] ;
+ local associated-targets = [ virtual-target.traverse [ $(action).targets ] ] ;
+ local targets-to-remove ;
+ for local t in [ sequence.unique $(associated-targets) ]
+ {
+ if [ $(t).type ] in $(.types-to-remove)
+ {
+ targets-to-remove += [ $(t).actual-name ] ;
+ }
+ }
+ rmtemp-sources $(target) : $(targets-to-remove) ;
+}
+
+local rule rmtemp-sources ( target : sources * )
+{
+ if $(sources)
+ {
+ TEMPORARY $(sources) ;
+ # Set a second action on target that will be executed after capture
+ # output action. The 'RmTemps' rule has the 'ignore' modifier so it is
+ # always considered succeeded. This is needed for 'run-fail' test. For
+ # that test the target will be marked with FAIL_EXPECTED, and without
+ # 'ignore' successful execution will be negated and be reported as
+ # failure. With 'ignore' we do not detect a case where removing files
+ # fails, but it is not likely to happen.
+ RmTemps $(target) : $(sources) ;
+ }
+}
+
+
+if [ os.name ] = NT
+{
+ .STATUS = %status% ;
+ .SET_STATUS = "set status=%ERRORLEVEL%" ;
+ .RUN_OUTPUT_NL = "echo." ;
+ .THEN = "(" ;
+ .EXIT_SUCCESS = "0" ;
+ .STATUS_0 = "%status% EQU 0 $(.THEN)" ;
+ .STATUS_NOT_0 = "%status% NEQ 0 $(.THEN)" ;
+ .VERBOSE = "%verbose% EQU 1 $(.THEN)" ;
+ .ENDIF = ")" ;
+ .SHELL_SET = "set " ;
+ .CATENATE = type ;
+ .CP = copy ;
+ .NULLIN = ;
+}
+else if [ os.name ] = VMS
+{
+ local nl = "
+" ;
+
+ .STATUS = "''status'" ;
+ .SET_STATUS = "status=$STATUS" ;
+ .SAY = "pipe write sys$output" ; ## not really echo
+ .RUN_OUTPUT_NL = "$(.SAY) \"\"" ;
+ .THEN = "$(nl)then" ;
+ .EXIT_SUCCESS = "1" ;
+ .SUCCESS = "status .eq. $(.EXIT_SUCCESS) $(.THEN)" ;
+ .STATUS_0 = "status .eq. 0 $(.THEN)" ;
+ .STATUS_NOT_0 = "status .ne. 0 $(.THEN)" ;
+ .VERBOSE = "verbose .eq. 1 $(.THEN)" ;
+ .ENDIF = "endif" ;
+ .SHELL_SET = "" ;
+ .CATENATE = type ;
+ .CP = copy ;
+ .NULLIN = ;
+}
+else
+{
+ .STATUS = "$status" ;
+ .SET_STATUS = "status=$?" ;
+ .RUN_OUTPUT_NL = "echo" ;
+ .THEN = "; then" ;
+ .EXIT_SUCCESS = "0" ;
+ .STATUS_0 = "test $status -eq 0 $(.THEN)" ;
+ .STATUS_NOT_0 = "test $status -ne 0 $(.THEN)" ;
+ .VERBOSE = "test $verbose -eq 1 $(.THEN)" ;
+ .ENDIF = "fi" ;
+ .SHELL_SET = "" ;
+ .CATENATE = cat ;
+ .CP = cp ;
+ .NULLIN = "<" "/dev/null" ;
+}
+
+
+.VERBOSE_TEST = 0 ;
+if --verbose-test in [ modules.peek : ARGV ]
+{
+ .VERBOSE_TEST = 1 ;
+}
+
+
+.RM = [ common.rm-command ] ;
+
+
+actions capture-output bind INPUT_FILES output-file
+{
+ $(PATH_SETUP)
+ $(.SHELL_SET)status=$(DISABLE_TEST_EXECUTION)
+ if $(.STATUS_NOT_0)
+ echo Skipping test execution due to testing.execute=off
+ exit $(.EXIT_SUCCESS)
+ $(.ENDIF)
+ $(LAUNCHER) "$(>)" $(ARGS) "$(INPUT_FILES)" > "$(output-file)" 2>&1 $(.NULLIN)
+ $(.SET_STATUS)
+ $(.RUN_OUTPUT_NL) >> "$(output-file)"
+ echo EXIT STATUS: $(.STATUS) >> "$(output-file)"
+ if $(.STATUS_0)
+ $(.CP) "$(output-file)" "$(<)"
+ $(.ENDIF)
+ $(.SHELL_SET)verbose=$(.VERBOSE_TEST)
+ if $(.STATUS_NOT_0)
+ $(.SHELL_SET)verbose=1
+ $(.ENDIF)
+ if $(.VERBOSE)
+ echo ====== BEGIN OUTPUT ======
+ $(.CATENATE) "$(output-file)"
+ echo ====== END OUTPUT ======
+ $(.ENDIF)
+ exit $(.STATUS)
+}
+
+
+actions quietly updated ignore piecemeal together RmTemps
+{
+ $(.RM) "$(>)"
+}
+
+if [ os.name ] = VMS
+{
+ actions capture-output bind INPUT_FILES output-file
+ {
+ $(PATH_SETUP)
+ $(.SHELL_SET)status=$(DISABLE_TEST_EXECUTION)
+ if $(.STATUS_NOT_0)
+ $(.SAY) "Skipping test execution due to testing.execute=off"
+ exit "$(.EXIT_SUCCESS)"
+ $(.ENDIF)
+ !! Execute twice - first for status, second for output
+ set noon
+ pipe $(LAUNCHER) $(>:W) $(ARGS) $(INPUT_FILES:W) 2>NL: >NL:
+ $(.SET_STATUS)
+ pipe $(LAUNCHER) $(>:W) $(ARGS) $(INPUT_FILES:W) | type sys$input /out=$(output-file:W)
+ set on
+ !! Harmonize VMS success status with POSIX
+ if $(.SUCCESS)
+ $(.SHELL_SET)status="0"
+ $(.ENDIF)
+ $(.RUN_OUTPUT_NL) | append /new sys$input $(output-file:W)
+ $(.SAY) "EXIT STATUS: $(.STATUS)" | append /new sys$input $(output-file:W)
+ if $(.STATUS_0)
+ $(.CP) $(output-file:W) $(<:W)
+ $(.ENDIF)
+ $(.SHELL_SET)verbose=$(.VERBOSE_TEST)
+ if $(.STATUS_NOT_0)
+ $(.SHELL_SET)verbose=1
+ $(.ENDIF)
+ if $(.VERBOSE)
+ $(.SAY) "====== BEGIN OUTPUT ======"
+ $(.CATENATE) $(output-file:W)
+ $(.SAY) "====== END OUTPUT ======"
+ $(.ENDIF)
+ !! Harmonize VMS success status with POSIX on exit
+ if $(.STATUS_0)
+ $(.SHELL_SET)status="$(.EXIT_SUCCESS)"
+ $(.ENDIF)
+ exit "$(.STATUS)"
+ }
+
+ actions quietly updated ignore piecemeal together RmTemps
+ {
+ $(.RM) $(>:WJ=;*,);*
+ }
+}
+
+.MAKE_FILE = [ common.file-creation-command ] ;
+
+toolset.flags testing.unit-test LAUNCHER <testing.launcher> ;
+toolset.flags testing.unit-test ARGS <testing.arg> ;
+
+
+rule unit-test ( target : source : properties * )
+{
+ run-path-setup $(target) : $(source) : $(properties) ;
+
+ if ! [ feature.get-values testing.launcher : $(properties) ]
+ {
+ ## On VMS set default launcher to MCR
+ if [ os.name ] = VMS { LAUNCHER on $(target) = MCR ; }
+ }
+}
+
+
+actions unit-test
+{
+ $(PATH_SETUP)
+ $(LAUNCHER) "$(>)" $(ARGS) && $(.MAKE_FILE) "$(<)"
+}
+
+if [ os.name ] = VMS
+{
+ actions unit-test
+ {
+ $(PATH_SETUP)
+ pipe $(LAUNCHER) $(>:W) $(ARGS) && $(.MAKE_FILE) $(<:W)
+ }
+}
+
+IMPORT $(__name__) : compile compile-fail run run-fail link link-fail
+ : : compile compile-fail run run-fail link link-fail ;
+
+
+# This is a composing generator to support cases where a generator for the
+# specified target constructs other targets as well. One such example is msvc's
+# exe generator that constructs both EXE and PDB targets.
+type.register TIME : time ;
+generators.register-composing testing.time : : TIME ;
+
+
+# Note that this rule may be called multiple times for a single target in case
+# there are multiple actions operating on the same target in sequence. One such
+# example are msvc exe targets first created by a linker action and then updated
+# with an embedded manifest file by a separate action.
+rule record-time ( target : source : start end user system clock )
+{
+ local src-string = "[$(source:G=:J=,)] " ;
+ USER_TIME on $(target) += $(src-string)$(user) ;
+ SYSTEM_TIME on $(target) += $(src-string)$(system) ;
+ CLOCK_TIME on $(target) += $(src-string)$(clock) ;
+
+ # We need the following variables because attempting to perform such
+ # variable expansion in actions would not work due to quotes getting treated
+ # as regular characters.
+ USER_TIME_SECONDS on $(target) += $(src-string)$(user)" seconds" ;
+ SYSTEM_TIME_SECONDS on $(target) += $(src-string)$(system)" seconds" ;
+ CLOCK_TIME_SECONDS on $(target) += $(src-string)$(clock)" seconds" ;
+}
+
+
+# Support for generating timing information for any main target. To use
+# declare a custom make target that uses the testing.time generator rule
+# specified here. For example:
+#
+# make main.cpp : main_cpp.pro : @do-something ;
+# time main.time : main.cpp ;
+# actions do-something
+# {
+# sleep 2 && echo "$(<)" > "$(<)"
+# }
+#
+# The above will generate a "main.time", and echo to output, timing
+# information for the action of source "main.cpp".
+
+
+IMPORT testing : record-time : : testing.record-time ;
+
+
+# Calling this rule requests that Boost Build time how long it takes to build
+# the 'source' target and display the results both on the standard output and in
+# the 'target' file.
+#
+rule time ( target : sources + : properties * )
+{
+ # Set up rule for recording timing information.
+ local action = [ on $(target) return $(.action) ] ;
+ for local action.source in [ $(action).sources ]
+ {
+ # Yes, this uses the private "actual-name" of the target action.
+ # But it's the only way to get at the real name of the sources
+ # given the context of header scanners.
+ __TIMING_RULE__ on [ $(action.source).actual-name ] = testing.record-time $(target) ;
+ }
+
+ # Make sure the sources get rebuilt any time we need to retrieve that
+ # information.
+ REBUILDS $(target) : $(sources) ;
+}
+
+
+actions time
+{
+ echo user: $(USER_TIME)
+ echo system: $(SYSTEM_TIME)
+ echo clock: $(CLOCK_TIME)
+
+ echo user: $(USER_TIME_SECONDS) > "$(<)"
+ echo system: $(SYSTEM_TIME_SECONDS) >> "$(<)"
+ echo clock: $(CLOCK_TIME_SECONDS) >> "$(<)"
+}
+
+if [ os.name ] = VMS
+{
+ actions time
+ {
+ WRITE SYS$OUTPUT "user: ", "$(USER_TIME)"
+ WRITE SYS$OUTPUT "system: ", "(SYSTEM_TIME)"
+ WRITE SYS$OUTPUT "clock: ", "(CLOCK_TIME)"
+
+ PIPE WRITE SYS$OUTPUT "user: ", "$(USER_TIME_SECONDS)" | TYPE SYS$INPUT /OUT=$(<:W)
+ PIPE WRITE SYS$OUTPUT "system: ", "$(SYSTEM_TIME_SECONDS)" | APPEND /NEW SYS$INPUT $(<:W)
+ PIPE WRITE SYS$OUTPUT "clock: ", "$(CLOCK_TIME_SECONDS)" | APPEND /NEW SYS$INPUT $(<:W)
+ }
+}
diff --git a/src/boost/tools/build/src/tools/testing.py b/src/boost/tools/build/src/tools/testing.py
new file mode 100644
index 000000000..8f1c0b330
--- /dev/null
+++ b/src/boost/tools/build/src/tools/testing.py
@@ -0,0 +1,359 @@
+# Status: ported, except for --out-xml
+# Base revision: 64488
+#
+# Copyright 2005 Dave Abrahams
+# Copyright 2002, 2003, 2004, 2005, 2010 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 module implements regression testing framework. It declares a number of
+# main target rules which perform some action and, if the results are OK,
+# creates an output file.
+#
+# The exact list of rules is:
+# 'compile' -- creates .test file if compilation of sources was
+# successful.
+# 'compile-fail' -- creates .test file if compilation of sources failed.
+# 'run' -- creates .test file is running of executable produced from
+# sources was successful. Also leaves behind .output file
+# with the output from program run.
+# 'run-fail' -- same as above, but .test file is created if running fails.
+#
+# In all cases, presence of .test file is an indication that the test passed.
+# For more convenient reporting, you might want to use C++ Boost regression
+# testing utilities (see http://www.boost.org/more/regression.html).
+#
+# For historical reason, a 'unit-test' rule is available which has the same
+# syntax as 'exe' and behaves just like 'run'.
+
+# Things to do:
+# - Teach compiler_status handle Jamfile.v2.
+# Notes:
+# - <no-warn> is not implemented, since it is Como-specific, and it is not
+# clear how to implement it
+# - std::locale-support is not implemented (it is used in one test).
+
+import b2.build.feature as feature
+import b2.build.type as type
+import b2.build.targets as targets
+import b2.build.generators as generators
+import b2.build.toolset as toolset
+import b2.tools.common as common
+import b2.util.option as option
+import b2.build_system as build_system
+
+
+
+from b2.manager import get_manager
+from b2.util import stem, bjam_signature, is_iterable_typed
+from b2.util.sequence import unique
+
+import bjam
+
+import re
+import os.path
+import sys
+
+def init():
+ pass
+
+# Feature controlling the command used to lanch test programs.
+feature.feature("testing.launcher", [], ["free", "optional"])
+
+feature.feature("test-info", [], ["free", "incidental"])
+feature.feature("testing.arg", [], ["free", "incidental"])
+feature.feature("testing.input-file", [], ["free", "dependency"])
+
+feature.feature("preserve-test-targets", ["on", "off"], ["incidental", "propagated"])
+
+# Register target types.
+type.register("TEST", ["test"])
+type.register("COMPILE", [], "TEST")
+type.register("COMPILE_FAIL", [], "TEST")
+
+type.register("RUN_OUTPUT", ["run"])
+type.register("RUN", [], "TEST")
+type.register("RUN_FAIL", [], "TEST")
+
+type.register("LINK", [], "TEST")
+type.register("LINK_FAIL", [], "TEST")
+type.register("UNIT_TEST", ["passed"], "TEST")
+
+__all_tests = []
+
+# Declare the rules which create main targets. While the 'type' module already
+# creates rules with the same names for us, we need extra convenience: default
+# name of main target, so write our own versions.
+
+# Helper rule. Create a test target, using basename of first source if no target
+# name is explicitly passed. Remembers the created target in a global variable.
+def make_test(target_type, sources, requirements, target_name=None):
+ assert isinstance(target_type, basestring)
+ assert is_iterable_typed(sources, basestring)
+ assert is_iterable_typed(requirements, basestring)
+ assert isinstance(target_type, basestring) or target_type is None
+ if not target_name:
+ target_name = stem(os.path.basename(sources[0]))
+
+ # Having periods (".") in the target name is problematic because the typed
+ # generator will strip the suffix and use the bare name for the file
+ # targets. Even though the location-prefix averts problems most times it
+ # does not prevent ambiguity issues when referring to the test targets. For
+ # example when using the XML log output. So we rename the target to remove
+ # the periods, and provide an alias for users.
+ real_name = target_name.replace(".", "~")
+
+ project = get_manager().projects().current()
+ # The <location-prefix> forces the build system for generate paths in the
+ # form '$build_dir/array1.test/gcc/debug'. This is necessary to allow
+ # post-processing tools to work.
+ t = get_manager().targets().create_typed_target(
+ type.type_from_rule_name(target_type), project, real_name, sources,
+ requirements + ["<location-prefix>" + real_name + ".test"], [], [])
+
+ # The alias to the real target, per period replacement above.
+ if real_name != target_name:
+ get_manager().projects().project_rules().rules["alias"](
+ target_name, [t])
+
+ # Remember the test (for --dump-tests). A good way would be to collect all
+ # given a project. This has some technical problems: e.g. we can not call
+ # this dump from a Jamfile since projects referred by 'build-project' are
+ # not available until the whole Jamfile has been loaded.
+ __all_tests.append(t)
+ return t
+
+
+# Note: passing more that one cpp file here is known to fail. Passing a cpp file
+# and a library target works.
+#
+@bjam_signature((["sources", "*"], ["requirements", "*"], ["target_name", "?"]))
+def compile(sources, requirements, target_name=None):
+ return make_test("compile", sources, requirements, target_name)
+
+@bjam_signature((["sources", "*"], ["requirements", "*"], ["target_name", "?"]))
+def compile_fail(sources, requirements, target_name=None):
+ return make_test("compile-fail", sources, requirements, target_name)
+
+@bjam_signature((["sources", "*"], ["requirements", "*"], ["target_name", "?"]))
+def link(sources, requirements, target_name=None):
+ return make_test("link", sources, requirements, target_name)
+
+@bjam_signature((["sources", "*"], ["requirements", "*"], ["target_name", "?"]))
+def link_fail(sources, requirements, target_name=None):
+ return make_test("link-fail", sources, requirements, target_name)
+
+def handle_input_files(input_files):
+ if len(input_files) > 1:
+ # Check that sorting made when creating property-set instance will not
+ # change the ordering.
+ if sorted(input_files) != input_files:
+ get_manager().errors()("Names of input files must be sorted alphabetically\n" +
+ "due to internal limitations")
+ return ["<testing.input-file>" + f for f in input_files]
+
+@bjam_signature((["sources", "*"], ["args", "*"], ["input_files", "*"],
+ ["requirements", "*"], ["target_name", "?"],
+ ["default_build", "*"]))
+def run(sources, args, input_files, requirements, target_name=None, default_build=[]):
+ if args:
+ requirements.append("<testing.arg>" + " ".join(args))
+ requirements.extend(handle_input_files(input_files))
+ return make_test("run", sources, requirements, target_name)
+
+@bjam_signature((["sources", "*"], ["args", "*"], ["input_files", "*"],
+ ["requirements", "*"], ["target_name", "?"],
+ ["default_build", "*"]))
+def run_fail(sources, args, input_files, requirements, target_name=None, default_build=[]):
+ if args:
+ requirements.append("<testing.arg>" + " ".join(args))
+ requirements.extend(handle_input_files(input_files))
+ return make_test("run-fail", sources, requirements, target_name)
+
+# Register all the rules
+for name in ["compile", "compile-fail", "link", "link-fail", "run", "run-fail"]:
+ get_manager().projects().add_rule(name, getattr(sys.modules[__name__], name.replace("-", "_")))
+
+# Use 'test-suite' as a synonym for 'alias', for backward compatibility.
+from b2.build.alias import alias
+get_manager().projects().add_rule("test-suite", alias)
+
+# For all main targets in 'project-module', which are typed targets with type
+# derived from 'TEST', produce some interesting information.
+#
+def dump_tests():
+ for t in __all_tests:
+ dump_test(t)
+
+# Given a project location in normalized form (slashes are forward), compute the
+# name of the Boost library.
+#
+__ln1 = re.compile("/(tools|libs)/(.*)/(test|example)")
+__ln2 = re.compile("/(tools|libs)/(.*)$")
+__ln3 = re.compile("(/status$)")
+def get_library_name(path):
+ assert isinstance(path, basestring)
+
+ path = path.replace("\\", "/")
+ match1 = __ln1.match(path)
+ match2 = __ln2.match(path)
+ match3 = __ln3.match(path)
+
+ if match1:
+ return match1.group(2)
+ elif match2:
+ return match2.group(2)
+ elif match3:
+ return ""
+ elif option.get("dump-tests", False, True):
+ # The 'run' rule and others might be used outside boost. In that case,
+ # just return the path, since the 'library name' makes no sense.
+ return path
+
+# Was an XML dump requested?
+__out_xml = option.get("out-xml", False, True)
+
+# Takes a target (instance of 'basic-target') and prints
+# - its type
+# - its name
+# - comments specified via the <test-info> property
+# - relative location of all source from the project root.
+#
+def dump_test(target):
+ assert isinstance(target, targets.AbstractTarget)
+ type = target.type()
+ name = target.name()
+ project = target.project()
+
+ project_root = project.get('project-root')
+ library = get_library_name(os.path.abspath(project.get('location')))
+ if library:
+ name = library + "/" + name
+
+ sources = target.sources()
+ source_files = []
+ for s in sources:
+ if isinstance(s, targets.FileReference):
+ location = os.path.abspath(os.path.join(s.location(), s.name()))
+ source_files.append(os.path.relpath(location, os.path.abspath(project_root)))
+
+ target_name = project.get('location') + "//" + target.name() + ".test"
+
+ test_info = target.requirements().get('test-info')
+ test_info = " ".join('"' + ti + '"' for ti in test_info)
+
+ # If the user requested XML output on the command-line, add the test info to
+ # that XML file rather than dumping them to stdout.
+ #if $(.out-xml)
+ #{
+# local nl = "
+#" ;
+# .contents on $(.out-xml) +=
+# "$(nl) <test type=\"$(type)\" name=\"$(name)\">"
+# "$(nl) <target><![CDATA[$(target-name)]]></target>"
+# "$(nl) <info><![CDATA[$(test-info)]]></info>"
+# "$(nl) <source><![CDATA[$(source-files)]]></source>"
+# "$(nl) </test>"
+# ;
+# }
+# else
+
+ source_files = " ".join('"' + s + '"' for s in source_files)
+ if test_info:
+ print 'boost-test(%s) "%s" [%s] : %s' % (type, name, test_info, source_files)
+ else:
+ print 'boost-test(%s) "%s" : %s' % (type, name, source_files)
+
+# Register generators. Depending on target type, either 'expect-success' or
+# 'expect-failure' rule will be used.
+generators.register_standard("testing.expect-success", ["OBJ"], ["COMPILE"])
+generators.register_standard("testing.expect-failure", ["OBJ"], ["COMPILE_FAIL"])
+generators.register_standard("testing.expect-success", ["RUN_OUTPUT"], ["RUN"])
+generators.register_standard("testing.expect-failure", ["RUN_OUTPUT"], ["RUN_FAIL"])
+generators.register_standard("testing.expect-success", ["EXE"], ["LINK"])
+generators.register_standard("testing.expect-failure", ["EXE"], ["LINK_FAIL"])
+
+# Generator which runs an EXE and captures output.
+generators.register_standard("testing.capture-output", ["EXE"], ["RUN_OUTPUT"])
+
+# Generator which creates a target if sources run successfully. Differs from RUN
+# in that run output is not captured. The reason why it exists is that the 'run'
+# rule is much better for automated testing, but is not user-friendly (see
+# http://article.gmane.org/gmane.comp.lib.boost.build/6353).
+generators.register_standard("testing.unit-test", ["EXE"], ["UNIT_TEST"])
+
+# FIXME: if those calls are after bjam.call, then bjam will crash
+# when toolset.flags calls bjam.caller.
+toolset.flags("testing.capture-output", "ARGS", [], ["<testing.arg>"])
+toolset.flags("testing.capture-output", "INPUT_FILES", [], ["<testing.input-file>"])
+toolset.flags("testing.capture-output", "LAUNCHER", [], ["<testing.launcher>"])
+
+toolset.flags("testing.unit-test", "LAUNCHER", [], ["<testing.launcher>"])
+toolset.flags("testing.unit-test", "ARGS", [], ["<testing.arg>"])
+
+# This is a composing generator to support cases where a generator for the
+# specified target constructs other targets as well. One such example is msvc's
+# exe generator that constructs both EXE and PDB targets.
+type.register("TIME", ["time"])
+generators.register_composing("testing.time", [], ["TIME"])
+
+
+# The following code sets up actions for this module. It's pretty convoluted,
+# but the basic points is that we most of actions are defined by Jam code
+# contained in testing-aux.jam, which we load into Jam module named 'testing'
+
+def run_path_setup(target, sources, ps):
+ if __debug__:
+ from ..build.property_set import PropertySet
+ assert is_iterable_typed(target, basestring) or isinstance(target, basestring)
+ assert is_iterable_typed(sources, basestring)
+ assert isinstance(ps, PropertySet)
+ # For testing, we need to make sure that all dynamic libraries needed by the
+ # test are found. So, we collect all paths from dependency libraries (via
+ # xdll-path property) and add whatever explicit dll-path user has specified.
+ # The resulting paths are added to the environment on each test invocation.
+ dll_paths = ps.get('dll-path')
+ dll_paths.extend(ps.get('xdll-path'))
+ dll_paths.extend(bjam.call("get-target-variable", sources, "RUN_PATH"))
+ dll_paths = unique(dll_paths)
+ if dll_paths:
+ bjam.call("set-target-variable", target, "PATH_SETUP",
+ common.prepend_path_variable_command(
+ common.shared_library_path_variable(), dll_paths))
+
+def capture_output_setup(target, sources, ps):
+ if __debug__:
+ from ..build.property_set import PropertySet
+ assert is_iterable_typed(target, basestring)
+ assert is_iterable_typed(sources, basestring)
+ assert isinstance(ps, PropertySet)
+ run_path_setup(target[0], sources, ps)
+
+ if ps.get('preserve-test-targets') == ['off']:
+ bjam.call("set-target-variable", target, "REMOVE_TEST_TARGETS", "1")
+
+get_manager().engine().register_bjam_action("testing.capture-output",
+ capture_output_setup)
+
+
+path = os.path.dirname(__file__)
+import b2.util.os_j
+get_manager().projects().project_rules()._import_rule("testing", "os.name",
+ b2.util.os_j.name)
+import b2.tools.common
+get_manager().projects().project_rules()._import_rule("testing", "common.rm-command",
+ b2.tools.common.rm_command)
+get_manager().projects().project_rules()._import_rule("testing", "common.file-creation-command",
+ b2.tools.common.file_creation_command)
+
+bjam.call("load", "testing", os.path.join(path, "testing-aux.jam"))
+
+
+for name in ["expect-success", "expect-failure", "time"]:
+ get_manager().engine().register_bjam_action("testing." + name)
+
+get_manager().engine().register_bjam_action("testing.unit-test",
+ run_path_setup)
+
+if option.get("dump-tests", False, True):
+ build_system.add_pre_build_hook(dump_tests)
diff --git a/src/boost/tools/build/src/tools/types/__init__.py b/src/boost/tools/build/src/tools/types/__init__.py
new file mode 100644
index 000000000..9ee31d13a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/__init__.py
@@ -0,0 +1,19 @@
+__all__ = [
+ 'asm',
+ 'cpp',
+ 'exe',
+ 'html',
+ 'lib',
+ 'obj',
+ 'preprocessed',
+ 'rsp',
+]
+
+def register_all ():
+ for i in __all__:
+ m = __import__ (__name__ + '.' + i)
+ reg = i + '.register ()'
+ #exec (reg)
+
+# TODO: (PF) I thought these would be imported automatically. Anyone knows why they aren't?
+register_all ()
diff --git a/src/boost/tools/build/src/tools/types/adoc.jam b/src/boost/tools/build/src/tools/types/adoc.jam
new file mode 100644
index 000000000..9e0c5309e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/adoc.jam
@@ -0,0 +1,26 @@
+#|
+Copyright 2017 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)
+|#
+
+import scanner ;
+import type ;
+
+type ASCIIDOC : adoc asciidoc ;
+
+class asciidoc-scanner : common-scanner
+{
+ rule pattern ( )
+ {
+ return
+ "include::([^[]+)"
+ "image::([^[]+)"
+ "image:([^[]+)"
+ ;
+ }
+}
+
+scanner.register asciidoc-scanner : include ;
+type.set-scanner ASCIIDOC : asciidoc-scanner ;
diff --git a/src/boost/tools/build/src/tools/types/asm.jam b/src/boost/tools/build/src/tools/types/asm.jam
new file mode 100644
index 000000000..a340db36a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/asm.jam
@@ -0,0 +1,4 @@
+# Copyright Craig Rodrigues 2005. 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)
+type ASM : s S asm ;
diff --git a/src/boost/tools/build/src/tools/types/asm.py b/src/boost/tools/build/src/tools/types/asm.py
new file mode 100644
index 000000000..d9a30152e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/asm.py
@@ -0,0 +1,33 @@
+# Copyright Craig Rodrigues 2005.
+# Copyright (c) 2008 Steven Watanabe
+#
+# 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 b2.build import type as type_
+from b2.manager import get_manager
+from b2.tools.cast import cast
+from b2.util import bjam_signature
+
+
+MANAGER = get_manager()
+PROJECT_REGISTRY = MANAGER.projects()
+
+# maps project.name() + type to type
+_project_types = {}
+
+type_.register_type('ASM', ['s', 'S', 'asm'])
+
+
+@bjam_signature((['type_'], ['sources', '*'], ['name', '?']))
+def set_asm_type(type_, sources, name=''):
+ project = PROJECT_REGISTRY.current()
+ _project_types[project.name() + type_] = _project_types.get(
+ project.name() + type_, type_) + '_'
+
+ name = name if name else _project_types[project.name() + type_]
+ type_ += '.asm'
+ return cast(name, type_.upper(), sources, [], [], [])
+
+
+PROJECT_REGISTRY.add_rule("set-asm-type", set_asm_type)
diff --git a/src/boost/tools/build/src/tools/types/cpp.jam b/src/boost/tools/build/src/tools/types/cpp.jam
new file mode 100644
index 000000000..3fcf449a2
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/cpp.jam
@@ -0,0 +1,90 @@
+# Copyright 2004 David Abrahams
+# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus
+# Copyright 2010 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)
+
+import scanner ;
+import type ;
+
+
+class c-scanner : scanner
+{
+ import path ;
+ import regex ;
+ import scanner ;
+ import sequence ;
+ import toolset ;
+ import virtual-target ;
+
+ rule __init__ ( includes * )
+ {
+ scanner.__init__ ;
+
+ # toolset.handle-flag-value is a bit of overkill, but it
+ # does correctly handle the topological sort of && separated
+ # include paths
+ self.includes = [ toolset.handle-flag-value <include> : $(includes) ] ;
+ }
+
+ rule pattern ( )
+ {
+ return "#[ \t]*include[ \t]*(<(.*)>|\"(.*)\")" ;
+ }
+
+ rule process ( target : matches * : binding )
+ {
+ local angle = [ regex.transform $(matches) : "<(.*)>" ] ;
+ angle = [ sequence.transform path.native : $(angle) ] ;
+ local quoted = [ regex.transform $(matches) : "\"(.*)\"" ] ;
+ quoted = [ sequence.transform path.native : $(quoted) ] ;
+
+ # CONSIDER: the new scoping rules seem to defeat "on target" variables.
+ local g = [ on $(target) return $(HDRGRIST) ] ;
+ local b = [ NORMALIZE_PATH $(binding:D) ] ;
+
+ # Attach binding of including file to included targets. When a target is
+ # directly created from a virtual target this extra information is
+ # unnecessary. But in other cases, it allows us to distinguish between
+ # two headers of the same name included from different places. We do not
+ # need this extra information for angle includes, since they should not
+ # depend on the including file (we can not get literal "." in the
+ # include path).
+ local g2 = $(g)"#"$(b) ;
+
+ angle = $(angle:G=$(g)) ;
+ quoted = $(quoted:G=$(g2)) ;
+
+ local all = $(angle) $(quoted) ;
+
+ INCLUDES $(target) : $(all) ;
+ NOCARE $(all) ;
+ SEARCH on $(angle) = $(self.includes:G=) ;
+ SEARCH on $(quoted) = $(b) $(self.includes:G=) ;
+
+ # Just propagate the current scanner to includes, in hope that includes
+ # do not change scanners.
+ scanner.propagate $(__name__) : $(all) : $(target) ;
+
+ ISFILE $(all) ;
+ }
+}
+
+scanner.register c-scanner : include ;
+
+type.register CPP : cpp cxx cc ;
+type.register H : h ;
+type.register HPP : hpp : H ;
+type.register C : c ;
+
+# It most cases where a CPP file or a H file is a source of some action, we
+# should rebuild the result if any of files included by CPP/H are changed. One
+# case when this is not needed is installation, which is handled specifically.
+type.set-scanner CPP : c-scanner ;
+type.set-scanner C : c-scanner ;
+# One case where scanning of H/HPP files is necessary is PCH generation -- if
+# any header included by HPP being precompiled changes, we need to recompile the
+# header.
+type.set-scanner H : c-scanner ;
+type.set-scanner HPP : c-scanner ;
diff --git a/src/boost/tools/build/src/tools/types/cpp.py b/src/boost/tools/build/src/tools/types/cpp.py
new file mode 100644
index 000000000..50797bae4
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/cpp.py
@@ -0,0 +1,10 @@
+# Copyright David Abrahams 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)
+from b2.build import type as type_
+
+
+type_.register_type('CPP', ['cpp', 'cxx', 'cc'])
+type_.register_type('H', ['h'])
+type_.register_type('HPP', ['hpp'], 'H')
+type_.register_type('C', ['c'])
diff --git a/src/boost/tools/build/src/tools/types/css.jam b/src/boost/tools/build/src/tools/types/css.jam
new file mode 100644
index 000000000..81b55ff43
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/css.jam
@@ -0,0 +1,10 @@
+#|
+Copyright 2017 Dmitry Arkhipov
+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 type ;
+
+type CSS : css ;
diff --git a/src/boost/tools/build/src/tools/types/docbook.jam b/src/boost/tools/build/src/tools/types/docbook.jam
new file mode 100644
index 000000000..1ceb8d495
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/docbook.jam
@@ -0,0 +1,8 @@
+#|
+Copyright 2017 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)
+|#
+
+type DOCBOOK : docbook : XML ;
diff --git a/src/boost/tools/build/src/tools/types/exe.jam b/src/boost/tools/build/src/tools/types/exe.jam
new file mode 100644
index 000000000..47109513a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/exe.jam
@@ -0,0 +1,9 @@
+# Copyright David Abrahams 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)
+
+import type ;
+
+type.register EXE ;
+type.set-generated-target-suffix EXE : <target-os>windows : "exe" ;
+type.set-generated-target-suffix EXE : <target-os>cygwin : "exe" ;
diff --git a/src/boost/tools/build/src/tools/types/exe.py b/src/boost/tools/build/src/tools/types/exe.py
new file mode 100644
index 000000000..a4935e24e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/exe.py
@@ -0,0 +1,11 @@
+# Copyright David Abrahams 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)
+
+from b2.build import type
+
+def register ():
+ type.register_type ('EXE', ['exe'], None, ['NT', 'CYGWIN'])
+ type.register_type ('EXE', [], None, [])
+
+register ()
diff --git a/src/boost/tools/build/src/tools/types/html.jam b/src/boost/tools/build/src/tools/types/html.jam
new file mode 100644
index 000000000..5cd337d09
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/html.jam
@@ -0,0 +1,4 @@
+# Copyright David Abrahams 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)
+type HTML : html ;
diff --git a/src/boost/tools/build/src/tools/types/html.py b/src/boost/tools/build/src/tools/types/html.py
new file mode 100644
index 000000000..63af4d907
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/html.py
@@ -0,0 +1,10 @@
+# Copyright David Abrahams 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)
+
+from b2.build import type
+
+def register ():
+ type.register_type ('HTML', ['html'])
+
+register ()
diff --git a/src/boost/tools/build/src/tools/types/lib.jam b/src/boost/tools/build/src/tools/types/lib.jam
new file mode 100644
index 000000000..854ab8fd5
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/lib.jam
@@ -0,0 +1,74 @@
+# Copyright David Abrahams 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)
+
+import type ; # for set-generated-target-suffix
+import os ;
+
+# The following naming scheme is used for libraries.
+#
+# On *nix:
+# libxxx.a static library
+# libxxx.so shared library
+#
+# On windows (msvc)
+# libxxx.lib static library
+# xxx.dll DLL
+# xxx.lib import library
+#
+# On windows (mingw):
+# libxxx.a static library
+# libxxx.dll DLL
+# libxxx.dll.a import library
+#
+# On cygwin i.e. <target-os>cygwin
+# libxxx.a static library
+# cygxxx.dll DLL
+# libxxx.dll.a import library
+#
+
+type.register LIB ;
+
+# FIXME: should not register both extensions on both platforms.
+type.register STATIC_LIB : a lib : LIB ;
+
+# The 'lib' prefix is used everywhere
+type.set-generated-target-prefix STATIC_LIB : : lib ;
+
+# Use '.lib' suffix for windows
+type.set-generated-target-suffix STATIC_LIB : <target-os>windows : lib ;
+
+# Except with gcc.
+type.set-generated-target-suffix STATIC_LIB : <toolset>gcc <target-os>windows : a ;
+
+# Use xxx.lib for import libs
+type IMPORT_LIB : : STATIC_LIB ;
+type.set-generated-target-prefix IMPORT_LIB : : "" ;
+type.set-generated-target-suffix IMPORT_LIB : : lib ;
+
+# Except with gcc (mingw or cygwin), where use libxxx.dll.a
+type.set-generated-target-prefix IMPORT_LIB : <toolset>gcc : lib ;
+type.set-generated-target-suffix IMPORT_LIB : <toolset>gcc : dll.a ;
+
+type.register SHARED_LIB : so dll dylib : LIB ;
+
+# Both mingw and cygwin use libxxx.dll naming scheme.
+# On Linux, use "lib" prefix
+type.set-generated-target-prefix SHARED_LIB : : lib ;
+# But don't use it on windows
+type.set-generated-target-prefix SHARED_LIB : <target-os>windows : "" ;
+# But use it again on mingw
+type.set-generated-target-prefix SHARED_LIB : <toolset>gcc <target-os>windows : lib ;
+# And use 'cyg' on cygwin
+type.set-generated-target-prefix SHARED_LIB : <target-os>cygwin : cyg ;
+
+
+type.set-generated-target-suffix SHARED_LIB : <target-os>windows : dll ;
+type.set-generated-target-suffix SHARED_LIB : <target-os>cygwin : dll ;
+type.set-generated-target-suffix SHARED_LIB : <target-os>darwin : dylib ;
+
+type SEARCHED_LIB : : LIB ;
+# This is needed so that when we create a target of SEARCHED_LIB
+# type, there's no prefix or suffix automatically added.
+type.set-generated-target-prefix SEARCHED_LIB : : "" ;
+type.set-generated-target-suffix SEARCHED_LIB : : "" ;
diff --git a/src/boost/tools/build/src/tools/types/lib.py b/src/boost/tools/build/src/tools/types/lib.py
new file mode 100644
index 000000000..d0ec1fb52
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/lib.py
@@ -0,0 +1,77 @@
+# Status: ported
+# Base revision: 64456.
+# Copyright David Abrahams 2004.
+# Copyright Vladimir Prus 2010.
+# 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 b2.build.type as type
+
+# The following naming scheme is used for libraries.
+#
+# On *nix:
+# libxxx.a static library
+# libxxx.so shared library
+#
+# On windows (msvc)
+# libxxx.lib static library
+# xxx.dll DLL
+# xxx.lib import library
+#
+# On windows (mingw):
+# libxxx.a static library
+# libxxx.dll DLL
+# libxxx.dll.a import library
+#
+# On cygwin i.e. <target-os>cygwin
+# libxxx.a static library
+# cygxxx.dll DLL
+# libxxx.dll.a import library
+#
+
+type.register('LIB')
+
+# FIXME: should not register both extensions on both platforms.
+type.register('STATIC_LIB', ['a', 'lib'], 'LIB')
+
+# The 'lib' prefix is used everywhere
+type.set_generated_target_prefix('STATIC_LIB', [], 'lib')
+
+# Use '.lib' suffix for windows
+type.set_generated_target_suffix('STATIC_LIB', ['<target-os>windows'], 'lib')
+
+# Except with gcc.
+type.set_generated_target_suffix('STATIC_LIB', ['<toolset>gcc', '<target-os>windows'], 'a')
+
+# Use xxx.lib for import libs
+type.register('IMPORT_LIB', [], 'STATIC_LIB')
+type.set_generated_target_prefix('IMPORT_LIB', [], '')
+type.set_generated_target_suffix('IMPORT_LIB', [], 'lib')
+
+# Except with gcc (mingw or cygwin), where use libxxx.dll.a
+type.set_generated_target_prefix('IMPORT_LIB', ['<toolset>gcc'], 'lib')
+type.set_generated_target_suffix('IMPORT_LIB', ['<toolset>gcc'], 'dll.a')
+
+type.register('SHARED_LIB', ['so', 'dll', 'dylib'], 'LIB')
+
+# Both mingw and cygwin use libxxx.dll naming scheme.
+# On Linux, use "lib" prefix
+type.set_generated_target_prefix('SHARED_LIB', [], 'lib')
+# But don't use it on windows
+type.set_generated_target_prefix('SHARED_LIB', ['<target-os>windows'], '')
+# But use it again on mingw
+type.set_generated_target_prefix('SHARED_LIB', ['<toolset>gcc', '<target-os>windows'], 'lib')
+# And use 'cyg' on cygwin
+type.set_generated_target_prefix('SHARED_LIB', ['<target-os>cygwin'], 'cyg')
+
+
+type.set_generated_target_suffix('SHARED_LIB', ['<target-os>windows'], 'dll')
+type.set_generated_target_suffix('SHARED_LIB', ['<target-os>cygwin'], 'dll')
+type.set_generated_target_suffix('SHARED_LIB', ['<target-os>darwin'], 'dylib')
+
+type.register('SEARCHED_LIB', [], 'LIB')
+# This is needed so that when we create a target of SEARCHED_LIB
+# type, there's no prefix or suffix automatically added.
+type.set_generated_target_prefix('SEARCHED_LIB', [], '')
+type.set_generated_target_suffix('SEARCHED_LIB', [], '')
diff --git a/src/boost/tools/build/src/tools/types/man.jam b/src/boost/tools/build/src/tools/types/man.jam
new file mode 100644
index 000000000..4fb59a0fe
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/man.jam
@@ -0,0 +1,8 @@
+#|
+Copyright 2017 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)
+|#
+
+type MANPAGE : man 1M n p x ;
diff --git a/src/boost/tools/build/src/tools/types/markdown.jam b/src/boost/tools/build/src/tools/types/markdown.jam
new file mode 100644
index 000000000..936dabfaa
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/markdown.jam
@@ -0,0 +1,4 @@
+# Copyright David Abrahams 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)
+type MARKDOWN : md markdown ;
diff --git a/src/boost/tools/build/src/tools/types/markdown.py b/src/boost/tools/build/src/tools/types/markdown.py
new file mode 100644
index 000000000..c689c9a68
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/markdown.py
@@ -0,0 +1,10 @@
+# Copyright David Abrahams 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)
+
+from b2.build import type
+
+def register ():
+ type.register_type ('MARKDOWN', ['markdown', 'md'])
+
+register ()
diff --git a/src/boost/tools/build/src/tools/types/obj.jam b/src/boost/tools/build/src/tools/types/obj.jam
new file mode 100644
index 000000000..6afbcaa6f
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/obj.jam
@@ -0,0 +1,9 @@
+# Copyright David Abrahams 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)
+
+import type ;
+
+type.register OBJ : o obj ;
+type.set-generated-target-suffix OBJ : <target-os>windows : obj ;
+type.set-generated-target-suffix OBJ : <target-os>cygwin : obj ;
diff --git a/src/boost/tools/build/src/tools/types/obj.py b/src/boost/tools/build/src/tools/types/obj.py
new file mode 100644
index 000000000..e61e99a81
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/obj.py
@@ -0,0 +1,11 @@
+# Copyright David Abrahams 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)
+
+from b2.build import type
+
+def register ():
+ type.register_type ('OBJ', ['obj'], None, ['NT', 'CYGWIN'])
+ type.register_type ('OBJ', ['o'])
+
+register ()
diff --git a/src/boost/tools/build/src/tools/types/objc.jam b/src/boost/tools/build/src/tools/types/objc.jam
new file mode 100644
index 000000000..709cbd0c7
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/objc.jam
@@ -0,0 +1,26 @@
+# Copyright Rene Rivera 2008, 2010.
+# 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 type ;
+import scanner ;
+import types/cpp ;
+
+class objc-scanner : c-scanner
+{
+ rule __init__ ( includes * )
+ {
+ c-scanner.__init__ $(includes) ;
+ }
+
+ rule pattern ( )
+ {
+ return "#[ \t]*include|import[ ]*(<(.*)>|\"(.*)\")" ;
+ }
+}
+
+scanner.register objc-scanner : include ;
+
+type.register OBJECTIVE_C : m ;
+type.register OBJECTIVE_CPP : mm ;
+type.set-scanner OBJECTIVE_C : objc-scanner ;
+type.set-scanner OBJECTIVE_CPP : objc-scanner ;
diff --git a/src/boost/tools/build/src/tools/types/pdf.jam b/src/boost/tools/build/src/tools/types/pdf.jam
new file mode 100644
index 000000000..f5d64387e
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/pdf.jam
@@ -0,0 +1,8 @@
+#|
+Copyright 2017 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)
+|#
+
+type PDF : pdf ;
diff --git a/src/boost/tools/build/src/tools/types/preprocessed.jam b/src/boost/tools/build/src/tools/types/preprocessed.jam
new file mode 100644
index 000000000..c9187ba67
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/preprocessed.jam
@@ -0,0 +1,9 @@
+# Copyright Steven Watanabe 2011
+# 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 type ;
+
+type.register PREPROCESSED_C : i : C ;
+type.register PREPROCESSED_CPP : ii : CPP ;
diff --git a/src/boost/tools/build/src/tools/types/preprocessed.py b/src/boost/tools/build/src/tools/types/preprocessed.py
new file mode 100644
index 000000000..f59104334
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/preprocessed.py
@@ -0,0 +1,11 @@
+# Copyright David Abrahams 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)
+
+from b2.build import type
+
+def register ():
+ type.register_type('PREPROCESSED_C', ['i'], 'C')
+ type.register_type('PREPROCESSED_CPP', ['ii'], 'CPP')
+
+register ()
diff --git a/src/boost/tools/build/src/tools/types/qt.jam b/src/boost/tools/build/src/tools/types/qt.jam
new file mode 100644
index 000000000..4951063e3
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/qt.jam
@@ -0,0 +1,12 @@
+# Copyright Vladimir Prus 2005. 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)
+
+type UI : ui ;
+type QRC : qrc ;
+type MOCCABLE_CPP ;
+type MOCCABLE_H ;
+type MOCCABLE5_CPP ;
+type MOCCABLE5_H ;
+# Result of running moc.
+type MOC : moc : H ;
diff --git a/src/boost/tools/build/src/tools/types/register.jam b/src/boost/tools/build/src/tools/types/register.jam
new file mode 100644
index 000000000..daedfb701
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/register.jam
@@ -0,0 +1,39 @@
+# Copyright David Abrahams 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)
+
+# This module's job is to automatically import all the type
+# registration modules in its directory.
+import type os path modules ;
+
+# 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.
+local rule type ( type : suffixes * : base-type ? : os * )
+{
+ if ! [ type.registered $(type) ]
+ {
+ if ( ! $(os) ) || [ os.name ] in $(os)
+ {
+ type.register $(type) : $(suffixes) : $(base-type) ;
+ }
+ }
+}
+
+.this-module's-file = [ modules.binding $(__name__) ] ;
+.this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ;
+.sibling-jamfiles = [ path.glob $(.this-module's-dir) : *.jam ] ;
+.sibling-modules = [ MATCH ^(.*)\.jam$ : $(.sibling-jamfiles) ] ;
+
+# A loop over all modules in this directory
+for m in $(.sibling-modules)
+{
+ m = [ path.basename $(m) ] ;
+ m = types/$(m) ;
+
+ # Inject the type rule into the new module
+ IMPORT $(__name__) : type : $(m:B) : type ;
+ import $(m) ;
+}
+
+
diff --git a/src/boost/tools/build/src/tools/types/rsp.jam b/src/boost/tools/build/src/tools/types/rsp.jam
new file mode 100644
index 000000000..bdf8a7c98
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/rsp.jam
@@ -0,0 +1,4 @@
+# Copyright David Abrahams 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)
+type RSP : rsp ;
diff --git a/src/boost/tools/build/src/tools/types/rsp.py b/src/boost/tools/build/src/tools/types/rsp.py
new file mode 100644
index 000000000..ccb379e95
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/rsp.py
@@ -0,0 +1,10 @@
+# Copyright David Abrahams 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)
+
+from b2.build import type
+
+def register ():
+ type.register_type ('RSP', ['rsp'])
+
+register ()
diff --git a/src/boost/tools/build/src/tools/types/sass-type.jam b/src/boost/tools/build/src/tools/types/sass-type.jam
new file mode 100644
index 000000000..c7f404025
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/sass-type.jam
@@ -0,0 +1,49 @@
+#|
+Copyright 2017 Dmitry Arkhipov
+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 scanner ;
+import type ;
+
+class sass-scanner : common-scanner
+{
+ import sequence ;
+
+ local rule import-to-file ( import )
+ {
+ if ! ( $(import:S) in .sass .scss )
+ {
+ return $(import).sass $(import).scss ;
+ }
+ else
+ {
+ return $(import) ;
+ }
+ }
+
+ rule pattern ( )
+ {
+ return
+ "@import[ \t]+\"([^\"]+)\""
+ "@import[ \t]+\'([^\']+)\'"
+ ;
+ }
+
+ rule process ( target : matches * : binding )
+ {
+ common-scanner.process
+ $(target)
+ : [ sequence.transform import-to-file : $(matches) ]
+ : $(binding)
+ ;
+ }
+}
+
+scanner.register sass-scanner : include ;
+
+type SASS : sass scss ;
+
+type.set-scanner SASS : sass-scanner ;
diff --git a/src/boost/tools/build/src/tools/types/xml.jam b/src/boost/tools/build/src/tools/types/xml.jam
new file mode 100644
index 000000000..10149ea93
--- /dev/null
+++ b/src/boost/tools/build/src/tools/types/xml.jam
@@ -0,0 +1,49 @@
+#|
+Copyright 2017 Rene Rivera
+Copyright 2003, 2004, 2005 Dave Abrahams
+Copyright 2003, 2004, 2005 Douglas Gregor
+Copyright 2005, 2006, 2007 Rene Rivera
+Copyright 2003, 2004, 2005 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)
+|#
+
+import scanner ;
+import type ;
+
+type XML : xml ;
+
+# XInclude scanner. Mostly stolen from c-scanner. :)
+# Note that this assumes an "xi" prefix for XIncludes. This is not always the
+# case for XML documents, but we assume it is true for anything we encounter.
+#
+class xinclude-scanner : scanner
+{
+ import scanner ;
+
+ rule __init__ ( includes * )
+ {
+ scanner.__init__ ;
+ self.includes = $(includes) ;
+ }
+
+ rule pattern ( )
+ {
+ return "xi:include[ ]*href=\"([^\"]*)\"" ;
+ }
+
+ 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=) ;
+
+ scanner.propagate $(__name__) : $(matches) : $(target) ;
+ }
+}
+
+scanner.register xinclude-scanner : "xsl:path" ;
+type.set-scanner XML : xinclude-scanner ;
diff --git a/src/boost/tools/build/src/tools/unix.jam b/src/boost/tools/build/src/tools/unix.jam
new file mode 100644
index 000000000..75949851a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/unix.jam
@@ -0,0 +1,224 @@
+# Copyright (c) 2004 Vladimir Prus.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# This file implements linking semantic common to all unixes. On unix, static
+# libraries must be specified in a fixed order on the linker command line. Generators
+# declared there store information about the order and use it property.
+
+import feature ;
+import "class" : new ;
+import generators ;
+import type ;
+import set ;
+import order ;
+import builtin ;
+
+class unix-linking-generator : linking-generator
+{
+ import property-set ;
+ import type ;
+ import unix ;
+
+ rule __init__ ( id
+ composing ? : # Specify if generator is composing. The generator will be
+ # composing if non-empty string is passed, or parameter is
+ # not given. To make generator non-composing, pass empty
+ # string ("")
+ source-types + : target-types + :
+ requirements * )
+ {
+ composing ?= true ;
+ generator.__init__ $(id) $(composing) : $(source-types) : $(target-types) :
+ $(requirements) ;
+ }
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ local result = [ linking-generator.run $(project) $(name) : $(property-set)
+ : $(sources) ] ;
+
+ unix.set-library-order $(sources) : $(property-set) : $(result[2-]) ;
+
+ return $(result) ;
+ }
+
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ local sources2 ;
+ local libraries ;
+ for local l in $(sources)
+ {
+ if [ type.is-derived [ $(l).type ] LIB ]
+ {
+ libraries += $(l) ;
+ }
+ else
+ {
+ sources2 += $(l) ;
+ }
+ }
+
+ sources = $(sources2) [ unix.order-libraries $(libraries) ] ;
+
+ return [ linking-generator.generated-targets $(sources) : $(property-set)
+ : $(project) $(name) ] ;
+ }
+
+}
+
+class unix-archive-generator : archive-generator
+{
+ import unix ;
+
+ rule __init__ ( id composing ? : source-types + : target-types + :
+ requirements * )
+ {
+ composing ?= true ;
+ archive-generator.__init__ $(id) $(composing) : $(source-types) : $(target-types) :
+ $(requirements) ;
+ }
+
+ rule run ( project name ? : property-set : sources + )
+ {
+ local result = [ archive-generator.run $(project) $(name) : $(property-set)
+ : $(sources) ] ;
+
+ unix.set-library-order $(sources) : $(property-set) : $(result[2-]) ;
+
+ return $(result) ;
+
+ }
+}
+
+class unix-searched-lib-generator : searched-lib-generator
+{
+ import unix ;
+ rule __init__ ( * : * )
+ {
+ generator.__init__
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule optional-properties ( )
+ {
+ return $(self.requirements) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ local result = [ searched-lib-generator.run $(project) $(name)
+ : $(property-set) : $(sources) ] ;
+
+ unix.set-library-order $(sources) : $(property-set) : $(result[2-]) ;
+
+ return $(result) ;
+ }
+}
+
+class unix-prebuilt-lib-generator : generator
+{
+ import unix ;
+ rule __init__ ( * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
+
+ rule run ( project name ? : property-set : sources * )
+ {
+ local f = [ $(property-set).get <file> ] ;
+ unix.set-library-order-aux $(f) : $(sources) ;
+ return $(f) $(sources) ;
+ }
+}
+
+generators.register
+ [ new unix-prebuilt-lib-generator unix.prebuilt : : LIB
+ : <file> <toolset>unix ] ;
+
+generators.override unix.prebuilt : builtin.lib-generator ;
+
+
+# Declare generators
+generators.register [ new unix-linking-generator unix.link : LIB OBJ : EXE
+ : <toolset>unix ] ;
+
+generators.register [ new unix-archive-generator unix.archive : OBJ : STATIC_LIB
+ : <toolset>unix ] ;
+
+generators.register [ new unix-linking-generator unix.link.dll : LIB OBJ : SHARED_LIB
+ : <toolset>unix ] ;
+
+generators.register [ new unix-searched-lib-generator
+ unix.searched-lib-generator : : SEARCHED_LIB : <toolset>unix ] ;
+
+
+# The derived toolset must specify their own actions.
+actions link {
+}
+
+actions link.dll {
+}
+
+actions archive {
+}
+
+actions searched-lib-generator {
+}
+
+actions prebuilt {
+}
+
+
+
+
+
+.order = [ new order ] ;
+
+rule set-library-order-aux ( from * : to * )
+{
+ for local f in $(from)
+ {
+ for local t in $(to)
+ {
+ if $(f) != $(t)
+ {
+ $(.order).add-pair $(f) $(t) ;
+ }
+ }
+ }
+}
+
+rule set-library-order ( sources * : property-set : result * )
+{
+ local used-libraries ;
+ local deps = [ $(property-set).dependency ] ;
+ for local l in $(sources) $(deps:G=)
+ {
+ if [ $(l).type ] && [ type.is-derived [ $(l).type ] LIB ]
+ {
+ used-libraries += $(l) ;
+ }
+ }
+
+ local created-libraries ;
+ for local l in $(result)
+ {
+ if [ $(l).type ] && [ type.is-derived [ $(l).type ] LIB ]
+ {
+ created-libraries += $(l) ;
+ }
+ }
+
+ created-libraries = [ set.difference $(created-libraries) : $(used-libraries) ] ;
+ set-library-order-aux $(created-libraries) : $(used-libraries) ;
+}
+
+rule order-libraries ( libraries * )
+{
+ local r = [ $(.order).order $(libraries) ] ;
+ return $(r) ;
+}
+ \ No newline at end of file
diff --git a/src/boost/tools/build/src/tools/unix.py b/src/boost/tools/build/src/tools/unix.py
new file mode 100644
index 000000000..298fc1dc5
--- /dev/null
+++ b/src/boost/tools/build/src/tools/unix.py
@@ -0,0 +1,155 @@
+# Copyright (c) 2004 Vladimir Prus.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+""" This file implements linking semantics common to all unixes. On unix, static
+ libraries must be specified in a fixed order on the linker command line. Generators
+ declared there store information about the order and use it properly.
+"""
+
+import builtin
+from b2.build import generators, type
+from b2.util.utility import *
+from b2.util import set, sequence
+
+class UnixLinkingGenerator (builtin.LinkingGenerator):
+
+ def __init__ (self, id, composing, source_types, target_types, requirements):
+ builtin.LinkingGenerator.__init__ (self, id, composing, source_types, target_types, requirements)
+
+ def run (self, project, name, prop_set, sources):
+ result = builtin.LinkingGenerator.run (self, project, name, prop_set, sources)
+ if result:
+ set_library_order (project.manager (), sources, prop_set, result [1])
+
+ return result
+
+ def generated_targets (self, sources, prop_set, project, name):
+ sources2 = []
+ libraries = []
+ for l in sources:
+ if type.is_derived (l.type (), 'LIB'):
+ libraries.append (l)
+
+ else:
+ sources2.append (l)
+
+ sources = sources2 + order_libraries (libraries)
+
+ return builtin.LinkingGenerator.generated_targets (self, sources, prop_set, project, name)
+
+
+class UnixArchiveGenerator (builtin.ArchiveGenerator):
+ def __init__ (self, id, composing, source_types, target_types_and_names, requirements):
+ builtin.ArchiveGenerator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+
+ def run (self, project, name, prop_set, sources):
+ from b2.build.property_set import PropertySet
+ result = builtin.ArchiveGenerator.run(self, project, name, prop_set, sources)
+ if result and isinstance(result[0], PropertySet):
+ _, targets = result
+ else:
+ targets = result
+ set_library_order(project.manager(), sources, prop_set, targets)
+ return result
+
+class UnixSearchedLibGenerator (builtin.SearchedLibGenerator):
+
+ def __init__ (self):
+ builtin.SearchedLibGenerator.__init__ (self)
+
+ def optional_properties (self):
+ return self.requirements ()
+
+ def run (self, project, name, prop_set, sources):
+ result = SearchedLibGenerator.run (project, name, prop_set, sources)
+
+ set_library_order (sources, prop_set, result)
+
+ return result
+
+class UnixPrebuiltLibGenerator (generators.Generator):
+ def __init__ (self, id, composing, source_types, target_types_and_names, requirements):
+ generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+
+ def run (self, project, name, prop_set, sources):
+ f = prop_set.get ('<file>')
+ set_library_order_aux (f, sources)
+ return f + sources
+
+### # The derived toolset must specify their own rules and actions.
+# FIXME: restore?
+# action.register ('unix.prebuilt', None, None)
+
+
+generators.register (UnixPrebuiltLibGenerator ('unix.prebuilt', False, [], ['LIB'], ['<file>', '<toolset>unix']))
+
+
+
+
+
+### # Declare generators
+### generators.register [ new UnixLinkingGenerator unix.link : LIB OBJ : EXE
+### : <toolset>unix ] ;
+generators.register (UnixArchiveGenerator ('unix.archive', True, ['OBJ'], ['STATIC_LIB'], ['<toolset>unix']))
+
+### generators.register [ new UnixLinkingGenerator unix.link.dll : LIB OBJ : SHARED_LIB
+### : <toolset>unix ] ;
+###
+### generators.register [ new UnixSearchedLibGenerator
+### unix.SearchedLibGenerator : : SEARCHED_LIB : <toolset>unix ] ;
+###
+###
+### # The derived toolset must specify their own actions.
+### actions link {
+### }
+###
+### actions link.dll {
+### }
+
+def unix_archive (manager, targets, sources, properties):
+ pass
+
+# FIXME: restore?
+#action.register ('unix.archive', unix_archive, [''])
+
+### actions searched-lib-generator {
+### }
+###
+### actions prebuilt {
+### }
+
+
+from b2.util.order import Order
+__order = Order ()
+
+def set_library_order_aux (from_libs, to_libs):
+ for f in from_libs:
+ for t in to_libs:
+ if f != t:
+ __order.add_pair (f, t)
+
+def set_library_order (manager, sources, prop_set, result):
+ used_libraries = []
+ deps = prop_set.dependency ()
+
+ sources.extend(d.value for d in deps)
+ sources = sequence.unique(sources)
+
+ for l in sources:
+ if l.type () and type.is_derived (l.type (), 'LIB'):
+ used_libraries.append (l)
+
+ created_libraries = []
+ for l in result:
+ if l.type () and type.is_derived (l.type (), 'LIB'):
+ created_libraries.append (l)
+
+ created_libraries = set.difference (created_libraries, used_libraries)
+ set_library_order_aux (created_libraries, used_libraries)
+
+def order_libraries (libraries):
+ return __order.order (libraries)
+
diff --git a/src/boost/tools/build/src/tools/vacpp.jam b/src/boost/tools/build/src/tools/vacpp.jam
new file mode 100644
index 000000000..168f46564
--- /dev/null
+++ b/src/boost/tools/build/src/tools/vacpp.jam
@@ -0,0 +1,173 @@
+# Copyright Vladimir Prus 2004.
+# Copyright Toon Knapen 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)
+
+#| tag::doc[]
+
+[[bbv2.reference.tools.compiler.vacpp]]
+= IBM Visual Age
+
+The `vacpp` module supports the http://www.ibm.com/software/ad/vacpp[IBM
+Visual Age] C++ Compiler, for the AIX operating system. Versions 7.1 and
+8.0 are known to work.
+
+The module is initialized using the following syntax:
+
+----
+using vacpp ;
+----
+
+The module does not accept any initialization options. The compiler
+should be installed in the `/usr/vacpp/bin` directory.
+
+Later versions of Visual Age are known as XL C/C++. They were not tested
+with the the `vacpp` module.
+
+|# # end::doc[]
+
+#
+# B2 V2 toolset for the IBM XL C++ compiler
+#
+
+import toolset : flags ;
+import feature ;
+import common ;
+import generators ;
+import os ;
+
+feature.extend toolset : vacpp ;
+toolset.inherit vacpp : unix ;
+generators.override vacpp.prebuilt : builtin.prebuilt ;
+generators.override vacpp.searched-lib-generator : searched-lib-generator ;
+
+# Configure the vacpp toolset
+rule init ( version ? : command * : options * )
+{
+ local condition = [
+ common.check-init-parameters vacpp : version $(version) ] ;
+
+ command = [ common.get-invocation-command vacpp : xlC
+ : $(command) : "/usr/vacpp/bin/xlC" ] ;
+
+ common.handle-options vacpp : $(condition) : $(command) : $(options) ;
+}
+
+# Declare generators
+generators.register-c-compiler vacpp.compile.c : C : OBJ : <toolset>vacpp ;
+generators.register-c-compiler vacpp.compile.c++ : CPP : OBJ : <toolset>vacpp ;
+
+# Allow C++ style comments in C files
+flags vacpp CFLAGS : -qcpluscmt ;
+
+# Declare flags
+flags vacpp CFLAGS <optimization>off : -qNOOPTimize ;
+flags vacpp CFLAGS <optimization>speed : -O3 -qstrict ;
+flags vacpp CFLAGS <optimization>space : -O2 -qcompact ;
+
+# Discretionary inlining (not recommended)
+flags vacpp CFLAGS <inlining>off : -qnoinline ;
+flags vacpp CFLAGS <inlining>on : -qinline ;
+#flags vacpp CFLAGS <inlining>full : -qinline ;
+flags vacpp CFLAGS <inlining>full : ;
+
+# Exception handling
+flags vacpp C++FLAGS <exception-handling>off : -qnoeh ;
+flags vacpp C++FLAGS <exception-handling>on : -qeh ;
+
+# Run-time Type Identification
+flags vacpp C++FLAGS <rtti>off : -qnortti ;
+flags vacpp C++FLAGS <rtti>on : -qrtti ;
+
+# Enable 64-bit memory addressing model
+flags vacpp CFLAGS <address-model>64 : -q64 ;
+flags vacpp LINKFLAGS <address-model>64 : -q64 ;
+flags vacpp ARFLAGS <target-os>aix/<address-model>64 : -X 64 ;
+
+# Use absolute path when generating debug information
+flags vacpp CFLAGS <debug-symbols>on : -g -qfullpath ;
+flags vacpp LINKFLAGS <debug-symbols>on : -g -qfullpath ;
+flags vacpp LINKFLAGS <debug-symbols>off : -s ;
+
+if [ os.name ] = AIX
+{
+ flags vacpp.compile C++FLAGS : -qfuncsect ;
+
+ # The -bnoipath strips the prepending (relative) path of libraries from
+ # the loader section in the target library or executable. Hence, during
+ # load-time LIBPATH (identical to LD_LIBRARY_PATH) or a hard-coded
+ # -blibpath (*similar* to -lrpath/-lrpath-link) is searched. Without
+ # this option, the prepending (relative) path + library name is
+ # hard-coded in the loader section, causing *only* this path to be
+ # searched during load-time. Note that the AIX linker does not have an
+ # -soname equivalent, this is as close as it gets.
+ #
+ # The above options are definitely for AIX 5.x, and most likely also for
+ # AIX 4.x and AIX 6.x. For details about the AIX linker see:
+ # http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
+ #
+ flags vacpp.link LINKFLAGS <link>shared : -bnoipath ;
+
+ # Run-time linking
+ flags vacpp.link EXE-LINKFLAGS <link>shared : -brtl ;
+}
+else
+{
+ # Linux PPC
+ flags vacpp.compile CFLAGS <link>shared : -qpic=large ;
+ flags vacpp FINDLIBS : rt ;
+}
+
+# Profiling
+flags vacpp CFLAGS <profiling>on : -pg ;
+flags vacpp LINKFLAGS <profiling>on : -pg ;
+
+flags vacpp.compile OPTIONS <cflags> ;
+flags vacpp.compile.c++ OPTIONS <cxxflags> ;
+flags vacpp DEFINES <define> ;
+flags vacpp UNDEFS <undef> ;
+flags vacpp HDRS <include> ;
+flags vacpp STDHDRS <sysinclude> ;
+flags vacpp.link OPTIONS <linkflags> ;
+flags vacpp ARFLAGS <arflags> ;
+
+flags vacpp LIBPATH <library-path> ;
+flags vacpp NEEDLIBS <library-file> ;
+flags vacpp FINDLIBS <find-shared-library> ;
+flags vacpp FINDLIBS <find-static-library> ;
+
+# Select the compiler name according to the threading model.
+flags vacpp VA_C_COMPILER <threading>single : xlc ;
+flags vacpp VA_C_COMPILER <threading>multi : xlc_r ;
+flags vacpp VA_CXX_COMPILER <threading>single : xlC ;
+flags vacpp VA_CXX_COMPILER <threading>multi : xlC_r ;
+
+SPACE = " " ;
+
+flags vacpp.link.dll HAVE_SONAME <target-os>linux : "" ;
+
+actions vacpp.link bind NEEDLIBS
+{
+ $(VA_CXX_COMPILER) $(EXE-LINKFLAGS) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS)
+}
+
+actions vacpp.link.dll bind NEEDLIBS
+{
+ xlC_r -G $(LINKFLAGS) -o "$(<[1])" $(HAVE_SONAME)-Wl,-soname$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS)
+}
+
+actions vacpp.compile.c
+{
+ $(VA_C_COMPILER) -c $(OPTIONS) $(USER_OPTIONS) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
+}
+
+actions vacpp.compile.c++
+{
+ $(VA_CXX_COMPILER) -c $(OPTIONS) $(USER_OPTIONS) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
+}
+
+actions updated together piecemeal vacpp.archive
+{
+ ar $(ARFLAGS) ru "$(<)" "$(>)"
+}
diff --git a/src/boost/tools/build/src/tools/vmsdecc.jam b/src/boost/tools/build/src/tools/vmsdecc.jam
new file mode 100644
index 000000000..8f1e8ed17
--- /dev/null
+++ b/src/boost/tools/build/src/tools/vmsdecc.jam
@@ -0,0 +1,578 @@
+# Copyright (c) 2015 Artur Shepilko
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Implements OpenVMS-based HP DECC/C++ toolset.
+# Relies on POSIX-style path handling bjam/B2 implementation for VMS.
+
+import "class" : new ;
+import property ;
+import generators ;
+import os ;
+import toolset : flags ;
+import feature ;
+import type ;
+import common ;
+import unix ;
+import path ;
+
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+
+feature.extend toolset : vmsdecc ;
+
+toolset.inherit-generators vmsdecc : unix : unix.link unix.link.dll ;
+toolset.inherit-flags vmsdecc : unix ;
+toolset.inherit-rules vmsdecc : unix ;
+
+generators.override vmsdecc.archive-generator : builtin.archive-generator ;
+generators.override vmsdecc.prebuilt : builtin.prebuilt ;
+generators.override vmsdecc.searched-lib-generator : searched-lib-generator ;
+
+type.set-generated-target-suffix EXE : <toolset>vmsdecc <target-os>vms : exe ;
+type.set-generated-target-suffix OBJ : <toolset>vmsdecc <target-os>vms : obj ;
+type.set-generated-target-suffix PREPROCESSED_C : <toolset>vmsdecc <target-os>vms : i ;
+type.set-generated-target-suffix PREPROCESSED_CPP : <toolset>vmsdecc <target-os>vms : ixx ;
+type.set-generated-target-suffix STATIC_LIB : <toolset>vmsdecc <target-os>vms : olb ; ## xxx.olb
+
+type.register-suffixes exe : SHARED_LIB ;
+type.set-generated-target-prefix SHARED_LIB : <toolset>vmsdecc <target-os>vms : shr ; ## shrxxx.exe
+type.set-generated-target-suffix SHARED_LIB : <toolset>vmsdecc <target-os>vms : exe ; ## shrxxx.exe
+
+.OBJ = .obj ; ## suffix
+.nl = "
+" ;
+
+rule init ( version ? : command * : options * )
+{
+ local argv = [ modules.peek : ARGV ] ;
+
+ local condition = [
+ common.check-init-parameters vmsdecc : version $(version) ] ;
+
+ # CC and CXX are CLI commands, so no need to search for the executables
+ command = CXX ;
+ toolset.flags vmsdecc .CXX $(condition) : CXX ;
+ common.handle-options vmsdecc : $(condition) : $(command) : $(options) ;
+
+ local command_c = $(command[1--2]) $(command[-1]:B=CC) ;
+ toolset.flags vmsdecc .CC $(condition) : $(command_c) ;
+
+ local linker = [ feature.get-values <linker> : $(options) ] ;
+ linker ?= CXXLINK ;
+ toolset.flags vmsdecc.link .LD $(condition) : $(linker) ;
+ if $(.debug-configuration)
+ {
+ ECHO notice\: using linker "::" $(condition) "::" $(linker[1]) ;
+ }
+
+ local archiver = LIB ;
+ toolset.flags vmsdecc.archive .AR $(condition) : $(archiver) ;
+
+ local b2 = $(argv[1]) ;
+ toolset.flags vmsdecc .B2 $(condition) : $(b2) ;
+}
+
+# Declare generators
+generators.register-c-compiler vmsdecc.compile.c++.preprocess : CPP : PREPROCESSED_CPP : <toolset>vmsdecc ;
+generators.register-c-compiler vmsdecc.compile.c.preprocess : C : PREPROCESSED_C : <toolset>vmsdecc ;
+generators.register-c-compiler vmsdecc.compile.c : C : OBJ : <toolset>vmsdecc ;
+generators.register-c-compiler vmsdecc.compile.c++ : CPP : OBJ : <toolset>vmsdecc ;
+
+# Declare flags and actions for compilation
+flags vmsdecc.compile OPTIONS <debug-symbols>on : /DEBUG ;
+flags vmsdecc.compile OPTIONS <profiling>on : /DEBUG ; ## needs PCA link options
+flags vmsdecc.compile OPTIONS <optimization>off : /NOOPT ;
+flags vmsdecc.compile OPTIONS <optimization>speed : /OPT=INLINE=SPEED/OPT=NOINLINE ;
+flags vmsdecc.compile OPTIONS <optimization>space : /OPT=INLINE=SIZE/OPT=NOINLINE ;
+flags vmsdecc.compile OPTIONS <warnings>off : /NOWARN ;
+flags vmsdecc.compile OPTIONS <warnings>on : /WARN ;
+flags vmsdecc.compile OPTIONS <warnings>all : /WARN=ENABLE=ALL ;
+
+flags vmsdecc.compile.c++ OPTIONS <inlining>off : /OPT=NOINLINE ;
+
+flags vmsdecc OPTIONS <address-model>32 : /POINTER=32 ;
+flags vmsdecc OPTIONS <address-model>64 : /POINTER=64 ; ## /POINTER=64=ARGV argv-64
+
+flags vmsdecc.compile OPTIONS <cflags> ;
+flags vmsdecc.compile.c++ OPTIONS <cxxflags> ;
+flags vmsdecc.compile DEFINES <define> ;
+flags vmsdecc.compile UNDEFS <undef> ;
+flags vmsdecc.compile INCLUDES <include> ;
+flags vmsdecc.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
+
+feature.feature cxx-repository : : free path ; #order-sensitive ;
+flags vmsdecc CXX-REPOS <cxx-repository> ;
+
+
+local rule get-includes ( sources * : includes * )
+{
+ local result ;
+
+ ## Expect POSIX-style path, quote in double-quotes
+ for local d in $(sources:D) $(includes)
+ {
+ if $(d)
+ {
+ local QUOTE = \" ;
+ local SEP = / ;
+
+ local enquote = false ;
+ local addsep = false ;
+
+ s = [ SPLIT_BY_CHARACTERS $(d) : $(QUOTE) ] ;
+
+ if $(s) = $(d) { enquote = true ; }
+ if [ SPLIT_BY_CHARACTERS $(s) : $(SEP) ] = $(s) { addsep = true ; }
+
+ if $(addsep)
+ {
+ d = $(s)$(SEP) ;
+ enquote = true ;
+ }
+
+ if $(enquote)
+ {
+ d = $(QUOTE)$(d)$(QUOTE) ;
+ }
+
+ if ! $(d) in $(result)
+ {
+ result += $(d) ;
+ }
+ }
+ }
+
+ return $(result) ;
+}
+
+CXX-REPO-NAME = cxx_repository ;
+
+local rule get-target-cxx-repo ( target )
+{
+ return [ path.join $(target) $(CXX-REPO-NAME) ] ;
+}
+
+rule compile.c++ ( targets * : sources * : properties * )
+{
+ DEPENDS $(targets) : [ on $(targets) return $(SOURCE-INCLUDES) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(CXX-REPOS) ] ;
+
+ DEFINES on $(targets) = [ on $(targets) return "__USE_STD_IOSTREAM" $(DEFINES) ] ;
+
+ INCLUDES on $(targets) = [ on $(targets) get-includes $(sources) : $(INCLUDES) ] ;
+
+ TARGET-CXX-REPO on $(targets) = [ on $(targets[1]) get-target-cxx-repo $(LOCATE) ] ;
+ CXX-REPOS on $(targets) = [ on $(targets) return $(TARGET-CXX-REPO) $(CXX-REPOS) ] ;
+}
+
+
+rule compile.c ( targets * : sources * : properties * )
+{
+ DEPENDS $(targets) : [ on $(targets) return $(SOURCE-INCLUDES) ] ;
+
+ INCLUDES on $(targets) = [ on $(targets) get-includes $(sources) : $(INCLUDES) ] ;
+}
+
+actions compile.c
+{
+ $(.CC) $(OPTIONS) /DEF=("$(DEFINES:J=",")") /UNDEF=("$(UNDEFS:J=",")") /INC=($(INCLUDES:J=,)) /OBJ=$(<:W) $(>:W)
+}
+
+actions compile.c++
+{
+ $(.CXX) $(OPTIONS) /DEF=("$(DEFINES:J=",")") /UNDEF=("$(UNDEFS:J=",")") /INC=($(INCLUDES:J=,)) /REPO=($(CXX-REPOS:WJ=,)) /OBJ=$(<:W) $(>:W)
+}
+
+
+
+# Custom linking generator to separate dependency libraries and optfiles from
+# the list of sources. The objfiles, libraries, and optfiles are then referenced
+# via properties. This allows separate qualification of object-files and libraries
+# on linker command line.
+#
+class vmsdecc-linking-generator : linking-generator
+{
+ rule run ( project name ? : property-set : sources + )
+ {
+ local result = [ linking-generator.run $(project) $(name) : $(property-set)
+ : $(sources) ] ;
+
+ return $(result) ;
+ }
+
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ local sources2 ; # Sources to pass to inherited rule.
+ local properties2 ; # Properties to pass to inherited rule.
+ local objfiles ; # Object files.
+ local libraries ; # Library sources.
+
+ properties2 = [ $(property-set).raw ] ;
+
+ for local s in $(sources)
+ {
+ if [ type.is-derived [ $(s).type ] OBJ ]
+ {
+ objfiles += $(s) ;
+ properties2 += <link-objfile>$(s) ;
+ }
+ else if [ type.is-derived [ $(s).type ] STATIC_LIB ]
+ {
+ libraries += $(s) ;
+ properties2 += <link-staticlib>$(s) ;
+ }
+ else if [ type.is-derived [ $(s).type ] SHARED_LIB ]
+ {
+ libraries += $(s) ;
+ properties2 += <link-sharedlib>$(s) ;
+ }
+ }
+
+
+ return [ linking-generator.generated-targets $(sources)
+ : [ property-set.create $(properties2) ] : $(project) $(name) ] ;
+ }
+}
+
+
+generators.register [ new vmsdecc-linking-generator vmsdecc.link :
+ OBJ SEARCHED_LIB STATIC_LIB SHARED_LIB : EXE : <toolset>vmsdecc ] ;
+
+generators.register [ new vmsdecc-linking-generator vmsdecc.link.dll :
+ OBJ SEARCHED_LIB STATIC_LIB SHARED_LIB : SHARED_LIB : <toolset>vmsdecc ] ;
+
+
+
+# Declare flags and actions for linking
+flags vmsdecc.link OPTIONS <debug-symbols>on : /DEBUG ;
+# Strip the binary when no debugging is needed
+flags vmsdecc.link OPTIONS <debug-symbols>off : /NODEBUG ;
+flags vmsdecc.link OPTIONS <profiling>on : /DEBUG ; ## need "DEFINE LIB$DEBUG PCA$COLLECTOR"
+flags vmsdecc.link OPTIONS <linkflags> ;
+flags vmsdecc.link LINKPATH <library-path> ;
+flags vmsdecc.link FINDLIBS-ST <find-static-library> ;
+flags vmsdecc.link FINDLIBS-SA <find-shared-library> ;
+flags vmsdecc.link LIBRARIES <library-file> ;
+flags vmsdecc.link LINK-RUNTIME <runtime-link>static : static ;
+flags vmsdecc.link LINK-RUNTIME <runtime-link>shared : dynamic ;
+flags vmsdecc.link RPATH <dll-path> ;
+flags vmsdecc.link FINDLIBS-SA ;
+
+feature.feature "link-objfile" : : free dependency path incidental ;
+flags vmsdecc.link LINK-OBJS <link-objfile> ;
+
+feature.feature "link-libmodule" : : free dependency incidental ;
+flags vmsdecc.link LINK-LIBMODULES <link-libmodule> ;
+
+feature.feature "link-staticlib" : : free dependency path incidental ;
+flags vmsdecc.link LINK-LIBS <link-staticlib> ;
+
+feature.feature "link-sharedlib" : : free dependency path incidental ;
+flags vmsdecc.link LINK-SHAREDLIBS <link-sharedlib> ;
+
+feature.feature "link-optfile" : : free dependency path incidental ;
+flags vmsdecc.link LINK-OPTS <link-optfile> ;
+
+
+local rule export-target-var-contents ( var-name : values * )
+{
+ local result ;
+ local nl = "
+" ;
+ local locate ;
+
+ if $(var-name)
+ {
+ result +=
+ "$(nl)$(var-name) =" ;
+ for local f in $(values)
+ {
+ locate = [ on $(f) return $(LOCATE) ] ;
+ result +=
+ "$(nl)\"$(f:TG=:R=$(locate))\"" ;
+ }
+ result += "$(nl) ;" ;
+ }
+
+ return $(result) ;
+}
+
+# VMS linker usually expects an explicit object module that contains main().
+# Yet on *NIX, the main module can be automatically resolved from a library --
+# this may arguably be convenient with dynamic linking, and is also used with
+# Boost.Test.
+# To handle such cases on VMS, one needs first to locate the library module
+# containing main(), then include it in sources for the link command.
+# GLOB_ARCHIVE built-in can locate the module name (globbing by symbol MAIN).
+# To be able to use its result during jam-parsing stage, we need to execute it
+# from a separate jam-file that produces a pre-defined option file for link.
+#
+
+actions write-jam-file-contents
+{
+ SET FILE /VER=1 @($(<:W):E= $(>) )
+}
+
+
+local rule mainmod-link-opt.generate ( jam-file : opt-file : objs * : libs * : sharedlibs * )
+{
+ local nl = "
+" ;
+ local $ = $ ;
+ local @ = @ ;
+
+ if $(jam-file) && $(opt-file)
+ {
+ local .contents on $(jam-file) =
+ "# This file was auto-generated by <toolset>$(__name__)." ;
+
+ .contents on $(jam-file) +=
+ "$(nl)OPT-FILE = $(opt-file) ;" ;
+
+ .contents on $(jam-file) += [ on $(jam-file)
+ export-target-var-contents "OBJS" : $(objs) ] ;
+
+ .contents on $(jam-file) += [ on $(jam-file)
+ export-target-var-contents "LIBS" : $(libs) ] ;
+
+ .contents on $(jam-file) += [ on $(jam-file)
+ export-target-var-contents "SHAREDLIBS" : $(sharedlibs) ] ;
+
+ .contents on $(jam-file) +=
+ "$(nl).nl = \"$(nl)\" ;"
+ ;
+ .contents on $(jam-file) +=
+ "$(nl)local rule get-main-members ( libs * : symbol-main ? )"
+ "$(nl){"
+ "$(nl) local result ;"
+ "$(nl) symbol-main ?= \"MAIN\" ;"
+ "$(nl) for local libfile in $($)(libs)"
+ "$(nl) {"
+ "$(nl) local main = [ GLOB_ARCHIVE $($)(libfile) : : : $($)(symbol-main) ] ;"
+ "$(nl) if $($)(main)"
+ "$(nl) {"
+ "$(nl) result += $($)(main) ;"
+ "$(nl) }"
+ "$(nl) }"
+ "$(nl) return $($)(result) ;"
+ "$(nl)}"
+ ;
+ .contents on $(jam-file) +=
+ "$(nl)local rule get-libmods ( members * )"
+ "$(nl){"
+ "$(nl) local result ;"
+ "$(nl) for local m in $($)(members)"
+ "$(nl) {"
+ "$(nl) local lib = $($)(m:WDBS) ;"
+ "$(nl) local mem = $($)(m:M) ;"
+ "$(nl) if $($)(mem)"
+ "$(nl) {"
+ "$(nl) local mod = [ SPLIT_BY_CHARACTERS $($)(mem) : \"()\" ] ;"
+ "$(nl) result += $($)(lib)/INC=($($)(mod:B))/LIB ;"
+ "$(nl) }"
+ "$(nl) }"
+ "$(nl) return $($)(result) ;"
+ "$(nl)}"
+ ;
+ .contents on $(jam-file) +=
+ "$(nl)rule mainmod-link-opt ( opt-file : libs * : objs * )"
+ "$(nl){"
+ "$(nl) local main-members = [ on $($)(opt-file[1]) get-main-members $($)(libs) ] ;"
+ "$(nl) LIBMODULES on $($)(opt-file[1]) = [ on $($)(opt-file[1]) get-libmods $($)(main-members[1]) ] ;"
+ "$(nl)}"
+ ;
+ .contents on $(jam-file) +=
+ "$(nl)actions mainmod-link-opt bind OBJS LIBMODULES"
+ "$(nl){"
+ "$(nl) SET FILE /VER=1 $(@)($($)(<:W):E= $($)(LIBMODULES:J=,-$($)(.nl))-$($)(.nl) )"
+ "$(nl)}"
+ ;
+ .contents on $(jam-file) +=
+ "$(nl)local rule make"
+ "$(nl){"
+ "$(nl) if $($)(OPT-FILE)"
+ "$(nl) {"
+ "$(nl) DEPENDS all : $($)(OPT-FILE) ;"
+ "$(nl) DEPENDS $($)(OPT-FILE) : $($)(LIBS) $($)(OBJS) ;"
+ "$(nl) mainmod-link-opt $($)(OPT-FILE) : $($)(LIBS) : $($)(OBJS) ;"
+ "$(nl) }"
+ "$(nl)}"
+ "$(nl)make all ;"
+ ;
+
+ write-jam-file-contents $(jam-file) : [ on $(jam-file) return $(.contents) ] ;
+
+ }
+}
+
+
+rule link ( targets * : sources * : properties * )
+{
+ DEPENDS $(targets) : [ on $(targets) return $(CXX-REPOS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-OBJS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-LIBS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-SHAREDLIBS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-OPTS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LIBRARIES) ] ;
+
+
+ for local s in $(sources)
+ {
+ local r = [ on $(s) return $(TARGET-CXX-REPO) ] ;
+
+ if ! $(r) in [ on $(targets[1]) return $(CXX-REPOS) ]
+ {
+ CXX-REPOS on $(targets[1]) += $(r) ;
+ }
+ }
+
+ local locate = [ on $(targets[1]) return $(LOCATE) ] ;
+ LINK-MAINMOD-OPT on $(targets[1]) = $(targets[1]:TG=:R=$(locate):S=$MAINMOD.opt) ;
+ LINK-MAINMOD-JAM on $(targets[1]) = $(targets[1]:TG=:R=$(locate):S=$MAINMOD.jam) ;
+ #on $(targets[1]) TEMPORARY $(LINK-MAINMOD-JAM) ;
+
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-MAINMOD-OPT) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-MAINMOD-JAM) ] ;
+ on $(targets[1]) DEPENDS $(LINK-MAINMOD-OPT) : $(LINK-MAINMOD-JAM) ;
+
+ on $(targets[1]) mainmod-link-opt.generate $(LINK-MAINMOD-JAM)
+ : $(LINK-MAINMOD-OPT) : $(LINK-OBJS) : $(LINK-LIBS) $(LIBRARIES) : $(LINK-SHAREDLIBS) ;
+
+
+}
+
+actions link bind LINK-OBJS LINK-MAINMOD-JAM LINK-MAINMOD-OPT LINK-LIBS LIBRARIES LINK-SHAREDLIBS LINK-OPTS CXX-REPOS
+{
+ CXX_REPOS = "" +"$(CXX-REPOS:WJ=,)"
+ IF (CXX_REPOS .EQS. "") THEN CXX_REPOS = "NL:"
+ DEF /NOLOG REPOS 'CXX_REPOS'
+ SET FILE /VER=1 @($(<:WS=$INPUT.opt):E= $(LINK-OBJS:WJ=,-$(.nl))-$(.nl) ,$(LINK-LIBS:WJ=/LIB,-$(.nl))/LIB-$(.nl) ,$(LIBRARIES:WJ=/LIB,-$(.nl))/LIB-$(.nl) ,$(LINK-SHAREDLIBS:WJ=/SHARE,-$(.nl))/SHARE-$(.nl) )
+ MC $(.B2) -f $(LINK-MAINMOD-JAM:W)
+ $(.LD) $(OPTIONS) /REPO=(REPOS:) /EXE=$(<:W) $(LINK-MAINMOD-OPT:W)/OPT, $(<:WS=$INPUT.opt)/OPT ,$(LINK-OPTS:WJ=/OPT,)/OPT
+}
+
+# Slight mods for dlls
+rule link.dll ( targets * : sources * : properties * )
+{
+ DEPENDS $(targets) : [ on $(targets) return $(CXX-REPOS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-OBJS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-LIBS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-SHAREDLIBS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-OPTS) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LIBRARIES) ] ;
+
+ for local s in $(sources)
+ {
+ local r = [ on $(s) return $(TARGET-CXX-REPO) ] ;
+
+ if ! $(r) in [ on $(targets[1]) return $(CXX-REPOS) ]
+ {
+ CXX-REPOS on $(targets[1]) += $(r) ;
+ }
+ }
+
+
+ local locate = [ on $(targets[1]) return $(LOCATE) ] ;
+ LINK-MAINMOD-OPT on $(targets[1]) = $(targets[1]:TG=:R=$(locate):S=$MAINMOD.opt) ;
+ LINK-MAINMOD-JAM on $(targets[1]) = $(targets[1]:TG=:R=$(locate):S=$MAINMOD.jam) ;
+ #on $(targets[1]) TEMPORARY $(LINK-MAINMOD-JAM) ;
+
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-MAINMOD-OPT) ] ;
+ DEPENDS $(targets) : [ on $(targets) return $(LINK-MAINMOD-JAM) ] ;
+ on $(targets[1]) DEPENDS $(LINK-MAINMOD-OPT) : $(LINK-MAINMOD-JAM) ;
+
+ on $(targets[1]) mainmod-link-opt.generate $(LINK-MAINMOD-JAM)
+ : $(LINK-MAINMOD-OPT) : $(LINK-OBJS) : $(LINK-LIBS) $(LIBRARIES) : $(LINK-SHAREDLIBS) ;
+
+}
+
+actions link.dll bind LINK-OBJS LINK-MAINMOD-JAM LINK-MAINMOD-OPT LINK-LIB LINK-LIBS LIBRARIES LINK-SHAREDLIBS LINK-OPTS CXX-REPOS
+{
+ CXX_REPOS = "" +"$(CXX-REPOS:WJ=,)"
+ IF (CXX_REPOS .EQS. "") THEN CXX_REPOS = "NL:"
+ DEF /NOLOG REPOS 'CXX_REPOS'
+ SET FILE /VER=1 @($(<:WS=$INPUT.opt):E= $(LINK-OBJS:WJ=,-$(.nl))-$(.nl) ,$(LINK-LIBS:WJ=/LIB,-$(.nl))/LIB-$(.nl) ,$(LIBRARIES:WJ=/LIB,-$(.nl))/LIB-$(.nl) ,$(LINK-SHAREDLIBS:WJ=/SHARE,-$(.nl))/SHARE-$(.nl) )
+ MC $(.B2) -f $(LINK-MAINMOD-JAM:W)
+ $(.LD) $(OPTIONS) /REPO=(REPOS:) /SHARE=$(<:W) $(LINK-MAINMOD-OPT:W)/OPT, $(<:WS=$INPUT.opt)/OPT ,$(LINK-OPTS:WJ=/OPT,)/OPT
+}
+
+
+
+flags vmsdecc.archive AROPTIONS <archiveflags> ;
+
+
+local rule vms-join-wildcard-name ( path * : name )
+{
+ local files ;
+
+ if $(name)
+ {
+ for local d in $(path)
+ {
+ files += $(d)$(name) ;
+ }
+
+ files ?= $(name) ;
+
+ }
+
+ return $(files) ;
+}
+
+
+rule archive ( targets + : sources * : properties * )
+{
+ local clean.a = $(targets[1])(clean) ;
+ TEMPORARY $(clean.a) ;
+ NOCARE $(clean.a) ;
+ LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
+ DEPENDS $(clean.a) : $(sources) ;
+ DEPENDS $(targets) : $(clean.a) ;
+ common.RmTemps $(clean.a) : $(targets) ;
+
+
+ #CXX-REPOS on $(targets[1]) = null ; ## reset
+
+ for local s in $(sources)
+ {
+ local r = [ on $(s) return $(TARGET-CXX-REPO) ] ;
+
+ if ! $(r) in [ on $(targets[1]) return $(CXX-REPOS) ]
+ {
+ CXX-REPOS on $(targets[1]) += $(r) ;
+ }
+ }
+
+ if [ on $(targets[1]) return $(CXX-REPOS) ]
+ {
+ CXX-REPO-OBJS on $(targets[1]) = [ on $(targets[1]) return [ vms-join-wildcard-name $(CXX-REPOS:W) : *$(.OBJ) ] ] ;
+
+ #DEPENDS $(targets) : [ on $(targets[1]) return $(CXX-REPO-OBJS) ] ;
+ }
+}
+
+# Declare action for creating static libraries
+actions piecemeal archive
+{
+ HAVE_REPO_OBJS = "F"
+ IF ("" +"$(CXX-REPO-OBJS[1])" .NES. "")
+ THEN
+ IF ( "" +F$SEARCH("$(CXX-REPO-OBJS[1])") .NES. "")
+ THEN
+ HAVE_REPO_OBJS = "T"
+ ENDIF
+ ENDIF
+ $(.AR) /CREATE /REPL $(AROPTIONS) $(<:W) $(>:WJ=,)
+ IF (HAVE_REPO_OBJS)
+ THEN
+ $(.AR) /REPL $(AROPTIONS) $(<:W) $(CXX-REPO-OBJS:J=,)
+ PIPE DEL /NOLOG /NOCONF $(CXX-REPO-OBJS:J=;*,);* 2>NL: >NL:
+ ENDIF
+}
+
diff --git a/src/boost/tools/build/src/tools/whale.jam b/src/boost/tools/build/src/tools/whale.jam
new file mode 100644
index 000000000..9335ff0c0
--- /dev/null
+++ b/src/boost/tools/build/src/tools/whale.jam
@@ -0,0 +1,116 @@
+# Copyright (C) Vladimir Prus 2002-2005.
+
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# This module implements support for Whale/Dolphin/WD parser/lexer tools.
+# See http://www.cs.queensu.ca/home/okhotin/whale/ for details.
+#
+# There are three interesting target types:
+# - WHL (the parser sources), that are converted to CPP and H
+# - DLP (the lexer sources), that are converted to CPP and H
+# - WD (combined parser/lexer sources), that are converted to WHL + DLP
+
+import type ;
+import generators ;
+import path ;
+import "class" : new ;
+import errors ;
+
+rule init ( path # path the Whale/Dolphin/WD binaries
+ )
+{
+ if $(.configured) && $(.path) != $(path)
+ {
+ errors.user-error "Attempt to reconfigure Whale support" :
+ "Previously configured with path \"$(.path:E=<empty>)\"" :
+ "Now configuring with path \"$(path:E=<empty>)\"" ;
+
+ }
+ .configured = true ;
+ .path = $(path) ;
+
+ .whale = [ path.join $(path) whale ] ;
+ .dolphin = [ path.join $(path) dolphin ] ;
+ .wd = [ path.join $(path) wd ] ;
+}
+
+
+# Declare the types.
+type.register WHL : whl ;
+type.register DLP : dlp ;
+type.register WHL_LR0 : lr0 ;
+type.register WD : wd ;
+
+# Declare standard generators.
+generators.register-standard whale.whale : WHL : CPP H H(%_symbols) ;
+generators.register-standard whale.dolphin : DLP : CPP H ;
+generators.register-standard whale.wd : WD : WHL(%_parser) DLP(%_lexer) ;
+
+# The conversions defines above a ambiguious when we generated CPP from WD.
+# We can either go via WHL type, or via DLP type.
+# The following custom generator handles this by running both conversions.
+
+class wd-to-cpp : generator
+{
+ rule __init__ ( * : * : * )
+ {
+ generator.__init__ $(1) : $(2) : $(3) ;
+ }
+
+ rule run ( project name ? : property-set : source * )
+ {
+ if ! $(source[2])
+ {
+ local new-sources ;
+ if ! [ $(source).type ] in WHL DLP
+ {
+ local r1 = [ generators.construct $(project) $(name)
+ : WHL : $(property-set) : $(source) ] ;
+ local r2 = [ generators.construct $(project) $(name)
+ : DLP : $(property-set) : $(source) ] ;
+
+ new-sources = [ sequence.unique $(r1[2-]) $(r2[2-]) ] ;
+ }
+ else
+ {
+ new-sources = $(source) ;
+ }
+
+ local result ;
+ for local i in $(new-sources)
+ {
+ local t = [ generators.construct $(project) $(name) : CPP
+ : $(property-set) : $(i) ] ;
+ result += $(t[2-]) ;
+ }
+ return $(result) ;
+ }
+ }
+
+}
+
+
+generators.override whale.wd-to-cpp : whale.whale ;
+generators.override whale.wd-to-cpp : whale.dolphin ;
+
+
+generators.register [ new wd-to-cpp whale.wd-to-cpp : : CPP ] ;
+
+
+actions whale
+{
+ $(.whale) -d $(<[1]:D) $(>)
+}
+
+actions dolphin
+{
+ $(.dolphin) -d $(<[1]:D) $(>)
+}
+
+actions wd
+{
+ $(.wd) -d $(<[1]:D) -g $(>)
+}
+
diff --git a/src/boost/tools/build/src/tools/xlcpp.jam b/src/boost/tools/build/src/tools/xlcpp.jam
new file mode 100644
index 000000000..1b66301cf
--- /dev/null
+++ b/src/boost/tools/build/src/tools/xlcpp.jam
@@ -0,0 +1,164 @@
+# Copyright Vladimir Prus 2004.
+# Copyright Toon Knapen 2004.
+# Copyright Catherine Morton 2015.
+# 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)
+
+#
+# B2 V2 toolset for the IBM XL C++ compiler
+#
+
+import toolset : flags ;
+import feature ;
+import common ;
+import generators ;
+import os ;
+
+feature.extend toolset : xlcpp ;
+toolset.inherit xlcpp : unix ;
+generators.override xlcpp.prebuilt : builtin.prebuilt ;
+generators.override xlcpp.searched-lib-generator : searched-lib-generator ;
+
+# Configure the xlcpp toolset
+rule init ( version ? : command * : options * )
+{
+ local condition = [
+ common.check-init-parameters xlcpp : version $(version) ] ;
+
+ command = [ common.get-invocation-command xlcpp : xlC
+ : $(command) : "/usr/xlcpp/bin/xlC" ] ;
+
+ common.handle-options xlcpp : $(condition) : $(command) : $(options) ;
+}
+
+# Declare generators
+generators.register-c-compiler xlcpp.compile.c : C : OBJ : <toolset>xlcpp ;
+generators.register-c-compiler xlcpp.compile.c++ : CPP : OBJ : <toolset>xlcpp ;
+
+# Allow C++ style comments in C files
+flags xlcpp CFLAGS : -qnoxlcompatmacros ;
+
+# Declare flags
+flags xlcpp CFLAGS <optimization>off : -qNOOPTimize ;
+flags xlcpp CFLAGS <optimization>speed : ;
+flags xlcpp CFLAGS <optimization>space : -O2 -qcompact ;
+
+# Discretionary inlining (not recommended)
+flags xlcpp CFLAGS <inlining>off : -qnoinline ;
+flags xlcpp CFLAGS <inlining>on : -qinline ;
+#flags xlcpp CFLAGS <inlining>full : -qinline ;
+flags xlcpp CFLAGS <inlining>full : ;
+
+# Exception handling
+flags xlcpp C++FLAGS <exception-handling>off : -qnoeh ;
+flags xlcpp C++FLAGS <exception-handling>on : -qeh ;
+
+# Run-time Type Identification
+flags xlcpp C++FLAGS <rtti>off : -qnortti ;
+flags xlcpp C++FLAGS <rtti>on : -qrtti ;
+
+# Enable 64-bit memory addressing model
+flags xlcpp CFLAGS <address-model>64 : -q64 ;
+flags xlcpp LINKFLAGS <address-model>64 : -q64 ;
+flags xlcpp ARFLAGS <target-os>aix/<address-model>64 : -X 64 ;
+
+# Use absolute path when generating debug information
+flags xlcpp CFLAGS <debug-symbols>on : -g -qfullpath ;
+flags xlcpp LINKFLAGS <debug-symbols>on : -g -qfullpath ;
+flags xlcpp LINKFLAGS <debug-symbols>off : -s ;
+
+if [ os.name ] = AIX
+{
+ flags xlcpp.compile C++FLAGS : -qfuncsect ;
+
+ # The -bnoipath strips the prepending (relative) path of libraries from
+ # the loader section in the target library or executable. Hence, during
+ # load-time LIBPATH (identical to LD_LIBRARY_PATH) or a hard-coded
+ # -blibpath (*similar* to -lrpath/-lrpath-link) is searched. Without
+ # this option, the prepending (relative) path + library name is
+ # hard-coded in the loader section, causing *only* this path to be
+ # searched during load-time. Note that the AIX linker does not have an
+ # -soname equivalent, this is as close as it gets.
+ #
+ # The above options are definitely for AIX 5.x, and most likely also for
+ # AIX 4.x and AIX 6.x. For details about the AIX linker see:
+ # http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
+ #
+ flags xlcpp.link LINKFLAGS <link>shared : -bnoipath ;
+
+ # Run-time linking
+ flags xlcpp.link EXE-LINKFLAGS <link>shared : -brtl ;
+}
+else
+{
+ # Linux PPC
+ flags xlcpp.compile CFLAGS <link>shared : -qpic=large ;
+ flags xlcpp FINDLIBS : rt ;
+
+ flags xlcpp.compile OPTIONS <local-visibility>hidden : -qvisibility=hidden ;
+ flags xlcpp.compile OPTIONS <local-visibility>protected : -qvisibility=protected ;
+ flags xlcpp.compile OPTIONS <local-visibility>global : -qvisibility=default ;
+}
+
+# Profiling
+flags xlcpp CFLAGS <profiling>on : -pg ;
+flags xlcpp LINKFLAGS <profiling>on : -pg ;
+
+# Declare flags and actions for compilation
+flags xlcpp.compile.c++ OPTIONS <cxxstd>98 : -std=c++03 ;
+flags xlcpp.compile.c++ OPTIONS <cxxstd>03 : -std=c++03 ;
+flags xlcpp.compile.c++ OPTIONS <cxxstd>0x : -std=c++11 ;
+flags xlcpp.compile.c++ OPTIONS <cxxstd>11 : -std=c++11 ;
+flags xlcpp.compile.c++ OPTIONS <cxxstd>1y : -std=c++1y ;
+flags xlcpp.compile.c++ OPTIONS <cxxstd>14 : -std=c++1y ;
+flags xlcpp.compile.c++ OPTIONS <cxxstd>latest : -std=c++1y ;
+
+flags xlcpp.compile OPTIONS <cflags> ;
+flags xlcpp.compile.c++ OPTIONS <cxxflags> ;
+flags xlcpp DEFINES <define> ;
+flags xlcpp UNDEFS <undef> ;
+flags xlcpp HDRS <include> ;
+flags xlcpp STDHDRS <sysinclude> ;
+flags xlcpp.link OPTIONS <linkflags> ;
+flags xlcpp ARFLAGS <arflags> ;
+
+flags xlcpp LIBPATH <library-path> ;
+flags xlcpp NEEDLIBS <library-file> ;
+flags xlcpp FINDLIBS <find-shared-library> ;
+flags xlcpp FINDLIBS <find-static-library> ;
+
+# Select the compiler name according to the threading model.
+flags xlcpp VA_C_COMPILER <threading>single : xlc ;
+flags xlcpp VA_C_COMPILER <threading>multi : xlc ;
+flags xlcpp VA_CXX_COMPILER <threading>single : xlC ;
+flags xlcpp VA_CXX_COMPILER <threading>multi : xlC ;
+
+SPACE = " " ;
+
+flags xlcpp.link.dll HAVE_SONAME <target-os>linux : "" ;
+
+actions xlcpp.link bind NEEDLIBS
+{
+ $(VA_CXX_COMPILER) $(EXE-LINKFLAGS) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS)
+}
+
+actions xlcpp.link.dll bind NEEDLIBS
+{
+ xlC -G $(LINKFLAGS) -o "$(<[1])" $(HAVE_SONAME)-Wl,-soname$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS)
+}
+
+actions xlcpp.compile.c
+{
+ $(VA_C_COMPILER) -c $(OPTIONS) $(USER_OPTIONS) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
+}
+
+actions xlcpp.compile.c++
+{
+ $(VA_CXX_COMPILER) -c $(OPTIONS) $(USER_OPTIONS) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
+}
+
+actions updated together piecemeal xlcpp.archive
+{
+ ar $(ARFLAGS) ru "$(<)" "$(>)"
+}
diff --git a/src/boost/tools/build/src/tools/xlf.jam b/src/boost/tools/build/src/tools/xlf.jam
new file mode 100644
index 000000000..e7fcc6086
--- /dev/null
+++ b/src/boost/tools/build/src/tools/xlf.jam
@@ -0,0 +1,39 @@
+# Copyright (C) 2004 Toon Knapen
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+#
+# toolset configuration for the IBM Fortran compiler (xlf)
+#
+
+import toolset : flags ;
+import feature ;
+import fortran ;
+
+rule init ( version ? : command * : options * )
+{
+}
+
+# Declare flags and action for compilation
+flags xlf OPTIONS <optimization>off : -O0 ;
+flags xlf OPTIONS <optimization>speed : -O3 ;
+flags xlf OPTIONS <optimization>space : -Os ;
+
+flags xlf OPTIONS <debug-symbols>on : -g ;
+flags xlf OPTIONS <profiling>on : -pg ;
+
+flags xlf DEFINES <define> ;
+flags xlf INCLUDES <include> ;
+
+rule compile-fortran
+{
+}
+
+actions compile-fortran
+{
+ xlf $(OPTIONS) -I$(INCLUDES) -c -o "$(<)" "$(>)"
+}
+
+generators.register-fortran-compiler xlf.compile-fortran : FORTRAN : OBJ ;
diff --git a/src/boost/tools/build/src/tools/xsltproc-config.jam b/src/boost/tools/build/src/tools/xsltproc-config.jam
new file mode 100644
index 000000000..b240fe3af
--- /dev/null
+++ b/src/boost/tools/build/src/tools/xsltproc-config.jam
@@ -0,0 +1,36 @@
+#~ Copyright 2005 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)
+
+# Automatic configuration for the xsltproc toolset. To use, just import this
+# module.
+
+import os ;
+import toolset : using ;
+
+
+local rule locate-executable ( name )
+{
+ local path = [ modules.peek : PATH ] ;
+ local exe ;
+ if [ os.name ] = NT
+ {
+ exe = [ GLOB $(path) "C:\\Boost\\bin" : $(name)\.exe ] ;
+ }
+ else
+ {
+ exe = [ GLOB $(path) : $(name) ] ;
+ }
+ return $(exe[1]) ;
+}
+
+
+local xsltproc-exe = [ locate-executable xsltproc ] ;
+if $(xsltproc-exe)
+{
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO notice\: using xsltproc ":" $(xsltproc-exe) ;
+ }
+ using xsltproc : $(xsltproc-exe) ;
+}
diff --git a/src/boost/tools/build/src/tools/xsltproc.jam b/src/boost/tools/build/src/tools/xsltproc.jam
new file mode 100644
index 000000000..6baf0491a
--- /dev/null
+++ b/src/boost/tools/build/src/tools/xsltproc.jam
@@ -0,0 +1,232 @@
+# Copyright (C) 2003 Doug Gregor. 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.
+
+# This module defines rules to apply an XSLT stylesheet to an XML file using the
+# xsltproc driver, part of libxslt.
+
+import "class" : new ;
+import common ;
+import feature ;
+import generators ;
+import modules ;
+import os ;
+import path ;
+import regex ;
+import sequence ;
+import toolset ;
+import virtual-target ;
+
+feature.feature "xsl:param" : : free ;
+feature.feature "xsl:path" : : free ;
+feature.feature catalog : : free ;
+
+
+# Initialize xsltproc support. The parameters are:
+# xsltproc: The xsltproc executable
+#
+rule init ( xsltproc ? )
+{
+ if $(xsltproc)
+ {
+ modify-config ;
+ .xsltproc = $(xsltproc) ;
+ check-xsltproc ;
+ }
+}
+
+
+rule freeze-config ( )
+{
+ if ! $(.config-frozen)
+ {
+ .config-frozen = true ;
+ .xsltproc ?= [ modules.peek : XSLTPROC ] ;
+ .xsltproc ?= xsltproc ;
+ check-xsltproc ;
+ .is-cygwin = [ .is-cygwin $(.xsltproc) ] ;
+ }
+}
+
+
+rule modify-config ( )
+{
+ if $(.config-frozen)
+ {
+ import errors ;
+ errors.user-error
+ "xsltproc: Cannot change xsltproc command after it has been used." ;
+ }
+}
+
+
+rule check-xsltproc ( )
+{
+ if $(.xsltproc)
+ {
+ local status = [ SHELL "\"$(.xsltproc)\" -V" : no-output : exit-status ]
+ ;
+ if $(status[2]) != 0
+ {
+ import errors ;
+ errors.user-error "xsltproc: Could not run \"$(.xsltproc)\" -V." ;
+ }
+ }
+}
+
+rule name ( )
+{
+ freeze-config ;
+ return $(.xsltproc) ;
+}
+
+# Returns a non-empty string if a cygwin xsltproc binary was specified.
+#
+rule is-cygwin ( )
+{
+ freeze-config ;
+ return $(.is-cygwin) ;
+}
+
+
+rule .is-cygwin ( xsltproc )
+{
+ if [ os.on-windows ]
+ {
+ local file = [ path.make [ modules.binding $(__name__) ] ] ;
+ local dir = [ path.native [ path.join [ path.parent $(file) ] xsltproc ]
+ ] ;
+ if [ os.name ] = CYGWIN
+ {
+ dir = $(dir:W) ;
+ }
+ local command =
+ "\"$(xsltproc)\" \"$(dir)\\test.xsl\" \"$(dir)\\test.xml\" 2>&1" ;
+ local status = [ SHELL $(command) : no-output : exit-status ] ;
+ if $(status[2]) != "0"
+ {
+ return true ;
+ }
+ }
+}
+
+class xsltproc-action : action
+{
+ rule adjust-properties ( property-set )
+ {
+ local s = [ $(self.targets[1]).creating-subvariant ] ;
+ if $(s)
+ {
+ return [ $(property-set).add-raw
+ [ $(s).implicit-includes "xsl:path" : XML ] ] ;
+ }
+ else
+ {
+ return $(property-set) ;
+ }
+ }
+}
+
+class xsltproc-generator : generator
+{
+ rule action-class ( )
+ {
+ return xsltproc-action ;
+ }
+}
+
+rule register-generator ( id : source-types + : target-types + : requirements * )
+{
+ if ! $(id) in $(.known-rules)
+ {
+ .known-rules += $(id) ;
+ flags $(id) ;
+ }
+ generators.register [ new xsltproc-generator $(id) :
+ $(source-types) : $(target-types) : $(requirements) ] ;
+}
+
+IMPORT xsltproc : register-generator : : generators.register-xslt ;
+
+rule flags ( rulename )
+{
+ toolset.uses-features $(rulename) : <xsl:param> <catalog> : unchecked ;
+ toolset.flags $(rulename) XSL-PATH : <xsl:path> : unchecked ;
+ toolset.flags $(rulename) FLAGS : <flags> : unchecked ;
+}
+
+rule compute-xslt-flags ( target : properties * )
+{
+ local flags ;
+ # Translate <xsl:param> into command line flags.
+ for local param in [ feature.get-values <xsl:param> : $(properties) ]
+ {
+ local namevalue = [ regex.split $(param) "=" ] ;
+ flags += --stringparam $(namevalue[1]) \"$(namevalue[2])\" ;
+ }
+
+ return $(flags) ;
+}
+
+
+local rule .xsltproc ( target : source stylesheet : properties * : dirname ? :
+ action )
+{
+ freeze-config ;
+ STYLESHEET on $(target) = $(stylesheet) ;
+ FLAGS on $(target) += [ compute-xslt-flags $(target) : $(properties) ] ;
+ NAME on $(target) = $(.xsltproc) ;
+
+ for local catalog in [ feature.get-values <catalog> : $(properties) ]
+ {
+ CATALOG = [ common.variable-setting-command XML_CATALOG_FILES :
+ $(catalog:T) ] ;
+ }
+
+ if [ os.on-windows ] && ! [ is-cygwin ]
+ {
+ action = $(action).windows ;
+ }
+
+ $(action) $(target) : $(source) ;
+}
+
+
+rule xslt ( target : source stylesheet : properties * )
+{
+ return [ .xsltproc $(target) : $(source) $(stylesheet) : $(properties) : :
+ xslt-xsltproc ] ;
+}
+
+
+rule xslt-dir ( target : source stylesheet : properties * : dirname )
+{
+ return [ .xsltproc $(target) : $(source) $(stylesheet) : $(properties) :
+ $(dirname) : xslt-xsltproc-dir ] ;
+}
+
+_ = " " ;
+
+actions xslt-xsltproc.windows
+{
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --path$(_)"$(XSL-PATH:W)" --xinclude -o "$(<)" "$(STYLESHEET:W)" "$(>:W)"
+}
+
+
+actions xslt-xsltproc bind STYLESHEET
+{
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --path$(_)"$(XSL-PATH:T)" --xinclude -o "$(<)" "$(STYLESHEET:T)" "$(>:T)"
+}
+
+
+actions xslt-xsltproc-dir.windows bind STYLESHEET
+{
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --path$(_)"$(XSL-PATH:W)" --xinclude -o "$(<:D)/" "$(STYLESHEET:W)" "$(>:W)"
+}
+
+
+actions xslt-xsltproc-dir bind STYLESHEET
+{
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --path$(_)"$(XSL-PATH:T)" --xinclude -o "$(<:D)/" "$(STYLESHEET:T)" "$(>:T)"
+}
diff --git a/src/boost/tools/build/src/tools/xsltproc/included.xsl b/src/boost/tools/build/src/tools/xsltproc/included.xsl
new file mode 100644
index 000000000..ef86394a9
--- /dev/null
+++ b/src/boost/tools/build/src/tools/xsltproc/included.xsl
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2010 Steven Watanabe
+
+ 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:stylesheet>
diff --git a/src/boost/tools/build/src/tools/xsltproc/test.xml b/src/boost/tools/build/src/tools/xsltproc/test.xml
new file mode 100644
index 000000000..57c8ba187
--- /dev/null
+++ b/src/boost/tools/build/src/tools/xsltproc/test.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root/>
diff --git a/src/boost/tools/build/src/tools/xsltproc/test.xsl b/src/boost/tools/build/src/tools/xsltproc/test.xsl
new file mode 100644
index 000000000..a142c91dd
--- /dev/null
+++ b/src/boost/tools/build/src/tools/xsltproc/test.xsl
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2010 Steven Watanabe
+
+ 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:include href="included.xsl"/>
+</xsl:stylesheet>
diff --git a/src/boost/tools/build/src/tools/zlib.jam b/src/boost/tools/build/src/tools/zlib.jam
new file mode 100644
index 000000000..7ac81047d
--- /dev/null
+++ b/src/boost/tools/build/src/tools/zlib.jam
@@ -0,0 +1,235 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the zlib library
+#
+# After 'using zlib', the following targets are available:
+#
+# /zlib//zlib -- The zlib library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import os ;
+import property ;
+import property-set ;
+
+header = zlib.h ;
+names = z zlib zll zdll ;
+
+sources = adler32.c compress.c
+ crc32.c deflate.c gzclose.c gzio.c gzlib.c gzread.c gzwrite.c
+ infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+# Initializes the zlib library.
+#
+# zlib can be configured either to use pre-existing binaries
+# or to build the library from source.
+#
+# Options for configuring a prebuilt zlib::
+#
+# <search>
+# The directory containing the zlib binaries.
+# <name>
+# Overrides the default library name.
+# <include>
+# The directory containing the zlib headers.
+#
+# If none of these options is specified, then the environmental
+# variables ZLIB_LIBRARY_PATH, ZLIB_NAME, and ZLIB_INCLUDE will
+# be used instead.
+#
+# Options for building zlib from source::
+#
+# <source>
+# The zlib source directory. Defaults to the environmental variable
+# ZLIB_SOURCE.
+# <tag>
+# A rule which computes the actual name of the compiled
+# libraries based on the build properties. Ignored
+# when using precompiled binaries.
+# <build-name>
+# The base name to use for the compiled library. Ignored
+# when using precompiled binaries.
+#
+# Examples::
+#
+# # Find zlib in the default system location
+# using zlib ;
+# # Build zlib from source
+# using zlib : 1.2.7 : <source>/home/steven/zlib-1.2.7 ;
+# # Find zlib in /usr/local
+# using zlib : 1.2.7
+# : <include>/usr/local/include <search>/usr/local/lib ;
+# # Build zlib from source for msvc and find
+# # prebuilt binaries for gcc.
+# using zlib : 1.2.7 : <source>C:/Devel/src/zlib-1.2.7 : <toolset>msvc ;
+# using zlib : 1.2.7 : : <toolset>gcc ;
+#
+rule init (
+ version ?
+ # The zlib version (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the zlib target
+
+ : is-default ?
+ # Default configurations are only used when zlib
+ # has not yet been configured. This option is
+ # deprecated. A configuration will be treated
+ # as a default when none of <include>, <search>,
+ # <name>, and <source> are present.
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project zlib ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local source-path = [ feature.get-values <source> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+ local tag = [ feature.get-values <tag> : $(options) ] ;
+ local build-name = [ feature.get-values <build-name> : $(options) ] ;
+
+ if ! $(library-path) && ! $(include-path) && ! $(source-path) && ! $(library-name)
+ {
+ is-default = true ;
+ }
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ # Ignore environmental ZLIB_SOURCE if this initialization
+ # requested to search for a specific pre-built library.
+ if $(library-path) || $(include-path) || $(library-name)
+ {
+ if $(source-path) || $(tag) || $(build-name)
+ {
+ errors.user-error "incompatible options for zlib:"
+ [ property.select <search> <include> <name> : $(options) ] "and"
+ [ property.select <source> <tag> <build-name> : $(options) ] ;
+ }
+ }
+ else
+ {
+ source-path ?= [ os.environ ZLIB_SOURCE ] ;
+ if $(source-path)
+ {
+ source-path = [ path.root [ path.make $(source-path) ]
+ [ path.pwd ] ] ;
+ }
+ }
+
+ if $(.configured.$(condition))
+ {
+ if $(is-default)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [zlib] zlib is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "zlib is already configured" ;
+ }
+ return ;
+ }
+ else if $(source-path)
+ {
+ build-name ?= z ;
+ library-id = [ CALC $(library-id) + 1 ] ;
+ tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
+ if $(tag)
+ {
+ tag = [ indirect.make $(tag) : [ $(caller).project-module ] ] ;
+ }
+ sources = [ path.glob $(source-path) : $(sources) ] ;
+ if $(.debug)
+ {
+ ECHO "notice: [zlib] Building zlib from source as $(build-name)" ;
+ if $(condition)
+ {
+ ECHO "notice: [zlib] Condition" [ $(condition).raw ] ;
+ }
+ if $(sources)
+ {
+ ECHO "notice: [zlib] found zlib source in $(source-path)" ;
+ }
+ else
+ {
+ ECHO "warning: [zlib] could not find zlib source in $(source-path)" ;
+ }
+ }
+ local target ;
+ if $(sources)
+ {
+ target = [ targets.create-typed-target LIB : $(.project)
+ : $(build-name).$(library-id)
+ : $(sources)
+ : $(requirements)
+ <tag>@$(tag)
+ <include>$(source-path)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <link>shared:<define>ZLIB_DLL
+ :
+ : <include>$(source-path) ] ;
+ }
+
+ local mt = [ new ac-library zlib : $(.project) : $(condition) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ if $(target)
+ {
+ $(mt).set-target $(target) ;
+ }
+ targets.main-target-alternative $(mt) ;
+ }
+ else
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [zlib] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [zlib] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local mt = [ new ac-library zlib : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
+ }
+ .configured.$(condition) = true ;
+}
diff --git a/src/boost/tools/build/src/tools/zstd.jam b/src/boost/tools/build/src/tools/zstd.jam
new file mode 100644
index 000000000..2cba82d6b
--- /dev/null
+++ b/src/boost/tools/build/src/tools/zstd.jam
@@ -0,0 +1,100 @@
+# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# Supports the zstd library
+#
+# After 'using zstd', the following targets are available:
+#
+# /zstd//zstd -- The zstd library
+
+import project ;
+import ac ;
+import errors ;
+import feature ;
+import "class" : new ;
+import targets ;
+import path ;
+import modules ;
+import indirect ;
+import property ;
+import property-set ;
+
+header = zstd.h ;
+# libzstd only needed for VisualC++ builds
+# *_static variants for prebuilt Windows static libraries
+names = zstd zstd_static libzstd libzstd_static ;
+
+library-id = 0 ;
+
+if --debug-configuration in [ modules.peek : ARGV ]
+{
+ .debug = true ;
+}
+
+rule init (
+ version ?
+ # (currently ignored)
+
+ : options *
+ # A list of the options to use
+
+ : requirements *
+ # The requirements for the target
+ )
+{
+ local caller = [ project.current ] ;
+
+ if ! $(.initialized)
+ {
+ .initialized = true ;
+
+ project.initialize $(__name__) ;
+ .project = [ project.current ] ;
+ project zstd ;
+ }
+
+ local library-path = [ feature.get-values <search> : $(options) ] ;
+ local include-path = [ feature.get-values <include> : $(options) ] ;
+ local library-name = [ feature.get-values <name> : $(options) ] ;
+
+ condition = [ property-set.create $(requirements) ] ;
+ condition = [ property-set.create [ $(condition).base ] ] ;
+
+ if $(.configured.$(condition))
+ {
+ if ! $(options)
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [zstd] zstd is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "zstd is already configured" ;
+ }
+ return ;
+ }
+ else
+ {
+ if $(.debug)
+ {
+ ECHO "notice: [zstd] Using pre-installed library" ;
+ if $(condition)
+ {
+ ECHO "notice: [zstd] Condition" [ $(condition).raw ] ;
+ }
+ }
+
+ local mt = [ new ac-library zstd : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
+ }
+ .configured.$(condition) = true ;
+}
diff --git a/src/boost/tools/build/src/util/__init__.py b/src/boost/tools/build/src/util/__init__.py
new file mode 100644
index 000000000..7c847cb57
--- /dev/null
+++ b/src/boost/tools/build/src/util/__init__.py
@@ -0,0 +1,321 @@
+
+import bjam
+import re
+import types
+
+from itertools import groupby
+
+
+def safe_isinstance(value, types=None, class_names=None):
+ """To prevent circular imports, this extends isinstance()
+ by checking also if `value` has a particular class name (or inherits from a
+ particular class name). This check is safe in that an AttributeError is not
+ raised in case `value` doesn't have a __class__ attribute.
+ """
+ # inspect is being imported here because I seriously doubt
+ # that this function will be used outside of the type
+ # checking below.
+ import inspect
+ result = False
+ if types is not None:
+ result = result or isinstance(value, types)
+ if class_names is not None and not result:
+ # this doesn't work with inheritance, but normally
+ # either the class will already be imported within the module,
+ # or the class doesn't have any subclasses. For example: PropertySet
+ if isinstance(class_names, basestring):
+ class_names = [class_names]
+ # this is the part that makes it "safe".
+ try:
+ base_names = [class_.__name__ for class_ in inspect.getmro(value.__class__)]
+ for name in class_names:
+ if name in base_names:
+ return True
+ except AttributeError:
+ pass
+ return result
+
+
+def is_iterable_typed(values, type_):
+ return is_iterable(values) and all(isinstance(v, type_) for v in values)
+
+
+def is_iterable(value):
+ """Returns whether value is iterable and not a string."""
+ return not isinstance(value, basestring) and hasattr(value, '__iter__')
+
+
+def is_iterable_or_none(value):
+ return is_iterable(value) or value is None
+
+
+def is_single_value(value):
+ # some functions may specify a bjam signature
+ # that is a string type, but still allow a
+ # PropertySet to be passed in
+ return safe_isinstance(value, (basestring, type(None)), 'PropertySet')
+
+
+if __debug__:
+
+ from textwrap import dedent
+ message = dedent(
+ """The parameter "{}" was passed in a wrong type for the "{}()" function.
+ Actual:
+ \ttype: {}
+ \tvalue: {}
+ Expected:
+ \t{}
+ """
+ )
+
+ bjam_types = {
+ '*': is_iterable_or_none,
+ '+': is_iterable_or_none,
+ '?': is_single_value,
+ '': is_single_value,
+ }
+
+ bjam_to_python = {
+ '*': 'iterable',
+ '+': 'iterable',
+ '?': 'single value',
+ '': 'single value',
+ }
+
+
+ def get_next_var(field):
+ it = iter(field)
+ var = it.next()
+ type_ = None
+ yield_var = False
+ while type_ not in bjam_types:
+ try:
+ # the first value has already
+ # been consumed outside of the loop
+ type_ = it.next()
+ except StopIteration:
+ # if there are no more values, then
+ # var still needs to be returned
+ yield_var = True
+ break
+ if type_ not in bjam_types:
+ # type_ is not a type and is
+ # another variable in the same field.
+ yield var, ''
+ # type_ is the next var
+ var = type_
+ else:
+ # otherwise, type_ is a type for var
+ yield var, type_
+ try:
+ # the next value should be a var
+ var = it.next()
+ except StopIteration:
+ # if not, then we're done with
+ # this field
+ break
+ if yield_var:
+ yield var, ''
+
+
+# Decorator the specifies bjam-side prototype for a Python function
+def bjam_signature(s):
+ if __debug__:
+ from inspect import getcallargs
+ def decorator(fn):
+ function_name = fn.__module__ + '.' + fn.__name__
+ def wrapper(*args, **kwargs):
+ callargs = getcallargs(fn, *args, **kwargs)
+ for field in s:
+ for var, type_ in get_next_var(field):
+ try:
+ value = callargs[var]
+ except KeyError:
+ raise Exception(
+ 'Bjam Signature specifies a variable named "{}"\n'
+ 'but is not found within the python function signature\n'
+ 'for function {}()'.format(var, function_name)
+ )
+ if not bjam_types[type_](value):
+ raise TypeError(
+ message.format(var, function_name, type(type_), repr(value),
+ bjam_to_python[type_])
+ )
+ return fn(*args, **kwargs)
+ wrapper.__name__ = fn.__name__
+ wrapper.bjam_signature = s
+ return wrapper
+ return decorator
+ else:
+ def decorator(f):
+ f.bjam_signature = s
+ return f
+
+ return decorator
+
+def metatarget(f):
+
+ f.bjam_signature = (["name"], ["sources", "*"], ["requirements", "*"],
+ ["default_build", "*"], ["usage_requirements", "*"])
+ return f
+
+class cached(object):
+
+ def __init__(self, function):
+ self.function = function
+ self.cache = {}
+
+ def __call__(self, *args):
+ try:
+ return self.cache[args]
+ except KeyError:
+ v = self.function(*args)
+ self.cache[args] = v
+ return v
+
+ def __get__(self, instance, type):
+ return types.MethodType(self, instance, type)
+
+def unquote(s):
+ if s and s[0] == '"' and s[-1] == '"':
+ return s[1:-1]
+ else:
+ return s
+
+_extract_jamfile_and_rule = re.compile("(Jamfile<.*>)%(.*)")
+
+def qualify_jam_action(action_name, context_module):
+
+ if action_name.startswith("###"):
+ # Callable exported from Python. Don't touch
+ return action_name
+ elif _extract_jamfile_and_rule.match(action_name):
+ # Rule is already in indirect format
+ return action_name
+ else:
+ ix = action_name.find('.')
+ if ix != -1 and action_name[:ix] == context_module:
+ return context_module + '%' + action_name[ix+1:]
+
+ return context_module + '%' + action_name
+
+
+def set_jam_action(name, *args):
+
+ m = _extract_jamfile_and_rule.match(name)
+ if m:
+ args = ("set-update-action-in-module", m.group(1), m.group(2)) + args
+ else:
+ args = ("set-update-action", name) + args
+
+ return bjam.call(*args)
+
+
+def call_jam_function(name, *args):
+
+ m = _extract_jamfile_and_rule.match(name)
+ if m:
+ args = ("call-in-module", m.group(1), m.group(2)) + args
+ return bjam.call(*args)
+ else:
+ return bjam.call(*((name,) + args))
+
+__value_id = 0
+__python_to_jam = {}
+__jam_to_python = {}
+
+def value_to_jam(value, methods=False):
+ """Makes a token to refer to a Python value inside Jam language code.
+
+ The token is merely a string that can be passed around in Jam code and
+ eventually passed back. For example, we might want to pass PropertySet
+ instance to a tag function and it might eventually call back
+ to virtual_target.add_suffix_and_prefix, passing the same instance.
+
+ For values that are classes, we'll also make class methods callable
+ from Jam.
+
+ Note that this is necessary to make a bit more of existing Jamfiles work.
+ This trick should not be used to much, or else the performance benefits of
+ Python port will be eaten.
+ """
+
+ global __value_id
+
+ r = __python_to_jam.get(value, None)
+ if r:
+ return r
+
+ exported_name = '###_' + str(__value_id)
+ __value_id = __value_id + 1
+ __python_to_jam[value] = exported_name
+ __jam_to_python[exported_name] = value
+
+ if methods and type(value) == types.InstanceType:
+ for field_name in dir(value):
+ field = getattr(value, field_name)
+ if callable(field) and not field_name.startswith("__"):
+ bjam.import_rule("", exported_name + "." + field_name, field)
+
+ return exported_name
+
+def record_jam_to_value_mapping(jam_value, python_value):
+ __jam_to_python[jam_value] = python_value
+
+def jam_to_value_maybe(jam_value):
+
+ if type(jam_value) == type(""):
+ return __jam_to_python.get(jam_value, jam_value)
+ else:
+ return jam_value
+
+def stem(filename):
+ i = filename.find('.')
+ if i != -1:
+ return filename[0:i]
+ else:
+ return filename
+
+
+def abbreviate_dashed(s):
+ """Abbreviates each part of string that is delimited by a '-'."""
+ r = []
+ for part in s.split('-'):
+ r.append(abbreviate(part))
+ return '-'.join(r)
+
+
+def abbreviate(s):
+ """Apply a set of standard transformations to string to produce an
+ abbreviation no more than 4 characters long.
+ """
+ if not s:
+ return ''
+ # check the cache
+ if s in abbreviate.abbreviations:
+ return abbreviate.abbreviations[s]
+ # anything less than 4 characters doesn't need
+ # an abbreviation
+ if len(s) < 4:
+ # update cache
+ abbreviate.abbreviations[s] = s
+ return s
+ # save the first character in case it's a vowel
+ s1 = s[0]
+ s2 = s[1:]
+ if s.endswith('ing'):
+ # strip off the 'ing'
+ s2 = s2[:-3]
+ # reduce all doubled characters to one
+ s2 = ''.join(c for c, _ in groupby(s2))
+ # remove all vowels
+ s2 = s2.translate(None, "AEIOUaeiou")
+ # shorten remaining consonants to 4 characters
+ # and add the first char back to the front
+ s2 = s1 + s2[:4]
+ # update cache
+ abbreviate.abbreviations[s] = s2
+ return s2
+# maps key to its abbreviated form
+abbreviate.abbreviations = {}
diff --git a/src/boost/tools/build/src/util/assert.jam b/src/boost/tools/build/src/util/assert.jam
new file mode 100644
index 000000000..f6afcdecf
--- /dev/null
+++ b/src/boost/tools/build/src/util/assert.jam
@@ -0,0 +1,346 @@
+# Copyright 2001, 2002, 2003 Dave Abrahams
+# Copyright 2006 Rene Rivera
+# Copyright 2002, 2003 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)
+
+import errors ;
+import modules ;
+
+
+################################################################################
+#
+# Private implementation details.
+#
+################################################################################
+
+# Rule added as a replacement for the regular Jam = operator but which does not
+# ignore trailing empty string elements.
+#
+local rule exact-equal-test ( lhs * : rhs * )
+{
+ local lhs_extended = $(lhs) xxx ;
+ local rhs_extended = $(rhs) xxx ;
+ if $(lhs_extended) = $(rhs_extended)
+ {
+ return true ;
+ }
+}
+
+
+# Two lists are considered set-equal if they contain the same elements, ignoring
+# duplicates and ordering.
+#
+local rule set-equal-test ( set1 * : set2 * )
+{
+ if ( $(set1) in $(set2) ) && ( $(set2) in $(set1) )
+ {
+ return true ;
+ }
+}
+
+
+################################################################################
+#
+# Public interface.
+#
+################################################################################
+
+# Assert the equality of A and B, ignoring trailing empty string elements.
+#
+rule equal ( a * : b * )
+{
+ if $(a) != $(b)
+ {
+ errors.error-skip-frames 3 assertion "failure:" \"$(a)\" "==" \"$(b)\"
+ (ignoring trailing empty strings) ;
+ }
+}
+
+
+# Assert that the result of calling RULE-NAME on the given arguments has a false
+# logical value (is either an empty list or all empty strings).
+#
+rule false ( rule-name args * : * )
+{
+ local result ;
+ module [ CALLER_MODULE ]
+ {
+ modules.poke assert : result : [ $(1) : $(2) : $(3) : $(4) : $(5) : $(6)
+ : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15)
+ : $(16) : $(17) : $(18) : $(19) ] ;
+ }
+
+ if $(result)
+ {
+ errors.error-skip-frames 3 assertion "failure:" Expected false result from
+ "[" $(rule-name) [ errors.lol->list $(args) : $(2) : $(3) : $(4) :
+ $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) :
+ $(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] "]" : "Got:" "["
+ \"$(result)\" "]" ;
+ }
+}
+
+
+# Assert that ELEMENT is present in LIST.
+#
+rule "in" ( element : list * )
+{
+ if ! $(element) in $(list)
+ {
+ errors.error-skip-frames 3 assertion "failure:" Expected \"$(element)\" in
+ "[" \"$(list)\" "]" ;
+ }
+}
+
+
+# Assert the inequality of A and B, ignoring trailing empty string elements.
+#
+rule not-equal ( a * : b * )
+{
+ if $(a) = $(b)
+ {
+ errors.error-skip-frames 3 assertion "failure:" \"$(a)\" "!=" \"$(b)\"
+ (ignoring trailing empty strings) ;
+ }
+}
+
+
+# Assert that ELEMENT is not present in LIST.
+#
+rule not-in ( element : list * )
+{
+ if $(element) in $(list)
+ {
+ errors.error-skip-frames 3 assertion "failure:" Did not expect
+ \"$(element)\" in "[" \"$(list)\" "]" ;
+ }
+}
+
+
+# Assert the inequality of A and B as sets.
+#
+rule not-set-equal ( a * : b * )
+{
+ if [ set-equal-test $(a) : $(b) ]
+ {
+ errors.error-skip-frames 3 assertion "failure:" Expected "[" \"$(a)\" "]"
+ and "[" \"$(b)\" "]" to not be equal as sets ;
+ }
+}
+
+
+# Assert that A and B are not exactly equal, not ignoring trailing empty string
+# elements.
+#
+rule not-exact-equal ( a * : b * )
+{
+ if [ exact-equal-test $(a) : $(b) ]
+ {
+ errors.error-skip-frames 3 assertion "failure:" \"$(a)\" "!=" \"$(b)\" ;
+ }
+}
+
+
+# Assert that EXPECTED is the result of calling RULE-NAME with the given
+# arguments.
+#
+rule result ( expected * : rule-name args * : * )
+{
+ local result ;
+ module [ CALLER_MODULE ]
+ {
+ modules.poke assert : result : [ $(2) : $(3) : $(4) : $(5) : $(6) : $(7)
+ : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) :
+ $(16) : $(17) : $(18) : $(19) ] ;
+ }
+
+ if ! [ exact-equal-test $(result) : $(expected) ]
+ {
+ errors.error-skip-frames 3 assertion "failure:" "[" $(rule-name) [
+ errors.lol->list $(args) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) :
+ $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17)
+ : $(18) : $(19) ] "]" : "Expected:" "[" \"$(expected)\" "]" : "Got:" "["
+ \"$(result)\" "]" ;
+ }
+}
+
+
+# Assert that EXPECTED is set-equal (i.e. duplicates and ordering are ignored)
+# to the result of calling RULE-NAME with the given arguments. Note that rules
+# called this way may accept at most 18 parameters.
+#
+rule result-set-equal ( expected * : rule-name args * : * )
+{
+ local result ;
+ module [ CALLER_MODULE ]
+ {
+ modules.poke assert : result : [ $(2) : $(3) : $(4) : $(5) : $(6) : $(7)
+ : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) :
+ $(16) : $(17) : $(18) : $(19) ] ;
+ }
+
+ if ! [ set-equal-test $(result) : $(expected) ]
+ {
+ errors.error-skip-frames 3 assertion "failure:" "[" $(rule-name) [
+ errors.lol->list $(args) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) :
+ $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17)
+ : $(18) : $(19) ] "]" : "Expected:" "[" \"$(expected)\" "]" : "Got:" "["
+ \"$(result)\" "]" ;
+ }
+}
+
+
+# Assert the equality of A and B as sets.
+#
+rule set-equal ( a * : b * )
+{
+ if ! [ set-equal-test $(a) : $(b) ]
+ {
+ errors.error-skip-frames 3 assertion "failure:" Expected "[" \"$(a)\" "]"
+ and "[" \"$(b)\" "]" to be equal as sets ;
+ }
+}
+
+
+# Assert that the result of calling RULE-NAME on the given arguments has a true
+# logical value (is neither an empty list nor all empty strings).
+#
+rule true ( rule-name args * : * )
+{
+ local result ;
+ module [ CALLER_MODULE ]
+ {
+ modules.poke assert : result : [ $(1) : $(2) : $(3) : $(4) : $(5) : $(6)
+ : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15)
+ : $(16) : $(17) : $(18) : $(19) ] ;
+ }
+
+ if ! $(result)
+ {
+ errors.error-skip-frames 3 assertion "failure:" Expected true result from
+ "[" $(rule-name) [ errors.lol->list $(args) : $(2) : $(3) : $(4) :
+ $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) :
+ $(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] "]" ;
+ }
+}
+
+
+# Assert the exact equality of A and B, not ignoring trailing empty string
+# elements.
+#
+rule exact-equal ( a * : b * )
+{
+ if ! [ exact-equal-test $(a) : $(b) ]
+ {
+ errors.error-skip-frames 3 assertion "failure:" \"$(a)\" "==" \"$(b)\" ;
+ }
+}
+
+
+# Assert that the given variable is not an empty list.
+#
+rule variable-not-empty ( name )
+{
+ local value = [ modules.peek [ CALLER_MODULE ] : $(name) ] ;
+ if ! $(value)-is-not-empty
+ {
+ errors.error-skip-frames 3 assertion "failure:" Expected variable
+ \"$(name)\" not to be an empty list ;
+ }
+}
+
+
+rule __test__ ( )
+{
+ # Helper rule used to avoid test duplication related to different list
+ # equality test rules.
+ #
+ local rule run-equality-test ( equality-assert : ignore-trailing-empty-strings ? )
+ {
+ local not-equality-assert = not-$(equality-assert) ;
+
+ # When the given equality test is expected to ignore trailing empty
+ # strings some of the test results should be inverted.
+ local not-equality-assert-i = not-$(equality-assert) ;
+ if $(ignore-trailing-empty-strings)
+ {
+ not-equality-assert-i = $(equality-assert) ;
+ }
+
+ $(equality-assert) : ;
+ $(equality-assert) "" "" : "" "" ;
+ $(not-equality-assert-i) : "" "" ;
+ $(equality-assert) x : x ;
+ $(not-equality-assert) : x ;
+ $(not-equality-assert) "" : x ;
+ $(not-equality-assert) "" "" : x ;
+ $(not-equality-assert-i) x : x "" ;
+ $(equality-assert) x "" : x "" ;
+ $(not-equality-assert) x : "" x ;
+ $(equality-assert) "" x : "" x ;
+
+ $(equality-assert) 1 2 3 : 1 2 3 ;
+ $(not-equality-assert) 1 2 3 : 3 2 1 ;
+ $(not-equality-assert) 1 2 3 : 1 5 3 ;
+ $(not-equality-assert) 1 2 3 : 1 "" 3 ;
+ $(not-equality-assert) 1 2 3 : 1 1 2 3 ;
+ $(not-equality-assert) 1 2 3 : 1 2 2 3 ;
+ $(not-equality-assert) 1 2 3 : 5 6 7 ;
+
+ # Extra variables used here just to make sure Boost Jam or Boost Build
+ # do not handle lists with empty strings differently depending on
+ # whether they are literals or stored in variables.
+
+ local empty = ;
+ local empty-strings = "" "" ;
+ local x-empty-strings = x "" "" ;
+ local empty-strings-x = "" "" x ;
+
+ $(equality-assert) : $(empty) ;
+ $(not-equality-assert-i) "" : $(empty) ;
+ $(not-equality-assert-i) "" "" : $(empty) ;
+ $(not-equality-assert-i) : $(empty-strings) ;
+ $(not-equality-assert-i) "" : $(empty-strings) ;
+ $(equality-assert) "" "" : $(empty-strings) ;
+ $(equality-assert) $(empty) : $(empty) ;
+ $(equality-assert) $(empty-strings) : $(empty-strings) ;
+ $(not-equality-assert-i) $(empty) : $(empty-strings) ;
+ $(equality-assert) $(x-empty-strings) : $(x-empty-strings) ;
+ $(equality-assert) $(empty-strings-x) : $(empty-strings-x) ;
+ $(not-equality-assert) $(empty-strings-x) : $(x-empty-strings) ;
+ $(not-equality-assert-i) x : $(x-empty-strings) ;
+ $(not-equality-assert) x : $(empty-strings-x) ;
+ $(not-equality-assert-i) x : $(x-empty-strings) ;
+ $(not-equality-assert-i) x "" : $(x-empty-strings) ;
+ $(equality-assert) x "" "" : $(x-empty-strings) ;
+ $(not-equality-assert) x : $(empty-strings-x) ;
+ $(not-equality-assert) "" x : $(empty-strings-x) ;
+ $(equality-assert) "" "" x : $(empty-strings-x) ;
+ }
+
+
+ # ---------------
+ # Equality tests.
+ # ---------------
+
+ run-equality-test equal : ignore-trailing-empty-strings ;
+ run-equality-test exact-equal ;
+
+
+ # -------------------------
+ # assert.set-equal() tests.
+ # -------------------------
+
+ set-equal : ;
+ not-set-equal "" "" : ;
+ set-equal "" "" : "" ;
+ set-equal "" "" : "" "" ;
+ set-equal a b c : a b c ;
+ set-equal a b c : b c a ;
+ set-equal a b c a : a b c ;
+ set-equal a b c : a b c a ;
+ not-set-equal a b c : a b c d ;
+ not-set-equal a b c d : a b c ;
+}
diff --git a/src/boost/tools/build/src/util/container.jam b/src/boost/tools/build/src/util/container.jam
new file mode 100644
index 000000000..dd4963938
--- /dev/null
+++ b/src/boost/tools/build/src/util/container.jam
@@ -0,0 +1,339 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003 Rene Rivera
+# Copyright 2002, 2003, 2004 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)
+
+# Various container classes.
+
+# Base for container objects. This lets us construct recursive structures. That
+# is containers with containers in them, specifically so we can tell literal
+# values from node values.
+#
+class node
+{
+ rule __init__ (
+ value ? # Optional value to set node to initially.
+ )
+ {
+ self.value = $(value) ;
+ }
+
+ # Set the value of this node, passing nothing will clear it.
+ #
+ rule set ( value * )
+ {
+ self.value = $(value) ;
+ }
+
+ # Get the value of this node.
+ #
+ rule get ( )
+ {
+ return $(self.value) ;
+ }
+}
+
+
+# A simple vector. Interface mimics the C++ std::vector and std::list, with the
+# exception that indices are one (1) based to follow Jam standard.
+#
+# TODO: Possibly add assertion checks.
+#
+class vector : node
+{
+ import numbers ;
+ import utility ;
+ import sequence ;
+
+ rule __init__ (
+ values * # Initial contents of vector.
+ )
+ {
+ node.__init__ ;
+ self.value = $(values) ;
+ }
+
+ # Get the value of the first element.
+ #
+ rule front ( )
+ {
+ return $(self.value[1]) ;
+ }
+
+ # Get the value of the last element.
+ #
+ rule back ( )
+ {
+ return $(self.value[-1]) ;
+ }
+
+ # Get the value of the element at the given index, one based. Access to
+ # elements of recursive structures is supported directly. Specifying
+ # additional index values recursively accesses the elements as containers.
+ # For example: [ $(v).at 1 : 2 ] would retrieve the second element of our
+ # first element, assuming the first element is a container.
+ #
+ rule at (
+ index # The element index, one based.
+ : * # Additional indices to access recursively.
+ )
+ {
+ local r = $(self.value[$(index)]) ;
+ if $(2)
+ {
+ r = [ $(r).at $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ;
+ }
+ return $(r) ;
+ }
+
+ # Get the value contained in the given element. This has the same
+ # functionality and interface as "at" but in addition gets the value of the
+ # referenced element, assuming it is a "node".
+ #
+ rule get-at (
+ index # The element index, one based.
+ : * # Additional indices to access recursively.
+ )
+ {
+ local r = $(self.value[$(index)]) ;
+ if $(2)
+ {
+ r = [ $(r).at $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ;
+ }
+ return [ $(r).get ] ;
+ }
+
+ # Insert the given value into the front of the vector pushing the rest of
+ # the elements back.
+ #
+ rule push-front (
+ value # Value to become first element.
+ )
+ {
+ self.value = $(value) $(self.value) ;
+ }
+
+ # Remove the front element from the vector. Does not return the value. No
+ # effect if vector is empty.
+ #
+ rule pop-front ( )
+ {
+ self.value = $(self.value[2-]) ;
+ }
+
+ # Add the given value at the end of the vector.
+ #
+ rule push-back (
+ value # Value to become back element.
+ )
+ {
+ self.value += $(value) ;
+ }
+
+ # Remove the back element from the vector. Does not return the value. No
+ # effect if vector is empty.
+ #
+ rule pop-back ( )
+ {
+ self.value = $(self.value[1--2]) ;
+ }
+
+ # Insert the given value at the given index, one based. The values at and to
+ # the right of the index are pushed back to make room for the new value.
+ # If the index is passed the end of the vector the element is added to the
+ # end.
+ #
+ rule insert (
+ index # The index to insert at, one based.
+ : value # The value to insert.
+ )
+ {
+ local left = $(self.value[1-$(index)]) ;
+ local right = $(self.value[$(index)-]) ;
+ if $(right)-is-not-empty
+ {
+ left = $(left[1--2]) ;
+ }
+ self.value = $(left) $(value) $(right) ;
+ }
+
+ # Remove one or more elements from the vector. The range is inclusive, and
+ # not specifying an end is equivalent to the [start, start] range.
+ #
+ rule erase (
+ start # Index of first element to remove.
+ end ? # Optional, index of last element to remove.
+ )
+ {
+ end ?= $(start) ;
+ local left = $(self.value[1-$(start)]) ;
+ left = $(left[1--2]) ;
+ local right = $(self.value[$(end)-]) ;
+ right = $(right[2-]) ;
+ self.value = $(left) $(right) ;
+ }
+
+ # Remove all elements from the vector.
+ #
+ rule clear ( )
+ {
+ self.value = ;
+ }
+
+ # The number of elements in the vector.
+ #
+ rule size ( )
+ {
+ return [ sequence.length $(self.value) ] ;
+ }
+
+ # Returns "true" if there are NO elements in the vector, empty otherwise.
+ #
+ rule empty ( )
+ {
+ if ! $(self.value)-is-not-empty
+ {
+ return true ;
+ }
+ }
+
+ # Returns the textual representation of content.
+ #
+ rule str ( )
+ {
+ return "[" [ sequence.transform utility.str : $(self.value) ] "]" ;
+ }
+
+ # Sorts the vector inplace, calling 'utility.less' for comparisons.
+ #
+ rule sort ( )
+ {
+ self.value = [ sequence.insertion-sort $(self.value) : utility.less ] ;
+ }
+
+ # Returns true if content is equal to the content of other vector. Uses
+ # 'utility.equal' for comparison.
+ #
+ rule equal ( another )
+ {
+ local mismatch ;
+ local size = [ size ] ;
+ if $(size) = [ $(another).size ]
+ {
+ for local i in [ numbers.range 1 $(size) ]
+ {
+ if ! [ utility.equal [ at $(i) ] [ $(another).at $(i) ] ]
+ {
+ mismatch = true ;
+ }
+ }
+ }
+ else
+ {
+ mismatch = true ;
+ }
+
+ if ! $(mismatch)
+ {
+ return true ;
+ }
+ }
+}
+
+
+rule __test__ ( )
+{
+ import assert ;
+ import "class" : new ;
+
+ local v1 = [ new vector ] ;
+ assert.true $(v1).equal $(v1) ;
+ assert.true $(v1).empty ;
+ assert.result 0 : $(v1).size ;
+ assert.result "[" "]" : $(v1).str ;
+ $(v1).push-back b ;
+ $(v1).push-front a ;
+ assert.result "[" a b "]" : $(v1).str ;
+ assert.result a : $(v1).front ;
+ assert.result b : $(v1).back ;
+ $(v1).insert 2 : d ;
+ $(v1).insert 2 : c ;
+ $(v1).insert 4 : f ;
+ $(v1).insert 4 : e ;
+ $(v1).pop-back ;
+ assert.result 5 : $(v1).size ;
+ assert.result d : $(v1).at 3 ;
+ $(v1).pop-front ;
+ assert.result c : $(v1).front ;
+ assert.false $(v1).empty ;
+ $(v1).erase 3 4 ;
+ assert.result 2 : $(v1).size ;
+
+ local v2 = [ new vector q w e r t y ] ;
+ assert.result 6 : $(v2).size ;
+ $(v1).push-back $(v2) ;
+ assert.result 3 : $(v1).size ;
+ local v2-alias = [ $(v1).back ] ;
+ assert.result e : $(v2-alias).at 3 ;
+ $(v1).clear ;
+ assert.true $(v1).empty ;
+ assert.false $(v2-alias).empty ;
+ $(v2).pop-back ;
+ assert.result t : $(v2-alias).back ;
+
+ local v3 = [ new vector ] ;
+ $(v3).push-back [ new vector 1 2 3 4 5 ] ;
+ $(v3).push-back [ new vector a b c ] ;
+ assert.result "[" "[" 1 2 3 4 5 "]" "[" a b c "]" "]" : $(v3).str ;
+ $(v3).push-back [ new vector [ new vector x y z ] [ new vector 7 8 9 ] ] ;
+ assert.result 1 : $(v3).at 1 : 1 ;
+ assert.result b : $(v3).at 2 : 2 ;
+ assert.result a b c : $(v3).get-at 2 ;
+ assert.result 7 8 9 : $(v3).get-at 3 : 2 ;
+
+ local v4 = [ new vector 4 3 6 ] ;
+ $(v4).sort ;
+ assert.result 3 4 6 : $(v4).get ;
+ assert.false $(v4).equal $(v3) ;
+
+ local v5 = [ new vector 3 4 6 ] ;
+ assert.true $(v4).equal $(v5) ;
+ # Check that vectors of different sizes are considered non-equal.
+ $(v5).pop-back ;
+ assert.false $(v4).equal $(v5) ;
+
+ local v6 = [ new vector [ new vector 1 2 3 ] ] ;
+ assert.true $(v6).equal [ new vector [ new vector 1 2 3 ] ] ;
+
+ local v7 = [ new vector 111 222 333 ] ;
+ assert.true $(v7).equal $(v7) ;
+ $(v7).insert 4 : 444 ;
+ assert.result 111 222 333 444 : $(v7).get ;
+ $(v7).insert 999 : xxx ;
+ assert.result 111 222 333 444 xxx : $(v7).get ;
+
+ local v8 = [ new vector "" "" "" ] ;
+ assert.true $(v8).equal $(v8) ;
+ assert.false $(v8).empty ;
+ assert.result 3 : $(v8).size ;
+ assert.result "" : $(v8).at 1 ;
+ assert.result "" : $(v8).at 2 ;
+ assert.result "" : $(v8).at 3 ;
+ assert.result : $(v8).at 4 ;
+ $(v8).insert 2 : 222 ;
+ assert.result 4 : $(v8).size ;
+ assert.result "" 222 "" "" : $(v8).get ;
+ $(v8).insert 999 : "" ;
+ assert.result 5 : $(v8).size ;
+ assert.result "" 222 "" "" "" : $(v8).get ;
+ $(v8).insert 999 : xxx ;
+ assert.result 6 : $(v8).size ;
+ assert.result "" 222 "" "" "" xxx : $(v8).get ;
+
+ # Regression test for a bug causing vector.equal to compare only the first
+ # and the last element in the given vectors.
+ local v9 = [ new vector 111 xxx 222 ] ;
+ local v10 = [ new vector 111 yyy 222 ] ;
+ assert.false $(v9).equal $(v10) ;
+}
diff --git a/src/boost/tools/build/src/util/doc.jam b/src/boost/tools/build/src/util/doc.jam
new file mode 100644
index 000000000..8d03b7ee5
--- /dev/null
+++ b/src/boost/tools/build/src/util/doc.jam
@@ -0,0 +1,1076 @@
+# Copyright 2002, 2005 Dave Abrahams
+# Copyright 2002, 2003, 2006 Rene Rivera
+# 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)
+
+# Documentation system, handles --help requests.
+# It defines rules that attach documentation to modules, rules, and variables.
+# Collects and generates documentation for the various parts of the build
+# system. The documentation is collected from comments integrated into the code.
+
+import modules ;
+import print ;
+import set ;
+import container ;
+import "class" ;
+import sequence ;
+import path ;
+
+
+# The type of output to generate.
+# "console" is formatted text echoed to the console (the default);
+# "text" is formatted text appended to the output file;
+# "html" is HTML output to the file.
+#
+help-output = console ;
+
+
+# The file to output documentation to when generating "text" or "html" help.
+# This is without extension as the extension is determined by the type of
+# output.
+#
+help-output-file = help ;
+
+# Whether to include local rules in help output.
+#
+.option.show-locals ?= ;
+
+# When showing documentation for a module, whether to also generate
+# automatically the detailed docs for each item in the module.
+#
+.option.detailed ?= ;
+
+# Generate debug output as the help is generated and modules are parsed.
+#
+.option.debug ?= ;
+
+# These are all the options available for enabling or disabling to control the
+# help system in various ways. Options can be enabled or disabled with
+# '--help-enable-<option>', and '--help-disable-<option>' respectively.
+#
+.option-description = Help Options ;
+
+# Enable or disable a documentation option.
+#
+local rule set-option (
+ option # The option name.
+ : value ? # Enabled (non-empty), or disabled (empty)
+)
+{
+ .option.$(option) = $(value) ;
+}
+
+
+# Set the type of output.
+#
+local rule set-output ( type )
+{
+ help-output = $(type) ;
+}
+
+
+# Set the output to a file.
+#
+local rule set-output-file ( file )
+{
+ help-output-file = $(file) ;
+}
+
+
+# Extracts the brief comment from a complete comment. The brief comment is the
+# first sentence.
+#
+local rule brief-comment (
+ docs * # The comment documentation.
+)
+{
+ local d = $(docs:J=" ") ;
+ local p = [ MATCH ".*([.])$" : $(d) ] ;
+ if ! $(p) { d = $(d)"." ; }
+ d = $(d)" " ;
+ local m = [ MATCH "^([^.]+[.])(.*)" : $(d) ] ;
+ local brief = $(m[1]) ;
+ while $(m[2]) && [ MATCH "^([^ ])" : $(m[2]) ]
+ {
+ m = [ MATCH "^([^.]+[.])(.*)" : $(m[2]) ] ;
+ brief += $(m[1]) ;
+ }
+ return $(brief:J="") ;
+}
+
+
+# Specifies the documentation for the current module.
+#
+local rule set-module-doc (
+ module-name ? # The name of the module to document.
+ : docs * # The documentation for the module.
+)
+{
+ module-name ?= * ;
+
+ $(module-name).brief = [ brief-comment $(docs) ] ;
+ $(module-name).docs = $(docs) ;
+
+ if ! $(module-name) in $(documented-modules)
+ {
+ documented-modules += $(module-name) ;
+ }
+}
+
+
+# Specifies the documentation for the current module.
+#
+local rule set-module-copyright (
+ module-name ? # The name of the module to document.
+ : copyright * # The copyright for the module.
+)
+{
+ module-name ?= * ;
+
+ $(module-name).copy-brief = [ brief-comment $(copyright) ] ;
+ $(module-name).copy-docs = $(docs) ;
+
+ if ! $(module-name) in $(documented-modules)
+ {
+ documented-modules += $(module-name) ;
+ }
+}
+
+
+# Specifies the documentation for a rule in the current module. If called in the
+# global module, this documents a global rule.
+#
+local rule set-rule-doc (
+ name # The name of the rule.
+ module-name ? # The name of the module to document.
+ is-local ? # Whether the rule is local to the module.
+ : docs * # The documentation for the rule.
+)
+{
+ module-name ?= * ;
+
+ $(module-name).$(name).brief = [ brief-comment $(docs) ] ;
+ $(module-name).$(name).docs = $(docs) ;
+ $(module-name).$(name).is-local = $(is-local) ;
+
+ if ! $(name) in $($(module-name).rules)
+ {
+ $(module-name).rules += $(name) ;
+ }
+}
+
+
+# Specify a class, will turn a rule into a class.
+#
+local rule set-class-doc (
+ name # The name of the class.
+ module-name ? # The name of the module to document.
+ : super-name ? # The super class name.
+)
+{
+ module-name ?= * ;
+
+ $(module-name).$(name).is-class = true ;
+ if $(super-name)
+ {
+ $(module-name).$(name).super-name = $(super-name) ;
+ }
+ $(module-name).$(name).class-rules =
+ [ MATCH "^($(name)[.].*)" : $($(module-name).rules) ] ;
+ $(module-name).$($(module-name).$(name).class-rules).is-class-rule = true ;
+
+ $(module-name).classes += $(name) ;
+ $(module-name).class-rules += $($(module-name).$(name).class-rules) ;
+ $(module-name).rules =
+ [ set.difference $($(module-name).rules) :
+ $(name) $($(module-name).$(name).class-rules) ] ;
+}
+
+
+# Set the argument call signature of a rule.
+#
+local rule set-rule-arguments-signature (
+ name # The name of the rule.
+ module-name ? # The name of the module to document.
+ : signature * # The arguments signature.
+)
+{
+ module-name ?= * ;
+
+ $(module-name).$(name).signature = $(signature) ;
+}
+
+
+# Specifies the documentation for an argument of a rule.
+#
+local rule set-argument-doc (
+ name # The name of the argument.
+ qualifier # Argument syntax qualifier, "*", "+", etc.
+ rule-name # The name of the rule.
+ module-name ? # THe optional name of the module.
+ : docs * # The documentation.
+)
+{
+ module-name ?= * ;
+
+ $(module-name).$(rule-name).args.$(name).qualifier = $(qualifier) ;
+ $(module-name).$(rule-name).args.$(name).docs = $(docs) ;
+
+ if ! $(name) in $($(module-name).$(rule-name).args)
+ {
+ $(module-name).$(rule-name).args += $(name) ;
+ }
+}
+
+
+# Specifies the documentation for a variable in the current module. If called in
+# the global module, the global variable is documented.
+#
+local rule set-variable-doc (
+ name # The name of the variable.
+ default # The default value.
+ initial # The initial value.
+ module-name ? # The name of the module to document.
+ : docs * # The documentation for the variable.
+)
+{
+ module-name ?= * ;
+
+ $(module-name).$(name).brief = [ brief-comment $(docs) ] ;
+ $(module-name).$(name).default = $(default) ;
+ $(module-name).$(name).initial = $(initial) ;
+ $(module-name).$(name).docs = $(docs) ;
+
+ if ! $(name) in $($(module-name).variables)
+ {
+ $(module-name).variables += $(name) ;
+ }
+}
+
+
+# Generates a general description of the documentation and help system.
+#
+local rule print-help-top ( )
+{
+ print.section "General command line usage" ;
+
+ print.text " b2 [options] [properties] [targets]
+
+ Options, properties and targets can be specified in any order.
+ " ;
+
+ print.section "Important Options" ;
+
+ print.list-start ;
+ print.list-item "--clean Remove targets instead of building" ;
+ print.list-item "-a Rebuild everything" ;
+ print.list-item "-n Don't execute the commands, only print them" ;
+ print.list-item "-d+2 Show commands as they are executed" ;
+ print.list-item "-d0 Suppress all informational messages" ;
+ print.list-item "-q Stop at first error" ;
+ print.list-item "--reconfigure Rerun all configuration checks" ;
+ print.list-item "--debug-configuration Diagnose configuration" ;
+ print.list-item "--debug-building Report which targets are built with what properties" ;
+ print.list-item "--debug-generator Diagnose generator search/execution" ;
+ print.list-end ;
+
+ print.section "Further Help"
+ The following options can be used to obtain additional documentation.
+ ;
+
+ print.list-start ;
+ print.list-item "--help-options Print more obscure command line options." ;
+ print.list-item "--help-internal B2 implementation details." ;
+ print.list-item "--help-doc-options Implementation details doc formatting." ;
+ print.list-end ;
+}
+
+
+# Generate Jam/Boost.Jam command usage information.
+#
+local rule print-help-usage ( )
+{
+ print.section "B2 Usage"
+ "b2 [ options... ] targets..."
+ ;
+ print.list-start ;
+ print.list-item -a\;
+ Build all targets, even if they are current. ;
+ print.list-item -fx\;
+ Read '"x"' as the Jamfile for building instead of searching for the
+ B2 system. ;
+ print.list-item -jx\;
+ Run up to '"x"' commands concurrently. ;
+ print.list-item -n\;
+ Do not execute build commands. Instead print out the commands as they
+ would be executed if building. ;
+ print.list-item -ox\;
+ Output the used build commands to file '"x"'. ;
+ print.list-item -q\;
+ Quit as soon as a build failure is encountered. Without this option
+ Boost.Jam will continue building as many targets as it can. ;
+ print.list-item -sx=y\;
+ Sets a Jam variable '"x"' to the value '"y"', overriding any value that
+ variable would have from the environment. ;
+ print.list-item -tx\;
+ Rebuild the target '"x"', even if it is up-to-date. ;
+ print.list-item -v\;
+ Display the version of b2. ;
+ print.list-item --x\;
+ Any option not explicitly handled by B2 remains available to
+ build scripts using the '"ARGV"' variable. ;
+ print.list-item --abbreviate-paths\;
+ Use abbreviated paths for targets. ;
+ print.list-item --hash\;
+ Shorten target paths by using an MD5 hash. ;
+ print.list-item -dconsole\;
+ Run the interactive debugger. Cannot be used with any other option. ;
+ print.list-item -dn\;
+ Enables output of diagnostic messages. The debug level '"n"' and all
+ below it are enabled by this option. ;
+ print.list-item -d+n\;
+ Enables output of diagnostic messages. Only the output for debug level
+ '"n"' is enabled. ;
+ print.list-end ;
+ print.section "Debug Levels"
+ Each debug level shows a different set of information. Usually with
+ higher levels producing more verbose information. The following levels
+ are supported\: ;
+ print.list-start ;
+ print.list-item 0\;
+ Turn off all diagnostic output. Only errors are reported. ;
+ print.list-item 1\;
+ Show the actions taken for building targets, as they are executed. ;
+ print.list-item 2\;
+ Show "quiet" actions and display all action text, as they are executed. ;
+ print.list-item 3\;
+ Show dependency analysis, and target/source timestamps/paths. ;
+ print.list-item 4\;
+ Show arguments of shell invocations. ;
+ print.list-item 5\;
+ Show rule invocations and variable expansions. ;
+ print.list-item 6\;
+ Show directory/header file/archive scans, and attempts at binding to targets. ;
+ print.list-item 7\;
+ Show variable settings. ;
+ print.list-item 8\;
+ Show variable fetches, variable expansions, and evaluation of '"if"' expressions. ;
+ print.list-item 9\;
+ Show variable manipulation, scanner tokens, and memory usage. ;
+ print.list-item 10\;
+ Show execution times for rules. ;
+ print.list-item 11\;
+ Show parsing progress of Jamfiles. ;
+ print.list-item 12\;
+ Show graph for target dependencies. ;
+ print.list-item 13\;
+ Show changes in target status (fate). ;
+ print.list-end ;
+}
+
+# Generates description of options controlling the help system. This
+# automatically reads the options as all variables in the module given
+# with the name `module-name` of the form ".option.*".
+#
+local rule print-help-options (
+ module-name
+)
+{
+ local options-to-list = [ MATCH "^[.]option[.](.*)" : $($(module-name).variables) ] ;
+ if $(options-to-list)
+ {
+ local option-title = $($(module-name)..option-description.initial) ;
+ if ! $(option-title) || $(option-title) = "(empty)"
+ {
+ option-title = "$(module-name) Options" ;
+ }
+ local option-description = $(option-title)
+ $($(module-name)..option-description.docs) ;
+ print.section $(option-description) ;
+ print.list-start ;
+ for local option in [ sequence.insertion-sort $(options-to-list) ]
+ {
+ local def = disabled ;
+ if $($(module-name)..option.$(option).default) != "(empty)"
+ {
+ def = $($(module-name)..option.$(option).default) ;
+ }
+ print.list-item $(option)\: $($(module-name)..option.$(option).docs)
+ Default is $(def). ;
+ }
+ print.list-end ;
+ }
+}
+
+
+# Generate brief documentation for all the known items in the section for a
+# module. Possible sections are: "rules", and "variables".
+#
+local rule print-help-module-section (
+ module # The module name.
+ section # rules or variables.
+ : section-head # The title of the section.
+ section-description * # The detailed description of the section.
+)
+{
+ if $($(module).$(section))
+ {
+ print.section $(section-head) $(section-description) ;
+ print.list-start ;
+ for local item in [ sequence.insertion-sort $($(module).$(section)) ]
+ {
+ local show = ;
+ if ! $($(module).$(item).is-local)
+ {
+ show = yes ;
+ }
+ if $(.option.show-locals)
+ {
+ show = yes ;
+ }
+ if $(show)
+ {
+ print.list-item $(item)\: $($(module).$(item).brief) ;
+ }
+ }
+ print.list-end ;
+ }
+}
+
+
+# Generate documentation for all possible modules. We attempt to list all known
+# modules together with a brief description of each.
+#
+local rule print-help-all (
+ ignored # Usually the module name, but is ignored here.
+)
+{
+ print.section "Modules"
+ "These are all the known modules. Use --help <module> to get more"
+ "detailed information."
+ ;
+ if $(documented-modules)
+ {
+ print.list-start ;
+ for local module-name in [ sequence.insertion-sort $(documented-modules) ]
+ {
+ # The brief docs for each module.
+ print.list-item $(module-name)\: $($(module-name).brief) ;
+ }
+ print.list-end ;
+ }
+ # The documentation for each module when details are requested.
+ if $(documented-modules) && $(.option.detailed)
+ {
+ for local module-name in [ sequence.insertion-sort $(documented-modules) ]
+ {
+ # The brief docs for each module.
+ print-help-module $(module-name) ;
+ }
+ }
+}
+
+
+# Generate documentation for a module. Basic information about the module is
+# generated.
+#
+local rule print-help-module (
+ module-name # The module to generate docs for.
+)
+{
+ # Print the docs.
+ print.section "Module '$(module-name)'" $($(module-name).docs) ;
+
+ # Print out the documented classes.
+ print-help-module-section $(module-name) classes : "Module '$(module-name)' classes"
+ Use --help $(module-name).<class-name> to get more information. ;
+
+ # Print out the documented rules.
+ print-help-module-section $(module-name) rules : "Module '$(module-name)' rules"
+ Use --help $(module-name).<rule-name> to get more information. ;
+
+ # Print out the documented variables.
+ print-help-module-section $(module-name) variables : "Module '$(module-name)' variables"
+ Use --help $(module-name).<variable-name> to get more information. ;
+
+ # Print out all the same information but indetailed form.
+ if $(.option.detailed)
+ {
+ print-help-classes $(module-name) ;
+ print-help-rules $(module-name) ;
+ print-help-variables $(module-name) ;
+ }
+}
+
+
+# Generate documentation for a set of rules in a module.
+#
+local rule print-help-rules (
+ module-name # Module of the rules.
+ : name * # Optional list of rules to describe.
+)
+{
+ name ?= $($(module-name).rules) ;
+ if [ set.intersection $(name) : $($(module-name).rules) $($(module-name).class-rules) ]
+ {
+ # Print out the given rules.
+ for local rule-name in [ sequence.insertion-sort $(name) ]
+ {
+ if $(.option.show-locals) || ! $($(module-name).$(rule-name).is-local)
+ {
+ local signature = $($(module-name).$(rule-name).signature:J=" ") ;
+ signature ?= "" ;
+ print.section "Rule '$(module-name).$(rule-name) ( $(signature) )'"
+ $($(module-name).$(rule-name).docs) ;
+ if $($(module-name).$(rule-name).args) &&
+ $($(module-name).$(rule-name).args.$($(module-name).$(rule-name).args).docs)
+ {
+ print.list-start ;
+ for local arg-name in $($(module-name).$(rule-name).args)
+ {
+ if $($(module-name).$(rule-name).args.$(arg-name).docs)
+ {
+ print.list-item $(arg-name)\: $($(module-name).$(rule-name).args.$(arg-name).docs) ;
+ }
+ }
+ print.list-end ;
+ }
+ }
+ }
+ }
+}
+
+
+# Generate documentation for a set of classes in a module.
+#
+local rule print-help-classes (
+ module-name # Module of the classes.
+ : name * # Optional list of classes to describe.
+)
+{
+ name ?= $($(module-name).classes) ;
+ if [ set.intersection $(name) : $($(module-name).classes) ]
+ {
+ # Print out the given classes.
+ for local class-name in [ sequence.insertion-sort $(name) ]
+ {
+ if $(.option.show-locals) || ! $($(module-name).$(class-name).is-local)
+ {
+ local signature = $($(module-name).$(class-name).signature:J=" ") ;
+ signature ?= "" ;
+ print.section "Class '$(module-name).$(class-name) ( $(signature) )'"
+ $($(module-name).$(class-name).docs)
+ "Inherits from '"$($(module-name).$(class-name).super-name)"'." ;
+ if $($(module-name).$(class-name).args)
+ {
+ print.list-start ;
+ for local arg-name in $($(module-name).$(class-name).args)
+ {
+ print.list-item $(arg-name)\: $($(module-name).$(class-name).args.$(arg-name).docs) ;
+ }
+ print.list-end ;
+ }
+ }
+
+ # Print out the documented rules of the class.
+ print-help-module-section $(module-name) $(class-name).class-rules : "Class '$(module-name).$(class-name)' rules"
+ Use --help $(module-name).<rule-name> to get more information. ;
+
+ # Print out all the rules if details are requested.
+ if $(.option.detailed)
+ {
+ print-help-rules $(module-name) : $($(module-name).$(class-name).class-rules) ;
+ }
+ }
+ }
+}
+
+
+# Generate documentation for a set of variables in a module.
+#
+local rule print-help-variables (
+ module-name ? # Module of the variables.
+ : name * # Optional list of variables to describe.
+)
+{
+ name ?= $($(module-name).variables) ;
+ if [ set.intersection $(name) : $($(module-name).variables) ]
+ {
+ # Print out the given variables.
+ for local variable-name in [ sequence.insertion-sort $(name) ]
+ {
+ print.section "Variable '$(module-name).$(variable-name)'" $($(module-name).$(variable-name).docs) ;
+ if $($(module-name).$(variable-name).default) ||
+ $($(module-name).$(variable-name).initial)
+ {
+ print.list-start ;
+ if $($(module-name).$(variable-name).default)
+ {
+ print.list-item "default value:" '$($(module-name).$(variable-name).default:J=" ")' ;
+ }
+ if $($(module-name).$(variable-name).initial)
+ {
+ print.list-item "initial value:" '$($(module-name).$(variable-name).initial:J=" ")' ;
+ }
+ print.list-end ;
+ }
+ }
+ }
+}
+
+
+# Generate documentation for a project.
+#
+local rule print-help-project (
+ unused ?
+ : jamfile * # The project Jamfile.
+)
+{
+ if $(jamfile<$(jamfile)>.docs)
+ {
+ # Print the docs.
+ print.section "Project-specific help"
+ Project has jamfile at $(jamfile) ;
+
+ print.lines $(jamfile<$(jamfile)>.docs) "" ;
+ }
+}
+
+
+# Generate documentation for a config file.
+#
+local rule print-help-config (
+ unused ?
+ : type # The type of configuration file user or site.
+ config-file # The configuration Jamfile.
+)
+{
+ if $(jamfile<$(config-file)>.docs)
+ {
+ # Print the docs.
+ print.section "Configuration help"
+ Configuration file at $(config-file) ;
+
+ print.lines $(jamfile<$(config-file)>.docs) "" ;
+ }
+}
+
+
+ws = "\t " ;
+
+# Extract the text from a single comment
+#
+local rule extract-one-comment (
+ var # The name of the variable to extract from
+ : start # The initial part after the leading '#'
+)
+{
+ local m = [ MATCH ^(\\|)(.*) : $(start) ] ;
+ if $(m)
+ {
+ start = $(m[2]) ;
+ local comment ;
+ while true
+ {
+ local end = [ MATCH "(.*)(\\|#)(.*)" : $(start) ] ;
+ if $(end)
+ {
+ comment += $(end[1]) ;
+ $(var) = $(end[3]) $($(var)[2-]) ;
+ return $(comment) ;
+ }
+ else
+ {
+ comment += $(start) ;
+ $(var) = $($(var)[2-]) ;
+ }
+ start = $($(var)[1]) ;
+ }
+ }
+ else
+ {
+ $(var) = $($(var)[2-]) ;
+ if $(start) { return [ MATCH "^[$(ws)]?(.*)$" : $(start) ] ; }
+ else { return "" ; }
+ }
+}
+
+# Extract the text from a block of comments.
+#
+local rule extract-comment (
+ var # The name of the variable to extract from.
+)
+{
+ local comment = ;
+ local line = $($(var)[1]) ;
+ local l = [ MATCH "^[$(ws)]*(#)(.*)$" : $(line) ] ;
+ while $(l[1]) && $($(var))
+ {
+ comment += [ extract-one-comment $(var) : $(l[2]) ] ;
+ line = $($(var)[1]) ;
+ l = [ MATCH "^[$(ws)]*(#)(.*)$" : $(line) ] ;
+ }
+ return $(comment) ;
+}
+
+
+# Extract s single line of Jam syntax, ignoring any comments.
+#
+local rule extract-syntax (
+ var # The name of the variable to extract from.
+)
+{
+ local syntax = ;
+ local line = $($(var)[1]) ;
+ while ! $(syntax) && ! [ MATCH "^[$(ws)]*(#)" : $(line) ] && $($(var))
+ {
+ local m = [ MATCH "^[$(ws)]*(.*)$" : $(line) ] ;
+ if $(m)
+ {
+ syntax = $(m) ;
+ }
+ $(var) = $($(var)[2-]) ;
+ line = $($(var)[1]) ;
+ }
+ return $(syntax) ;
+}
+
+
+# Extract the next token, this is either a single Jam construct or a comment as
+# a single token.
+#
+local rule extract-token (
+ var # The name of the variable to extract from.
+)
+{
+ local parts = ;
+ while ! $(parts)
+ {
+ parts = [ MATCH "^[$(ws)]*([^$(ws)]+)[$(ws)]*(.*)" : $($(var)[1]) ] ;
+ if ! $(parts)
+ {
+ $(var) = $($(var)[2-]) ;
+ }
+ }
+ local token = ;
+ if [ MATCH "^(#)" : $(parts[1]) ]
+ {
+ token = $(parts:J=" ") ;
+ $(var) = $($(var)[2-]) ;
+ }
+ else
+ {
+ token = $(parts[1]) ;
+ $(var) = $(parts[2-]:J=" ") $($(var)[2-]) ;
+ }
+ return $(token) ;
+}
+
+
+# Scan for a rule declaration as the next item in the variable.
+#
+local rule scan-rule (
+ syntax ? # The first part of the text which contains the rule declaration.
+ : var # The name of the variable to extract from.
+)
+{
+ local rule-parts =
+ [ MATCH "^[$(ws)]*(rule|local[$(ws)]*rule)[$(ws)]+([^$(ws)]+)[$(ws)]*(.*)" : $(syntax:J=" ") ] ;
+ if $(rule-parts[1])
+ {
+ # Mark as doc for rule.
+ local rule-name = $(rule-parts[2]) ;
+ if $(scope-name)
+ {
+ rule-name = $(scope-name).$(rule-name) ;
+ }
+ local is-local = [ MATCH "^(local).*" : $(rule-parts[1]) ] ;
+ if $(comment-block)
+ {
+ set-rule-doc $(rule-name) $(module-name) $(is-local) : $(comment-block) ;
+ }
+ # Parse args of rule.
+ $(var) = $(rule-parts[3-]) $($(var)) ;
+ set-rule-arguments-signature $(rule-name) $(module-name) : [ scan-rule-arguments $(var) ] ;
+ # Scan within this rules scope.
+ local scope-level = [ extract-token $(var) ] ;
+ local scope-name = $(rule-name) ;
+ while $(scope-level) && $($(var))
+ {
+ local comment-block = [ extract-comment $(var) ] ;
+ local syntax-block = [ extract-syntax $(var) ] ;
+ if [ scan-rule $(syntax-block) : $(var) ]
+ {
+ }
+ else if [ MATCH "^(\\{)" : $(syntax-block) ]
+ {
+ scope-level += "{" ;
+ }
+ else if [ MATCH "^[^\\}]*([\\}])[$(ws)]*$" : $(syntax-block) ]
+ {
+ scope-level = $(scope-level[2-]) ;
+ }
+ }
+
+ return true ;
+ }
+}
+
+
+# Scan the arguments of a rule.
+#
+local rule scan-rule-arguments (
+ var # The name of the variable to extract from.
+)
+{
+ local arg-syntax = ;
+ local token = [ extract-token $(var) ] ;
+ while $(token) != "(" && $(token) != "{"
+ {
+ token = [ extract-token $(var) ] ;
+ }
+ if $(token) != "{"
+ {
+ token = [ extract-token $(var) ] ;
+ }
+ local arg-signature = ;
+ while $(token) != ")" && $(token) != "{"
+ {
+ local arg-name = ;
+ local arg-qualifier = " " ;
+ local arg-doc = ;
+ if $(token) = ":"
+ {
+ arg-signature += $(token) ;
+ token = [ extract-token $(var) ] ;
+ }
+ arg-name = $(token) ;
+ arg-signature += $(token) ;
+ token = [ extract-token $(var) ] ;
+ if [ MATCH "^([\\*\\+\\?])" : $(token) ]
+ {
+ arg-qualifier = $(token) ;
+ arg-signature += $(token) ;
+ token = [ extract-token $(var) ] ;
+ }
+ if $(token) = ":"
+ {
+ arg-signature += $(token) ;
+ token = [ extract-token $(var) ] ;
+ }
+ if [ MATCH "^(#)" : $(token) ]
+ {
+ $(var) = $(token) $($(var)) ;
+ arg-doc = [ extract-comment $(var) ] ;
+ token = [ extract-token $(var) ] ;
+ }
+ set-argument-doc $(arg-name) $(arg-qualifier) $(rule-name) $(module-name) : $(arg-doc) ;
+ }
+ while $(token) != "{"
+ {
+ token = [ extract-token $(var) ] ;
+ }
+ $(var) = "{" $($(var)) ;
+ arg-signature ?= "" ;
+ return $(arg-signature) ;
+}
+
+
+# Scan for a variable declaration.
+#
+local rule scan-variable (
+ syntax ? # The first part of the text which contains the variable declaration.
+ : var # The name of the variable to extract from.
+)
+{
+ # [1] = name, [2] = value(s)
+ local var-parts =
+ [ MATCH "^[$(ws)]*([^$(ws)]+)[$(ws)]+([\\?\\=]*)[$(ws)]+([^\\;]*)\\;" : $(syntax) ] ;
+ if $(var-parts)
+ {
+ local value = [ MATCH "^(.*)[ ]$" : $(var-parts[3-]:J=" ") ] ;
+ local default-value = "" ;
+ local initial-valie = "" ;
+ if $(var-parts[2]) = "?="
+ {
+ default-value = $(value) ;
+ default-value ?= "(empty)" ;
+ }
+ else
+ {
+ initial-value = $(value) ;
+ initial-value ?= "(empty)" ;
+ }
+ if $(comment-block)
+ {
+ set-variable-doc $(var-parts[1]) $(default-value) $(initial-value) $(module-name) : $(comment-block) ;
+ }
+ return true ;
+ }
+}
+
+
+# Scan a class declaration.
+#
+local rule scan-class (
+ syntax ? # The syntax text for the class declaration.
+ : var # The name of the variable to extract from.
+)
+{
+ # [1] = class?, [2] = name, [3] = superclass
+ local class-parts =
+ [ MATCH "^[$(ws)]*([^$(ws)]+)[$(ws)]+([^$(ws)]+)[$(ws)]*:*[$(ws)]*([^$(ws);]*)" : $(syntax) ] ;
+ if $(class-parts[1]) = "class" || $(class-parts[1]) = "class.class"
+ {
+ # Scan within this class scope.
+ local scope-level = [ extract-token $(var) ] ;
+ local scope-name = $(class-parts[2]) ;
+ while $(scope-level) && $($(var))
+ {
+ local comment-block = [ extract-comment $(var) ] ;
+ local syntax-block = [ extract-syntax $(var) ] ;
+ if [ scan-rule $(syntax-block) : $(var) ]
+ {
+ }
+ else if [ MATCH "^(\\{)" : $(syntax-block) ]
+ {
+ scope-level += "{" ;
+ }
+ else if [ MATCH "^[^\\}]*([\\}])[$(ws)]*$" : $(syntax-block) ]
+ {
+ scope-level = $(scope-level[2-]) ;
+ }
+ }
+
+ # This has to come after parsing the rules, because
+ # it looks up the rules for the class from the global list.
+ set-class-doc $(class-parts[2]) $(module-name) : $(class-parts[3]) ;
+
+ return true ;
+ }
+}
+
+
+# Scan a module file for documentation comments. This also invokes any actions
+# assigned to the module. The actions are the rules that do the actual output of
+# the documentation. This rule is invoked as the header scan rule for the module
+# file.
+#
+rule scan-module (
+ target # The module file.
+ : text * # The text in the file, one item per line.
+ : action * # Rule to call to output docs for the module.
+)
+{
+ if $(.option.debug) { ECHO "HELP:" scanning module target '$(target)' ; }
+ local module-name = $(target:B) ;
+ local module-documented = ;
+ local comment-block = ;
+ local syntax-block = ;
+ # This is a hack because we can not get the line of a file if it happens to
+ # not have a new-line termination.
+ text += "}" ;
+ while $(text)
+ {
+ comment-block = [ extract-comment text ] ;
+ syntax-block = [ extract-syntax text ] ;
+ if $(.option.debug)
+ {
+ ECHO "HELP:" comment block\; '$(comment-block)' ;
+ ECHO "HELP:" syntax block\; '$(syntax-block)' ;
+ }
+ if [ scan-rule $(syntax-block) : text ] { }
+ else if [ scan-variable $(syntax-block) : text ] { }
+ else if [ scan-class $(syntax-block) : text ] { }
+ else if [ MATCH ".*([cC]opyright).*" : $(comment-block:J=" ") ]
+ {
+ # mark as the copy for the module.
+ set-module-copyright $(module-name) : $(comment-block) ;
+ }
+ else if $(action[1]) in "print-help-project" "print-help-config"
+ && ! $(jamfile<$(target)>.docs)
+ {
+ # special module docs for the project jamfile.
+ jamfile<$(target)>.docs = $(comment-block) ;
+ }
+ else if ! $(module-documented)
+ {
+ # document the module.
+ set-module-doc $(module-name) : $(comment-block) ;
+ module-documented = true ;
+ }
+ }
+ if $(action)
+ {
+ $(action[1]) $(module-name) : $(action[2-]) ;
+ }
+}
+
+
+# Import scan-module to global scope, so that it is available during header
+# scanning phase.
+#
+IMPORT $(__name__) : scan-module : : doc.scan-module ;
+
+
+# Read in a file using the SHELL builtin and return the individual lines as
+# would be done for header scanning.
+#
+local rule read-file (
+ file # The file to read in.
+)
+{
+ file = [ path.native [ path.root [ path.make $(file) ] [ path.pwd ] ] ] ;
+ if ! $(.file<$(file)>.lines)
+ {
+ local content ;
+ switch [ modules.peek : OS ]
+ {
+ case NT :
+ content = [ SHELL "TYPE \"$(file)\"" ] ;
+
+ case * :
+ content = [ SHELL "cat \"$(file)\"" ] ;
+ }
+ local lines ;
+ local << = "([^\r\n]*)[\r]?[\n](.*)" ;
+ local line+ = [ MATCH "$(<<)" : "$(content)" ] ;
+ while $(line+)
+ {
+ lines += $(line+[1]) ;
+ line+ = [ MATCH "$(<<)" : "$(line+[2])" ] ;
+ }
+ .file<$(file)>.lines = $(lines) ;
+ }
+ return $(.file<$(file)>.lines) ;
+}
+
+
+# Add a scan action to perform to generate the help documentation. The action
+# rule is passed the name of the module as the first argument. The second
+# argument(s) are optional and passed directly as specified here.
+#
+local rule do-scan (
+ modules + # The modules to scan and perform the action on.
+ : action * # The action rule, plus the secondary arguments to pass to the action rule.
+)
+{
+ if $(help-output) = text
+ {
+ print.output $(help-output-file).txt plain ;
+ ALWAYS $(help-output-file).txt ;
+ DEPENDS all : $(help-output-file).txt ;
+ }
+ if $(help-output) = html
+ {
+ print.output $(help-output-file).html html ;
+ ALWAYS $(help-output-file).html ;
+ DEPENDS all : $(help-output-file).html ;
+ }
+ for local module-file in $(modules[1--2])
+ {
+ scan-module $(module-file) : [ read-file $(module-file) ] ;
+ }
+ scan-module $(modules[-1]) : [ read-file $(modules[-1]) ] : $(action) ;
+}
diff --git a/src/boost/tools/build/src/util/indirect.jam b/src/boost/tools/build/src/util/indirect.jam
new file mode 100644
index 000000000..095fea95f
--- /dev/null
+++ b/src/boost/tools/build/src/util/indirect.jam
@@ -0,0 +1,124 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2003 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)
+
+import modules ;
+import numbers ;
+
+
+# The pattern that indirect rules must match: module%rule
+.pattern = "^([^%]*)%([^%]+)$" ;
+
+
+#
+# Type checking rules.
+#
+local rule indirect-rule ( x )
+{
+ if ! [ MATCH $(.pattern) : $(x) ]
+ {
+ return "expected a string of the form module%rule, but got \""$(x)"\" for argument" ;
+ }
+}
+
+
+# Make an indirect rule which calls the given rule. If context is supplied it is
+# expected to be the module in which to invoke the rule by the 'call' rule
+# below. Otherwise, the rule will be invoked in the module of this rule's
+# caller.
+#
+rule make ( rulename bound-args * : context ? )
+{
+ if [ MATCH $(.pattern) : $(rulename) ]
+ {
+ return $(rulename) $(bound-args) ;
+ }
+ else
+ {
+ context ?= [ CALLER_MODULE ] ;
+ context ?= "" ;
+ return $(context)%$(rulename) $(bound-args) ;
+ }
+}
+
+
+# Make an indirect rule which calls the given rule. 'rulename' may be a
+# qualified rule; if so it is returned unchanged. Otherwise, if frames is not
+# supplied, the result will be invoked (by 'call', below) in the module of the
+# caller. Otherwise, frames > 1 specifies additional call frames to back up in
+# order to find the module context.
+#
+rule make-qualified ( rulename bound-args * : frames ? )
+{
+ if [ MATCH $(.pattern) : $(rulename) ]
+ {
+ return $(rulename) $(bound-args) ;
+ }
+ else
+ {
+ frames ?= 1 ;
+ # If the rule name includes a Jamfile module, grab it.
+ local module-context = [ MATCH "^(Jamfile<[^>]*>)\\..*" : $(rulename) ] ;
+
+ if ! $(module-context)
+ {
+ # Take the first dot-separated element as module name. This disallows
+ # module names with dots, but allows rule names with dots.
+ module-context = [ MATCH "^([^.]*)\\..*" : $(rulename) ] ;
+ }
+ module-context ?= [ CALLER_MODULE $(frames) ] ;
+ return [ make $(rulename) $(bound-args) : $(module-context) ] ;
+ }
+}
+
+
+# Returns the module name in which the given indirect rule will be invoked.
+#
+rule get-module ( [indirect-rule] x )
+{
+ local m = [ MATCH $(.pattern) : $(x) ] ;
+ if ! $(m[1])
+ {
+ m = ;
+ }
+ return $(m[1]) ;
+}
+
+
+# Returns the rulename that will be called when x is invoked.
+#
+rule get-rule ( [indirect-rule] x )
+{
+ local m = [ MATCH $(.pattern) : $(x) ] ;
+ return $(m[2]) ;
+}
+
+
+# Invoke the given indirect-rule.
+#
+rule call ( [indirect-rule] r args * : * )
+{
+ return [ modules.call-in [ get-module $(r) ] : [ get-rule $(r) ] $(args) :
+ $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) :
+ $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] ;
+}
+
+
+rule __test__
+{
+ import assert ;
+
+ rule foo-barr! ( x )
+ {
+ assert.equal $(x) : x ;
+ }
+
+ assert.equal [ get-rule [ make foo-barr! ] ] : foo-barr! ;
+ assert.equal [ get-module [ make foo-barr! ] ] : [ CALLER_MODULE ] ;
+
+ call [ make foo-barr! ] x ;
+ call [ make foo-barr! x ] ;
+ call [ make foo-barr! : [ CALLER_MODULE ] ] x ;
+}
diff --git a/src/boost/tools/build/src/util/indirect.py b/src/boost/tools/build/src/util/indirect.py
new file mode 100644
index 000000000..01c2e77c2
--- /dev/null
+++ b/src/boost/tools/build/src/util/indirect.py
@@ -0,0 +1,15 @@
+# Status: minimally ported. This module is not supposed to be used much
+# with Boost.Build/Python.
+#
+# Copyright 2003 Dave Abrahams
+# 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)
+
+from b2.util import call_jam_function, bjam_signature
+
+def call(*args):
+ a1 = args[0]
+ name = a1[0]
+ a1tail = a1[1:]
+ call_jam_function(name, *((a1tail,) + args[1:]))
diff --git a/src/boost/tools/build/src/util/logger.py b/src/boost/tools/build/src/util/logger.py
new file mode 100644
index 000000000..8da0434ae
--- /dev/null
+++ b/src/boost/tools/build/src/util/logger.py
@@ -0,0 +1,46 @@
+# Copyright Pedro Ferreira 2005. 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 sys
+
+class NullLogger:
+ def __init__ (self):
+ self.indent_ = ''
+
+ def log (self, source_name, *args):
+ if self.on () and self.interesting (source_name):
+ self.do_log (self.indent_)
+ for i in args:
+ self.do_log (i)
+ self.do_log ('\n')
+
+ def increase_indent (self):
+ if self.on ():
+ self.indent_ += ' '
+
+ def decrease_indent (self):
+ if self.on () and len (self.indent_) > 4:
+ self.indent_ = self.indent_ [-4:]
+
+ def do_log (self, *args):
+ pass
+
+ def interesting (self, source_name):
+ return False
+
+ def on (self):
+ return True
+
+class TextLogger (NullLogger):
+ def __init__ (self):
+ NullLogger.__init__ (self)
+
+ def do_log (self, arg):
+ sys.stdout.write (str (arg))
+
+ def interesting (self, source_name):
+ return True
+
+ def on (self):
+ return True
diff --git a/src/boost/tools/build/src/util/numbers.jam b/src/boost/tools/build/src/util/numbers.jam
new file mode 100644
index 000000000..665347d31
--- /dev/null
+++ b/src/boost/tools/build/src/util/numbers.jam
@@ -0,0 +1,218 @@
+# Copyright 2001, 2002 Dave Abrahams
+# Copyright 2002, 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)
+
+import errors ;
+
+
+rule trim-leading-zeroes ( value )
+{
+ return [ CALC $(value) + 0 ] ;
+}
+
+
+rule check ( numbers * )
+{
+ for local n in $(numbers)
+ {
+ switch $(n)
+ {
+ case *[^0-9]* :
+ errors.error $(n) "in" $(numbers) : is not a number ;
+ }
+ }
+}
+
+
+rule increment ( number )
+{
+ return [ CALC $(number) + 1 ] ;
+}
+
+
+rule decrement ( number )
+{
+ return [ CALC $(number) - 1 ] ;
+}
+
+
+rule range ( start finish ? : step ? )
+{
+ if ! $(finish)
+ {
+ finish = $(start) ;
+ start = 1 ;
+ }
+ step ?= 1 ;
+
+ check $(start) $(finish) $(step) ;
+
+ if $(finish) != 0
+ {
+ local result ;
+ while [ less $(start) $(finish) ] || $(start) = $(finish)
+ {
+ result += $(start) ;
+ start = [ CALC $(start) + $(step) ] ;
+ }
+ return $(result) ;
+ }
+}
+
+
+rule less ( n1 n2 )
+{
+ switch [ CALC $(n2) - $(n1) ]
+ {
+ case [1-9]* : return true ;
+ }
+}
+
+
+rule log10 ( number )
+{
+ switch $(number)
+ {
+ case *[^0-9]* : errors.error $(number) is not a number ;
+ case 0 : errors.error can't take log of zero ;
+ case [1-9] : return 0 ;
+ case [1-9]? : return 1 ;
+ case [1-9]?? : return 2 ;
+ case [1-9]??? : return 3 ;
+ case [1-9]???? : return 4 ;
+ case [1-9]????? : return 5 ;
+ case [1-9]?????? : return 6 ;
+ case [1-9]??????? : return 7 ;
+ case [1-9]???????? : return 8 ;
+ case [1-9]????????? : return 9 ;
+ case * :
+ {
+ import sequence ;
+ import string ;
+ local chars = [ string.chars $(number) ] ;
+ while $(chars[1]) = 0
+ {
+ chars = $(chars[2-]) ;
+ }
+ if ! $(chars)
+ {
+ errors.error can't take log of zero ;
+ }
+ else
+ {
+ return [ decrement [ sequence.length $(chars) ] ] ;
+ }
+ }
+ }
+}
+
+
+rule __test__ ( )
+{
+ import assert ;
+
+ assert.result 1 : increment 0 ;
+ assert.result 2 : increment 1 ;
+ assert.result 1 : decrement 2 ;
+ assert.result 0 : decrement 1 ;
+ assert.result 50 : increment 49 ;
+ assert.result 49 : decrement 50 ;
+ assert.result 99 : increment 98 ;
+ assert.result 99 : decrement 100 ;
+ assert.result 100 : increment 99 ;
+ assert.result 999 : decrement 1000 ;
+ assert.result 1000 : increment 999 ;
+
+ assert.result 1 2 3 : range 3 ;
+ assert.result 1 2 3 4 5 6 7 8 9 10 11 12 : range 12 ;
+ assert.result 3 4 5 6 7 8 9 10 11 : range 3 11 ;
+ assert.result : range 0 ;
+ assert.result 1 4 7 10 : range 10 : 3 ;
+ assert.result 2 4 6 8 10 : range 2 10 : 2 ;
+ assert.result 25 50 75 100 : range 25 100 : 25 ;
+
+ assert.result 0 : trim-leading-zeroes 0 ;
+ assert.result 1234 : trim-leading-zeroes 1234 ;
+ assert.result 123456 : trim-leading-zeroes 0000123456 ;
+ assert.result 1000123456 : trim-leading-zeroes 1000123456 ;
+ assert.result 10000 : trim-leading-zeroes 10000 ;
+ assert.result 10000 : trim-leading-zeroes 00010000 ;
+
+ assert.true less 1 2 ;
+ assert.true less 1 12 ;
+ assert.true less 1 21 ;
+ assert.true less 005 217 ;
+ assert.false less 0 0 ;
+ assert.false less 03 3 ;
+ assert.false less 3 03 ;
+ assert.true less 005 217 ;
+ assert.true less 0005 217 ;
+ assert.true less 5 00217 ;
+
+ # TEMPORARY disabled, because nested "try"/"catch" do not work and I do no
+ # have the time to fix that right now.
+ if $(0)
+ {
+ try ;
+ {
+ decrement 0 ;
+ }
+ catch can't decrement zero! ;
+
+ try ;
+ {
+ check foo ;
+ }
+ catch : not a number ;
+
+ try ;
+ {
+ increment foo ;
+ }
+ catch : not a number ;
+
+ try ;
+ {
+ log10 0 ;
+ }
+ catch can't take log of zero ;
+
+ try ;
+ {
+ log10 000 ;
+ }
+ catch can't take log of zero ;
+
+ }
+
+ assert.result 0 : log10 1 ;
+ assert.result 0 : log10 9 ;
+ assert.result 1 : log10 10 ;
+ assert.result 1 : log10 99 ;
+ assert.result 2 : log10 100 ;
+ assert.result 2 : log10 101 ;
+ assert.result 2 : log10 125 ;
+ assert.result 2 : log10 999 ;
+ assert.result 3 : log10 1000 ;
+ assert.result 10 : log10 12345678901 ;
+
+ for local x in [ range 75 110 : 5 ]
+ {
+ for local y in [ range $(x) 111 : 3 ]
+ {
+ if $(x) != $(y)
+ {
+ assert.true less $(x) $(y) ;
+ }
+ }
+ }
+
+ for local x in [ range 90 110 : 2 ]
+ {
+ for local y in [ range 80 $(x) : 4 ]
+ {
+ assert.false less $(x) $(y) ;
+ }
+ }
+}
diff --git a/src/boost/tools/build/src/util/option.jam b/src/boost/tools/build/src/util/option.jam
new file mode 100644
index 000000000..4c837f4e1
--- /dev/null
+++ b/src/boost/tools/build/src/util/option.jam
@@ -0,0 +1,109 @@
+# Copyright (c) 2005 Vladimir Prus.
+#
+# Use, modification and distribution is subject to the Boost Software
+# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import modules ;
+
+# Set a value for a named option, to be used when not overridden on the command
+# line.
+rule set ( name : value ? )
+{
+ .option.$(name) = $(value) ;
+}
+
+rule get ( name : default-value ? : implied-value ? )
+{
+ local m = [ MATCH --$(name)=(.*) : [ modules.peek : ARGV ] ] ;
+ if $(m)
+ {
+ return $(m[1]) ;
+ }
+ else
+ {
+ m = [ MATCH (--$(name)) : [ modules.peek : ARGV ] ] ;
+ if $(m) && $(implied-value)
+ {
+ return $(implied-value) ;
+ }
+ else if $(.option.$(name))
+ {
+ return $(.option.$(name)) ;
+ }
+ else
+ {
+ return $(default-value) ;
+ }
+ }
+}
+
+
+# Check command-line args as soon as possible. For each option try to load
+# module named after option. Is that succeeds, invoke 'process' rule in the
+# module. The rule may return "true" to indicate that the regular build process
+# should not be attempted.
+#
+# Options take the general form of: --<name>[=<value>] [<value>]
+#
+rule process ( )
+{
+ local ARGV = [ modules.peek : ARGV ] ;
+ local BOOST_BUILD_PATH = [ modules.peek : BOOST_BUILD_PATH ] ;
+
+ local dont-build ;
+ local args = $(ARGV) ;
+ while $(args)
+ {
+ local arg = [ MATCH ^--(.*) : $(args[1]) ] ;
+ while $(args[2-]) && ! $(arg)
+ {
+ args = $(args[2-]) ;
+ arg = [ MATCH ^--(.*) : $(args[1]) ] ;
+ }
+ args = $(args[2-]) ;
+
+ if $(arg)
+ {
+ local split = [ MATCH "^(([^-=]+)[^=]*)(=?)(.*)$" : $(arg) ] ;
+ local full-name = $(split[1]) ;
+ local prefix = $(split[2]) ;
+ local values ;
+
+ if $(split[3])
+ {
+ values = $(split[4]) ;
+ }
+ if $(args) && ! [ MATCH ^(--).* : $(args[1]) ]
+ {
+ values += $(args[1]) ;
+ args = $(args[2-]) ;
+ }
+
+ # Jook in options subdirectories of BOOST_BUILD_PATH for modules
+ # matching the full option name and then its prefix.
+ local plugin-dir = options ;
+ local option-files = [ GLOB $(plugin-dir:D=$(BOOST_BUILD_PATH)) :
+ $(full-name).jam $(prefix).jam ] ;
+
+ if $(option-files)
+ {
+ # Load the file into a module named for the option.
+ local f = $(option-files[1]) ;
+ local module-name = --$(f:D=:S=) ;
+ modules.load $(module-name) : $(f:D=) : $(f:D) ;
+
+ # If there is a process rule, call it with the full option name
+ # and its value (if any). If there was no "=" in the option, the
+ # value will be empty.
+ if process in [ RULENAMES $(module-name) ]
+ {
+ dont-build += [ modules.call-in $(module-name) : process
+ --$(full-name) : $(values) ] ;
+ }
+ }
+ }
+ }
+
+ return $(dont-build) ;
+}
diff --git a/src/boost/tools/build/src/util/option.py b/src/boost/tools/build/src/util/option.py
new file mode 100644
index 000000000..b23a7257c
--- /dev/null
+++ b/src/boost/tools/build/src/util/option.py
@@ -0,0 +1,35 @@
+# Copyright (c) 2005-2010 Vladimir Prus.
+#
+# Use, modification and distribution is subject to 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
+import re
+import b2.util.regex
+
+options = {}
+
+# Set a value for a named option, to be used when not overridden on the command
+# line.
+def set(name, value=None):
+
+ global options
+
+ options[name] = value
+
+def get(name, default_value=None, implied_value=None):
+
+ global options
+
+ matches = b2.util.regex.transform(sys.argv, "--" + re.escape(name) + "=(.*)")
+ if matches:
+ return matches[-1]
+ else:
+ m = b2.util.regex.transform(sys.argv, "--(" + re.escape(name) + ")")
+ if m and implied_value:
+ return implied_value
+ elif options.get(name) is not None:
+ return options[name]
+ else:
+ return default_value
diff --git a/src/boost/tools/build/src/util/order.jam b/src/boost/tools/build/src/util/order.jam
new file mode 100644
index 000000000..943d24889
--- /dev/null
+++ b/src/boost/tools/build/src/util/order.jam
@@ -0,0 +1,173 @@
+# Copyright (C) 2003 Vladimir Prus
+# 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 module defines a class which allows to order arbitrary object with
+# regard to arbitrary binary relation.
+#
+# The primary use case is the gcc toolset, which is sensitive to library order:
+# if library 'a' uses symbols from library 'b', then 'a' must be present before
+# 'b' on the linker's command line.
+#
+# This requirement can be lifted for gcc with GNU ld, but for gcc with Solaris
+# LD (and for Solaris toolset as well), the order always matters.
+#
+# So, we need to store order requirements and then order libraries according to
+# them. It is not possible to use the dependency graph as order requirements.
+# What we need is a "use symbols" relationship while dependency graph provides
+# the "needs to be updated" relationship.
+#
+# For example::
+# lib a : a.cpp b;
+# lib b ;
+#
+# For static linking, library 'a' need not depend on 'b'. However, it should
+# still come before 'b' on the command line.
+
+class order
+{
+ rule __init__ ( )
+ {
+ }
+
+ # Adds the constraint that 'first' should preceede 'second'.
+ rule add-pair ( first second )
+ {
+ .constraits += $(first)--$(second) ;
+ }
+ NATIVE_RULE class@order : add-pair ;
+
+ # Given a list of objects, reorder them so that the constraints specified by
+ # 'add-pair' are satisfied.
+ #
+ # The algorithm was adopted from an awk script by Nikita Youshchenko
+ # (yoush at cs dot msu dot su)
+ rule order ( objects * )
+ {
+ # The algorithm used is the same is standard transitive closure, except
+ # that we're not keeping in-degree for all vertices, but rather removing
+ # edges.
+ local result ;
+ if $(objects)
+ {
+ local constraints = [ eliminate-unused-constraits $(objects) ] ;
+
+ # Find some library that nobody depends upon and add it to the
+ # 'result' array.
+ local obj ;
+ while $(objects)
+ {
+ local new_objects ;
+ while $(objects)
+ {
+ obj = $(objects[1]) ;
+ if [ has-no-dependents $(obj) : $(constraints) ]
+ {
+ # Emulate break ;
+ new_objects += $(objects[2-]) ;
+ objects = ;
+ }
+ else
+ {
+ new_objects += $(obj) ;
+ obj = ;
+ objects = $(objects[2-]) ;
+ }
+ }
+
+ if ! $(obj)
+ {
+ errors.error "Circular order dependencies" ;
+ }
+ # No problem with placing first.
+ result += $(obj) ;
+ # Remove all constraints where 'obj' comes first, since they are
+ # already satisfied.
+ constraints = [ remove-satisfied $(constraints) : $(obj) ] ;
+
+ # Add the remaining objects for further processing on the next
+ # iteration
+ objects = $(new_objects) ;
+ }
+
+ }
+ return $(result) ;
+ }
+ NATIVE_RULE class@order : order ;
+
+ # Eliminate constraints which mention objects not in 'objects'. In
+ # graph-theory terms, this is finding a subgraph induced by ordered
+ # vertices.
+ rule eliminate-unused-constraits ( objects * )
+ {
+ local result ;
+ for local c in $(.constraints)
+ {
+ local m = [ MATCH (.*)--(.*) : $(c) ] ;
+ if $(m[1]) in $(objects) && $(m[2]) in $(objects)
+ {
+ result += $(c) ;
+ }
+ }
+ return $(result) ;
+ }
+
+ # Returns true if there's no constraint in 'constaraints' where 'obj' comes
+ # second.
+ rule has-no-dependents ( obj : constraints * )
+ {
+ local failed ;
+ while $(constraints) && ! $(failed)
+ {
+ local c = $(constraints[1]) ;
+ local m = [ MATCH (.*)--(.*) : $(c) ] ;
+ if $(m[2]) = $(obj)
+ {
+ failed = true ;
+ }
+ constraints = $(constraints[2-]) ;
+ }
+ if ! $(failed)
+ {
+ return true ;
+ }
+ }
+
+ rule remove-satisfied ( constraints * : obj )
+ {
+ local result ;
+ for local c in $(constraints)
+ {
+ local m = [ MATCH (.*)--(.*) : $(c) ] ;
+ if $(m[1]) != $(obj)
+ {
+ result += $(c) ;
+ }
+ }
+ return $(result) ;
+ }
+}
+
+
+rule __test__ ( )
+{
+ import "class" : new ;
+ import assert ;
+
+ c1 = [ new order ] ;
+ $(c1).add-pair l1 l2 ;
+
+ assert.result l1 l2 : $(c1).order l1 l2 ;
+ assert.result l1 l2 : $(c1).order l2 l1 ;
+
+ $(c1).add-pair l2 l3 ;
+ assert.result l1 l2 : $(c1).order l2 l1 ;
+ $(c1).add-pair x l2 ;
+ assert.result l1 l2 : $(c1).order l2 l1 ;
+ assert.result l1 l2 l3 : $(c1).order l2 l3 l1 ;
+
+ # The output should be stable for unconstrained
+ # elements.
+ assert.result l4 l5 : $(c1).order l4 l5 ;
+}
diff --git a/src/boost/tools/build/src/util/order.py b/src/boost/tools/build/src/util/order.py
new file mode 100644
index 000000000..1cd57dad2
--- /dev/null
+++ b/src/boost/tools/build/src/util/order.py
@@ -0,0 +1,121 @@
+# Copyright (C) 2003 Vladimir Prus
+# 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)
+
+class Order:
+ """Allows ordering arbitrary objects with regard to arbitrary binary relation.
+
+ The primary use case is the gcc toolset, which is sensitive to
+ library order: if library 'a' uses symbols from library 'b',
+ then 'a' must be present before 'b' on the linker's command line.
+
+ This requirement can be lifted for gcc with GNU ld, but for gcc with
+ Solaris LD (and for Solaris toolset as well), the order always matters.
+
+ So, we need to store order requirements and then order libraries
+ according to them. It it not possible to use dependency graph as
+ order requirements. What we need is "use symbols" relationship
+ while dependency graph provides "needs to be updated" relationship.
+
+ For example::
+ lib a : a.cpp b;
+ lib b ;
+
+ For static linking, the 'a' library need not depend on 'b'. However, it
+ still should come before 'b' on the command line.
+ """
+
+ def __init__ (self):
+ self.constraints_ = []
+
+ def add_pair (self, first, second):
+ """ Adds the constraint that 'first' should precede 'second'.
+ """
+ self.constraints_.append ((first, second))
+
+ def order (self, objects):
+ """ Given a list of objects, reorder them so that the constains specified
+ by 'add_pair' are satisfied.
+
+ The algorithm was adopted from an awk script by Nikita Youshchenko
+ (yoush at cs dot msu dot su)
+ """
+ # The algorithm used is the same is standard transitive closure,
+ # except that we're not keeping in-degree for all vertices, but
+ # rather removing edges.
+ result = []
+
+ if not objects:
+ return result
+
+ constraints = self.__eliminate_unused_constraits (objects)
+
+ # Find some library that nobody depends upon and add it to
+ # the 'result' array.
+ obj = None
+ while objects:
+ new_objects = []
+ while objects:
+ obj = objects [0]
+
+ if self.__has_no_dependents (obj, constraints):
+ # Emulate break ;
+ new_objects.extend (objects [1:])
+ objects = []
+
+ else:
+ new_objects.append (obj)
+ obj = None
+ objects = objects [1:]
+
+ if not obj:
+ raise BaseException ("Circular order dependencies")
+
+ # No problem with placing first.
+ result.append (obj)
+
+ # Remove all contains where 'obj' comes first,
+ # since they are already satisfied.
+ constraints = self.__remove_satisfied (constraints, obj)
+
+ # Add the remaining objects for further processing
+ # on the next iteration
+ objects = new_objects
+
+ return result
+
+ def __eliminate_unused_constraits (self, objects):
+ """ Eliminate constraints which mention objects not in 'objects'.
+ In graph-theory terms, this is finding subgraph induced by
+ ordered vertices.
+ """
+ result = []
+ for c in self.constraints_:
+ if c [0] in objects and c [1] in objects:
+ result.append (c)
+
+ return result
+
+ def __has_no_dependents (self, obj, constraints):
+ """ Returns true if there's no constraint in 'constraints' where
+ 'obj' comes second.
+ """
+ failed = False
+ while constraints and not failed:
+ c = constraints [0]
+
+ if c [1] == obj:
+ failed = True
+
+ constraints = constraints [1:]
+
+ return not failed
+
+ def __remove_satisfied (self, constraints, obj):
+ result = []
+ for c in constraints:
+ if c [0] != obj:
+ result.append (c)
+
+ return result
diff --git a/src/boost/tools/build/src/util/os.jam b/src/boost/tools/build/src/util/os.jam
new file mode 100644
index 000000000..21dd28f03
--- /dev/null
+++ b/src/boost/tools/build/src/util/os.jam
@@ -0,0 +1,208 @@
+# Copyright 2001, 2002, 2003, 2005 Dave Abrahams
+# Copyright 2006 Rene Rivera
+# Copyright 2003, 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)
+
+import modules ;
+import string ;
+
+
+# Return the value(s) of the given environment variable(s) at the time bjam was
+# invoked.
+rule environ ( variable-names + )
+{
+ local result ;
+ for local var-name in $(variable-names)
+ {
+ # We check the various cases of the var name for a value to account
+ # for programs that change the casing of env vars. One such program
+ # is Python that upper-cases env var names on import, and resports
+ # them as upper-case instead of keeping the original case.
+ local value ;
+ value ?= [ modules.peek .ENVIRON : $(var-name) ] ;
+ value ?= [ modules.peek .ENVIRON : $(var-name:U) ] ;
+ value ?= [ modules.peek .ENVIRON : $(var-name:L) ] ;
+ result += $(value) ;
+ }
+ return $(result) ;
+}
+
+.name = [ modules.peek : OS ] ;
+.platform = [ modules.peek : OSPLAT ] ;
+.version = [ modules.peek : OSVER ] ;
+
+
+local rule constant ( c : os ? )
+{
+ os ?= $(.name) ;
+ # First look for a platform-specific name, then the general value.
+ local variables = .$(c)-$(os) .$(c) ;
+ local result = $($(variables)) ;
+ return $(result[1]) ;
+}
+
+rule get-constant ( os ? )
+{
+ # Find the name of the constant being accessed, which is equal to the name
+ # used to invoke us.
+ local bt = [ BACKTRACE 1 ] ;
+ local rulename = [ MATCH "([^.]*)$" : $(bt[4]) ] ;
+ return [ constant $(rulename) : $(os) ] ;
+}
+
+
+# export all the common constants
+.constants = name platform version shared-library-path-variable path-separator executable-path-variable executable-suffix ;
+for local constant in $(.constants)
+{
+ IMPORT $(__name__) : get-constant : $(__name__) : $(constant) ;
+}
+EXPORT $(__name__) : $(.constants) ;
+
+.executable-path-variable-NT = PATH ;
+# On Windows the case and capitalization of PATH is not always predictable, so
+# let's find out what variable name was really set.
+if $(.name) = NT
+{
+ for local n in [ VARNAMES .ENVIRON ]
+ {
+ if $(n:L) = path
+ {
+ .executable-path-variable-NT = $(n) ;
+ }
+ }
+}
+
+# Specific constants for various platforms. There's no need to define any
+# constant whose value would be the same as the default, below.
+.shared-library-path-variable-NT = $(.executable-path-variable-NT) ;
+.path-separator-NT = ";" ;
+.path-separator-VXWORKS = ";" ;
+.expand-variable-prefix-NT = % ;
+.expand-variable-suffix-NT = % ;
+.executable-suffix-NT = .exe ;
+
+.shared-library-path-variable-CYGWIN = PATH ;
+
+.shared-library-path-variable-MACOSX = DYLD_LIBRARY_PATH ;
+
+.shared-library-path-variable-AIX = LIBPATH ;
+
+.shared-library-path-variable-HAIKU = LIBRARY_PATH ;
+
+.shared-library-path-variable-VMS = PATH ;
+.path-separator-VMS = "," ;
+.expand-variable-prefix-VMS = '' ;
+.expand-variable-suffix-VMS = ' ;
+.executable-suffix-VMS = .exe ;
+
+# VxWorks uses the default LD_LIBRARY_PATH, but we need an alternate
+# name on the cross build host to propagate to the target system
+.shared-library-path-variable-VXWORKS = VSB_LD_LIBRARY_PATH ;
+
+# Default constants
+.shared-library-path-variable = LD_LIBRARY_PATH ;
+.path-separator = ":" ;
+.expand-variable-prefix = $ ;
+.expand-variable-suffix = "" ;
+.executable-path-variable = PATH ;
+.executable-suffix = "" ;
+
+
+# Return a list of the directories in the PATH. Yes, that information is (sort
+# of) available in the global module, but jam code can change those values, and
+# it isn't always clear what case/capitalization to use when looking. This rule
+# is a more reliable way to get there.
+rule executable-path ( )
+{
+ return [ string.words [ environ [ constant executable-path-variable ] ]
+ : [ constant path-separator ] ] ;
+}
+
+
+# Initialize the list of home directories for the current user depending on the
+# OS.
+if $(.name) = NT
+{
+ local home = [ environ HOMEDRIVE HOMEPATH ] ;
+ .home-directories = $(home[1])$(home[2]) [ environ HOME ] [ environ USERPROFILE ] ;
+}
+else
+{
+ .home-directories = [ environ HOME ] ;
+}
+
+
+# Can't use 'constant' mechanism because it only returns 1-element values.
+rule home-directories ( )
+{
+ return $(.home-directories) ;
+}
+
+
+# Return the string needed to represent the expansion of the named shell
+# variable.
+rule expand-variable ( variable )
+{
+ local prefix = [ constant expand-variable-prefix ] ;
+ local suffix = [ constant expand-variable-suffix ] ;
+ return $(prefix)$(variable)$(suffix) ;
+}
+
+
+# Returns true if running on windows, whether in cygwin or not.
+rule on-windows ( )
+{
+ local result ;
+ if [ modules.peek : NT ]
+ {
+ result = true ;
+ }
+ else if [ modules.peek : UNIX ]
+ {
+ switch [ modules.peek : JAMUNAME ]
+ {
+ case CYGWIN* :
+ {
+ result = true ;
+ }
+ }
+ }
+ return $(result) ;
+}
+
+
+rule on-vms ( )
+{
+ local result ;
+ if [ modules.peek : VMS ]
+ {
+ result = true ;
+ }
+ return $(result) ;
+}
+
+
+if ! [ on-windows ] && ! [ on-vms ]
+{
+ .on-unix = 1 ;
+}
+
+
+rule on-unix
+{
+ return $(.on-unix) ;
+}
+
+
+rule __test__
+{
+ import assert ;
+ if ! ( --quiet in [ modules.peek : ARGV ] )
+ {
+ ECHO "os:" name= [ name ] ;
+ ECHO "os:" version= [ version ] ;
+ }
+ assert.true name ;
+}
diff --git a/src/boost/tools/build/src/util/os_j.py b/src/boost/tools/build/src/util/os_j.py
new file mode 100644
index 000000000..f5dff1f90
--- /dev/null
+++ b/src/boost/tools/build/src/util/os_j.py
@@ -0,0 +1,24 @@
+# Status: stub, just enough to make tests work.
+#
+# Named os_j to avoid conflicts with standard 'os'. See
+# project.py:import for special-casing.
+#
+# Copyright 2001, 2002, 2003, 2005 Dave Abrahams
+# Copyright 2006 Rene Rivera
+# Copyright 2003, 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)
+import os
+
+import bjam
+
+__OS = bjam.call("peek", [], "OS")[0]
+
+# Return Jam's name of OS to prevent existing code from burning
+# when faced with Python naming
+def name():
+ return __OS
+
+
+def environ(keys):
+ return [os.environ[key] for key in keys if key in os.environ]
diff --git a/src/boost/tools/build/src/util/param.jam b/src/boost/tools/build/src/util/param.jam
new file mode 100644
index 000000000..9db2e5855
--- /dev/null
+++ b/src/boost/tools/build/src/util/param.jam
@@ -0,0 +1,54 @@
+# Copyright 2018 Steven Watanabe
+# 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)
+
+# Named parameters are represented as a list which has the
+# argument name as the first element and the value as the
+# remaining elements. This function sorts the parameters
+# into the correct variables and removes the parameter names.
+#
+# Example::
+#
+# rule exe ( name : sources * : requirements * )
+# {
+# param.handle-named-params sources requirements ;
+# # At this point $(sources) is test.cpp
+# }
+# exe test : requirements <link>shared : sources test.cpp ;
+#
+rule handle-named-params ( parameter-names * )
+{
+ module [ CALLER_MODULE ]
+ {
+ # Uglify the variable names, because we're executing in an unknown module.
+ local found-8bef5c096d06a1b0 ;
+ local tmp-8bef5c096d06a1b0.$(1) ;
+ for local v-8bef5c096d06a1b0 in $(1)
+ {
+ if $($(v-8bef5c096d06a1b0)[1]) && $($(v-8bef5c096d06a1b0)[1]) in $(1)
+ {
+ if $(tmp-8bef5c096d06a1b0.$($(v-8bef5c096d06a1b0)[1]))
+ {
+ import errors ;
+ errors.error Parameter '$($(v-8bef5c096d06a1b0)[1])' passed more than once. ;
+ }
+ found-8bef5c096d06a1b0 = true ;
+ tmp-8bef5c096d06a1b0.$($(v-8bef5c096d06a1b0)[1]) = $($(v-8bef5c096d06a1b0)[2-]) ;
+ }
+ else if $($(v-8bef5c096d06a1b0))-is-defined
+ {
+ if $(found-8bef5c096d06a1b0)
+ {
+ import errors ;
+ errors.error "Positional arguments must appear first." ;
+ }
+ tmp-8bef5c096d06a1b0.$(v-8bef5c096d06a1b0) = $($(v-8bef5c096d06a1b0)) ;
+ }
+ }
+ for local v-8bef5c096d06a1b0 in $(1)
+ {
+ $(v-8bef5c096d06a1b0) = $(tmp-8bef5c096d06a1b0.$(v-8bef5c096d06a1b0)) ;
+ }
+ }
+}
diff --git a/src/boost/tools/build/src/util/path.jam b/src/boost/tools/build/src/util/path.jam
new file mode 100644
index 000000000..02abd0706
--- /dev/null
+++ b/src/boost/tools/build/src/util/path.jam
@@ -0,0 +1,1015 @@
+# Copyright 2002-2006. Vladimir Prus
+# Copyright 2003-2004. Dave Abrahams
+# Copyright 2003-2006. 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)
+
+# Performs various path manipulations. Paths are always in a 'normalized'
+# representation. In it, a path may be either:
+#
+# - '.', or
+#
+# - ['/'] [ ( '..' '/' )* (token '/')* token ]
+#
+# In plain english, path can be rooted, '..' elements are allowed only at the
+# beginning, and it never ends in slash, except for path consisting of slash
+# only.
+
+import modules ;
+import regex ;
+import sequence ;
+import set ;
+
+
+os = [ modules.peek : OS ] ;
+if [ modules.peek : UNIX ]
+{
+ local uname = [ modules.peek : JAMUNAME ] ;
+ switch $(uname)
+ {
+ case CYGWIN* : os = CYGWIN ;
+ case * : os = UNIX ;
+ }
+}
+
+
+# Converts the native path into normalized form.
+#
+rule make ( native )
+{
+ return [ make-$(os) $(native) ] ;
+}
+
+
+# Builds native representation of the path.
+#
+rule native ( path )
+{
+ return [ native-$(os) $(path) ] ;
+}
+
+
+# Tests if a path is rooted.
+#
+rule is-rooted ( path )
+{
+ return [ MATCH "^(/)" : $(path) ] ;
+}
+
+
+# Tests if a path has a parent.
+#
+rule has-parent ( path )
+{
+ if $(path) != /
+ {
+ return 1 ;
+ }
+ else
+ {
+ return ;
+ }
+}
+
+
+# Returns the path without any directory components.
+#
+rule basename ( path )
+{
+ return [ MATCH "([^/]+)$" : $(path) ] ;
+}
+
+
+# Returns parent directory of the path. If no parent exists, error is issued.
+#
+rule parent ( path )
+{
+ if [ has-parent $(path) ]
+ {
+ if $(path) = .
+ {
+ return .. ;
+ }
+ else
+ {
+ # Strip everything at the end of path up to and including the last
+ # slash.
+ local result = [ regex.match "((.*)/)?([^/]+)" : $(path) : 2 3 ] ;
+
+ # Did we strip what we shouldn't?
+ if $(result[2]) = ".."
+ {
+ return $(path)/.. ;
+ }
+ else
+ {
+ if ! $(result[1])
+ {
+ if [ is-rooted $(path) ]
+ {
+ result = / ;
+ }
+ else
+ {
+ result = . ;
+ }
+ }
+ return $(result[1]) ;
+ }
+ }
+ }
+ else
+ {
+ import errors ;
+ errors.error "Path '$(path)' has no parent" ;
+ }
+}
+
+
+# Returns path2 such that "[ join path path2 ] = .". The path may not contain
+# ".." element or be rooted.
+#
+rule reverse ( path )
+{
+ if $(path) = .
+ {
+ return $(path) ;
+ }
+ else
+ {
+ local tokens = [ regex.split $(path) / ] ;
+ local tokens2 ;
+ for local i in $(tokens)
+ {
+ tokens2 += .. ;
+ }
+ return [ sequence.join $(tokens2) : / ] ;
+ }
+}
+
+
+# Concatenates the passed path elements. Generates an error if any element other
+# than the first one is rooted. Skips any empty or undefined path elements.
+#
+rule join ( elements + )
+{
+ if ! $(elements[2-])
+ {
+ return $(elements[1]) ;
+ }
+ else
+ {
+ for local e in $(elements[2-])
+ {
+ if [ is-rooted $(e) ]
+ {
+ import errors ;
+ errors.error only the first element may be rooted ;
+ }
+ }
+ return [ NORMALIZE_PATH "$(elements)" ] ;
+ }
+}
+
+
+# If 'path' is relative, it is rooted at 'root'. Otherwise, it is unchanged.
+#
+rule root ( path root )
+{
+ if [ is-rooted $(path) ]
+ {
+ return $(path) ;
+ }
+ else
+ {
+ return [ join $(root) $(path) ] ;
+ }
+}
+
+
+# Returns the current working directory.
+#
+rule pwd ( )
+{
+ if ! $(.pwd)
+ {
+ .pwd = [ make [ PWD ] ] ;
+ }
+ return $(.pwd) ;
+}
+
+
+# Returns the list of files matching the given pattern in the specified
+# directory. Both directories and patterns are supplied as portable paths. Each
+# pattern should be non-absolute path, and can't contain "." or ".." elements.
+# Each slash separated element of pattern can contain the following special
+# characters:
+# - '?', which match any character
+# - '*', which matches arbitrary number of characters.
+# A file $(d)/e1/e2/e3 (where 'd' is in $(dirs)) matches pattern p1/p2/p3 if and
+# only if e1 matches p1, e2 matches p2 and so on.
+#
+# For example:
+# [ glob . : *.cpp ]
+# [ glob . : */build/Jamfile ]
+#
+rule glob ( dirs * : patterns + : exclude-patterns * )
+{
+ local result ;
+ local real-patterns ;
+ local real-exclude-patterns ;
+ for local d in $(dirs)
+ {
+ for local p in $(patterns)
+ {
+ local pattern = [ path.root $(p) $(d) ] ;
+ real-patterns += [ path.native $(pattern) ] ;
+ }
+
+ for local p in $(exclude-patterns)
+ {
+ local pattern = [ path.root $(p) $(d) ] ;
+ real-exclude-patterns += [ path.native $(pattern) ] ;
+ }
+ }
+
+ local inc = [ GLOB-RECURSIVELY $(real-patterns) ] ;
+ inc = [ sequence.transform NORMALIZE_PATH : $(inc) ] ;
+ local exc = [ GLOB-RECURSIVELY $(real-exclude-patterns) ] ;
+ exc = [ sequence.transform NORMALIZE_PATH : $(exc) ] ;
+
+ return [ sequence.transform path.make : [ set.difference $(inc) : $(exc) ] ]
+ ;
+}
+
+
+# Recursive version of GLOB. Builds the glob of files while also searching in
+# the subdirectories of the given roots. An optional set of exclusion patterns
+# will filter out the matching entries from the result. The exclusions also
+# apply to the subdirectory scanning, such that directories that match the
+# exclusion patterns will not be searched.
+#
+rule glob-tree ( roots * : patterns + : exclude-patterns * )
+{
+ return [ sequence.transform path.make : [ .glob-tree [ sequence.transform
+ path.native : $(roots) ] : $(patterns) : $(exclude-patterns) ] ] ;
+}
+
+
+local rule .glob-tree ( roots * : patterns * : exclude-patterns * )
+{
+ local excluded ;
+ if $(exclude-patterns)
+ {
+ excluded = [ GLOB $(roots) : $(exclude-patterns) ] ;
+ }
+ local result = [ set.difference [ GLOB $(roots) : $(patterns) ] :
+ $(excluded) ] ;
+ local subdirs ;
+ for local d in [ set.difference [ GLOB $(roots) : * ] : $(excluded) ]
+ {
+ if ! ( $(d:D=) in . .. ) && ! [ CHECK_IF_FILE $(d) ]
+ {
+ subdirs += $(d) ;
+ }
+ }
+ if $(subdirs)
+ {
+ result += [ .glob-tree $(subdirs) : $(patterns) : $(exclude-patterns) ]
+ ;
+ }
+ return $(result) ;
+}
+
+
+# Returns true is the specified file exists.
+#
+rule exists ( file )
+{
+ return [ path.glob $(file:D) : $(file:D=) ] ;
+}
+NATIVE_RULE path : exists ;
+
+
+# Find out the absolute name of path and returns the list of all the parents,
+# starting with the immediate one. Parents are returned as relative names. If
+# 'upper_limit' is specified, directories above it will be pruned.
+#
+rule all-parents ( path : upper_limit ? : cwd ? )
+{
+ cwd ?= [ pwd ] ;
+ local path_ele = [ regex.split [ root $(path) $(cwd) ] / ] ;
+
+ if ! $(upper_limit)
+ {
+ upper_limit = / ;
+ }
+ local upper_ele = [ regex.split [ root $(upper_limit) $(cwd) ] / ] ;
+
+ # Leave only elements in 'path_ele' below 'upper_ele'.
+ while $(path_ele) && ( $(upper_ele[1]) = $(path_ele[1]) )
+ {
+ upper_ele = $(upper_ele[2-]) ;
+ path_ele = $(path_ele[2-]) ;
+ }
+
+ # Have all upper elements been removed ?
+ if $(upper_ele)
+ {
+ import errors ;
+ errors.error "$(upper_limit) is not prefix of $(path)" ;
+ }
+
+ # Create the relative paths to parents, number of elements in 'path_ele'.
+ local result ;
+ for local i in $(path_ele)
+ {
+ path = [ parent $(path) ] ;
+ result += $(path) ;
+ }
+ return $(result) ;
+}
+
+
+# Search for 'pattern' in parent directories of 'dir', up to and including
+# 'upper_limit', if it is specified, or up to the filesystem root otherwise.
+#
+rule glob-in-parents ( dir : patterns + : upper-limit ? )
+{
+ local result ;
+ local parent-dirs = [ all-parents $(dir) : $(upper-limit) ] ;
+
+ while $(parent-dirs) && ! $(result)
+ {
+ result = [ glob $(parent-dirs[1]) : $(patterns) ] ;
+ parent-dirs = $(parent-dirs[2-]) ;
+ }
+ return $(result) ;
+}
+
+
+# Assuming 'child' is a subdirectory of 'parent', return the relative path from
+# 'parent' to 'child'.
+#
+rule relative ( child parent : no-error ? )
+{
+ local not-a-child ;
+ if $(parent) = "."
+ {
+ return $(child) ;
+ }
+ else
+ {
+ local split1 = [ regex.split $(parent) / ] ;
+ local split2 = [ regex.split $(child) / ] ;
+
+ while $(split1)
+ {
+ if $(split1[1]) = $(split2[1])
+ {
+ split1 = $(split1[2-]) ;
+ split2 = $(split2[2-]) ;
+ }
+ else
+ {
+ not-a-child = true ;
+ split1 = ;
+ }
+ }
+ if $(split2)
+ {
+ if $(not-a-child)
+ {
+ if $(no-error)
+ {
+ return not-a-child ;
+ }
+ else
+ {
+ import errors ;
+ errors.error $(child) is not a subdir of $(parent) ;
+ }
+ }
+ else
+ {
+ return [ join $(split2) ] ;
+ }
+ }
+ else
+ {
+ return "." ;
+ }
+ }
+}
+
+
+# Returns the minimal path to path2 that is relative to path1.
+# If no such path exists and path2 is rooted, return it unchanged.
+#
+rule relative-to ( path1 path2 )
+{
+ local root_1 = [ regex.split [ reverse $(path1) ] / ] ;
+ local split1 = [ regex.split $(path1) / ] ;
+ local split2 = [ regex.split $(path2) / ] ;
+ local is-rooted ;
+
+ if $(split1[1]) = "" && $(split2[1]) = ""
+ {
+ is-rooted = true ;
+ }
+ else if $(split1[1]) != "" && $(split2[1]) = ""
+ {
+ # Second path is rooted
+ return $(path2) ;
+ }
+ else if $(split1[1]) = "" && $(split2[1]) != ""
+ {
+ import errors ;
+ errors.error Cannot find relative path from $(path1) to $(path2) ;
+ }
+
+ # For windows paths on different drives, return an
+ # absolute path
+ if $(os) = NT && $(split1[1]) = "" &&
+ [ MATCH "^(.:)$" : $(split1[2]) ] &&
+ $(split1[2]) != $(split2[2])
+ {
+ return $(path2) ;
+ }
+
+ while $(split1) && $(root_1)
+ {
+ if $(split1[1]) = $(split2[1])
+ {
+ root_1 = $(root_1[2-]) ;
+ split1 = $(split1[2-]) ;
+ split2 = $(split2[2-]) ;
+ }
+ else if $(split1[1]) = ..
+ {
+ if $(is-rooted)
+ {
+ return $(path2) ;
+ }
+ else
+ {
+ import errors ;
+ errors.error Cannot find relative path from $(path1) to $(path2) ;
+ return ;
+ }
+ }
+ else
+ {
+ split1 = ;
+ }
+ }
+ return [ join . $(root_1) $(split2) ] ;
+}
+
+
+# Returns the list of paths used by the operating system for looking up
+# programs.
+#
+rule programs-path ( )
+{
+ local result ;
+ local raw = [ modules.peek : PATH Path path ] ;
+ for local p in $(raw)
+ {
+ if $(p)
+ {
+ result += [ path.make $(p) ] ;
+ }
+ }
+ return $(result) ;
+}
+
+
+rule makedirs ( path )
+{
+ local result = true ;
+ local native = [ native $(path) ] ;
+ if ! [ exists $(native) ]
+ {
+ if [ makedirs [ parent $(path) ] ]
+ {
+ if ! [ MAKEDIR $(native) ]
+ {
+ import errors ;
+ errors.error "Could not create directory '$(path)'" ;
+ result = ;
+ }
+ }
+ }
+ return $(result) ;
+}
+
+
+# Converts native Windows paths into our internal canonic path representation.
+# Supports 'invalid' paths containing multiple successive path separator
+# characters.
+#
+# TODO: Check and if needed add support for Windows 'X:file' path format where
+# the file is located in the current folder on drive X.
+#
+rule make-NT ( native )
+{
+ local result = [ NORMALIZE_PATH $(native) ] ;
+
+ # We need to add an extra '/' in front in case this is a rooted Windows path
+ # starting with a drive letter and not a path separator character since the
+ # builtin NORMALIZE_PATH rule has no knowledge of this leading drive letter
+ # and treats it as a regular folder name.
+ if [ regex.match "(^.:)" : $(native) ]
+ {
+ result = /$(result) ;
+ }
+
+ return $(result) ;
+}
+
+
+rule native-NT ( path )
+{
+ local remove-slash = [ MATCH "^/(.:.*)" : $(path) ] ;
+ if $(remove-slash)
+ {
+ path = $(remove-slash) ;
+ }
+ return [ regex.replace $(path) / \\ ] ;
+}
+
+
+rule make-UNIX ( native )
+{
+ # VP: I have no idea now 'native' can be empty here! But it can!
+ if ! $(native)
+ {
+ import errors ;
+ errors.error "Empty path passed to 'make-UNIX'" ;
+ }
+ else
+ {
+ return [ NORMALIZE_PATH $(native:T) ] ;
+ }
+}
+
+
+rule native-UNIX ( path )
+{
+ return $(path) ;
+}
+
+
+rule make-CYGWIN ( path )
+{
+ return [ make-NT $(path) ] ;
+}
+
+
+rule native-CYGWIN ( path )
+{
+ local result = $(path) ;
+ if [ regex.match "(^/.:)" : $(path) ] # Windows absolute path.
+ {
+ result = [ MATCH "^/?(.*)" : $(path) ] ; # Remove leading '/'.
+ }
+ return [ native-UNIX $(result) ] ;
+}
+
+
+# split-path-VMS: splits input native path into device dir file (each part is
+# optional).
+#
+# example:
+#
+# dev:[dir]file.c => dev: [dir] file.c
+#
+rule split-path-VMS ( native )
+{
+ local matches = [ MATCH "([a-zA-Z0-9_-]+:)?(\\[[^\]]*\\])?(.*)?$" : $(native)
+ ] ;
+ local device = $(matches[1]) ;
+ local dir = $(matches[2]) ;
+ local file = $(matches[3]) ;
+
+ return $(device) $(dir) $(file) ;
+}
+
+
+# Converts a native VMS path into a portable path spec.
+#
+# Does not handle current-device absolute paths such as "[dir]File.c" as it is
+# not clear how to represent them in the portable path notation.
+#
+# Adds a trailing dot (".") to the file part if no extension is present (helps
+# when converting it back into native path).
+#
+rule make-VMS ( native )
+{
+ ## Use POSIX-style path (keep previous code commented out - real magic!).
+ ## VMS CRTL supports POSIX path, JAM is retrofitted to pass it to VMS CRTL.
+
+ local portable = [ make-UNIX $(native) ] ;
+
+ #if [ MATCH ^(\\[[a-zA-Z0-9]) : $(native) ]
+ #{
+ # import errors ;
+ # errors.error "Can't handle default-device absolute paths: " $(native) ;
+ #}
+ #
+ #local parts = [ split-path-VMS $(native) ] ;
+ #local device = $(parts[1]) ;
+ #local dir = $(parts[2]) ;
+ #local file = $(parts[3]) ;
+ #local elems ;
+ #
+ #if $(device)
+ #{
+ # #
+ # # rooted
+ # #
+ # elems = /$(device) ;
+ #}
+ #
+ #if $(dir) = "[]"
+ #{
+ # #
+ # # Special case: current directory
+ # #
+ # elems = $(elems) "." ;
+ #}
+ #else if $(dir)
+ #{
+ # dir = [ regex.replace $(dir) "\\[|\\]" "" ] ;
+ # local dir_parts = [ regex.split $(dir) \\. ] ;
+ #
+ # if $(dir_parts[1]) = ""
+ # {
+ # #
+ # # Relative path
+ # #
+ # dir_parts = $(dir_parts[2--1]) ;
+ # }
+ #
+ # #
+ # # replace "parent-directory" parts (- => ..)
+ # #
+ # dir_parts = [ regex.replace-list $(dir_parts) : - : .. ] ;
+ #
+ # elems = $(elems) $(dir_parts) ;
+ #}
+ #
+ #if $(file)
+ #{
+ # if ! [ MATCH (\\.) : $(file) ]
+ # {
+ # #
+ # # Always add "." to end of non-extension file.
+ # #
+ # file = $(file). ;
+ # }
+ # elems = $(elems) $(file) ;
+ #}
+ #
+ #portable = [ path.join $(elems) ] ;
+
+ return $(portable) ;
+}
+
+
+# Converts a portable path spec into a native VMS path.
+#
+# Relies on having at least one dot (".") included in the file name to be able
+# to differentiate it from the directory part.
+#
+rule native-VMS ( path )
+{
+ ## Use POSIX-style path (keep previous code commented out - real magic!).
+ ## VMS CRTL supports POSIX path, JAM is retrofitted to pass it to VMS CRTL.
+ ## NOTE: While translation to VMS-style is implemented with $(:W) modifier,
+ ## Here we retain POSIX-style path, so it can be portably manipulated
+ ## in B2 rules, and only in actions it's translated with $(:W).
+
+ local native = [ native-UNIX $(path) ] ;
+
+ #local device = "" ;
+ #local dir = $(path) ;
+ #local file = "" ;
+ #local split ;
+ #
+ ##
+ ## Has device ?
+ ##
+ #if [ is-rooted $(dir) ]
+ #{
+ # split = [ MATCH ^/([^:]+:)/?(.*) : $(dir) ] ;
+ # device = $(split[1]) ;
+ # dir = $(split[2]) ;
+ #}
+ #
+ ##
+ ## Has file ?
+ ##
+ ## This is no exact science, just guess work:
+ ##
+ ## If the last part of the current path spec includes some chars, followed by
+ ## a dot, optionally followed by more chars - then it is a file (keep your
+ ## fingers crossed).
+ ##
+ #split = [ regex.split $(dir) / ] ;
+ #local maybe_file = $(split[-1]) ;
+ #
+ #if [ MATCH ^([^.]+\\..*) : $(maybe_file) ]
+ #{
+ # file = $(maybe_file) ;
+ # dir = [ sequence.join $(split[1--2]) : / ] ;
+ #}
+ #
+ ##
+ ## Has dir spec ?
+ ##
+ #if $(dir) = "."
+ #{
+ # dir = "[]" ;
+ #}
+ #else if $(dir)
+ #{
+ # dir = [ regex.replace $(dir) \\.\\. - ] ;
+ # dir = [ regex.replace $(dir) / . ] ;
+ #
+ # if $(device) = ""
+ # {
+ # #
+ # # Relative directory
+ # #
+ # dir = "."$(dir) ;
+ # }
+ # dir = "["$(dir)"]" ;
+ #}
+ #
+ #native = [ sequence.join $(device) $(dir) $(file) ] ;
+
+ return $(native) ;
+}
+
+
+if $(os) = VMS
+{
+ # Translates POSIX-style path to VMS-style path
+ #
+ # This results in actual VMS path, unlike 'native-VMS' rule which is meant
+ # to return POSIX-style in order to mask VMS specificity and help portability.
+
+ rule to-VMS ( path )
+ {
+ return $(path:W) ;
+ }
+
+ EXPORT $(__name__) : to-$(os) ;
+}
+
+# Remove one level of indirection
+IMPORT $(__name__) : make-$(os) native-$(os) : $(__name__) : make native ;
+EXPORT $(__name__) : make native ;
+
+rule __test__ ( )
+{
+ import assert ;
+ import errors : try catch ;
+
+ assert.true is-rooted "/" ;
+ assert.true is-rooted "/foo" ;
+ assert.true is-rooted "/foo/bar" ;
+ assert.result : is-rooted "." ;
+ assert.result : is-rooted "foo" ;
+ assert.result : is-rooted "foo/bar" ;
+
+ assert.true has-parent "foo" ;
+ assert.true has-parent "foo/bar" ;
+ assert.true has-parent "." ;
+ assert.result : has-parent "/" ;
+
+ assert.result "." : basename "." ;
+ assert.result ".." : basename ".." ;
+ assert.result "foo" : basename "foo" ;
+ assert.result "foo" : basename "bar/foo" ;
+ assert.result "foo" : basename "gaz/bar/foo" ;
+ assert.result "foo" : basename "/gaz/bar/foo" ;
+
+ assert.result "." : parent "foo" ;
+ assert.result "/" : parent "/foo" ;
+ assert.result "foo/bar" : parent "foo/bar/giz" ;
+ assert.result ".." : parent "." ;
+ assert.result ".." : parent "../foo" ;
+ assert.result "../../foo" : parent "../../foo/bar" ;
+
+ assert.result "." : reverse "." ;
+ assert.result ".." : reverse "foo" ;
+ assert.result "../../.." : reverse "foo/bar/giz" ;
+
+ assert.result "foo" : join "foo" ;
+ assert.result "/foo" : join "/" "foo" ;
+ assert.result "foo/bar" : join "foo" "bar" ;
+ assert.result "foo/bar" : join "foo/giz" "../bar" ;
+ assert.result "foo/giz" : join "foo/bar/baz" "../../giz" ;
+ assert.result ".." : join "." ".." ;
+ assert.result ".." : join "foo" "../.." ;
+ assert.result "../.." : join "../foo" "../.." ;
+ assert.result "/foo" : join "/bar" "../foo" ;
+ assert.result "foo/giz" : join "foo/giz" "." ;
+ assert.result "." : join lib2 ".." ;
+ assert.result "/" : join "/a" ".." ;
+
+ assert.result /a/b : join /a/b/c .. ;
+
+ assert.result "foo/bar/giz" : join "foo" "bar" "giz" ;
+ assert.result "giz" : join "foo" ".." "giz" ;
+ assert.result "foo/giz" : join "foo" "." "giz" ;
+
+ try ;
+ {
+ join "a" "/b" ;
+ }
+ catch only first element may be rooted ;
+
+ local CWD = "/home/ghost/build" ;
+ assert.result : all-parents . : . : $(CWD) ;
+ assert.result . .. ../.. ../../.. : all-parents "Jamfile" : "" : $(CWD) ;
+ assert.result foo . .. ../.. ../../.. : all-parents "foo/Jamfile" : "" :
+ $(CWD) ;
+ assert.result ../Work .. ../.. ../../.. : all-parents "../Work/Jamfile" : ""
+ : $(CWD) ;
+
+ local CWD = "/home/ghost" ;
+ assert.result . .. : all-parents "Jamfile" : "/home" : $(CWD) ;
+ assert.result . : all-parents "Jamfile" : "/home/ghost" : $(CWD) ;
+
+ assert.result "c/d" : relative "a/b/c/d" "a/b" ;
+ assert.result "foo" : relative "foo" "." ;
+
+ assert.result "c/d" : relative-to "a/b" "a/b/c/d" ;
+ assert.result "foo" : relative-to "." "foo" ;
+ assert.result "../d" : relative-to "/a/b" "/a/d" ;
+ assert.result "x" : relative-to .. ../x ;
+ assert.result "/x" : relative-to x /x ;
+ try ;
+ {
+ relative-to "../x" "a" ;
+ }
+ catch Cannot find relative path from ../x to a ;
+ try ;
+ {
+ relative-to "../../x" "../a" ;
+ }
+ catch Cannot find relative path from ../../x to ../a ;
+ try ;
+ {
+ relative-to "/x/y" "a/b" ;
+ }
+ catch Cannot find relative path from /x/y to a/b ;
+
+ local save-os = [ modules.peek path : os ] ;
+ modules.poke path : os : NT ;
+
+ assert.result "foo/bar/giz" : make-NT "foo/bar/giz" ;
+ assert.result "foo/bar/giz" : make-NT "foo\\bar\\giz" ;
+ assert.result "foo" : make-NT "foo/" ;
+ assert.result "foo" : make-NT "foo\\" ;
+ assert.result "foo" : make-NT "foo/." ;
+ assert.result "foo" : make-NT "foo/bar/.." ;
+ assert.result "foo" : make-NT "foo/bar/../" ;
+ assert.result "foo" : make-NT "foo/bar/..\\" ;
+ assert.result "foo/bar" : make-NT "foo/././././bar" ;
+ assert.result "/foo" : make-NT "\\foo" ;
+ assert.result "/D:/My Documents" : make-NT "D:\\My Documents" ;
+ assert.result "/c:/boost/tools/build/new/project.jam" : make-NT
+ "c:\\boost\\tools\\build\\test\\..\\new\\project.jam" ;
+
+ # Test processing 'invalid' paths containing multiple successive path
+ # separators.
+ assert.result "foo" : make-NT "foo//" ;
+ assert.result "foo" : make-NT "foo///" ;
+ assert.result "foo" : make-NT "foo\\\\" ;
+ assert.result "foo" : make-NT "foo\\\\\\" ;
+ assert.result "/foo" : make-NT "//foo" ;
+ assert.result "/foo" : make-NT "///foo" ;
+ assert.result "/foo" : make-NT "\\\\foo" ;
+ assert.result "/foo" : make-NT "\\\\\\foo" ;
+ assert.result "/foo" : make-NT "\\/\\/foo" ;
+ assert.result "foo/bar" : make-NT "foo//\\//\\\\bar//\\//\\\\\\//\\//\\\\" ;
+ assert.result "foo" : make-NT "foo/bar//.." ;
+ assert.result "foo/bar" : make-NT "foo/bar/giz//.." ;
+ assert.result "foo/giz" : make-NT
+ "foo//\\//\\\\bar///\\\\//\\\\////\\/..///giz\\//\\\\\\//\\//\\\\" ;
+ assert.result "../../../foo" : make-NT "..///.//..///.//..////foo///" ;
+
+ # Test processing 'invalid' rooted paths with too many '..' path elements
+ # that would place them before the root.
+ assert.result : make-NT "/.." ;
+ assert.result : make-NT "/../" ;
+ assert.result : make-NT "/../." ;
+ assert.result : make-NT "/.././" ;
+ assert.result : make-NT "/foo/../bar/giz/.././././../../." ;
+ assert.result : make-NT "/foo/../bar/giz/.././././../.././" ;
+ assert.result : make-NT "//foo/../bar/giz/.././././../../." ;
+ assert.result : make-NT "//foo/../bar/giz/.././././../.././" ;
+ assert.result : make-NT "\\\\foo/../bar/giz/.././././../../." ;
+ assert.result : make-NT "\\\\foo/../bar/giz/.././././../.././" ;
+ assert.result : make-NT "/..///.//..///.//..////foo///" ;
+
+ assert.result "foo\\bar\\giz" : native-NT "foo/bar/giz" ;
+ assert.result "foo" : native-NT "foo" ;
+ assert.result "\\foo" : native-NT "/foo" ;
+ assert.result "D:\\My Documents\\Work" : native-NT "/D:/My Documents/Work" ;
+
+ assert.result "../y" : relative-to "/C:/x" "/C:/y" ;
+ assert.result "/D:/test" : relative-to "/C:/test" "/D:/test" ;
+ try ;
+ {
+ relative-to "/C:/y" "a/b" ;
+ }
+ catch Cannot find relative path from "/C:/y" to a/b ;
+
+ modules.poke path : os : UNIX ;
+
+ assert.result "foo/bar/giz" : make-UNIX "foo/bar/giz" ;
+ assert.result "/sub1" : make-UNIX "/sub1/." ;
+ assert.result "/sub1" : make-UNIX "/sub1/sub2/.." ;
+ assert.result "sub1" : make-UNIX "sub1/." ;
+ assert.result "sub1" : make-UNIX "sub1/sub2/.." ;
+ assert.result "/foo/bar" : native-UNIX "/foo/bar" ;
+
+ modules.poke path : os : VMS ;
+
+ ## On VMS use POSIX-style path (keep previous tests commented out).
+
+ assert.result "foo/bar/giz" : make-VMS "foo/bar/giz" ;
+ assert.result "/sub1" : make-VMS "/sub1/." ;
+ assert.result "/sub1" : make-VMS "/sub1/sub2/.." ;
+ assert.result "sub1" : make-VMS "sub1/." ;
+ assert.result "sub1" : make-VMS "sub1/sub2/.." ;
+ assert.result "/foo/bar" : native-VMS "/foo/bar" ;
+
+ ##
+ ## Do not really need to poke os before these
+ ##
+ #assert.result "disk:" "[dir]" "file" : split-path-VMS "disk:[dir]file" ;
+ #assert.result "disk:" "[dir]" "" : split-path-VMS "disk:[dir]" ;
+ #assert.result "disk:" "" "" : split-path-VMS "disk:" ;
+ #assert.result "disk:" "" "file" : split-path-VMS "disk:file" ;
+ #assert.result "" "[dir]" "file" : split-path-VMS "[dir]file" ;
+ #assert.result "" "[dir]" "" : split-path-VMS "[dir]" ;
+ #assert.result "" "" "file" : split-path-VMS "file" ;
+ #assert.result "" "" "" : split-path-VMS "" ;
+ #
+ ##
+ ## Special case: current directory
+ ##
+ #assert.result "" "[]" "" : split-path-VMS "[]" ;
+ #assert.result "disk:" "[]" "" : split-path-VMS "disk:[]" ;
+ #assert.result "" "[]" "file" : split-path-VMS "[]file" ;
+ #assert.result "disk:" "[]" "file" : split-path-VMS "disk:[]file" ;
+ #
+ ##
+ ## Make portable paths
+ ##
+ #assert.result "/disk:" : make-VMS "disk:" ;
+ #assert.result "foo/bar/giz" : make-VMS "[.foo.bar.giz]" ;
+ #assert.result "foo" : make-VMS "[.foo]" ;
+ #assert.result "foo" : make-VMS "[.foo.bar.-]" ;
+ #assert.result ".." : make-VMS "[.-]" ;
+ #assert.result ".." : make-VMS "[-]" ;
+ #assert.result "." : make-VMS "[]" ;
+ #assert.result "giz.h" : make-VMS "giz.h" ;
+ #assert.result "foo/bar/giz.h" : make-VMS "[.foo.bar]giz.h" ;
+ #assert.result "/disk:/my_docs" : make-VMS "disk:[my_docs]" ;
+ #assert.result "/disk:/boost/tools/build/new/project.jam" : make-VMS
+ # "disk:[boost.tools.build.test.-.new]project.jam" ;
+ #
+ ##
+ ## Special case (adds '.' to end of file w/o extension to disambiguate from
+ ## directory in portable path spec)
+ ##
+ #assert.result "Jamfile." : make-VMS "Jamfile" ;
+ #assert.result "dir/Jamfile." : make-VMS "[.dir]Jamfile" ;
+ #assert.result "/disk:/dir/Jamfile." : make-VMS "disk:[dir]Jamfile" ;
+ #
+ ##
+ ## Make native paths
+ ##
+ #assert.result "disk:" : native-VMS "/disk:" ;
+ #assert.result "[.foo.bar.giz]" : native-VMS "foo/bar/giz" ;
+ #assert.result "[.foo]" : native-VMS "foo" ;
+ #assert.result "[.-]" : native-VMS ".." ;
+ #assert.result "[.foo.-]" : native-VMS "foo/.." ;
+ #assert.result "[]" : native-VMS "." ;
+ #assert.result "disk:[my_docs.work]" : native-VMS "/disk:/my_docs/work" ;
+ #assert.result "giz.h" : native-VMS "giz.h" ;
+ #assert.result "disk:Jamfile." : native-VMS "/disk:Jamfile." ;
+ #assert.result "disk:[my_docs.work]Jamfile." : native-VMS
+ # "/disk:/my_docs/work/Jamfile." ;
+
+ modules.poke path : os : $(save-os) ;
+}
diff --git a/src/boost/tools/build/src/util/path.py b/src/boost/tools/build/src/util/path.py
new file mode 100644
index 000000000..c535a7d56
--- /dev/null
+++ b/src/boost/tools/build/src/util/path.py
@@ -0,0 +1,937 @@
+# Status: this module is ported on demand by however needs something
+# from it. Functionality that is not needed by Python port will
+# be dropped.
+
+# 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.
+
+# Performs various path manipulations. Path are always in a 'normilized'
+# representation. In it, a path may be either:
+#
+# - '.', or
+#
+# - ['/'] [ ( '..' '/' )* (token '/')* token ]
+#
+# In plain english, path can be rooted, '..' elements are allowed only
+# at the beginning, and it never ends in slash, except for path consisting
+# of slash only.
+
+import os.path
+from utility import to_seq
+from glob import glob as builtin_glob
+
+from b2.util import bjam_signature
+
+@bjam_signature((["path", "root"],))
+def root (path, root):
+ """ If 'path' is relative, it is rooted at 'root'. Otherwise, it's unchanged.
+ """
+ if os.path.isabs (path):
+ return path
+ else:
+ return os.path.join (root, path)
+
+@bjam_signature((["native"],))
+def make (native):
+ """ Converts the native path into normalized form.
+ """
+ # TODO: make os selection here.
+ return make_UNIX (native)
+
+@bjam_signature([['native']])
+def make_UNIX (native):
+
+ # VP: I have no idea now 'native' can be empty here! But it can!
+ assert (native)
+
+ return os.path.normpath (native)
+
+@bjam_signature((["path"],))
+def native (path):
+ """ Builds a native representation of the path.
+ """
+ # TODO: make os selection here.
+ return native_UNIX (path)
+
+def native_UNIX (path):
+ return path
+
+
+def pwd ():
+ """ Returns the current working directory.
+ # TODO: is it a good idea to use the current dir? Some use-cases
+ may not allow us to depend on the current dir.
+ """
+ return make (os.getcwd ())
+
+def is_rooted (path):
+ """ Tests if a path is rooted.
+ """
+ return path and path [0] == '/'
+
+
+###################################################################
+# Still to port.
+# Original lines are prefixed with "# "
+#
+# # 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.
+#
+# # Performs various path manipulations. Path are always in a 'normilized'
+# # representation. In it, a path may be either:
+# #
+# # - '.', or
+# #
+# # - ['/'] [ ( '..' '/' )* (token '/')* token ]
+# #
+# # In plain english, path can be rooted, '..' elements are allowed only
+# # at the beginning, and it never ends in slash, except for path consisting
+# # of slash only.
+#
+# import modules ;
+# import sequence ;
+# import regex ;
+# import errors : error ;
+#
+#
+# os = [ modules.peek : OS ] ;
+# if [ modules.peek : UNIX ]
+# {
+# local uname = [ modules.peek : JAMUNAME ] ;
+# switch $(uname)
+# {
+# case CYGWIN* :
+# os = CYGWIN ;
+#
+# case * :
+# os = UNIX ;
+# }
+# }
+#
+# #
+# # Tests if a path is rooted.
+# #
+# rule is-rooted ( path )
+# {
+# return [ MATCH "^(/)" : $(path) ] ;
+# }
+#
+# #
+# # Tests if a path has a parent.
+# #
+# rule has-parent ( path )
+# {
+# if $(path) != / {
+# return 1 ;
+# } else {
+# return ;
+# }
+# }
+#
+# #
+# # Returns the path without any directory components.
+# #
+# rule basename ( path )
+# {
+# return [ MATCH "([^/]+)$" : $(path) ] ;
+# }
+#
+# #
+# # Returns parent directory of the path. If no parent exists, error is issued.
+# #
+# rule parent ( path )
+# {
+# if [ has-parent $(path) ] {
+#
+# if $(path) = . {
+# return .. ;
+# } else {
+#
+# # Strip everything at the end of path up to and including
+# # the last slash
+# local result = [ regex.match "((.*)/)?([^/]+)" : $(path) : 2 3 ] ;
+#
+# # Did we strip what we shouldn't?
+# if $(result[2]) = ".." {
+# return $(path)/.. ;
+# } else {
+# if ! $(result[1]) {
+# if [ is-rooted $(path) ] {
+# result = / ;
+# } else {
+# result = . ;
+# }
+# }
+# return $(result[1]) ;
+# }
+# }
+# } else {
+# error "Path '$(path)' has no parent" ;
+# }
+# }
+#
+# #
+# # Returns path2 such that "[ join path path2 ] = .".
+# # The path may not contain ".." element or be rooted.
+# #
+# rule reverse ( path )
+# {
+# if $(path) = .
+# {
+# return $(path) ;
+# }
+# else
+# {
+# local tokens = [ regex.split $(path) "/" ] ;
+# local tokens2 ;
+# for local i in $(tokens) {
+# tokens2 += .. ;
+# }
+# return [ sequence.join $(tokens2) : "/" ] ;
+# }
+# }
+def reverse(path):
+ """Returns path2 such that `os.path.join(path, path2) == '.'`.
+ `path` may not contain '..' or be rooted.
+
+ Args:
+ path (str): the path to reverse
+
+ Returns:
+ the string of the reversed path
+
+ Example:
+
+ >>> p1 = 'path/to/somewhere'
+ >>> p2 = reverse('path/to/somewhere')
+ >>> p2
+ '../../..'
+ >>> os.path.normpath(os.path.join(p1, p2))
+ '.'
+ """
+ if is_rooted(path) or '..' in path:
+ from b2.manager import get_manager
+ get_manager().errors()(
+ 'reverse(path): path is either rooted or contains ".." in the path')
+ if path == '.':
+ return path
+ path = os.path.normpath(path)
+ # os.sep.join() is being used over os.path.join() due
+ # to an extra '..' that is created by os.path.join()
+ return os.sep.join('..' for t in path.split(os.sep))
+# #
+# # Auxiliary rule: does all the semantic of 'join', except for error checking.
+# # The error checking is separated because this rule is recursive, and I don't
+# # like the idea of checking the same input over and over.
+# #
+# local rule join-imp ( elements + )
+# {
+# return [ NORMALIZE_PATH $(elements:J="/") ] ;
+# }
+#
+# #
+# # Contanenates the passed path elements. Generates an error if
+# # any element other than the first one is rooted.
+# #
+# rule join ( elements + )
+# {
+# if ! $(elements[2])
+# {
+# return $(elements[1]) ;
+# }
+# else
+# {
+# for local e in $(elements[2-])
+# {
+# if [ is-rooted $(e) ]
+# {
+# error only first element may be rooted ;
+# }
+# }
+# return [ join-imp $(elements) ] ;
+# }
+# }
+
+
+def glob (dirs, patterns):
+ """ Returns the list of files matching the given pattern in the
+ specified directory. Both directories and patterns are
+ supplied as portable paths. Each pattern should be non-absolute
+ path, and can't contain "." or ".." elements. Each slash separated
+ element of pattern can contain the following special characters:
+ - '?', which match any character
+ - '*', which matches arbitrary number of characters.
+ A file $(d)/e1/e2/e3 (where 'd' is in $(dirs)) matches pattern p1/p2/p3
+ if and only if e1 matches p1, e2 matches p2 and so on.
+
+ For example:
+ [ glob . : *.cpp ]
+ [ glob . : */build/Jamfile ]
+ """
+# {
+# local result ;
+# if $(patterns:D)
+# {
+# # When a pattern has a directory element, we first glob for
+# # directory, and then glob for file name is the found directories.
+# for local p in $(patterns)
+# {
+# # First glob for directory part.
+# local globbed-dirs = [ glob $(dirs) : $(p:D) ] ;
+# result += [ glob $(globbed-dirs) : $(p:D="") ] ;
+# }
+# }
+# else
+# {
+# # When a pattern has not directory, we glob directly.
+# # Take care of special ".." value. The "GLOB" rule simply ignores
+# # the ".." element (and ".") element in directory listings. This is
+# # needed so that
+# #
+# # [ glob libs/*/Jamfile ]
+# #
+# # don't return
+# #
+# # libs/../Jamfile (which is the same as ./Jamfile)
+# #
+# # On the other hand, when ".." is explicitly present in the pattern
+# # we need to return it.
+# #
+# for local dir in $(dirs)
+# {
+# for local p in $(patterns)
+# {
+# if $(p) != ".."
+# {
+# result += [ sequence.transform make
+# : [ GLOB [ native $(dir) ] : $(p) ] ] ;
+# }
+# else
+# {
+# result += [ path.join $(dir) .. ] ;
+# }
+# }
+# }
+# }
+# return $(result) ;
+# }
+#
+
+# TODO: (PF) I replaced the code above by this. I think it should work but needs to be tested.
+ result = []
+ dirs = to_seq (dirs)
+ patterns = to_seq (patterns)
+
+ splitdirs = []
+ for dir in dirs:
+ splitdirs += dir.split (os.pathsep)
+
+ for dir in splitdirs:
+ for pattern in patterns:
+ p = os.path.join (dir, pattern)
+ import glob
+ result.extend (glob.glob (p))
+ return result
+
+#
+# Find out the absolute name of path and returns the list of all the parents,
+# starting with the immediate one. Parents are returned as relative names.
+# If 'upper_limit' is specified, directories above it will be pruned.
+#
+def all_parents(path, upper_limit=None, cwd=None):
+
+ if not cwd:
+ cwd = os.getcwd()
+
+ path_abs = os.path.join(cwd, path)
+
+ if upper_limit:
+ upper_limit = os.path.join(cwd, upper_limit)
+
+ result = []
+ while path_abs and path_abs != upper_limit:
+ (head, tail) = os.path.split(path)
+ path = os.path.join(path, "..")
+ result.append(path)
+ path_abs = head
+
+ if upper_limit and path_abs != upper_limit:
+ raise BaseException("'%s' is not a prefix of '%s'" % (upper_limit, path))
+
+ return result
+
+# Search for 'pattern' in parent directories of 'dir', up till and including
+# 'upper_limit', if it is specified, or till the filesystem root otherwise.
+#
+def glob_in_parents(dir, patterns, upper_limit=None):
+
+ result = []
+ parent_dirs = all_parents(dir, upper_limit)
+
+ for p in parent_dirs:
+ result = glob(p, patterns)
+ if result: break
+
+ return result
+
+#
+# #
+# # Assuming 'child' is a subdirectory of 'parent', return the relative
+# # path from 'parent' to 'child'
+# #
+# rule relative ( child parent )
+# {
+# if $(parent) = "."
+# {
+# return $(child) ;
+# }
+# else
+# {
+# local split1 = [ regex.split $(parent) / ] ;
+# local split2 = [ regex.split $(child) / ] ;
+#
+# while $(split1)
+# {
+# if $(split1[1]) = $(split2[1])
+# {
+# split1 = $(split1[2-]) ;
+# split2 = $(split2[2-]) ;
+# }
+# else
+# {
+# errors.error $(child) is not a subdir of $(parent) ;
+# }
+# }
+# return [ join $(split2) ] ;
+# }
+# }
+#
+# # Returns the minimal path to path2 that is relative path1.
+# #
+# rule relative-to ( path1 path2 )
+# {
+# local root_1 = [ regex.split [ reverse $(path1) ] / ] ;
+# local split1 = [ regex.split $(path1) / ] ;
+# local split2 = [ regex.split $(path2) / ] ;
+#
+# while $(split1) && $(root_1)
+# {
+# if $(split1[1]) = $(split2[1])
+# {
+# root_1 = $(root_1[2-]) ;
+# split1 = $(split1[2-]) ;
+# split2 = $(split2[2-]) ;
+# }
+# else
+# {
+# split1 = ;
+# }
+# }
+# return [ join . $(root_1) $(split2) ] ;
+# }
+
+# Returns the list of paths which are used by the operating system
+# for looking up programs
+def programs_path ():
+ raw = []
+ names = ['PATH', 'Path', 'path']
+
+ for name in names:
+ raw.append(os.environ.get (name, ''))
+
+ result = []
+ for elem in raw:
+ if elem:
+ for p in elem.split(os.path.pathsep):
+ # it's possible that the user's Path has
+ # double path separators, thus it is possible
+ # for p to be an empty string.
+ if p:
+ result.append(make(p))
+
+ return result
+
+# rule make-NT ( native )
+# {
+# local tokens = [ regex.split $(native) "[/\\]" ] ;
+# local result ;
+#
+# # Handle paths ending with slashes
+# if $(tokens[-1]) = ""
+# {
+# tokens = $(tokens[1--2]) ; # discard the empty element
+# }
+#
+# result = [ path.join $(tokens) ] ;
+#
+# if [ regex.match "(^.:)" : $(native) ]
+# {
+# result = /$(result) ;
+# }
+#
+# if $(native) = ""
+# {
+# result = "." ;
+# }
+#
+# return $(result) ;
+# }
+#
+# rule native-NT ( path )
+# {
+# local result = [ MATCH "^/?(.*)" : $(path) ] ;
+# result = [ sequence.join [ regex.split $(result) "/" ] : "\\" ] ;
+# return $(result) ;
+# }
+#
+# rule make-CYGWIN ( path )
+# {
+# return [ make-NT $(path) ] ;
+# }
+#
+# rule native-CYGWIN ( path )
+# {
+# local result = $(path) ;
+# if [ regex.match "(^/.:)" : $(path) ] # win absolute
+# {
+# result = [ MATCH "^/?(.*)" : $(path) ] ; # remove leading '/'
+# }
+# return [ native-UNIX $(result) ] ;
+# }
+#
+# #
+# # split-VMS: splits input native path into
+# # device dir file (each part is optional),
+# # example:
+# #
+# # dev:[dir]file.c => dev: [dir] file.c
+# #
+# rule split-path-VMS ( native )
+# {
+# local matches = [ MATCH ([a-zA-Z0-9_-]+:)?(\\[[^\]]*\\])?(.*)?$ : $(native) ] ;
+# local device = $(matches[1]) ;
+# local dir = $(matches[2]) ;
+# local file = $(matches[3]) ;
+#
+# return $(device) $(dir) $(file) ;
+# }
+#
+# #
+# # Converts a native VMS path into a portable path spec.
+# #
+# # Does not handle current-device absolute paths such
+# # as "[dir]File.c" as it is not clear how to represent
+# # them in the portable path notation.
+# #
+# # Adds a trailing dot (".") to the file part if no extension
+# # is present (helps when converting it back into native path).
+# #
+# rule make-VMS ( native )
+# {
+# if [ MATCH ^(\\[[a-zA-Z0-9]) : $(native) ]
+# {
+# errors.error "Can't handle default-device absolute paths: " $(native) ;
+# }
+#
+# local parts = [ split-path-VMS $(native) ] ;
+# local device = $(parts[1]) ;
+# local dir = $(parts[2]) ;
+# local file = $(parts[3]) ;
+# local elems ;
+#
+# if $(device)
+# {
+# #
+# # rooted
+# #
+# elems = /$(device) ;
+# }
+#
+# if $(dir) = "[]"
+# {
+# #
+# # Special case: current directory
+# #
+# elems = $(elems) "." ;
+# }
+# else if $(dir)
+# {
+# dir = [ regex.replace $(dir) "\\[|\\]" "" ] ;
+# local dir_parts = [ regex.split $(dir) \\. ] ;
+#
+# if $(dir_parts[1]) = ""
+# {
+# #
+# # Relative path
+# #
+# dir_parts = $(dir_parts[2--1]) ;
+# }
+#
+# #
+# # replace "parent-directory" parts (- => ..)
+# #
+# dir_parts = [ regex.replace-list $(dir_parts) : - : .. ] ;
+#
+# elems = $(elems) $(dir_parts) ;
+# }
+#
+# if $(file)
+# {
+# if ! [ MATCH (\\.) : $(file) ]
+# {
+# #
+# # Always add "." to end of non-extension file
+# #
+# file = $(file). ;
+# }
+# elems = $(elems) $(file) ;
+# }
+#
+# local portable = [ path.join $(elems) ] ;
+#
+# return $(portable) ;
+# }
+#
+# #
+# # Converts a portable path spec into a native VMS path.
+# #
+# # Relies on having at least one dot (".") included in the file
+# # name to be able to differentiate it ftom the directory part.
+# #
+# rule native-VMS ( path )
+# {
+# local device = "" ;
+# local dir = $(path) ;
+# local file = "" ;
+# local native ;
+# local split ;
+#
+# #
+# # Has device ?
+# #
+# if [ is-rooted $(dir) ]
+# {
+# split = [ MATCH ^/([^:]+:)/?(.*) : $(dir) ] ;
+# device = $(split[1]) ;
+# dir = $(split[2]) ;
+# }
+#
+# #
+# # Has file ?
+# #
+# # This is no exact science, just guess work:
+# #
+# # If the last part of the current path spec
+# # includes some chars, followed by a dot,
+# # optionally followed by more chars -
+# # then it is a file (keep your fingers crossed).
+# #
+# split = [ regex.split $(dir) / ] ;
+# local maybe_file = $(split[-1]) ;
+#
+# if [ MATCH ^([^.]+\\..*) : $(maybe_file) ]
+# {
+# file = $(maybe_file) ;
+# dir = [ sequence.join $(split[1--2]) : / ] ;
+# }
+#
+# #
+# # Has dir spec ?
+# #
+# if $(dir) = "."
+# {
+# dir = "[]" ;
+# }
+# else if $(dir)
+# {
+# dir = [ regex.replace $(dir) \\.\\. - ] ;
+# dir = [ regex.replace $(dir) / . ] ;
+#
+# if $(device) = ""
+# {
+# #
+# # Relative directory
+# #
+# dir = "."$(dir) ;
+# }
+# dir = "["$(dir)"]" ;
+# }
+#
+# native = [ sequence.join $(device) $(dir) $(file) ] ;
+#
+# return $(native) ;
+# }
+#
+#
+# rule __test__ ( ) {
+#
+# import assert ;
+# import errors : try catch ;
+#
+# assert.true is-rooted "/" ;
+# assert.true is-rooted "/foo" ;
+# assert.true is-rooted "/foo/bar" ;
+# assert.result : is-rooted "." ;
+# assert.result : is-rooted "foo" ;
+# assert.result : is-rooted "foo/bar" ;
+#
+# assert.true has-parent "foo" ;
+# assert.true has-parent "foo/bar" ;
+# assert.true has-parent "." ;
+# assert.result : has-parent "/" ;
+#
+# assert.result "." : basename "." ;
+# assert.result ".." : basename ".." ;
+# assert.result "foo" : basename "foo" ;
+# assert.result "foo" : basename "bar/foo" ;
+# assert.result "foo" : basename "gaz/bar/foo" ;
+# assert.result "foo" : basename "/gaz/bar/foo" ;
+#
+# assert.result "." : parent "foo" ;
+# assert.result "/" : parent "/foo" ;
+# assert.result "foo/bar" : parent "foo/bar/giz" ;
+# assert.result ".." : parent "." ;
+# assert.result ".." : parent "../foo" ;
+# assert.result "../../foo" : parent "../../foo/bar" ;
+#
+#
+# assert.result "." : reverse "." ;
+# assert.result ".." : reverse "foo" ;
+# assert.result "../../.." : reverse "foo/bar/giz" ;
+#
+# assert.result "foo" : join "foo" ;
+# assert.result "/foo" : join "/" "foo" ;
+# assert.result "foo/bar" : join "foo" "bar" ;
+# assert.result "foo/bar" : join "foo/giz" "../bar" ;
+# assert.result "foo/giz" : join "foo/bar/baz" "../../giz" ;
+# assert.result ".." : join "." ".." ;
+# assert.result ".." : join "foo" "../.." ;
+# assert.result "../.." : join "../foo" "../.." ;
+# assert.result "/foo" : join "/bar" "../foo" ;
+# assert.result "foo/giz" : join "foo/giz" "." ;
+# assert.result "." : join lib2 ".." ;
+# assert.result "/" : join "/a" ".." ;
+#
+# assert.result /a/b : join /a/b/c .. ;
+#
+# assert.result "foo/bar/giz" : join "foo" "bar" "giz" ;
+# assert.result "giz" : join "foo" ".." "giz" ;
+# assert.result "foo/giz" : join "foo" "." "giz" ;
+#
+# try ;
+# {
+# join "a" "/b" ;
+# }
+# catch only first element may be rooted ;
+#
+# local CWD = "/home/ghost/build" ;
+# assert.result : all-parents . : . : $(CWD) ;
+# assert.result . .. ../.. ../../.. : all-parents "Jamfile" : "" : $(CWD) ;
+# assert.result foo . .. ../.. ../../.. : all-parents "foo/Jamfile" : "" : $(CWD) ;
+# assert.result ../Work .. ../.. ../../.. : all-parents "../Work/Jamfile" : "" : $(CWD) ;
+#
+# local CWD = "/home/ghost" ;
+# assert.result . .. : all-parents "Jamfile" : "/home" : $(CWD) ;
+# assert.result . : all-parents "Jamfile" : "/home/ghost" : $(CWD) ;
+#
+# assert.result "c/d" : relative "a/b/c/d" "a/b" ;
+# assert.result "foo" : relative "foo" "." ;
+#
+# local save-os = [ modules.peek path : os ] ;
+# modules.poke path : os : NT ;
+#
+# assert.result "foo/bar/giz" : make "foo/bar/giz" ;
+# assert.result "foo/bar/giz" : make "foo\\bar\\giz" ;
+# assert.result "foo" : make "foo/." ;
+# assert.result "foo" : make "foo/bar/.." ;
+# assert.result "/D:/My Documents" : make "D:\\My Documents" ;
+# assert.result "/c:/boost/tools/build/new/project.jam" : make "c:\\boost\\tools\\build\\test\\..\\new\\project.jam" ;
+#
+# assert.result "foo\\bar\\giz" : native "foo/bar/giz" ;
+# assert.result "foo" : native "foo" ;
+# assert.result "D:\\My Documents\\Work" : native "/D:/My Documents/Work" ;
+#
+# modules.poke path : os : UNIX ;
+#
+# assert.result "foo/bar/giz" : make "foo/bar/giz" ;
+# assert.result "/sub1" : make "/sub1/." ;
+# assert.result "/sub1" : make "/sub1/sub2/.." ;
+# assert.result "sub1" : make "sub1/." ;
+# assert.result "sub1" : make "sub1/sub2/.." ;
+# assert.result "/foo/bar" : native "/foo/bar" ;
+#
+# modules.poke path : os : VMS ;
+#
+# #
+# # Don't really need to poke os before these
+# #
+# assert.result "disk:" "[dir]" "file" : split-path-VMS "disk:[dir]file" ;
+# assert.result "disk:" "[dir]" "" : split-path-VMS "disk:[dir]" ;
+# assert.result "disk:" "" "" : split-path-VMS "disk:" ;
+# assert.result "disk:" "" "file" : split-path-VMS "disk:file" ;
+# assert.result "" "[dir]" "file" : split-path-VMS "[dir]file" ;
+# assert.result "" "[dir]" "" : split-path-VMS "[dir]" ;
+# assert.result "" "" "file" : split-path-VMS "file" ;
+# assert.result "" "" "" : split-path-VMS "" ;
+#
+# #
+# # Special case: current directory
+# #
+# assert.result "" "[]" "" : split-path-VMS "[]" ;
+# assert.result "disk:" "[]" "" : split-path-VMS "disk:[]" ;
+# assert.result "" "[]" "file" : split-path-VMS "[]file" ;
+# assert.result "disk:" "[]" "file" : split-path-VMS "disk:[]file" ;
+#
+# #
+# # Make portable paths
+# #
+# assert.result "/disk:" : make "disk:" ;
+# assert.result "foo/bar/giz" : make "[.foo.bar.giz]" ;
+# assert.result "foo" : make "[.foo]" ;
+# assert.result "foo" : make "[.foo.bar.-]" ;
+# assert.result ".." : make "[.-]" ;
+# assert.result ".." : make "[-]" ;
+# assert.result "." : make "[]" ;
+# assert.result "giz.h" : make "giz.h" ;
+# assert.result "foo/bar/giz.h" : make "[.foo.bar]giz.h" ;
+# assert.result "/disk:/my_docs" : make "disk:[my_docs]" ;
+# assert.result "/disk:/boost/tools/build/new/project.jam" : make "disk:[boost.tools.build.test.-.new]project.jam" ;
+#
+# #
+# # Special case (adds '.' to end of file w/o extension to
+# # disambiguate from directory in portable path spec).
+# #
+# assert.result "Jamfile." : make "Jamfile" ;
+# assert.result "dir/Jamfile." : make "[.dir]Jamfile" ;
+# assert.result "/disk:/dir/Jamfile." : make "disk:[dir]Jamfile" ;
+#
+# #
+# # Make native paths
+# #
+# assert.result "disk:" : native "/disk:" ;
+# assert.result "[.foo.bar.giz]" : native "foo/bar/giz" ;
+# assert.result "[.foo]" : native "foo" ;
+# assert.result "[.-]" : native ".." ;
+# assert.result "[.foo.-]" : native "foo/.." ;
+# assert.result "[]" : native "." ;
+# assert.result "disk:[my_docs.work]" : native "/disk:/my_docs/work" ;
+# assert.result "giz.h" : native "giz.h" ;
+# assert.result "disk:Jamfile." : native "/disk:Jamfile." ;
+# assert.result "disk:[my_docs.work]Jamfile." : native "/disk:/my_docs/work/Jamfile." ;
+#
+# modules.poke path : os : $(save-os) ;
+#
+# }
+
+#
+
+
+#def glob(dir, patterns):
+# result = []
+# for pattern in patterns:
+# result.extend(builtin_glob(os.path.join(dir, pattern)))
+# return result
+
+def glob(dirs, patterns, exclude_patterns=None):
+ """Returns the list of files matching the given pattern in the
+ specified directory. Both directories and patterns are
+ supplied as portable paths. Each pattern should be non-absolute
+ path, and can't contain '.' or '..' elements. Each slash separated
+ element of pattern can contain the following special characters:
+ - '?', which match any character
+ - '*', which matches arbitrary number of characters.
+ A file $(d)/e1/e2/e3 (where 'd' is in $(dirs)) matches pattern p1/p2/p3
+ if and only if e1 matches p1, e2 matches p2 and so on.
+ For example:
+ [ glob . : *.cpp ]
+ [ glob . : */build/Jamfile ]
+ """
+
+ assert(isinstance(patterns, list))
+ assert(isinstance(dirs, list))
+
+ if not exclude_patterns:
+ exclude_patterns = []
+ else:
+ assert(isinstance(exclude_patterns, list))
+
+ real_patterns = [os.path.join(d, p) for p in patterns for d in dirs]
+ real_exclude_patterns = [os.path.join(d, p) for p in exclude_patterns
+ for d in dirs]
+
+ inc = [os.path.normpath(name) for p in real_patterns
+ for name in builtin_glob(p)]
+ exc = [os.path.normpath(name) for p in real_exclude_patterns
+ for name in builtin_glob(p)]
+ return [x for x in inc if x not in exc]
+
+def glob_tree(roots, patterns, exclude_patterns=None):
+ """Recursive version of GLOB. Builds the glob of files while
+ also searching in the subdirectories of the given roots. An
+ optional set of exclusion patterns will filter out the
+ matching entries from the result. The exclusions also apply
+ to the subdirectory scanning, such that directories that
+ match the exclusion patterns will not be searched."""
+
+ if not exclude_patterns:
+ exclude_patterns = []
+
+ result = glob(roots, patterns, exclude_patterns)
+ subdirs = [s for s in glob(roots, ["*"], exclude_patterns) if s != "." and s != ".." and os.path.isdir(s)]
+ if subdirs:
+ result.extend(glob_tree(subdirs, patterns, exclude_patterns))
+
+ return result
+
+def glob_in_parents(dir, patterns, upper_limit=None):
+ """Recursive version of GLOB which glob sall parent directories
+ of dir until the first match is found. Returns an empty result if no match
+ is found"""
+
+ assert(isinstance(dir, str))
+ assert(isinstance(patterns, list))
+
+ result = []
+
+ absolute_dir = os.path.join(os.getcwd(), dir)
+ absolute_dir = os.path.normpath(absolute_dir)
+ while absolute_dir:
+ new_dir = os.path.split(absolute_dir)[0]
+ if new_dir == absolute_dir:
+ break
+ result = glob([new_dir], patterns)
+ if result:
+ break
+ absolute_dir = new_dir
+
+ return result
+
+
+# The relpath functionality is written by
+# Cimarron Taylor
+def split(p, rest=[]):
+ (h,t) = os.path.split(p)
+ if len(h) < 1: return [t]+rest
+ if len(t) < 1: return [h]+rest
+ return split(h,[t]+rest)
+
+def commonpath(l1, l2, common=[]):
+ if len(l1) < 1: return (common, l1, l2)
+ if len(l2) < 1: return (common, l1, l2)
+ if l1[0] != l2[0]: return (common, l1, l2)
+ return commonpath(l1[1:], l2[1:], common+[l1[0]])
+
+def relpath(p1, p2):
+ (common,l1,l2) = commonpath(split(p1), split(p2))
+ p = []
+ if len(l1) > 0:
+ p = [ '../' * len(l1) ]
+ p = p + l2
+ if p:
+ return os.path.join( *p )
+ else:
+ return "."
diff --git a/src/boost/tools/build/src/util/print.jam b/src/boost/tools/build/src/util/print.jam
new file mode 100644
index 000000000..814547f39
--- /dev/null
+++ b/src/boost/tools/build/src/util/print.jam
@@ -0,0 +1,508 @@
+# Copyright 2003 Douglas Gregor
+# Copyright 2002, 2003, 2005 Rene Rivera
+# Copyright 2002, 2003, 2004, 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)
+
+# Utilities for generating format independent output. Using these
+# will help in generation of documentation in at minimum plain/console
+# and html.
+
+import modules ;
+import numbers ;
+import string ;
+import regex ;
+import "class" ;
+import scanner ;
+import path ;
+import os ;
+
+# The current output target. Defaults to console.
+output-target = console ;
+
+# The current output type. Defaults to plain. Other possible values are "html".
+output-type = plain ;
+
+# Whitespace.
+.whitespace = [ string.whitespace ] ;
+
+# Redirect
+.redirect-out = ">" ;
+.redirect-append = ">>" ;
+if [ os.name ] = VMS
+{
+ .redirect-out = "| TYPE SYS$INPUT /OUT=" ;
+ .redirect-append = "| APPEND/NEW SYS$INPUT " ;
+}
+
+# Set the target and type of output to generate. This sets both the destination
+# output and the type of docs to generate to that output. The target can be
+# either a file or "console" for echoing to the console. If the type of output
+# is not specified it defaults to plain text.
+#
+rule output (
+ target # The target file or device; file or "console".
+ type ? # The type of output; "plain" or "html".
+)
+{
+ type ?= plain ;
+ if $(output-target) != $(target)
+ {
+ output-target = $(target) ;
+ output-type = $(type) ;
+ if $(output-type) = html
+ {
+ text
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
+ "<html>"
+ "<head>"
+ "</head>"
+ "<body link=\"#0000ff\" vlink=\"#800080\">"
+ : true
+ : prefix ;
+ text
+ "</body>"
+ "</html>"
+ :
+ : suffix ;
+ }
+ }
+}
+
+
+# Generate a section with a description. The type of output can be controlled by
+# the value of the 'output-type' variable.
+#
+rule section (
+ name # The name of the section.
+ description * # A number of description lines.
+)
+{
+ if $(output-type) = plain
+ {
+ lines [ split-at-words "$(name):" ] ;
+ lines ;
+ }
+ else if $(output-type) = html
+ {
+ name = [ escape-html $(name) ] ;
+ text <h3>$(name)</h3> <p> ;
+ }
+ local pre = ;
+ while $(description)
+ {
+ local paragraph = ;
+ while $(description) && [ string.is-whitespace $(description[1]) ] { description = $(description[2-]) ; }
+ if $(pre)
+ {
+ while $(description) && (
+ $(pre) = " $(description[1])" ||
+ ( $(pre) < [ string.chars [ MATCH "^([$(.whitespace)]*)" : " $(description[1])" ] ] )
+ )
+ { paragraph += $(description[1]) ; description = $(description[2-]) ; }
+ while [ string.is-whitespace $(paragraph[-1]) ] { paragraph = $(paragraph[1--2]) ; }
+ pre = ;
+ if $(output-type) = plain
+ {
+ lines $(paragraph) "" : " " " " ;
+ }
+ else if $(output-type) = html
+ {
+ text <blockquote> ;
+ lines $(paragraph) ;
+ text </blockquote> ;
+ }
+ }
+ else
+ {
+ while $(description) && ! [ string.is-whitespace $(description[1]) ]
+ { paragraph += $(description[1]) ; description = $(description[2-]) ; }
+ if $(paragraph[1]) = "::" && ! $(paragraph[2])
+ {
+ pre = " " ;
+ }
+ if $(paragraph[1]) = "::"
+ {
+ if $(output-type) = plain
+ {
+ lines $(paragraph[2-]) "" : " " " " ;
+ lines ;
+ }
+ else if $(output-type) = html
+ {
+ text <blockquote> ;
+ lines $(paragraph[2-]) ;
+ text </blockquote> ;
+ }
+ }
+ else
+ {
+ local p = [ MATCH "(.*)(::)$" : $(paragraph[-1]) ] ;
+ local pws = [ MATCH "([ ]*)$" : $(p[1]) ] ;
+ p = [ MATCH "(.*)($(pws))($(p[2]))$" : $(paragraph[-1]) ] ;
+ if $(p[3]) = "::"
+ {
+ pre = [ string.chars [ MATCH "^([$(.whitespace)]*)" : " $(p[1])" ] ] ;
+ if ! $(p[2]) || $(p[2]) = "" { paragraph = $(paragraph[1--2]) "$(p[1]):" ; }
+ else { paragraph = $(paragraph[1--2]) $(p[1]) ; }
+ if $(output-type) = plain
+ {
+ lines [ split-at-words " " $(paragraph) ] : " " " " ;
+ lines ;
+ }
+ else if $(output-type) = html
+ {
+ text </p> <p> [ escape-html $(paragraph) ] ;
+ }
+ }
+ else
+ {
+ if $(output-type) = plain
+ {
+ lines [ split-at-words " " $(paragraph) ] : " " " " ;
+ lines ;
+ }
+ else if $(output-type) = html
+ {
+ text </p> <p> [ escape-html $(paragraph) ] ;
+ }
+ }
+ }
+ }
+ }
+ if $(output-type) = html
+ {
+ text </p> ;
+ }
+}
+
+
+# Generate the start of a list of items. The type of output can be controlled by
+# the value of the 'output-type' variable.
+#
+rule list-start ( )
+{
+ if $(output-type) = plain
+ {
+ }
+ else if $(output-type) = html
+ {
+ text <ul> ;
+ }
+}
+
+
+# Generate an item in a list. The type of output can be controlled by the value
+# of the 'output-type' variable.
+#
+rule list-item (
+ item + # The item to list.
+)
+{
+ if $(output-type) = plain
+ {
+ lines [ split-at-words "*" $(item) ] : " " " " ;
+ }
+ else if $(output-type) = html
+ {
+ text <li> [ escape-html $(item) ] </li> ;
+ }
+}
+
+
+# Generate the end of a list of items. The type of output can be controlled by
+# the value of the 'output-type' variable.
+#
+rule list-end ( )
+{
+ if $(output-type) = plain
+ {
+ lines ;
+ }
+ else if $(output-type) = html
+ {
+ text </ul> ;
+ }
+}
+
+
+# Split the given text into separate lines, word-wrapping to a margin. The
+# default margin is 78 characters.
+#
+rule split-at-words (
+ text + # The text to split.
+ : margin ? # An optional margin, default is 78.
+)
+{
+ local lines = ;
+ text = [ string.words $(text:J=" ") ] ;
+ text = $(text:J=" ") ;
+ margin ?= 78 ;
+ local char-match-1 = ".?" ;
+ local char-match = "" ;
+ while $(margin) != 0
+ {
+ char-match = $(char-match)$(char-match-1) ;
+ margin = [ numbers.decrement $(margin) ] ;
+ }
+ while $(text)
+ {
+ local s = "" ;
+ local t = "" ;
+ # divide s into the first X characters and the rest
+ s = [ MATCH "^($(char-match))(.*)" : $(text) ] ;
+
+ if $(s[2])
+ {
+ # split the first half at a space
+ t = [ MATCH "^(.*)[\\ ]([^\\ ]*)$" : $(s[1]) ] ;
+ }
+ else
+ {
+ t = $(s) ;
+ }
+
+ if ! $(t[2])
+ {
+ t += "" ;
+ }
+
+ text = $(t[2])$(s[2]) ;
+ lines += $(t[1]) ;
+ }
+ return $(lines) ;
+}
+
+
+# Generate a set of fixed lines. Each single item passed in is output on a
+# separate line. For console this just echos each line, but for html this will
+# split them with <br>.
+#
+rule lines (
+ text * # The lines of text.
+ : indent ? # Optional indentation prepended to each line after the first.
+ outdent ? # Optional indentation to prepend to the first line.
+)
+{
+ text ?= "" ;
+ indent ?= "" ;
+ outdent ?= "" ;
+ if $(output-type) = plain
+ {
+ text $(outdent)$(text[1]) $(indent)$(text[2-]) ;
+ }
+ else if $(output-type) = html
+ {
+ local indent-chars = [ string.chars $(indent) ] ;
+ indent = "" ;
+ for local c in $(indent-chars)
+ {
+ if $(c) = " " { c = "&nbsp;" ; }
+ else if $(c) = " " { c = "&nbsp;&nbsp;&nbsp;&nbsp;" ; }
+ indent = $(indent)$(c) ;
+ }
+ local html-text = [ escape-html $(text) : "&nbsp;" ] ;
+ text $(html-text[1])<br> $(indent)$(html-text[2-])<br> ;
+ }
+}
+
+
+# Output text directly to the current target. When doing output to a file, one
+# can indicate if the text should be output to "prefix" it, as the "body"
+# (default), or "suffix" of the file. This is independent of the actual
+# execution order of the text rule. This rule invokes a singular action, one
+# action only once, which does the build of the file. Therefore actions on the
+# target outside of this rule will happen entirely before and/or after all
+# output using this rule.
+#
+rule text (
+ strings * # The strings of text to output.
+ : overwrite ? # True to overwrite the output (if it is a file).
+ : prefix-body-suffix ? # Indication to output prefix, body, or suffix (for
+ # a file).
+)
+{
+ prefix-body-suffix ?= body ;
+ if $(output-target) = console
+ {
+ if ! $(strings)
+ {
+ ECHO ;
+ }
+ else
+ {
+ for local s in $(strings)
+ {
+ ECHO $(s) ;
+ }
+ }
+ }
+ if ! $($(output-target).did-action)
+ {
+ $(output-target).did-action = yes ;
+ $(output-target).text-prefix = ;
+ $(output-target).text-body = ;
+ $(output-target).text-suffix = ;
+
+ nl on $(output-target) = "
+" ;
+ text-redirect on $(output-target) = $(.redirect-append) ;
+ if $(overwrite)
+ {
+ text-redirect on $(output-target) = $(.redirect-out) ;
+ }
+ text-content on $(output-target) = ;
+
+ text-action $(output-target) ;
+
+ if $(overwrite) && $(output-target) != console
+ {
+ check-for-update $(output-target) ;
+ }
+ }
+ $(output-target).text-$(prefix-body-suffix) += $(strings) ;
+ text-content on $(output-target) =
+ $($(output-target).text-prefix)
+ $($(output-target).text-body)
+ $($(output-target).text-suffix) ;
+}
+
+
+# Outputs the text to the current targets, after word-wrapping it.
+#
+rule wrapped-text ( text + )
+{
+ local lines = [ split-at-words $(text) ] ;
+ text $(lines) ;
+}
+
+
+# Escapes text into html/xml printable equivalents. Does not know about tags and
+# therefore tags fed into this will also be escaped. Currently escapes space,
+# "<", ">", and "&".
+#
+rule escape-html (
+ text + # The text to escape.
+ : space ? # What to replace spaces with, defaults to " ".
+)
+{
+ local html-text = ;
+ while $(text)
+ {
+ local html = $(text[1]) ;
+ text = $(text[2-]) ;
+ html = [ regex.replace $(html) "&" "&amp;" ] ;
+ html = [ regex.replace $(html) "<" "&lt;" ] ;
+ html = [ regex.replace $(html) ">" "&gt;" ] ;
+ if $(space)
+ {
+ html = [ regex.replace $(html) " " "$(space)" ] ;
+ }
+ html-text += $(html) ;
+ }
+ return $(html-text) ;
+}
+
+
+# Outputs the text strings collected by the text rule to the output file.
+#
+actions quietly text-action
+{
+ @($(STDOUT):E=$(text-content:J=$(nl))) $(text-redirect) "$(<)"
+}
+
+if [ os.name ] = VMS
+{
+ actions quietly text-action
+ {
+ @($(STDOUT):E=$(text-content:J=$(nl))) $(text-redirect) $(<:W)
+ }
+}
+
+rule get-scanner ( )
+{
+ if ! $(.scanner)
+ {
+ .scanner = [ class.new print-scanner ] ;
+ }
+ return $(.scanner) ;
+}
+
+
+# The following code to update print targets when their contents change is a
+# horrible hack. It basically creates a target which binds to this file
+# (print.jam) and installs a scanner on it which reads the target and compares
+# its contents to the new contents that we are writing.
+#
+rule check-for-update ( target )
+{
+ local scanner = [ get-scanner ] ;
+ local file = [ path.native [ modules.binding $(__name__) ] ] ;
+ local g = [ MATCH <(.*)> : $(target:G) ] ;
+ local dependency-target = $(__file__:G=$(g:E=)-$(target:G=)-$(scanner)) ;
+ DEPENDS $(target) : $(dependency-target) ;
+ SEARCH on $(dependency-target) = $(file:D) ;
+ ISFILE $(dependency-target) ;
+ NOUPDATE $(dependency-target) ;
+ base on $(dependency-target) = $(target) ;
+ scanner.install $(scanner) : $(dependency-target) ;
+ return $(dependency-target) ;
+}
+
+
+class print-scanner : scanner
+{
+ import path ;
+ import os ;
+
+ rule pattern ( )
+ {
+ return "(One match...)" ;
+ }
+
+ rule process ( target : matches * : binding )
+ {
+ local base = [ on $(target) return $(base) ] ;
+ local nl = [ on $(base) return $(nl) ] ;
+ local text-content = [ on $(base) return $(text-content) ] ;
+ local dir = [ on $(base) return $(LOCATE) ] ;
+ if $(dir)
+ {
+ dir = [ path.make $(dir) ] ;
+ }
+ local file = [ path.native [ path.join $(dir) $(base:G=) ] ] ;
+ local actual-content ;
+ if [ os.name ] = NT
+ {
+ actual-content = [ SHELL "type \"$(file)\" 2>nul" ] ;
+ }
+ else if [ os.name ] = VMS
+ {
+ actual-content = [ SHELL "PIPE TYPE $(file:W) 2>NL:" ] ;
+ }
+ else
+ {
+ actual-content = [ SHELL "cat \"$(file)\" 2>/dev/null" ] ;
+ }
+ if $(text-content:J=$(nl)) != $(actual-content)
+ {
+ ALWAYS $(base) ;
+ }
+ }
+}
+
+
+rule __test__ ( )
+{
+ import assert ;
+
+ assert.result one two three : split-at-words one two three : 5 ;
+ assert.result "one two" three : split-at-words one two three : 8 ;
+ assert.result "one two" three : split-at-words one two three : 9 ;
+ assert.result "one two three" : split-at-words one two three ;
+
+ # VP, 2004-12-03 The following test fails for some reason, so commenting it
+ # out.
+ #assert.result "one&nbsp;two&nbsp;three" "&amp;&lt;&gt;" :
+ # escape-html "one two three" "&<>" ;
+}
diff --git a/src/boost/tools/build/src/util/regex.jam b/src/boost/tools/build/src/util/regex.jam
new file mode 100644
index 000000000..6da5f1e2c
--- /dev/null
+++ b/src/boost/tools/build/src/util/regex.jam
@@ -0,0 +1,208 @@
+# Copyright 2001, 2002 Dave Abrahams
+# Copyright 2003 Douglas Gregor
+# Copyright 2003 Rene Rivera
+# Copyright 2002, 2003, 2004, 2005 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)
+
+#
+# Returns a list of the following substrings:
+# 1) from beginning till the first occurrence of 'separator' or till the end,
+# 2) between each occurrence of 'separator' and the next occurrence,
+# 3) from the last occurrence of 'separator' till the end.
+# If no separator is present, the result will contain only one element.
+#
+
+rule split ( string separator )
+{
+ local result ;
+ local s = $(string) ;
+
+ # Break pieaces off 's' until it has no separators left.
+ 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]) ;
+ }
+ }
+ # Combine the remaining part at the beginning, which does not have
+ # separators, with the pieces broken off. Note that the rule's signature
+ # does not allow the initial s to be empty.
+ return $(s) $(result) ;
+}
+
+if [ HAS_NATIVE_RULE regex : split : 1 ]
+{
+ NATIVE_RULE regex : split ;
+}
+
+# Returns the concatenated results of Applying regex.split to every element of
+# the list using the separator pattern.
+#
+rule split-list ( list * : separator )
+{
+ local result ;
+ for s in $(list)
+ {
+ result += [ split $(s) $(separator) ] ;
+ }
+ return $(result) ;
+}
+
+
+# Match string against pattern, and return the elements indicated by indices.
+#
+rule match ( pattern : string : indices * )
+{
+ indices ?= 1 2 3 4 5 6 7 8 9 ;
+ local x = [ MATCH $(pattern) : $(string) ] ;
+ return $(x[$(indices)]) ;
+}
+
+
+# Matches all elements of 'list' against the 'pattern' and returns a list of
+# elements indicated by indices of all successful matches. If 'indices' is
+# omitted returns a list of first parenthesised groups of all successful
+# matches.
+#
+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) ;
+}
+
+NATIVE_RULE regex : transform ;
+
+
+# Escapes all of the characters in symbols using the escape symbol escape-symbol
+# for the given string, and returns the escaped string.
+#
+rule escape ( string : symbols : escape-symbol )
+{
+ local result = "" ;
+ local m = 1 ;
+ while $(m)
+ {
+ m = [ MATCH "^([^$(symbols)]*)([$(symbols)])(.*)" : $(string) ] ;
+ if $(m)
+ {
+ m += "" ; # Supposedly a bug fix; borrowed from regex.split
+ result = "$(result)$(m[1])$(escape-symbol)$(m[2])" ;
+ string = $(m[3]) ;
+ }
+ }
+ string ?= "" ;
+ result = "$(result)$(string)" ;
+ return $(result) ;
+}
+
+
+# Replaces occurrences of a match string in a given string and returns the new
+# string. The match string can be a regex expression.
+#
+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) ;
+}
+
+if [ HAS_NATIVE_RULE regex : replace : 1 ]
+{
+ NATIVE_RULE regex : replace ;
+}
+
+
+# Replaces occurrences of a match string in a given list of strings and returns
+# a list of new strings. The match string can be a regex expression.
+#
+# list - the list of strings to modify.
+# match - the search expression.
+# replacement - the string to replace with.
+#
+rule replace-list ( list * : match : replacement )
+{
+ local result ;
+ for local e in $(list)
+ {
+ result += [ replace $(e) $(match) $(replacement) ] ;
+ }
+ return $(result) ;
+}
+
+
+rule __test__ ( )
+{
+ import assert ;
+
+ assert.result a b c : split "a/b/c" / ;
+ assert.result "" a b c : split "/a/b/c" / ;
+ assert.result "" "" a b c : split "//a/b/c" / ;
+ assert.result "" a "" b c : split "/a//b/c" / ;
+ assert.result "" a "" b c "" : split "/a//b/c/" / ;
+ assert.result "" a "" b c "" "" : split "/a//b/c//" / ;
+ assert.result "" a b c "" : split "abc" "" ;
+ assert.result "" "" : split "" "" ;
+
+ assert.result a c b d
+ : match (.)(.)(.)(.) : abcd : 1 3 2 4 ;
+
+ assert.result a b c d
+ : match (.)(.)(.)(.) : abcd ;
+
+ assert.result ababab cddc
+ : match "((ab)*)([cd]+)" : abababcddc : 1 3 ;
+
+ assert.result a.h c.h
+ : transform <a.h> \"b.h\" <c.h> : <(.*)> ;
+
+ assert.result a.h b.h c.h
+ : transform <a.h> \"b.h\" <c.h> : "<([^>]*)>|\"([^\"]*)\"" : 1 2 ;
+
+ assert.result "^<?xml version=\"1.0\"^>"
+ : escape "<?xml version=\"1.0\">" : "&|()<>^" : "^" ;
+
+ assert.result "<?xml version=\\\"1.0\\\">"
+ : escape "<?xml version=\"1.0\">" : "\\\"" : "\\" ;
+
+ assert.result "string&nbsp;string&nbsp;" : replace "string string " " " "&nbsp;" ;
+ assert.result "&nbsp;string&nbsp;string" : replace " string string" " " "&nbsp;" ;
+ assert.result "string&nbsp;&nbsp;string" : replace "string string" " " "&nbsp;" ;
+ assert.result "-" : replace "&" "&" "-" ;
+ assert.result "x" : replace "" "" "x" ;
+ assert.result "xax" : replace "a" "" "x" ;
+ assert.result "xaxbx" : replace "ab" "" "x" ;
+
+ assert.result "-" "a-b" : replace-list "&" "a&b" : "&" : "-" ;
+}
diff --git a/src/boost/tools/build/src/util/regex.py b/src/boost/tools/build/src/util/regex.py
new file mode 100644
index 000000000..053c645f5
--- /dev/null
+++ b/src/boost/tools/build/src/util/regex.py
@@ -0,0 +1,63 @@
+# (C) Copyright David Abrahams 2001. 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
+
+from b2.util import bjam_signature
+
+
+def transform (list, pattern, indices = [1]):
+ """ Matches all elements of 'list' against the 'pattern'
+ and returns a list of the elements indicated by indices of
+ all successful matches. If 'indices' is omitted returns
+ a list of first paranthethised groups of all successful
+ matches.
+ """
+ result = []
+
+ for e in list:
+ m = re.match (pattern, e)
+
+ if m:
+ for i in indices:
+ result.append (m.group (i))
+
+ return result
+
+
+@bjam_signature([['s', 'pattern', 'replacement']])
+def replace(s, pattern, replacement):
+ """Replaces occurrences of a match string in a given
+ string and returns the new string. The match string
+ can be a regex expression.
+
+ Args:
+ s (str): the string to modify
+ pattern (str): the search expression
+ replacement (str): the string to replace each match with
+ """
+ # the replacement string may contain invalid backreferences (like \1 or \g)
+ # which will cause python's regex to blow up. Since this should emulate
+ # the jam version exactly and the jam version didn't support
+ # backreferences, this version shouldn't either. re.sub
+ # allows replacement to be a callable; this is being used
+ # to simply return the replacement string and avoid the hassle
+ # of worrying about backreferences within the string.
+ def _replacement(matchobj):
+ return replacement
+ return re.sub(pattern, _replacement, s)
+
+
+@bjam_signature((['items', '*'], ['match'], ['replacement']))
+def replace_list(items, match, replacement):
+ """Replaces occurrences of a match string in a given list of strings and returns
+ a list of new strings. The match string can be a regex expression.
+
+ Args:
+ items (list): the list of strings to modify.
+ match (str): the search expression.
+ replacement (str): the string to replace with.
+ """
+ return [replace(item, match, replacement) for item in items]
diff --git a/src/boost/tools/build/src/util/sequence.jam b/src/boost/tools/build/src/util/sequence.jam
new file mode 100644
index 000000000..ddfd069c7
--- /dev/null
+++ b/src/boost/tools/build/src/util/sequence.jam
@@ -0,0 +1,378 @@
+# Copyright 2001, 2002, 2003 Dave Abrahams
+# Copyright 2006 Rene Rivera
+# Copyright 2002, 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)
+
+import assert ;
+import numbers ;
+import modules ;
+
+
+# Note that algorithms in this module execute largely in the caller's module
+# namespace, so that local rules can be used as function objects. Also note that
+# most predicates can be multi-element lists. In that case, all but the first
+# element are prepended to the first argument which is passed to the rule named
+# by the first element.
+
+
+# Return the elements e of $(sequence) for which [ $(predicate) e ] has a
+# non-null value.
+#
+rule filter ( predicate + : sequence * )
+{
+ local caller = [ CALLER_MODULE ] ;
+ local result ;
+
+ for local e in $(sequence)
+ {
+ if [ modules.call-in $(caller) : $(predicate) $(e) ]
+ {
+ result += $(e) ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# Return a new sequence consisting of [ $(function) $(e) ] for each element e of
+# $(sequence).
+#
+rule transform ( function + : sequence * )
+{
+ local caller = [ CALLER_MODULE ] ;
+ local result ;
+
+ for local e in $(sequence)
+ {
+ result += [ modules.call-in $(caller) : $(function) $(e) ] ;
+ }
+ return $(result) ;
+}
+
+if [ HAS_NATIVE_RULE sequence : transform : 1 ]
+{
+ NATIVE_RULE sequence : transform ;
+}
+
+# Returns the elements of 's' in reverse order
+rule reverse ( s * )
+{
+ local r ;
+ for local x in $(s)
+ {
+ r = $(x) $(r) ;
+ }
+ return $(r) ;
+}
+
+
+rule less ( a b )
+{
+ if $(a) < $(b)
+ {
+ return true ;
+ }
+}
+
+
+# Insertion-sort s using the BinaryPredicate ordered.
+#
+rule insertion-sort ( s * : ordered * )
+{
+ if ! $(ordered)
+ {
+ return [ SORT $(s) ] ;
+ }
+ else
+ {
+ local caller = [ CALLER_MODULE ] ;
+ ordered ?= sequence.less ;
+ local result = $(s[1]) ;
+ if $(ordered) = sequence.less
+ {
+ local head tail ;
+ for local x in $(s[2-])
+ {
+ head = ;
+ tail = $(result) ;
+ while $(tail) && ( $(tail[1]) < $(x) )
+ {
+ head += $(tail[1]) ;
+ tail = $(tail[2-]) ;
+ }
+ result = $(head) $(x) $(tail) ;
+ }
+ }
+ else
+ {
+ for local x in $(s[2-])
+ {
+ local head tail ;
+ tail = $(result) ;
+ while $(tail) && [ modules.call-in $(caller) : $(ordered) $(tail[1]) $(x) ]
+ {
+ head += $(tail[1]) ;
+ tail = $(tail[2-]) ;
+ }
+ result = $(head) $(x) $(tail) ;
+ }
+ }
+
+ return $(result) ;
+ }
+}
+
+
+# Merge two ordered sequences using the BinaryPredicate ordered.
+#
+rule merge ( s1 * : s2 * : ordered * )
+{
+ ordered ?= sequence.less ;
+ local result__ ;
+ local caller = [ CALLER_MODULE ] ;
+
+ while $(s1) && $(s2)
+ {
+ if [ modules.call-in $(caller) : $(ordered) $(s1[1]) $(s2[1]) ]
+ {
+ result__ += $(s1[1]) ;
+ s1 = $(s1[2-]) ;
+ }
+ else if [ modules.call-in $(caller) : $(ordered) $(s2[1]) $(s1[1]) ]
+ {
+ result__ += $(s2[1]) ;
+ s2 = $(s2[2-]) ;
+ }
+ else
+ {
+ s2 = $(s2[2-]) ;
+ }
+
+ }
+ result__ += $(s1) ;
+ result__ += $(s2) ;
+
+ return $(result__) ;
+}
+
+# Compares two sequences lexicagraphically
+#
+rule compare ( s1 * : s2 * : ordered * )
+{
+ if ! $(ordered)
+ {
+ if $(s1) < $(s2)
+ {
+ return true ;
+ }
+ }
+ else
+ {
+ while true
+ {
+ if ! $(s2[1])-is-defined
+ {
+ return ;
+ }
+ else if ! $(s1[1])-is-defined
+ {
+ return true ;
+ }
+ else if [ $(ordered) $(s1[1]) $(s2[1]) ]
+ {
+ return true ;
+ }
+ else if [ $(ordered) $(s2[1]) $(s1[1]) ]
+ {
+ return ;
+ }
+ s1 = $(s1[2-]) ;
+ s2 = $(s2[2-]) ;
+ }
+ }
+}
+
+# Join the elements of s into one long string. If joint is supplied, it is used
+# as a separator.
+#
+rule join ( s * : joint ? )
+{
+ joint ?= "" ;
+ return $(s:J=$(joint)) ;
+}
+
+
+# Find the length of any sequence.
+#
+rule length ( s * )
+{
+ local result = 0 ;
+ for local i in $(s)
+ {
+ result = [ CALC $(result) + 1 ] ;
+ }
+ return $(result) ;
+}
+
+# Removes duplicates from 'list'. If 'stable' is
+# passed, then the order of the elements will
+# be unchanged.
+rule unique ( list * : stable ? )
+{
+ local result ;
+ local prev ;
+ if $(stable)
+ {
+ for local f in $(list)
+ {
+ if ! $(f) in $(result)
+ {
+ result += $(f) ;
+ }
+ }
+ }
+ else
+ {
+ for local i in [ SORT $(list) ]
+ {
+ if $(i) != $(prev)
+ {
+ result += $(i) ;
+ }
+ prev = $(i) ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# Returns the maximum number in 'elements'. Uses 'ordered' for comparisons or
+# 'numbers.less' if none is provided.
+#
+rule max-element ( elements + : ordered ? )
+{
+ ordered ?= numbers.less ;
+
+ local max = $(elements[1]) ;
+ for local e in $(elements[2-])
+ {
+ if [ $(ordered) $(max) $(e) ]
+ {
+ max = $(e) ;
+ }
+ }
+ return $(max) ;
+}
+
+
+# Returns all of 'elements' for which corresponding element in parallel list
+# 'rank' is equal to the maximum value in 'rank'.
+#
+rule select-highest-ranked ( elements * : ranks * )
+{
+ if $(elements)
+ {
+ local max-rank = [ max-element $(ranks) ] ;
+ local result ;
+ while $(elements)
+ {
+ if $(ranks[1]) = $(max-rank)
+ {
+ result += $(elements[1]) ;
+ }
+ elements = $(elements[2-]) ;
+ ranks = $(ranks[2-]) ;
+ }
+ return $(result) ;
+ }
+}
+NATIVE_RULE sequence : select-highest-ranked ;
+
+
+rule __test__ ( )
+{
+ # Use a unique module so we can test the use of local rules.
+ module sequence.__test__
+ {
+ import assert ;
+ import sequence ;
+
+ local rule is-even ( n )
+ {
+ if $(n) in 0 2 4 6 8
+ {
+ return true ;
+ }
+ }
+
+ assert.result 4 6 4 2 8 : sequence.filter is-even : 1 4 6 3 4 7 2 3 8 ;
+
+ # Test that argument binding works.
+ local rule is-equal-test ( x y )
+ {
+ if $(x) = $(y)
+ {
+ return true ;
+ }
+ }
+
+ assert.result 3 3 3 : sequence.filter is-equal-test 3 : 1 2 3 4 3 5 3 5 7 ;
+
+ local rule append-x ( n )
+ {
+ return $(n)x ;
+ }
+
+ assert.result 1x 2x 3x : sequence.transform append-x : 1 2 3 ;
+
+ local rule repeat2 ( x )
+ {
+ return $(x) $(x) ;
+ }
+
+ assert.result 1 1 2 2 3 3 : sequence.transform repeat2 : 1 2 3 ;
+
+ local rule test-greater ( a b )
+ {
+ if $(a) > $(b)
+ {
+ return true ;
+ }
+ }
+ assert.result 1 2 3 4 5 6 7 8 9 : sequence.insertion-sort 9 6 5 3 8 7 1 2 4 ;
+ assert.result 9 8 7 6 5 4 3 2 1 : sequence.insertion-sort 9 6 5 3 8 7 1 2 4 : test-greater ;
+ assert.result 1 2 3 4 5 6 : sequence.merge 1 3 5 : 2 4 6 ;
+ assert.result 6 5 4 3 2 1 : sequence.merge 5 3 1 : 6 4 2 : test-greater ;
+ assert.result 1 2 3 : sequence.merge 1 2 3 : ;
+ assert.result 1 : sequence.merge 1 : 1 ;
+
+ assert.result foo-bar-baz : sequence.join foo bar baz : - ;
+ assert.result substandard : sequence.join sub stan dard ;
+ assert.result 3.0.1 : sequence.join 3.0.1 : - ;
+
+ assert.result 0 : sequence.length ;
+ assert.result 3 : sequence.length a b c ;
+ assert.result 17 : sequence.length 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ;
+
+ assert.result 1 : sequence.length a ;
+ assert.result 10 : sequence.length a b c d e f g h i j ;
+ assert.result 11 : sequence.length a b c d e f g h i j k ;
+ assert.result 12 : sequence.length a b c d e f g h i j k l ;
+
+ local p2 = x ;
+ for local i in 1 2 3 4 5 6 7 8
+ {
+ p2 = $(p2) $(p2) ;
+ }
+ assert.result 256 : sequence.length $(p2) ;
+
+ assert.result 1 2 3 4 5 : sequence.unique 1 2 3 2 4 3 3 5 5 5 ;
+
+ assert.result 5 : sequence.max-element 1 3 5 0 4 ;
+
+ assert.result e-3 h-3 : sequence.select-highest-ranked e-1 e-3 h-3 m-2 : 1 3 3 2 ;
+
+ assert.result 7 6 5 4 3 2 1 : sequence.reverse 1 2 3 4 5 6 7 ;
+ }
+}
diff --git a/src/boost/tools/build/src/util/sequence.py b/src/boost/tools/build/src/util/sequence.py
new file mode 100644
index 000000000..b5dddbade
--- /dev/null
+++ b/src/boost/tools/build/src/util/sequence.py
@@ -0,0 +1,58 @@
+# (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 operator
+
+from b2.util import is_iterable
+
+
+def unique (values, stable=False):
+ assert is_iterable(values)
+ if stable:
+ s = set()
+ r = []
+ for v in values:
+ if not v in s:
+ r.append(v)
+ s.add(v)
+ return r
+ else:
+ return list(set(values))
+
+def max_element (elements, ordered = None):
+ """ Returns the maximum number in 'elements'. Uses 'ordered' for comparisons,
+ or '<' is none is provided.
+ """
+ assert is_iterable(elements)
+ assert callable(ordered) or ordered is None
+ if not ordered: ordered = operator.lt
+
+ max = elements [0]
+ for e in elements [1:]:
+ if ordered (max, e):
+ max = e
+
+ return max
+
+def select_highest_ranked (elements, ranks):
+ """ Returns all of 'elements' for which corresponding element in parallel
+ list 'rank' is equal to the maximum value in 'rank'.
+ """
+ assert is_iterable(elements)
+ assert is_iterable(ranks)
+ if not elements:
+ return []
+
+ max_rank = max_element (ranks)
+
+ result = []
+ while elements:
+ if ranks [0] == max_rank:
+ result.append (elements [0])
+
+ elements = elements [1:]
+ ranks = ranks [1:]
+
+ return result
diff --git a/src/boost/tools/build/src/util/set.jam b/src/boost/tools/build/src/util/set.jam
new file mode 100644
index 000000000..fc179134f
--- /dev/null
+++ b/src/boost/tools/build/src/util/set.jam
@@ -0,0 +1,93 @@
+# Copyright 2001, 2002 Dave Abrahams
+# 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)
+
+class set
+{
+ rule __init__ ( )
+ {
+ }
+
+ rule add ( elements * )
+ {
+ for local e in $(elements)
+ {
+ if ! $($(e))
+ {
+ $(e) = 1 ;
+ self.result += $(e) ;
+ }
+ }
+ }
+
+ rule contains ( element )
+ {
+ return $($(element)) ;
+ }
+
+ rule list ( )
+ {
+ return $(self.result) ;
+ }
+}
+
+
+
+# Returns the elements of set1 that are not in set2.
+#
+rule difference ( set1 * : set2 * )
+{
+ local result = ;
+ for local element in $(set1)
+ {
+ if ! ( $(element) in $(set2) )
+ {
+ result += $(element) ;
+ }
+ }
+ return $(result) ;
+}
+
+NATIVE_RULE set : difference ;
+
+
+# Removes all the items appearing in both set1 & set2.
+#
+rule intersection ( set1 * : set2 * )
+{
+ local result ;
+ for local v in $(set1)
+ {
+ if $(v) in $(set2)
+ {
+ result += $(v) ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# Returns whether set1 & set2 contain the same elements. Note that this ignores
+# any element ordering differences as well as any element duplication.
+#
+rule equal ( set1 * : set2 * )
+{
+ if $(set1) in $(set2) && ( $(set2) in $(set1) )
+ {
+ return true ;
+ }
+}
+
+
+rule __test__ ( )
+{
+ import assert ;
+
+ assert.result 0 1 4 6 8 9 : difference 0 1 2 3 4 5 6 7 8 9 : 2 3 5 7 ;
+ assert.result 2 5 7 : intersection 0 1 2 4 5 6 7 8 9 : 2 3 5 7 ;
+
+ assert.true equal : ;
+ assert.true equal 1 1 2 3 : 3 2 2 1 ;
+ assert.false equal 2 3 : 3 2 2 1 ;
+}
diff --git a/src/boost/tools/build/src/util/set.py b/src/boost/tools/build/src/util/set.py
new file mode 100644
index 000000000..98b1d17f5
--- /dev/null
+++ b/src/boost/tools/build/src/util/set.py
@@ -0,0 +1,48 @@
+# (C) Copyright David Abrahams 2001. 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.
+
+from b2.util import is_iterable
+from .utility import to_seq
+
+
+def difference (b, a):
+ """ Returns the elements of B that are not in A.
+ """
+ a = set(a)
+ result = []
+ for item in b:
+ if item not in a:
+ result.append(item)
+ return result
+
+def intersection (set1, set2):
+ """ Removes from set1 any items which don't appear in set2 and returns the result.
+ """
+ assert is_iterable(set1)
+ assert is_iterable(set2)
+ result = []
+ for v in set1:
+ if v in set2:
+ result.append (v)
+ return result
+
+def contains (small, large):
+ """ Returns true iff all elements of 'small' exist in 'large'.
+ """
+ small = to_seq (small)
+ large = to_seq (large)
+
+ for s in small:
+ if not s in large:
+ return False
+ return True
+
+def equal (a, b):
+ """ Returns True iff 'a' contains the same elements as 'b', irrespective of their order.
+ # TODO: Python 2.4 has a proper set class.
+ """
+ assert is_iterable(a)
+ assert is_iterable(b)
+ return contains (a, b) and contains (b, a)
diff --git a/src/boost/tools/build/src/util/string.jam b/src/boost/tools/build/src/util/string.jam
new file mode 100644
index 000000000..b7af7c2e4
--- /dev/null
+++ b/src/boost/tools/build/src/util/string.jam
@@ -0,0 +1,189 @@
+# Copyright 2002 Dave Abrahams
+# Copyright 2002, 2003 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)
+
+import regex ;
+
+
+# Characters considered whitespace, as a list.
+.whitespace-chars = " " " " "
+" ;
+
+# Characters considered whitespace, as a single string.
+.whitespace = $(.whitespace-chars:J="") ;
+
+
+# Returns the canonical set of whitespace characters, as a list.
+#
+rule whitespace-chars ( )
+{
+ return $(.whitespace-chars) ;
+}
+
+
+# Returns the canonical set of whitespace characters, as a single string.
+#
+rule whitespace ( )
+{
+ return $(.whitespace) ;
+}
+
+
+# Splits the given string into a list of strings composed of each character of
+# the string in sequence.
+#
+rule chars (
+ string # The string to split.
+ )
+{
+ local result ;
+ while $(string)
+ {
+ local s = [ MATCH (.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.*) : $(string) ] ;
+ string = $(s[9]) ;
+ result += $(s[1-8]) ;
+ }
+
+ # Trim off empty strings.
+ while $(result[1]) && ! $(result[-1])
+ {
+ result = $(result[1--2]) ;
+ }
+
+ return $(result) ;
+}
+
+
+# Apply a set of standard transformations to string to produce an abbreviation
+# no more than 5 characters long.
+#
+rule abbreviate ( string )
+{
+ local r = $(.abbreviated-$(string)) ;
+ if $(r)
+ {
+ return $(r) ;
+ }
+ # Anything less than 4 characters gets no abbreviation.
+ else if ! [ MATCH (....) : $(string) ]
+ {
+ .abbreviated-$(string) = $(string) ;
+ return $(string) ;
+ }
+ else
+ {
+ # Separate the initial letter in case it's a vowel.
+ local s1 = [ MATCH ^(.)(.*) : $(string) ] ;
+
+ # Drop trailing "ing".
+ local s2 = [ MATCH ^(.*)ing$ : $(s1[2]) ] ;
+ s2 ?= $(s1[2]) ;
+
+ # Reduce all doubled characters to one.
+ local last = "" ;
+ for local c in [ chars $(s2) ]
+ {
+ if $(c) != $(last)
+ {
+ r += $(c) ;
+ last = $(c) ;
+ }
+ }
+ s2 = $(r:J="") ;
+
+ # Chop all vowels out of the remainder.
+ s2 = [ regex.replace $(s2) "[AEIOUaeiou]" "" ] ;
+
+ # Shorten remaining consonants to 4 characters.
+ s2 = [ MATCH ^(.?.?.?.?) : $(s2) ] ;
+
+ # Glue the initial character back on to the front.
+ s2 = $(s1[1])$(s2) ;
+
+ .abbreviated-$(string) = $(s2) ;
+ return $(s2) ;
+ }
+}
+
+
+# Concatenates the given strings, inserting the given separator between each
+# string.
+#
+rule join (
+ strings * # The strings to join.
+ : separator ? # The optional separator.
+ )
+{
+ separator ?= "" ;
+ return $(strings:J=$(separator)) ;
+}
+
+
+# Split a string into whitespace separated words.
+#
+rule words (
+ string # The string to split.
+ : whitespace * # Optional, characters to consider as whitespace.
+ )
+{
+ whitespace = $(whitespace:J="") ;
+ whitespace ?= $(.whitespace) ;
+ local w = ;
+ while $(string)
+ {
+ string = [ MATCH "^[$(whitespace)]*([^$(whitespace)]*)(.*)" : $(string) ] ;
+ if $(string[1]) && $(string[1]) != ""
+ {
+ w += $(string[1]) ;
+ }
+ string = $(string[2]) ;
+ }
+ return $(w) ;
+}
+
+
+# Check that the given string is composed entirely of whitespace.
+#
+rule is-whitespace (
+ string ? # The string to test.
+ )
+{
+ if ! $(string) { return true ; }
+ else if $(string) = "" { return true ; }
+ else if [ MATCH "^([$(.whitespace)]+)$" : $(string) ] { return true ; }
+ else { return ; }
+}
+
+rule __test__ ( )
+{
+ import assert ;
+ assert.result a b c : chars abc ;
+
+ assert.result rntm : abbreviate runtime ;
+ assert.result ovrld : abbreviate overload ;
+ assert.result dbg : abbreviate debugging ;
+ assert.result async : abbreviate asynchronous ;
+ assert.result pop : abbreviate pop ;
+ assert.result aaa : abbreviate aaa ;
+ assert.result qck : abbreviate quack ;
+ assert.result sttc : abbreviate static ;
+
+ # Check boundary cases.
+ assert.result a : chars a ;
+ assert.result : chars "" ;
+ assert.result a b c d e f g h : chars abcdefgh ;
+ assert.result a b c d e f g h i : chars abcdefghi ;
+ assert.result a b c d e f g h i j : chars abcdefghij ;
+ assert.result a b c d e f g h i j k : chars abcdefghijk ;
+
+ assert.result a//b/c/d : join a "" b c d : / ;
+ assert.result abcd : join a "" b c d ;
+
+ assert.result a b c : words "a b c" ;
+
+ assert.true is-whitespace " " ;
+ assert.false is-whitespace " a b c " ;
+ assert.true is-whitespace "" ;
+ assert.true is-whitespace ;
+}
diff --git a/src/boost/tools/build/src/util/utility.jam b/src/boost/tools/build/src/util/utility.jam
new file mode 100644
index 000000000..d2cdb004f
--- /dev/null
+++ b/src/boost/tools/build/src/util/utility.jam
@@ -0,0 +1,235 @@
+# Copyright 2001, 2002 Dave Abrahams
+# Copyright 2002, 2003, 2004, 2005 Vladimir Prus
+# Copyright 2008 Jurko Gospodnetic
+# 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 "class" : is-instance ;
+
+
+# For all elements of 'list' which do not already have 'suffix', add 'suffix'.
+#
+rule apply-default-suffix ( suffix : list * )
+{
+ local result ;
+ for local i in $(list)
+ {
+ if $(i:S) = $(suffix)
+ {
+ result += $(i) ;
+ }
+ else
+ {
+ result += $(i)$(suffix) ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# If 'name' contains a dot, returns the part before the last dot. If 'name'
+# contains no dot, returns it unmodified.
+#
+rule basename ( name )
+{
+ if $(name:S)
+ {
+ name = $(name:B) ;
+ }
+ return $(name) ;
+}
+
+
+# Return the file of the caller of the rule that called caller-file.
+#
+rule caller-file ( )
+{
+ local bt = [ BACKTRACE ] ;
+ return $(bt[9]) ;
+}
+
+
+# Tests if 'a' is equal to 'b'. If 'a' is a class instance, calls its 'equal'
+# method. Uses ordinary jam's comparison otherwise.
+#
+rule equal ( a b )
+{
+ if [ is-instance $(a) ]
+ {
+ return [ $(a).equal $(b) ] ;
+ }
+ else
+ {
+ if $(a) = $(b)
+ {
+ return true ;
+ }
+ }
+}
+
+
+# Tests if 'a' is less than 'b'. If 'a' is a class instance, calls its 'less'
+# method. Uses ordinary jam's comparison otherwise.
+#
+rule less ( a b )
+{
+ if [ is-instance $(a) ]
+ {
+ return [ $(a).less $(b) ] ;
+ }
+ else
+ {
+ if $(a) < $(b)
+ {
+ return true ;
+ }
+ }
+}
+
+
+# Returns the textual representation of argument. If it is a class instance,
+# class its 'str' method. Otherwise, returns the argument.
+#
+rule str ( value )
+{
+ if [ is-instance $(value) ]
+ {
+ return [ $(value).str ] ;
+ }
+ else
+ {
+ return $(value) ;
+ }
+}
+
+
+# Accepts a list of gristed values and returns them ungristed. Reports an error
+# in case any of the passed parameters is not gristed, i.e. surrounded in angle
+# brackets < and >.
+#
+rule ungrist ( names * )
+{
+ local result ;
+ for local name in $(names)
+ {
+ local stripped = [ MATCH ^<(.*)>$ : $(name) ] ;
+ if ! $(stripped)-defined
+ {
+ import errors ;
+ local quoted-names = \"$(names)\" ;
+ errors.error "in" ungrist "$(quoted-names:J= ):" \"$(name)\" is not
+ of the form <.*> ;
+ }
+ result += $(stripped) ;
+ }
+ return $(result) ;
+}
+
+
+# If the passed value is quoted, unquotes it. Otherwise returns the value
+# unchanged.
+#
+rule unquote ( value ? )
+{
+ local match-result = [ MATCH ^(\")(.*)(\")$ : $(value) ] ;
+ if $(match-result)
+ {
+ return $(match-result[2]) ;
+ }
+ else
+ {
+ return $(value) ;
+ }
+}
+
+
+rule __test__ ( )
+{
+ import assert ;
+ import "class" : new ;
+ import errors : try catch ;
+
+ assert.result 123 : str 123 ;
+
+ class test-class__
+ {
+ rule __init__ ( ) { }
+ rule str ( ) { return "str-test-class" ; }
+ rule less ( a ) { return "yes, of course!" ; }
+ rule equal ( a ) { return "not sure" ; }
+ }
+
+ assert.result "str-test-class" : str [ new test-class__ ] ;
+ assert.true less 1 2 ;
+ assert.false less 2 1 ;
+ assert.result "yes, of course!" : less [ new test-class__ ] 1 ;
+ assert.true equal 1 1 ;
+ assert.false equal 1 2 ;
+ assert.result "not sure" : equal [ new test-class__ ] 1 ;
+
+ assert.result foo.lib foo.lib : apply-default-suffix .lib : foo.lib foo.lib
+ ;
+
+ assert.result foo : basename foo ;
+ assert.result foo : basename foo.so ;
+ assert.result foo.so : basename foo.so.1 ;
+
+ assert.result : unquote ;
+ assert.result "" : unquote "" ;
+ assert.result "" : unquote \"\" ;
+ assert.result \" : unquote \"\"\" ;
+ assert.result \"\" : unquote \"\"\"\" ;
+ assert.result foo : unquote foo ;
+ assert.result \"foo : unquote \"foo ;
+ assert.result foo\" : unquote foo\" ;
+ assert.result foo : unquote \"foo\" ;
+ assert.result \"foo\" : unquote \"\"foo\"\" ;
+
+ assert.result : ungrist ;
+ assert.result "" : ungrist <> ;
+ assert.result foo : ungrist <foo> ;
+ assert.result <foo> : ungrist <<foo>> ;
+ assert.result foo bar : ungrist <foo> <bar> ;
+
+ try ;
+ {
+ ungrist "" ;
+ }
+ catch "in" ungrist "\"\":" \"\" is not of the form <.*> ;
+
+ try ;
+ {
+ ungrist foo ;
+ }
+ catch "in" ungrist "\"foo\":" \"foo\" is not of the form <.*> ;
+
+ try ;
+ {
+ ungrist <foo ;
+ }
+ catch "in" ungrist "\"<foo\":" \"<foo\" is not of the form <.*> ;
+
+ try ;
+ {
+ ungrist foo> ;
+ }
+ catch "in" ungrist "\"foo>\":" \"foo>\" is not of the form <.*> ;
+
+ try ;
+ {
+ ungrist foo bar ;
+ }
+ catch "in" ungrist "\"foo\" "\"bar\"":" \"foo\" is not of the form <.*> ;
+
+ try ;
+ {
+ ungrist foo <bar> ;
+ }
+ catch "in" ungrist "\"foo\" "\"<bar>\"":" \"foo\" is not of the form <.*> ;
+
+ try ;
+ {
+ ungrist <foo> bar ;
+ }
+ catch "in" ungrist "\"<foo>\" "\"bar\"":" \"bar\" is not of the form <.*> ;
+}
diff --git a/src/boost/tools/build/src/util/utility.py b/src/boost/tools/build/src/util/utility.py
new file mode 100644
index 000000000..ded3e5bcd
--- /dev/null
+++ b/src/boost/tools/build/src/util/utility.py
@@ -0,0 +1,176 @@
+# (C) Copyright David Abrahams 2001. 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.
+
+""" Utility functions to add/remove/get grists.
+ Grists are string enclosed in angle brackets (<>) that are used as prefixes. See Jam for more information.
+"""
+
+import re
+import os
+import bjam
+from b2.exceptions import *
+from b2.util import is_iterable_typed
+
+__re_grist_and_value = re.compile (r'(<[^>]*>)(.*)')
+__re_grist_content = re.compile ('^<(.*)>$')
+__re_backslash = re.compile (r'\\')
+
+def to_seq (value):
+ """ If value is a sequence, returns it.
+ If it is a string, returns a sequence with value as its sole element.
+ """
+ if not value:
+ return []
+
+ if isinstance (value, str):
+ return [value]
+
+ else:
+ return value
+
+def replace_references_by_objects (manager, refs):
+ objs = []
+ for r in refs:
+ objs.append (manager.get_object (r))
+ return objs
+
+def add_grist (features):
+ """ Transform a string by bracketing it with "<>". If already bracketed, does nothing.
+ features: one string or a sequence of strings
+ return: the gristed string, if features is a string, or a sequence of gristed strings, if features is a sequence
+ """
+ assert is_iterable_typed(features, basestring) or isinstance(features, basestring)
+ def grist_one (feature):
+ if feature [0] != '<' and feature [len (feature) - 1] != '>':
+ return '<' + feature + '>'
+ else:
+ return feature
+
+ if isinstance (features, str):
+ return grist_one (features)
+ else:
+ return [ grist_one (feature) for feature in features ]
+
+def replace_grist (features, new_grist):
+ """ Replaces the grist of a string by a new one.
+ Returns the string with the new grist.
+ """
+ assert is_iterable_typed(features, basestring) or isinstance(features, basestring)
+ assert isinstance(new_grist, basestring)
+ # this function is used a lot in the build phase and the original implementation
+ # was extremely slow; thus some of the weird-looking optimizations for this function.
+ single_item = False
+ if isinstance(features, str):
+ features = [features]
+ single_item = True
+
+ result = []
+ for feature in features:
+ # '<feature>value' -> ('<feature', '>', 'value')
+ # 'something' -> ('something', '', '')
+ # '<toolset>msvc/<feature>value' -> ('<toolset', '>', 'msvc/<feature>value')
+ grist, split, value = feature.partition('>')
+ # if a partition didn't occur, then grist is just 'something'
+ # set the value to be the grist
+ if not value and not split:
+ value = grist
+ result.append(new_grist + value)
+
+ if single_item:
+ return result[0]
+ return result
+
+def get_value (property):
+ """ Gets the value of a property, that is, the part following the grist, if any.
+ """
+ assert is_iterable_typed(property, basestring) or isinstance(property, basestring)
+ return replace_grist (property, '')
+
+def get_grist (value):
+ """ Returns the grist of a string.
+ If value is a sequence, does it for every value and returns the result as a sequence.
+ """
+ assert is_iterable_typed(value, basestring) or isinstance(value, basestring)
+ def get_grist_one (name):
+ split = __re_grist_and_value.match (name)
+ if not split:
+ return ''
+ else:
+ return split.group (1)
+
+ if isinstance (value, str):
+ return get_grist_one (value)
+ else:
+ return [ get_grist_one (v) for v in value ]
+
+def ungrist (value):
+ """ Returns the value without grist.
+ If value is a sequence, does it for every value and returns the result as a sequence.
+ """
+ assert is_iterable_typed(value, basestring) or isinstance(value, basestring)
+ def ungrist_one (value):
+ stripped = __re_grist_content.match (value)
+ if not stripped:
+ raise BaseException ("in ungrist: '%s' is not of the form <.*>" % value)
+
+ return stripped.group (1)
+
+ if isinstance (value, str):
+ return ungrist_one (value)
+ else:
+ return [ ungrist_one (v) for v in value ]
+
+def replace_suffix (name, new_suffix):
+ """ Replaces the suffix of name by new_suffix.
+ If no suffix exists, the new one is added.
+ """
+ assert isinstance(name, basestring)
+ assert isinstance(new_suffix, basestring)
+ split = os.path.splitext (name)
+ return split [0] + new_suffix
+
+def forward_slashes (s):
+ """ Converts all backslashes to forward slashes.
+ """
+ assert isinstance(s, basestring)
+ return s.replace('\\', '/')
+
+
+def split_action_id (id):
+ """ Splits an id in the toolset and specific rule parts. E.g.
+ 'gcc.compile.c++' returns ('gcc', 'compile.c++')
+ """
+ assert isinstance(id, basestring)
+ split = id.split ('.', 1)
+ toolset = split [0]
+ name = ''
+ if len (split) > 1:
+ name = split [1]
+ return (toolset, name)
+
+def os_name ():
+ result = bjam.variable("OS")
+ assert(len(result) == 1)
+ return result[0]
+
+def platform ():
+ return bjam.variable("OSPLAT")
+
+def os_version ():
+ return bjam.variable("OSVER")
+
+def on_windows ():
+ """ Returns true if running on windows, whether in cygwin or not.
+ """
+ if bjam.variable("NT"):
+ return True
+
+ elif bjam.variable("UNIX"):
+
+ uname = bjam.variable("JAMUNAME")
+ if uname and uname[0].startswith("CYGWIN"):
+ return True
+
+ return False
diff --git a/src/boost/tools/build/test/BoostBuild.py b/src/boost/tools/build/test/BoostBuild.py
new file mode 100644
index 000000000..209fba3bd
--- /dev/null
+++ b/src/boost/tools/build/test/BoostBuild.py
@@ -0,0 +1,1353 @@
+# Copyright 2002-2005 Vladimir Prus.
+# Copyright 2002-2003 Dave Abrahams.
+# Copyright 2006 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)
+
+from __future__ import print_function
+
+import TestCmd
+
+import copy
+import fnmatch
+import glob
+import math
+import os
+import os.path
+import re
+import shutil
+try:
+ from StringIO import StringIO
+except:
+ from io import StringIO
+import subprocess
+import sys
+import tempfile
+import time
+import traceback
+import tree
+import types
+
+from xml.sax.saxutils import escape
+
+try:
+ from functools import reduce
+except:
+ pass
+
+
+def isstr(data):
+ return isinstance(data, (type(''), type(u'')))
+
+
+class TestEnvironmentError(Exception):
+ pass
+
+
+annotations = []
+
+
+def print_annotation(name, value, xml):
+ """Writes some named bits of information about the current test run."""
+ if xml:
+ print(escape(name) + " {{{")
+ print(escape(value))
+ print("}}}")
+ else:
+ print(name + " {{{")
+ print(value)
+ print("}}}")
+
+
+def flush_annotations(xml=0):
+ global annotations
+ for ann in annotations:
+ print_annotation(ann[0], ann[1], xml)
+ annotations = []
+
+
+def clear_annotations():
+ global annotations
+ annotations = []
+
+
+defer_annotations = 0
+
+def set_defer_annotations(n):
+ global defer_annotations
+ defer_annotations = n
+
+
+def annotate_stack_trace(tb=None):
+ if tb:
+ trace = TestCmd.caller(traceback.extract_tb(tb), 0)
+ else:
+ trace = TestCmd.caller(traceback.extract_stack(), 1)
+ annotation("stacktrace", trace)
+
+
+def annotation(name, value):
+ """Records an annotation about the test run."""
+ annotations.append((name, value))
+ if not defer_annotations:
+ flush_annotations()
+
+
+def get_toolset():
+ toolset = None
+ for arg in sys.argv[1:]:
+ if not arg.startswith("-"):
+ toolset = arg
+ return toolset or "gcc"
+
+
+# Detect the host OS.
+cygwin = hasattr(os, "uname") and os.uname()[0].lower().startswith("cygwin")
+windows = cygwin or os.environ.get("OS", "").lower().startswith("windows")
+
+if cygwin:
+ default_os = "cygwin"
+elif windows:
+ default_os = "windows"
+elif hasattr(os, "uname"):
+ default_os = os.uname()[0].lower()
+
+def prepare_prefixes_and_suffixes(toolset, target_os=default_os):
+ ind = toolset.find('-')
+ if ind == -1:
+ rtoolset = toolset
+ else:
+ rtoolset = toolset[:ind]
+ prepare_suffix_map(rtoolset, target_os)
+ prepare_library_prefix(rtoolset, target_os)
+
+
+def prepare_suffix_map(toolset, target_os=default_os):
+ """
+ Set up suffix translation performed by the Boost Build testing framework
+ to accommodate different toolsets generating targets of the same type using
+ different filename extensions (suffixes).
+
+ """
+ global suffixes
+ suffixes = {}
+ if target_os == "cygwin":
+ suffixes[".lib"] = ".a"
+ suffixes[".obj"] = ".o"
+ suffixes[".implib"] = ".lib.a"
+ elif target_os == "windows":
+ if toolset == "gcc":
+ # MinGW
+ suffixes[".lib"] = ".a"
+ suffixes[".obj"] = ".o"
+ suffixes[".implib"] = ".dll.a"
+ else:
+ # Everything else Windows
+ suffixes[".implib"] = ".lib"
+ else:
+ suffixes[".exe"] = ""
+ suffixes[".dll"] = ".so"
+ suffixes[".lib"] = ".a"
+ suffixes[".obj"] = ".o"
+ suffixes[".implib"] = ".no_implib_files_on_this_platform"
+
+ if target_os == "darwin":
+ suffixes[".dll"] = ".dylib"
+
+
+def prepare_library_prefix(toolset, target_os=default_os):
+ """
+ Setup whether Boost Build is expected to automatically prepend prefixes
+ to its built library targets.
+
+ """
+ global lib_prefix
+ lib_prefix = "lib"
+
+ global dll_prefix
+ if target_os == "cygwin":
+ dll_prefix = "cyg"
+ elif target_os == "windows" and toolset != "gcc":
+ dll_prefix = None
+ else:
+ dll_prefix = "lib"
+
+
+def re_remove(sequence, regex):
+ me = re.compile(regex)
+ result = list(filter(lambda x: me.match(x), sequence))
+ if not result:
+ raise ValueError()
+ for r in result:
+ sequence.remove(r)
+
+
+def glob_remove(sequence, pattern):
+ result = list(fnmatch.filter(sequence, pattern))
+ if not result:
+ raise ValueError()
+ for r in result:
+ sequence.remove(r)
+
+
+class Tester(TestCmd.TestCmd):
+ """Main tester class for Boost Build.
+
+ Optional arguments:
+
+ `arguments` - Arguments passed to the run executable.
+ `executable` - Name of the executable to invoke.
+ `match` - Function to use for compating actual and
+ expected file contents.
+ `boost_build_path` - Boost build path to be passed to the run
+ executable.
+ `translate_suffixes` - Whether to update suffixes on the the file
+ names passed from the test script so they
+ match those actually created by the current
+ toolset. For example, static library files
+ are specified by using the .lib suffix but
+ when the "gcc" toolset is used it actually
+ creates them using the .a suffix.
+ `pass_toolset` - Whether the test system should pass the
+ specified toolset to the run executable.
+ `use_test_config` - Whether the test system should tell the run
+ executable to read in the test_config.jam
+ configuration file.
+ `ignore_toolset_requirements` - Whether the test system should tell the run
+ executable to ignore toolset requirements.
+ `workdir` - Absolute directory where the test will be
+ run from.
+ `pass_d0` - If set, when tests are not explicitly run
+ in verbose mode, they are run as silent
+ (-d0 & --quiet Boost Jam options).
+
+ Optional arguments inherited from the base class:
+
+ `description` - Test description string displayed in case
+ of a failed test.
+ `subdir` - List of subdirectories to automatically
+ create under the working directory. Each
+ subdirectory needs to be specified
+ separately, parent coming before its child.
+ `verbose` - Flag that may be used to enable more
+ verbose test system output. Note that it
+ does not also enable more verbose build
+ system output like the --verbose command
+ line option does.
+ """
+ def __init__(self, arguments=None, executable="b2",
+ match=TestCmd.match_exact, boost_build_path=None,
+ translate_suffixes=True, pass_toolset=True, use_test_config=True,
+ ignore_toolset_requirements=False, workdir="", pass_d0=False,
+ **keywords):
+
+ assert arguments.__class__ is not str
+ self.original_workdir = os.path.dirname(__file__)
+ if workdir and not os.path.isabs(workdir):
+ raise ("Parameter workdir <%s> must point to an absolute "
+ "directory: " % workdir)
+
+ self.last_build_timestamp = 0
+ self.translate_suffixes = translate_suffixes
+ self.use_test_config = use_test_config
+
+ self.toolset = get_toolset()
+ self.pass_toolset = pass_toolset
+ self.ignore_toolset_requirements = ignore_toolset_requirements
+
+ prepare_prefixes_and_suffixes(pass_toolset and self.toolset or "gcc")
+
+ use_default_bjam = "--default-bjam" in sys.argv
+
+ if not use_default_bjam:
+ jam_build_dir = ""
+
+ # Find where jam_src is located. Try for the debug version if it is
+ # lying around.
+ srcdir = os.path.join(os.path.dirname(__file__), "..", "src")
+ dirs = [os.path.join(srcdir, "engine", jam_build_dir + ".debug"),
+ os.path.join(srcdir, "engine", jam_build_dir)]
+ for d in dirs:
+ if os.path.exists(d):
+ jam_build_dir = d
+ break
+ else:
+ print("Cannot find built Boost.Jam")
+ sys.exit(1)
+
+ verbosity = ["-d0", "--quiet"]
+ if not pass_d0:
+ verbosity = []
+ if "--verbose" in sys.argv:
+ keywords["verbose"] = True
+ verbosity = ["-d2"]
+ self.verbosity = verbosity
+
+ if boost_build_path is None:
+ boost_build_path = self.original_workdir + "/.."
+
+ program_list = []
+ if use_default_bjam:
+ program_list.append(executable)
+ else:
+ program_list.append(os.path.join(jam_build_dir, executable))
+ program_list.append('-sBOOST_BUILD_PATH="' + boost_build_path + '"')
+ if arguments:
+ program_list += arguments
+
+ TestCmd.TestCmd.__init__(self, program=program_list, match=match,
+ workdir=workdir, inpath=use_default_bjam, **keywords)
+
+ os.chdir(self.workdir)
+
+ def cleanup(self):
+ try:
+ TestCmd.TestCmd.cleanup(self)
+ os.chdir(self.original_workdir)
+ except AttributeError:
+ # When this is called during TestCmd.TestCmd.__del__ we can have
+ # both 'TestCmd' and 'os' unavailable in our scope. Do nothing in
+ # this case.
+ pass
+
+ def set_toolset(self, toolset, target_os=default_os):
+ self.toolset = toolset
+ self.pass_toolset = True
+ prepare_prefixes_and_suffixes(toolset, target_os)
+
+
+ #
+ # Methods that change the working directory's content.
+ #
+ def set_tree(self, tree_location):
+ # It is not possible to remove the current directory.
+ d = os.getcwd()
+ os.chdir(os.path.dirname(self.workdir))
+ shutil.rmtree(self.workdir, ignore_errors=False)
+
+ if not os.path.isabs(tree_location):
+ tree_location = os.path.join(self.original_workdir, tree_location)
+ shutil.copytree(tree_location, self.workdir)
+
+ os.chdir(d)
+ def make_writable(unused, dir, entries):
+ for e in entries:
+ name = os.path.join(dir, e)
+ os.chmod(name, os.stat(name).st_mode | 0o222)
+ for root, _, files in os.walk("."):
+ make_writable(None, root, files)
+
+ def write(self, file, content, wait=True):
+ nfile = self.native_file_name(file)
+ self.__makedirs(os.path.dirname(nfile), wait)
+ if not type(content) == bytes:
+ content = content.encode()
+ f = open(nfile, "wb")
+ try:
+ f.write(content)
+ finally:
+ f.close()
+ self.__ensure_newer_than_last_build(nfile)
+
+ def copy(self, src, dst):
+ try:
+ self.write(dst, self.read(src, binary=True))
+ except:
+ self.fail_test(1)
+
+ def copy_preserving_timestamp(self, src, dst):
+ src_name = self.native_file_name(src)
+ dst_name = self.native_file_name(dst)
+ stats = os.stat(src_name)
+ self.write(dst, self.__read(src, binary=True))
+ os.utime(dst_name, (stats.st_atime, stats.st_mtime))
+
+ def touch(self, names, wait=True):
+ if isstr(names):
+ names = [names]
+ for name in names:
+ path = self.native_file_name(name)
+ if wait:
+ self.__ensure_newer_than_last_build(path)
+ else:
+ os.utime(path, None)
+
+ def rm(self, names):
+ if not type(names) == list:
+ names = [names]
+
+ if names == ["."]:
+ # If we are deleting the entire workspace, there is no need to wait
+ # for a clock tick.
+ self.last_build_timestamp = 0
+
+ # Avoid attempts to remove the current directory.
+ os.chdir(self.original_workdir)
+ for name in names:
+ n = glob.glob(self.native_file_name(name))
+ if n: n = n[0]
+ if not n:
+ n = self.glob_file(name.replace("$toolset", self.toolset + "*")
+ )
+ if n:
+ if os.path.isdir(n):
+ shutil.rmtree(n, ignore_errors=False)
+ else:
+ os.unlink(n)
+
+ # Create working dir root again in case we removed it.
+ if not os.path.exists(self.workdir):
+ os.mkdir(self.workdir)
+ os.chdir(self.workdir)
+
+ def expand_toolset(self, name):
+ """
+ Expands $toolset placeholder in the given file to the name of the
+ toolset currently being tested.
+
+ """
+ self.write(name, self.read(name).replace("$toolset", self.toolset))
+
+ def dump_stdio(self):
+ annotation("STDOUT", self.stdout())
+ annotation("STDERR", self.stderr())
+
+ def run_build_system(self, extra_args=None, subdir="", stdout=None,
+ stderr="", status=0, match=None, pass_toolset=None,
+ use_test_config=None, ignore_toolset_requirements=None,
+ expected_duration=None, **kw):
+
+ assert extra_args.__class__ is not str
+
+ if os.path.isabs(subdir):
+ print("You must pass a relative directory to subdir <%s>." % subdir
+ )
+ return
+
+ self.previous_tree, dummy = tree.build_tree(self.workdir)
+ self.wait_for_time_change_since_last_build()
+
+ if match is None:
+ match = self.match
+
+ if pass_toolset is None:
+ pass_toolset = self.pass_toolset
+
+ if use_test_config is None:
+ use_test_config = self.use_test_config
+
+ if ignore_toolset_requirements is None:
+ ignore_toolset_requirements = self.ignore_toolset_requirements
+
+ try:
+ kw["program"] = []
+ kw["program"] += self.program
+ if extra_args:
+ kw["program"] += extra_args
+ if not extra_args or not any(a.startswith("-j") for a in extra_args):
+ kw["program"] += ["-j1"]
+ if stdout is None and not any(a.startswith("-d") for a in kw["program"]):
+ kw["program"] += self.verbosity
+ if pass_toolset:
+ kw["program"].append("toolset=" + self.toolset)
+ if use_test_config:
+ kw["program"].append('--test-config="%s"' % os.path.join(
+ self.original_workdir, "test-config.jam"))
+ if ignore_toolset_requirements:
+ kw["program"].append("--ignore-toolset-requirements")
+ if "--python" in sys.argv:
+ # -z disables Python optimization mode.
+ # this enables type checking (all assert
+ # and if __debug__ statements).
+ kw["program"].extend(["--python", "-z"])
+ if "--stacktrace" in sys.argv:
+ kw["program"].append("--stacktrace")
+ kw["chdir"] = subdir
+ self.last_program_invocation = kw["program"]
+ build_time_start = time.time()
+ TestCmd.TestCmd.run(self, **kw)
+ build_time_finish = time.time()
+ except:
+ self.dump_stdio()
+ raise
+
+ old_last_build_timestamp = self.last_build_timestamp
+ self.tree, self.last_build_timestamp = tree.build_tree(self.workdir)
+ self.difference = tree.tree_difference(self.previous_tree, self.tree)
+ if self.difference.empty():
+ # If nothing has been changed by this build and sufficient time has
+ # passed since the last build that actually changed something,
+ # there is no need to wait for touched or newly created files to
+ # start getting newer timestamps than the currently existing ones.
+ self.last_build_timestamp = old_last_build_timestamp
+
+ self.difference.ignore_directories()
+ self.unexpected_difference = copy.deepcopy(self.difference)
+
+ if (status and self.status) is not None and self.status != status:
+ expect = ""
+ if status != 0:
+ expect = " (expected %d)" % status
+
+ annotation("failure", '"%s" returned %d%s' % (kw["program"],
+ self.status, expect))
+
+ annotation("reason", "unexpected status returned by bjam")
+ self.fail_test(1)
+
+ if stdout is not None and not match(self.stdout(), stdout):
+ stdout_test = match(self.stdout(), stdout)
+ annotation("failure", "Unexpected stdout")
+ annotation("Expected STDOUT", stdout)
+ annotation("Actual STDOUT", self.stdout())
+ stderr = self.stderr()
+ if stderr:
+ annotation("STDERR", stderr)
+ self.maybe_do_diff(self.stdout(), stdout, stdout_test)
+ self.fail_test(1, dump_stdio=False)
+
+ # Intel tends to produce some messages to stderr which make tests fail.
+ intel_workaround = re.compile("^xi(link|lib): executing.*\n", re.M)
+ actual_stderr = re.sub(intel_workaround, "", self.stderr())
+
+ if stderr is not None and not match(actual_stderr, stderr):
+ stderr_test = match(actual_stderr, stderr)
+ annotation("failure", "Unexpected stderr")
+ annotation("Expected STDERR", stderr)
+ annotation("Actual STDERR", self.stderr())
+ annotation("STDOUT", self.stdout())
+ self.maybe_do_diff(actual_stderr, stderr, stderr_test)
+ self.fail_test(1, dump_stdio=False)
+
+ if expected_duration is not None:
+ actual_duration = build_time_finish - build_time_start
+ if actual_duration > expected_duration:
+ print("Test run lasted %f seconds while it was expected to "
+ "finish in under %f seconds." % (actual_duration,
+ expected_duration))
+ self.fail_test(1, dump_stdio=False)
+
+ self.__ignore_junk()
+
+ def glob_file(self, name):
+ name = self.adjust_name(name)
+ result = None
+ if hasattr(self, "difference"):
+ for f in (self.difference.added_files +
+ self.difference.modified_files +
+ self.difference.touched_files):
+ if fnmatch.fnmatch(f, name):
+ result = self.__native_file_name(f)
+ break
+ if not result:
+ result = glob.glob(self.__native_file_name(name))
+ if result:
+ result = result[0]
+ return result
+
+ def __read(self, name, binary=False):
+ try:
+ openMode = "r"
+ if binary:
+ openMode += "b"
+ else:
+ openMode += "U"
+ f = open(name, openMode)
+ result = f.read()
+ f.close()
+ return result
+ except:
+ annotation("failure", "Could not open '%s'" % name)
+ self.fail_test(1)
+ return ""
+
+ def read(self, name, binary=False):
+ name = self.glob_file(name)
+ return self.__read(name, binary=binary)
+
+ def read_and_strip(self, name):
+ if not self.glob_file(name):
+ return ""
+ f = open(self.glob_file(name), "rb")
+ lines = f.readlines()
+ f.close()
+ result = "\n".join(x.decode().rstrip() for x in lines)
+ if lines and lines[-1][-1] != "\n":
+ return result + "\n"
+ return result
+
+ def fail_test(self, condition, dump_difference=True, dump_stdio=True,
+ dump_stack=True):
+ if not condition:
+ return
+
+ if dump_difference and hasattr(self, "difference"):
+ f = StringIO()
+ self.difference.pprint(f)
+ annotation("changes caused by the last build command",
+ f.getvalue())
+
+ if dump_stdio:
+ self.dump_stdio()
+
+ if "--preserve" in sys.argv:
+ print()
+ print("*** Copying the state of working dir into 'failed_test' ***")
+ print()
+ path = os.path.join(self.original_workdir, "failed_test")
+ if os.path.isdir(path):
+ shutil.rmtree(path, ignore_errors=False)
+ elif os.path.exists(path):
+ raise "Path " + path + " already exists and is not a directory"
+ shutil.copytree(self.workdir, path)
+ print("The failed command was:")
+ print(" ".join(self.last_program_invocation))
+
+ if dump_stack:
+ annotate_stack_trace()
+ sys.exit(1)
+
+ # A number of methods below check expectations with actual difference
+ # between directory trees before and after a build. All the 'expect*'
+ # methods require exact names to be passed. All the 'ignore*' methods allow
+ # wildcards.
+
+ # All names can be either a string or a list of strings.
+ def expect_addition(self, names):
+ for name in self.adjust_names(names):
+ try:
+ glob_remove(self.unexpected_difference.added_files, name)
+ except:
+ annotation("failure", "File %s not added as expected" % name)
+ self.fail_test(1)
+
+ def ignore_addition(self, wildcard):
+ self.__ignore_elements(self.unexpected_difference.added_files,
+ wildcard)
+
+ def expect_removal(self, names):
+ for name in self.adjust_names(names):
+ try:
+ glob_remove(self.unexpected_difference.removed_files, name)
+ except:
+ annotation("failure", "File %s not removed as expected" % name)
+ self.fail_test(1)
+
+ def ignore_removal(self, wildcard):
+ self.__ignore_elements(self.unexpected_difference.removed_files,
+ wildcard)
+
+ def expect_modification(self, names):
+ for name in self.adjust_names(names):
+ try:
+ glob_remove(self.unexpected_difference.modified_files, name)
+ except:
+ annotation("failure", "File %s not modified as expected" %
+ name)
+ self.fail_test(1)
+
+ def ignore_modification(self, wildcard):
+ self.__ignore_elements(self.unexpected_difference.modified_files,
+ wildcard)
+
+ def expect_touch(self, names):
+ d = self.unexpected_difference
+ for name in self.adjust_names(names):
+ # We need to check both touched and modified files. The reason is
+ # that:
+ # (1) Windows binaries such as obj, exe or dll files have slight
+ # differences even with identical inputs due to Windows PE
+ # format headers containing an internal timestamp.
+ # (2) Intel's compiler for Linux has the same behaviour.
+ filesets = [d.modified_files, d.touched_files]
+
+ while filesets:
+ try:
+ glob_remove(filesets[-1], name)
+ break
+ except ValueError:
+ filesets.pop()
+
+ if not filesets:
+ annotation("failure", "File %s not touched as expected" % name)
+ self.fail_test(1)
+
+ def ignore_touch(self, wildcard):
+ self.__ignore_elements(self.unexpected_difference.touched_files,
+ wildcard)
+
+ def ignore(self, wildcard):
+ self.ignore_addition(wildcard)
+ self.ignore_removal(wildcard)
+ self.ignore_modification(wildcard)
+ self.ignore_touch(wildcard)
+
+ def expect_nothing(self, names):
+ for name in self.adjust_names(names):
+ if name in self.difference.added_files:
+ annotation("failure",
+ "File %s added, but no action was expected" % name)
+ self.fail_test(1)
+ if name in self.difference.removed_files:
+ annotation("failure",
+ "File %s removed, but no action was expected" % name)
+ self.fail_test(1)
+ pass
+ if name in self.difference.modified_files:
+ annotation("failure",
+ "File %s modified, but no action was expected" % name)
+ self.fail_test(1)
+ if name in self.difference.touched_files:
+ annotation("failure",
+ "File %s touched, but no action was expected" % name)
+ self.fail_test(1)
+
+ def __ignore_junk(self):
+ # Not totally sure about this change, but I do not see a good
+ # alternative.
+ if windows:
+ self.ignore("*.ilk") # MSVC incremental linking files.
+ self.ignore("*.pdb") # MSVC program database files.
+ self.ignore("*.rsp") # Response files.
+ self.ignore("*.tds") # Borland debug symbols.
+ self.ignore("*.manifest") # MSVC DLL manifests.
+ self.ignore("bin/standalone/msvc/*/msvc-setup.bat")
+
+ # Debug builds of bjam built with gcc produce this profiling data.
+ self.ignore("gmon.out")
+ self.ignore("*/gmon.out")
+
+ # Boost Build's 'configure' functionality (unfinished at the time)
+ # produces this file.
+ self.ignore("bin/config.log")
+ self.ignore("bin/project-cache.jam")
+
+ # Compiled Python files created when running Python based Boost Build.
+ self.ignore("*.pyc")
+
+ # OSX/Darwin files and dirs.
+ self.ignore("*.dSYM/*")
+
+ def expect_nothing_more(self):
+ if not self.unexpected_difference.empty():
+ annotation("failure", "Unexpected changes found")
+ output = StringIO()
+ self.unexpected_difference.pprint(output)
+ annotation("unexpected changes", output.getvalue())
+ self.fail_test(1)
+
+ def expect_output_lines(self, lines, expected=True):
+ self.__expect_lines(self.stdout(), lines, expected)
+
+ def expect_content_lines(self, filename, line, expected=True):
+ self.__expect_lines(self.read_and_strip(filename), line, expected)
+
+ def expect_content(self, name, content, exact=False):
+ actual = self.read(name)
+ content = content.replace("$toolset", self.toolset + "*")
+
+ matched = False
+ if exact:
+ matched = fnmatch.fnmatch(actual, content)
+ else:
+ def sorted_(z):
+ z.sort(key=lambda x: x.lower().replace("\\", "/"))
+ return z
+ actual_ = list(map(lambda x: sorted_(x.split()), actual.splitlines()))
+ content_ = list(map(lambda x: sorted_(x.split()), content.splitlines()))
+ if len(actual_) == len(content_):
+ matched = map(
+ lambda x, y: map(lambda n, p: fnmatch.fnmatch(n, p), x, y),
+ actual_, content_)
+ matched = reduce(
+ lambda x, y: x and reduce(
+ lambda a, b: a and b,
+ y, True),
+ matched, True)
+
+ if not matched:
+ print("Expected:\n")
+ print(content)
+ print("Got:\n")
+ print(actual)
+ self.fail_test(1)
+
+ def maybe_do_diff(self, actual, expected, result=None):
+ if os.environ.get("DO_DIFF"):
+ e = tempfile.mktemp("expected")
+ a = tempfile.mktemp("actual")
+ f = open(e, "w")
+ f.write(expected)
+ f.close()
+ f = open(a, "w")
+ f.write(actual)
+ f.close()
+ print("DIFFERENCE")
+ # Current diff should return 1 to indicate 'different input files'
+ # but some older diff versions may return 0 and depending on the
+ # exact Python/OS platform version, os.system() call may gobble up
+ # the external process's return code and return 0 itself.
+ if os.system('diff -u "%s" "%s"' % (e, a)) not in [0, 1]:
+ print('Unable to compute difference: diff -u "%s" "%s"' % (e, a
+ ))
+ os.unlink(e)
+ os.unlink(a)
+ elif type(result) is TestCmd.MatchError:
+ print(result.message)
+ else:
+ print("Set environmental variable 'DO_DIFF' to examine the "
+ "difference.")
+
+ # Internal methods.
+ def adjust_lib_name(self, name):
+ global lib_prefix
+ global dll_prefix
+ result = name
+
+ pos = name.rfind(".")
+ if pos != -1:
+ suffix = name[pos:]
+ if suffix == ".lib":
+ (head, tail) = os.path.split(name)
+ if lib_prefix:
+ tail = lib_prefix + tail
+ result = os.path.join(head, tail)
+ elif suffix == ".dll" or suffix == ".implib":
+ (head, tail) = os.path.split(name)
+ if dll_prefix:
+ tail = dll_prefix + tail
+ result = os.path.join(head, tail)
+ # If we want to use this name in a Jamfile, we better convert \ to /,
+ # as otherwise we would have to quote \.
+ result = result.replace("\\", "/")
+ return result
+
+ def adjust_suffix(self, name):
+ if not self.translate_suffixes:
+ return name
+ pos = name.rfind(".")
+ if pos == -1:
+ return name
+ suffix = name[pos:]
+ return name[:pos] + suffixes.get(suffix, suffix)
+
+ # Acceps either a string or a list of strings and returns a list of
+ # strings. Adjusts suffixes on all names.
+ def adjust_names(self, names):
+ if isstr(names):
+ names = [names]
+ r = map(self.adjust_lib_name, names)
+ r = map(self.adjust_suffix, r)
+ r = map(lambda x, t=self.toolset: x.replace("$toolset", t + "*"), r)
+ return list(r)
+
+ def adjust_name(self, name):
+ return self.adjust_names(name)[0]
+
+ def __native_file_name(self, name):
+ return os.path.normpath(os.path.join(self.workdir, *name.split("/")))
+
+ def native_file_name(self, name):
+ return self.__native_file_name(self.adjust_name(name))
+
+ def wait_for_time_change(self, path, touch):
+ """
+ Wait for newly assigned file system modification timestamps for the
+ given path to become large enough for the timestamp difference to be
+ correctly recognized by both this Python based testing framework and
+ the Boost Jam executable being tested. May optionally touch the given
+ path to set its modification timestamp to the new value.
+
+ """
+ self.__wait_for_time_change(path, touch, last_build_time=False)
+
+ def wait_for_time_change_since_last_build(self):
+ """
+ Wait for newly assigned file system modification timestamps to
+ become large enough for the timestamp difference to be
+ correctly recognized by the Python based testing framework.
+ Does not care about Jam's timestamp resolution, since we
+ only need this to detect touched files.
+ """
+ if self.last_build_timestamp:
+ timestamp_file = "timestamp-3df2f2317e15e4a9"
+ open(timestamp_file, "wb").close()
+ self.__wait_for_time_change_impl(timestamp_file,
+ self.last_build_timestamp,
+ self.__python_timestamp_resolution(timestamp_file, 0), 0)
+ os.unlink(timestamp_file)
+
+ def __build_timestamp_resolution(self):
+ """
+ Returns the minimum path modification timestamp resolution supported
+ by the used Boost Jam executable.
+
+ """
+ dir = tempfile.mkdtemp("bjam_version_info")
+ try:
+ jam_script = "timestamp_resolution.jam"
+ f = open(os.path.join(dir, jam_script), "w")
+ try:
+ f.write("EXIT $(JAM_TIMESTAMP_RESOLUTION) : 0 ;")
+ finally:
+ f.close()
+ p = subprocess.Popen([self.program[0], "-d0", "-f%s" % jam_script],
+ stdout=subprocess.PIPE, cwd=dir, universal_newlines=True)
+ out, err = p.communicate()
+ finally:
+ shutil.rmtree(dir, ignore_errors=False)
+
+ if p.returncode != 0:
+ raise TestEnvironmentError("Unexpected return code (%s) when "
+ "detecting Boost Jam's minimum supported path modification "
+ "timestamp resolution version information." % p.returncode)
+ if err:
+ raise TestEnvironmentError("Unexpected error output (%s) when "
+ "detecting Boost Jam's minimum supported path modification "
+ "timestamp resolution version information." % err)
+
+ r = re.match("([0-9]{2}):([0-9]{2}):([0-9]{2}\\.[0-9]{9})$", out)
+ if not r:
+ # Older Boost Jam versions did not report their minimum supported
+ # path modification timestamp resolution and did not actually
+ # support path modification timestamp resolutions finer than 1
+ # second.
+ # TODO: Phase this support out to avoid such fallback code from
+ # possibly covering up other problems.
+ return 1
+ if r.group(1) != "00" or r.group(2) != "00": # hours, minutes
+ raise TestEnvironmentError("Boost Jam with too coarse minimum "
+ "supported path modification timestamp resolution (%s:%s:%s)."
+ % (r.group(1), r.group(2), r.group(3)))
+ return float(r.group(3)) # seconds.nanoseconds
+
+ def __ensure_newer_than_last_build(self, path):
+ """
+ Updates the given path's modification timestamp after waiting for the
+ newly assigned file system modification timestamp to become large
+ enough for the timestamp difference between it and the last build
+ timestamp to be correctly recognized by both this Python based testing
+ framework and the Boost Jam executable being tested. Does nothing if
+ there is no 'last build' information available.
+
+ """
+ if self.last_build_timestamp:
+ self.__wait_for_time_change(path, touch=True, last_build_time=True)
+
+ def __expect_lines(self, data, lines, expected):
+ """
+ Checks whether the given data contains the given lines.
+
+ Data may be specified as a single string containing text lines
+ separated by newline characters.
+
+ Lines may be specified in any of the following forms:
+ * Single string containing text lines separated by newlines - the
+ given lines are searched for in the given data without any extra
+ data lines between them.
+ * Container of strings containing text lines separated by newlines
+ - the given lines are searched for in the given data with extra
+ data lines allowed between lines belonging to different strings.
+ * Container of strings containing text lines separated by newlines
+ and containers containing strings - the same as above with the
+ internal containers containing strings being interpreted as if
+ all their content was joined together into a single string
+ separated by newlines.
+
+ A newline at the end of any multi-line lines string is interpreted as
+ an expected extra trailig empty line.
+ """
+ # str.splitlines() trims at most one trailing newline while we want the
+ # trailing newline to indicate that there should be an extra empty line
+ # at the end.
+ def splitlines(x):
+ return (x + "\n").splitlines()
+
+ if data is None:
+ data = []
+ elif isstr(data):
+ data = splitlines(data)
+
+ if isstr(lines):
+ lines = [splitlines(lines)]
+ else:
+ expanded = []
+ for x in lines:
+ if isstr(x):
+ x = splitlines(x)
+ expanded.append(x)
+ lines = expanded
+
+ if _contains_lines(data, lines) != bool(expected):
+ output = []
+ if expected:
+ output = ["Did not find expected lines:"]
+ else:
+ output = ["Found unexpected lines:"]
+ first = True
+ for line_sequence in lines:
+ if line_sequence:
+ if first:
+ first = False
+ else:
+ output.append("...")
+ output.extend(" > " + line for line in line_sequence)
+ output.append("in output:")
+ output.extend(" > " + line for line in data)
+ annotation("failure", "\n".join(output))
+ self.fail_test(1)
+
+ def __ignore_elements(self, things, wildcard):
+ """Removes in-place 'things' elements matching the given 'wildcard'."""
+ things[:] = list(filter(lambda x: not fnmatch.fnmatch(x, wildcard), things))
+
+ def __makedirs(self, path, wait):
+ """
+ Creates a folder with the given path, together with any missing
+ parent folders. If WAIT is set, makes sure any newly created folders
+ have modification timestamps newer than the ones left behind by the
+ last build run.
+
+ """
+ try:
+ if wait:
+ stack = []
+ while path and path not in stack and not os.path.isdir(path):
+ stack.append(path)
+ path = os.path.dirname(path)
+ while stack:
+ path = stack.pop()
+ os.mkdir(path)
+ self.__ensure_newer_than_last_build(path)
+ else:
+ os.makedirs(path)
+ except Exception:
+ pass
+
+ def __python_timestamp_resolution(self, path, minimum_resolution):
+ """
+ Returns the modification timestamp resolution for the given path
+ supported by the used Python interpreter/OS/filesystem combination.
+ Will not check for resolutions less than the given minimum value. Will
+ change the path's modification timestamp in the process.
+
+ Return values:
+ 0 - nanosecond resolution supported
+ positive decimal - timestamp resolution in seconds
+
+ """
+ # Note on Python's floating point timestamp support:
+ # Python interpreter versions prior to Python 2.3 did not support
+ # floating point timestamps. Versions 2.3 through 3.3 may or may not
+ # support it depending on the configuration (may be toggled by calling
+ # os.stat_float_times(True/False) at program startup, disabled by
+ # default prior to Python 2.5 and enabled by default since). Python 3.3
+ # deprecated this configuration and 3.4 removed support for it after
+ # which floating point timestamps are always supported.
+ ver = sys.version_info[0:2]
+ python_nanosecond_support = ver >= (3, 4) or (ver >= (2, 3) and
+ os.stat_float_times())
+
+ # Minimal expected floating point difference used to account for
+ # possible imprecise floating point number representations. We want
+ # this number to be small (at least smaller than 0.0001) but still
+ # large enough that we can be sure that increasing a floating point
+ # value by 2 * eta guarantees the value read back will be increased by
+ # at least eta.
+ eta = 0.00005
+
+ stats_orig = os.stat(path)
+ def test_time(diff):
+ """Returns whether a timestamp difference is detectable."""
+ os.utime(path, (stats_orig.st_atime, stats_orig.st_mtime + diff))
+ return os.stat(path).st_mtime > stats_orig.st_mtime + eta
+
+ # Test for nanosecond timestamp resolution support.
+ if not minimum_resolution and python_nanosecond_support:
+ if test_time(2 * eta):
+ return 0
+
+ # Detect the filesystem timestamp resolution. Note that there is no
+ # need to make this code 'as fast as possible' as, this function gets
+ # called before having to sleep until the next detectable modification
+ # timestamp value and that, since we already know nanosecond resolution
+ # is not supported, will surely take longer than whatever we do here to
+ # detect this minimal detectable modification timestamp resolution.
+ step = 0.1
+ if not python_nanosecond_support:
+ # If Python does not support nanosecond timestamp resolution we
+ # know the minimum possible supported timestamp resolution is 1
+ # second.
+ minimum_resolution = max(1, minimum_resolution)
+ index = max(1, int(minimum_resolution / step))
+ while step * index < minimum_resolution:
+ # Floating point number representation errors may cause our
+ # initially calculated start index to be too small if calculated
+ # directly.
+ index += 1
+ while True:
+ # Do not simply add up the steps to avoid cumulative floating point
+ # number representation errors.
+ next = step * index
+ if next > 10:
+ raise TestEnvironmentError("File systems with too coarse "
+ "modification timestamp resolutions not supported.")
+ if test_time(next):
+ return next
+ index += 1
+
+ def __wait_for_time_change(self, path, touch, last_build_time):
+ """
+ Wait until a newly assigned file system modification timestamp for
+ the given path is large enough for the timestamp difference between it
+ and the last build timestamp or the path's original file system
+ modification timestamp (depending on the last_build_time flag) to be
+ correctly recognized by both this Python based testing framework and
+ the Boost Jam executable being tested. May optionally touch the given
+ path to set its modification timestamp to the new value.
+
+ """
+ assert self.last_build_timestamp or not last_build_time
+ stats_orig = os.stat(path)
+
+ if last_build_time:
+ start_time = self.last_build_timestamp
+ else:
+ start_time = stats_orig.st_mtime
+
+ build_resolution = self.__build_timestamp_resolution()
+ assert build_resolution >= 0
+
+ # Check whether the current timestamp is already new enough.
+ if stats_orig.st_mtime > start_time and (not build_resolution or
+ stats_orig.st_mtime >= start_time + build_resolution):
+ return
+
+ resolution = self.__python_timestamp_resolution(path, build_resolution)
+ assert resolution >= build_resolution
+ self.__wait_for_time_change_impl(path, start_time, resolution, build_resolution)
+
+ if not touch:
+ os.utime(path, (stats_orig.st_atime, stats_orig.st_mtime))
+
+ def __wait_for_time_change_impl(self, path, start_time, resolution, build_resolution):
+ # Implementation notes:
+ # * Theoretically time.sleep() API might get interrupted too soon
+ # (never actually encountered).
+ # * We encountered cases where we sleep just long enough for the
+ # filesystem's modifiction timestamp to change to the desired value,
+ # but after waking up, the read timestamp is still just a tiny bit
+ # too small (encountered on Windows). This is most likely caused by
+ # imprecise floating point timestamp & sleep interval representation
+ # used by Python. Note though that we never encountered a case where
+ # more than one additional tiny sleep() call was needed to remedy
+ # the situation.
+ # * We try to wait long enough for the timestamp to change, but do not
+ # want to waste processing time by waiting too long. The main
+ # problem is that when we have a coarse resolution, the actual times
+ # get rounded and we do not know the exact sleep time needed for the
+ # difference between two such times to pass. E.g. if we have a 1
+ # second resolution and the original and the current file timestamps
+ # are both 10 seconds then it could be that the current time is
+ # 10.99 seconds and that we can wait for just one hundredth of a
+ # second for the current file timestamp to reach its next value, and
+ # using a longer sleep interval than that would just be wasting
+ # time.
+ while True:
+ os.utime(path, None)
+ c = os.stat(path).st_mtime
+ if resolution:
+ if c > start_time and (not build_resolution or c >= start_time
+ + build_resolution):
+ break
+ if c <= start_time - resolution:
+ # Move close to the desired timestamp in one sleep, but not
+ # close enough for timestamp rounding to potentially cause
+ # us to wait too long.
+ if start_time - c > 5:
+ if last_build_time:
+ error_message = ("Last build time recorded as "
+ "being a future event, causing a too long "
+ "wait period. Something must have played "
+ "around with the system clock.")
+ else:
+ error_message = ("Original path modification "
+ "timestamp set to far into the future or "
+ "something must have played around with the "
+ "system clock, causing a too long wait "
+ "period.\nPath: '%s'" % path)
+ raise TestEnvironmentError(message)
+ _sleep(start_time - c)
+ else:
+ # We are close to the desired timestamp so take baby sleeps
+ # to avoid sleeping too long.
+ _sleep(max(0.01, resolution / 10))
+ else:
+ if c > start_time:
+ break
+ _sleep(max(0.01, start_time - c))
+
+
+class List:
+ def __init__(self, s=""):
+ elements = []
+ if isstr(s):
+ # Have to handle escaped spaces correctly.
+ elements = s.replace("\ ", "\001").split()
+ else:
+ elements = s
+ self.l = [e.replace("\001", " ") for e in elements]
+
+ def __len__(self):
+ return len(self.l)
+
+ def __getitem__(self, key):
+ return self.l[key]
+
+ def __setitem__(self, key, value):
+ self.l[key] = value
+
+ def __delitem__(self, key):
+ del self.l[key]
+
+ def __str__(self):
+ return str(self.l)
+
+ def __repr__(self):
+ return "%s.List(%r)" % (self.__module__, " ".join(self.l))
+
+ def __mul__(self, other):
+ result = List()
+ if not isinstance(other, List):
+ other = List(other)
+ for f in self:
+ for s in other:
+ result.l.append(f + s)
+ return result
+
+ def __rmul__(self, other):
+ if not isinstance(other, List):
+ other = List(other)
+ return List.__mul__(other, self)
+
+ def __add__(self, other):
+ result = List()
+ result.l = self.l[:] + other.l[:]
+ return result
+
+
+def _contains_lines(data, lines):
+ data_line_count = len(data)
+ expected_line_count = reduce(lambda x, y: x + len(y), lines, 0)
+ index = 0
+ for expected in lines:
+ if expected_line_count > data_line_count - index:
+ return False
+ expected_line_count -= len(expected)
+ index = _match_line_sequence(data, index, data_line_count -
+ expected_line_count, expected)
+ if index < 0:
+ return False
+ return True
+
+
+def _match_line_sequence(data, start, end, lines):
+ if not lines:
+ return start
+ for index in range(start, end - len(lines) + 1):
+ data_index = index
+ for expected in lines:
+ if not fnmatch.fnmatch(data[data_index], expected):
+ break
+ data_index += 1
+ else:
+ return data_index
+ return -1
+
+
+def _sleep(delay):
+ if delay > 5:
+ raise TestEnvironmentError("Test environment error: sleep period of "
+ "more than 5 seconds requested. Most likely caused by a file with "
+ "its modification timestamp set to sometime in the future.")
+ time.sleep(delay)
+
+
+###############################################################################
+#
+# Initialization.
+#
+###############################################################################
+
+# Make os.stat() return file modification times as floats instead of integers
+# to get the best possible file timestamp resolution available. The exact
+# resolution depends on the underlying file system and the Python os.stat()
+# implementation. The better the resolution we achieve, the shorter we need to
+# wait for files we create to start getting new timestamps.
+#
+# Additional notes:
+# * os.stat_float_times() function first introduced in Python 2.3. and
+# suggested for deprecation in Python 3.3.
+# * On Python versions 2.5+ we do not need to do this as there os.stat()
+# returns floating point file modification times by default.
+# * Windows CPython implementations prior to version 2.5 do not support file
+# modification timestamp resolutions of less than 1 second no matter whether
+# these timestamps are returned as integer or floating point values.
+# * Python documentation states that this should be set in a program's
+# __main__ module to avoid affecting other libraries that might not be ready
+# to support floating point timestamps. Since we use no such external
+# libraries, we ignore this warning to make it easier to enable this feature
+# in both our single & multiple-test scripts.
+if (2, 3) <= sys.version_info < (2, 5) and not os.stat_float_times():
+ os.stat_float_times(True)
+
+
+# Quickie tests. Should use doctest instead.
+if __name__ == "__main__":
+ assert str(List("foo bar") * "/baz") == "['foo/baz', 'bar/baz']"
+ assert repr("foo/" * List("bar baz")) == "__main__.List('foo/bar foo/baz')"
+
+ assert _contains_lines([], [])
+ assert _contains_lines([], [[]])
+ assert _contains_lines([], [[], []])
+ assert _contains_lines([], [[], [], []])
+ assert not _contains_lines([], [[""]])
+ assert not _contains_lines([], [["a"]])
+
+ assert _contains_lines([""], [])
+ assert _contains_lines(["a"], [])
+ assert _contains_lines(["a", "b"], [])
+ assert _contains_lines(["a", "b"], [[], [], []])
+
+ assert _contains_lines([""], [[""]])
+ assert not _contains_lines([""], [["a"]])
+ assert not _contains_lines(["a"], [[""]])
+ assert _contains_lines(["a", "", "b", ""], [["a"]])
+ assert _contains_lines(["a", "", "b", ""], [[""]])
+ assert _contains_lines(["a", "", "b"], [["b"]])
+ assert not _contains_lines(["a", "b"], [[""]])
+ assert not _contains_lines(["a", "", "b", ""], [["c"]])
+ assert _contains_lines(["a", "", "b", "x"], [["x"]])
+
+ data = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
+ assert _contains_lines(data, [["1", "2"]])
+ assert not _contains_lines(data, [["2", "1"]])
+ assert not _contains_lines(data, [["1", "3"]])
+ assert not _contains_lines(data, [["1", "3"]])
+ assert _contains_lines(data, [["1"], ["2"]])
+ assert _contains_lines(data, [["1"], [], [], [], ["2"]])
+ assert _contains_lines(data, [["1"], ["3"]])
+ assert not _contains_lines(data, [["3"], ["1"]])
+ assert _contains_lines(data, [["3"], ["7"], ["8"]])
+ assert not _contains_lines(data, [["1"], ["3", "5"]])
+ assert not _contains_lines(data, [["1"], [""], ["5"]])
+ assert not _contains_lines(data, [["1"], ["5"], ["3"]])
+ assert not _contains_lines(data, [["1"], ["5", "3"]])
+
+ assert not _contains_lines(data, [[" 3"]])
+ assert not _contains_lines(data, [["3 "]])
+ assert not _contains_lines(data, [["3", ""]])
+ assert not _contains_lines(data, [["", "3"]])
+
+ print("tests passed")
diff --git a/src/boost/tools/build/test/Jamfile.jam b/src/boost/tools/build/test/Jamfile.jam
new file mode 100644
index 000000000..7ec0bf303
--- /dev/null
+++ b/src/boost/tools/build/test/Jamfile.jam
@@ -0,0 +1,29 @@
+# Copyright 2018 Steven Watanabe
+# 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 python ;
+import testing ;
+
+if ! [ python.configured ]
+{
+ using python ;
+}
+
+# Not quite perfect, but good enough for most purposes
+local test-files = [ glob *.py ] ;
+
+local boost-build-files = [ glob
+ ../src/tools/*.jam
+ ../src/tools/*/*.jam
+ ../src/build/*.jam
+ ../src/util/*.jam
+ ../src/kernel/*.jam
+ ../src/options/*.jam
+ ../src/*.jam ] ;
+
+testing.make-test run-pyd : test_all.py :
+ <dependency>$(test-files)
+ <dependency>$(boost-build-files)
+ ;
diff --git a/src/boost/tools/build/test/MockToolset.py b/src/boost/tools/build/test/MockToolset.py
new file mode 100755
index 000000000..a692a6861
--- /dev/null
+++ b/src/boost/tools/build/test/MockToolset.py
@@ -0,0 +1,267 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# 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 sys
+
+def create(t):
+ t.write('''mockinfo.py''', '''
+from __future__ import print_function
+import re
+import optparse
+import os
+
+parser = optparse.OptionParser()
+parser.add_option('-o', dest="output_file")
+parser.add_option('-x', dest="language")
+parser.add_option('-c', dest="compile", action="store_true")
+parser.add_option('-I', dest="includes", action="append")
+parser.add_option('-D', dest="defines", action="append")
+parser.add_option('-L', dest="library_path", action="append")
+parser.add_option('--dll', dest="dll", action="store_true")
+parser.add_option('--archive', dest="archive", action="store_true")
+parser.add_option('--static-lib', dest="static_libraries", action="append")
+parser.add_option('--shared-lib', dest="shared_libraries", action="append")
+
+cwd = os.environ["JAM_CWD"]
+
+class MockInfo(object):
+ def __init__(self, verbose=False):
+ self.files = dict()
+ self.commands = list()
+ self.verbose = verbose
+ def source_file(self, name, pattern):
+ self.files[name] = pattern
+ def action(self, command, status=0):
+ if isinstance(command, str):
+ command = command.split()
+ self.commands.append((command, status))
+ def check(self, command):
+ print("Testing command", command)
+ for (raw, status) in self.commands:
+ if self.matches(raw, command):
+ return status
+ def matches(self, raw, command):
+ (expected_options, expected_args) = parser.parse_args(raw)
+ options = command[0]
+ input_files = list(command[1])
+ if self.verbose:
+ print(" - matching against", (expected_options, expected_args))
+ if len(expected_args) != len(input_files):
+ if self.verbose:
+ print(" argument list sizes differ")
+ return False
+ for arg in expected_args:
+ if arg.startswith('$'):
+ fileid = arg[1:]
+ pattern = self.files[fileid] if fileid in self.files else fileid
+ matching_file = None
+ for input_file in input_files:
+ with open(input_file, 'r') as f:
+ contents = f.read()
+ if pattern == contents:
+ matching_file = input_file
+ break
+ if matching_file is not None:
+ input_files.remove(matching_file)
+ else:
+ if self.verbose:
+ print(" Failed to match input file contents: %s" % arg)
+ return False
+ else:
+ if arg in input_files:
+ input_files.remove(arg)
+ else:
+ if self.verbose:
+ print(" Failed to match input file: %s" % arg)
+ return False
+
+ if options.language != expected_options.language:
+ if self.verbose:
+ print(" Failed to match -c")
+ return False
+
+ if options.compile != expected_options.compile:
+ if self.verbose:
+ print(" Failed to match -x")
+ return False
+
+ # Normalize a path for comparison purposes
+ def adjust_path(p):
+ return os.path.normcase(os.path.normpath(os.path.join(cwd, p)))
+
+ # order matters
+ if options.includes is None:
+ options.includes = []
+ if expected_options.includes is None:
+ expected_options.includes = []
+ if list(map(adjust_path, options.includes)) != \
+ list(map(adjust_path, expected_options.includes)):
+ if self.verbose:
+ print(" Failed to match -I ", list(map(adjust_path, options.includes)), \
+ " != ", list(map(adjust_path, expected_options.includes)))
+ return False
+
+ if options.defines is None:
+ options.defines = []
+ if expected_options.defines is None:
+ expected_options.defines = []
+ if options.defines != expected_options.defines:
+ if self.verbose:
+ print(" Failed to match -I ", options.defines, \
+ " != ", expected_options.defines)
+ return False
+
+ if options.library_path is None:
+ options.library_path = []
+ if expected_options.library_path is None:
+ expected_options.library_path = []
+ if list(map(adjust_path, options.library_path)) != \
+ list(map(adjust_path, expected_options.library_path)):
+ if self.verbose:
+ print(" Failed to match -L ", list(map(adjust_path, options.library_path)), \
+ " != ", list(map(adjust_path, expected_options.library_path)))
+ return False
+
+ if options.static_libraries != expected_options.static_libraries:
+ if self.verbose:
+ print(" Failed to match --static-lib")
+ return False
+
+ if options.shared_libraries != expected_options.shared_libraries:
+ if self.verbose:
+ print(" Failed to match --shared-lib")
+ return False
+
+ if options.dll != expected_options.dll:
+ if self.verbose:
+ print(" Failed to match --dll")
+ return False
+
+ if options.archive != expected_options.archive:
+ if self.verbose:
+ print(" Failed to match --archive")
+ return False
+
+ # The output must be handled after everything else
+ # is validated
+ if expected_options.output_file is not None:
+ if options.output_file is not None:
+ if expected_options.output_file.startswith('$'):
+ fileid = expected_options.output_file[1:]
+ if fileid not in self.files:
+ self.files[fileid] = fileid
+ else:
+ assert(self.files[fileid] == fileid)
+ with open(options.output_file, 'w') as output:
+ output.write(fileid)
+ else:
+ if self.verbose:
+ print("Failed to match -o")
+ return False
+ elif options.output_file is not None:
+ if self.verbose:
+ print("Failed to match -o")
+ return False
+
+ # if we've gotten here, then everything matched
+ if self.verbose:
+ print(" Matched")
+ return True
+''')
+
+ t.write('mock.py', '''
+from __future__ import print_function
+import mockinfo
+import markup
+import sys
+
+status = markup.info.check(mockinfo.parser.parse_args())
+if status is not None:
+ exit(status)
+else:
+ print("Unrecognized command: " + ' '.join(sys.argv))
+ exit(1)
+''')
+
+ t.write('mock.jam', '''
+import feature ;
+import toolset ;
+import path ;
+import modules ;
+import common ;
+import type ;
+
+.python-cmd = "\"%s\"" ;
+
+# Behave the same as gcc on Windows, because that's what
+# the test system expects
+type.set-generated-target-prefix SHARED_LIB : <toolset>mock <target-os>windows : lib ;
+type.set-generated-target-suffix STATIC_LIB : <toolset>mock <target-os>windows : a ;
+
+rule init ( )
+{
+ local here = [ path.make [ modules.binding $(__name__) ] ] ;
+ here = [ path.native [ path.root [ path.parent $(here) ] [ path.pwd ] ] ] ;
+ .config-cmd = [ common.variable-setting-command JAM_CWD : $(here) ] $(.python-cmd) -B ;
+}
+
+feature.extend toolset : mock ;
+
+generators.register-c-compiler mock.compile.c++ : CPP : OBJ : <toolset>mock ;
+generators.register-c-compiler mock.compile.c : C : OBJ : <toolset>mock ;
+
+generators.register-linker mock.link : LIB OBJ : EXE : <toolset>mock ;
+generators.register-linker mock.link.dll : LIB OBJ : SHARED_LIB : <toolset>mock ;
+generators.register-archiver mock.archive : OBJ : STATIC_LIB : <toolset>mock ;
+
+toolset.flags mock.compile OPTIONS <link>shared : -fPIC ;
+toolset.flags mock.compile INCLUDES : <include> ;
+toolset.flags mock.compile DEFINES : <define> ;
+
+actions compile.c
+{
+ $(.config-cmd) mock.py -c -x c -I"$(INCLUDES)" -D"$(DEFINES)" "$(>)" -o "$(<)"
+}
+
+actions compile.c++
+{
+ $(.config-cmd) mock.py -c -x c++ -I"$(INCLUDES)" -D"$(DEFINES)" "$(>)" -o "$(<)"
+}
+
+toolset.flags mock.link USER_OPTIONS <linkflags> ;
+toolset.flags mock.link FINDLIBS-STATIC <find-static-library> ;
+toolset.flags mock.link FINDLIBS-SHARED <find-shared-library> ;
+toolset.flags mock.link LINK_PATH <library-path> ;
+toolset.flags mock.link LIBRARIES <library-file> ;
+
+actions link
+{
+ $(.config-cmd) mock.py "$(>)" -o "$(<)" $(USER_OPTIONS) -L"$(LINK_PATH)" --static-lib=$(FINDLIBS-STATIC) --shared-lib=$(FINDLIBS-SHARED)
+}
+
+actions archive
+{
+ $(.config-cmd) mock.py --archive "$(>)" -o "$(<)" $(USER_OPTIONS)
+}
+
+actions link.dll
+{
+ $(.config-cmd) mock.py --dll "$(>)" -o "$(<)" $(USER_OPTIONS) -L"$(LINK_PATH)" --static-lib=$(FINDLIBS-STATIC) --shared-lib=$(FINDLIBS-SHARED)
+}
+
+''' % sys.executable.replace('\\', '\\\\'))
+
+def set_expected(t, markup):
+ verbose = "True" if t.verbose else "False"
+ t.write('markup.py', '''
+import mockinfo
+info = mockinfo.MockInfo(%s)
+def source_file(name, contents):
+ info.source_file(name, contents)
+def action(command, status=0):
+ info.action(command, status)
+''' % (verbose) + markup)
diff --git a/src/boost/tools/build/test/TestCmd.py b/src/boost/tools/build/test/TestCmd.py
new file mode 100644
index 000000000..3f9c2a3ce
--- /dev/null
+++ b/src/boost/tools/build/test/TestCmd.py
@@ -0,0 +1,609 @@
+"""
+TestCmd.py: a testing framework for commands and scripts.
+
+The TestCmd module provides a framework for portable automated testing of
+executable commands and scripts (in any language, not just Python), especially
+commands and scripts that require file system interaction.
+
+In addition to running tests and evaluating conditions, the TestCmd module
+manages and cleans up one or more temporary workspace directories, and provides
+methods for creating files and directories in those workspace directories from
+in-line data, here-documents), allowing tests to be completely self-contained.
+
+A TestCmd environment object is created via the usual invocation:
+
+ test = TestCmd()
+
+The TestCmd module provides pass_test(), fail_test(), and no_result() unbound
+methods that report test results for use with the Aegis change management
+system. These methods terminate the test immediately, reporting PASSED, FAILED
+or NO RESULT respectively and exiting with status 0 (success), 1 or 2
+respectively. This allows for a distinction between an actual failed test and a
+test that could not be properly evaluated because of an external condition (such
+as a full file system or incorrect permissions).
+
+"""
+
+# Copyright 2000 Steven Knight
+# This module is free software, and you may redistribute it and/or modify
+# it under the same terms as Python itself, so long as this copyright message
+# and disclaimer are retained in their original form.
+#
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
+# THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+#
+# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
+# AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
+# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+# Copyright 2002-2003 Vladimir Prus.
+# Copyright 2002-2003 Dave Abrahams.
+# Copyright 2006 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)
+
+from __future__ import print_function
+
+__author__ = "Steven Knight <knight@baldmt.com>"
+__revision__ = "TestCmd.py 0.D002 2001/08/31 14:56:12 software"
+__version__ = "0.02"
+
+from types import *
+
+import os
+import os.path
+import re
+import shutil
+import stat
+import subprocess
+import sys
+import tempfile
+import traceback
+
+
+tempfile.template = 'testcmd.'
+
+_Cleanup = []
+
+def _clean():
+ global _Cleanup
+ list = _Cleanup[:]
+ _Cleanup = []
+ list.reverse()
+ for test in list:
+ test.cleanup()
+
+sys.exitfunc = _clean
+
+
+def caller(tblist, skip):
+ string = ""
+ arr = []
+ for file, line, name, text in tblist:
+ if file[-10:] == "TestCmd.py":
+ break
+ arr = [(file, line, name, text)] + arr
+ atfrom = "at"
+ for file, line, name, text in arr[skip:]:
+ if name == "?":
+ name = ""
+ else:
+ name = " (" + name + ")"
+ string = string + ("%s line %d of %s%s\n" % (atfrom, line, file, name))
+ atfrom = "\tfrom"
+ return string
+
+
+def fail_test(self=None, condition=True, function=None, skip=0):
+ """Cause the test to fail.
+
+ By default, the fail_test() method reports that the test FAILED and exits
+ with a status of 1. If a condition argument is supplied, the test fails
+ only if the condition is true.
+
+ """
+ if not condition:
+ return
+ if not function is None:
+ function()
+ of = ""
+ desc = ""
+ sep = " "
+ if not self is None:
+ if self.program:
+ of = " of " + " ".join(self.program)
+ sep = "\n\t"
+ if self.description:
+ desc = " [" + self.description + "]"
+ sep = "\n\t"
+
+ at = caller(traceback.extract_stack(), skip)
+
+ sys.stderr.write("FAILED test" + of + desc + sep + at + """
+in directory: """ + os.getcwd() )
+ sys.exit(1)
+
+
+def no_result(self=None, condition=True, function=None, skip=0):
+ """Causes a test to exit with no valid result.
+
+ By default, the no_result() method reports NO RESULT for the test and
+ exits with a status of 2. If a condition argument is supplied, the test
+ fails only if the condition is true.
+
+ """
+ if not condition:
+ return
+ if not function is None:
+ function()
+ of = ""
+ desc = ""
+ sep = " "
+ if not self is None:
+ if self.program:
+ of = " of " + self.program
+ sep = "\n\t"
+ if self.description:
+ desc = " [" + self.description + "]"
+ sep = "\n\t"
+
+ at = caller(traceback.extract_stack(), skip)
+ sys.stderr.write("NO RESULT for test" + of + desc + sep + at)
+ sys.exit(2)
+
+
+def pass_test(self=None, condition=True, function=None):
+ """Causes a test to pass.
+
+ By default, the pass_test() method reports PASSED for the test and exits
+ with a status of 0. If a condition argument is supplied, the test passes
+ only if the condition is true.
+
+ """
+ if not condition:
+ return
+ if not function is None:
+ function()
+ sys.stderr.write("PASSED\n")
+ sys.exit(0)
+
+class MatchError(object):
+ def __init__(self, message):
+ self.message = message
+ def __nonzero__(self):
+ return False
+ def __bool__(self):
+ return False
+
+def match_exact(lines=None, matches=None):
+ """
+ Returns whether the given lists or strings containing lines separated
+ using newline characters contain exactly the same data.
+
+ """
+ if not type(lines) is list:
+ lines = lines.split("\n")
+ if not type(matches) is list:
+ matches = matches.split("\n")
+ if len(lines) != len(matches):
+ return
+ for i in range(len(lines)):
+ if lines[i] != matches[i]:
+ return MatchError("Mismatch at line %d\n- %s\n+ %s\n" %
+ (i+1, matches[i], lines[i]))
+ if len(lines) < len(matches):
+ return MatchError("Missing lines at line %d\n- %s" %
+ (len(lines), "\n- ".join(matches[len(lines):])))
+ if len(lines) > len(matches):
+ return MatchError("Extra lines at line %d\n+ %s" %
+ (len(matches), "\n+ ".join(lines[len(matches):])))
+ return 1
+
+
+def match_re(lines=None, res=None):
+ """
+ Given lists or strings contain lines separated using newline characters.
+ This function matches those lines one by one, interpreting the lines in the
+ res parameter as regular expressions.
+
+ """
+ if not type(lines) is list:
+ lines = lines.split("\n")
+ if not type(res) is list:
+ res = res.split("\n")
+ for i in range(min(len(lines), len(res))):
+ if not re.compile("^" + res[i] + "$").search(lines[i]):
+ return MatchError("Mismatch at line %d\n- %s\n+ %s\n" %
+ (i+1, res[i], lines[i]))
+ if len(lines) < len(res):
+ return MatchError("Missing lines at line %d\n- %s" %
+ (len(lines), "\n- ".join(res[len(lines):])))
+ if len(lines) > len(res):
+ return MatchError("Extra lines at line %d\n+ %s" %
+ (len(res), "\n+ ".join(lines[len(res):])))
+ return 1
+
+
+class TestCmd:
+ def __init__(self, description=None, program=None, workdir=None,
+ subdir=None, verbose=False, match=None, inpath=None):
+
+ self._cwd = os.getcwd()
+ self.description_set(description)
+ self.program_set(program, inpath)
+ self.verbose_set(verbose)
+ if match is None:
+ self.match_func = match_re
+ else:
+ self.match_func = match
+ self._dirlist = []
+ self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
+ env = os.environ.get('PRESERVE')
+ if env:
+ self._preserve['pass_test'] = env
+ self._preserve['fail_test'] = env
+ self._preserve['no_result'] = env
+ else:
+ env = os.environ.get('PRESERVE_PASS')
+ if env is not None:
+ self._preserve['pass_test'] = env
+ env = os.environ.get('PRESERVE_FAIL')
+ if env is not None:
+ self._preserve['fail_test'] = env
+ env = os.environ.get('PRESERVE_PASS')
+ if env is not None:
+ self._preserve['PRESERVE_NO_RESULT'] = env
+ self._stdout = []
+ self._stderr = []
+ self.status = None
+ self.condition = 'no_result'
+ self.workdir_set(workdir)
+ self.subdir(subdir)
+
+ def __del__(self):
+ self.cleanup()
+
+ def __repr__(self):
+ return "%x" % id(self)
+
+ def cleanup(self, condition=None):
+ """
+ Removes any temporary working directories for the specified TestCmd
+ environment. If the environment variable PRESERVE was set when the
+ TestCmd environment was created, temporary working directories are not
+ removed. If any of the environment variables PRESERVE_PASS,
+ PRESERVE_FAIL or PRESERVE_NO_RESULT were set when the TestCmd
+ environment was created, then temporary working directories are not
+ removed if the test passed, failed or had no result, respectively.
+ Temporary working directories are also preserved for conditions
+ specified via the preserve method.
+
+ Typically, this method is not called directly, but is used when the
+ script exits to clean up temporary working directories as appropriate
+ for the exit status.
+
+ """
+ if not self._dirlist:
+ return
+ if condition is None:
+ condition = self.condition
+ if self._preserve[condition]:
+ for dir in self._dirlist:
+ print("Preserved directory %s" % dir)
+ else:
+ list = self._dirlist[:]
+ list.reverse()
+ for dir in list:
+ self.writable(dir, 1)
+ shutil.rmtree(dir, ignore_errors=1)
+
+ self._dirlist = []
+ self.workdir = None
+ os.chdir(self._cwd)
+ try:
+ global _Cleanup
+ _Cleanup.remove(self)
+ except (AttributeError, ValueError):
+ pass
+
+ def description_set(self, description):
+ """Set the description of the functionality being tested."""
+ self.description = description
+
+ def fail_test(self, condition=True, function=None, skip=0):
+ """Cause the test to fail."""
+ if not condition:
+ return
+ self.condition = 'fail_test'
+ fail_test(self = self,
+ condition = condition,
+ function = function,
+ skip = skip)
+
+ def match(self, lines, matches):
+ """Compare actual and expected file contents."""
+ return self.match_func(lines, matches)
+
+ def match_exact(self, lines, matches):
+ """Compare actual and expected file content exactly."""
+ return match_exact(lines, matches)
+
+ def match_re(self, lines, res):
+ """Compare file content with a regular expression."""
+ return match_re(lines, res)
+
+ def no_result(self, condition=True, function=None, skip=0):
+ """Report that the test could not be run."""
+ if not condition:
+ return
+ self.condition = 'no_result'
+ no_result(self = self,
+ condition = condition,
+ function = function,
+ skip = skip)
+
+ def pass_test(self, condition=True, function=None):
+ """Cause the test to pass."""
+ if not condition:
+ return
+ self.condition = 'pass_test'
+ pass_test(self, condition, function)
+
+ def preserve(self, *conditions):
+ """
+ Arrange for the temporary working directories for the specified
+ TestCmd environment to be preserved for one or more conditions. If no
+ conditions are specified, arranges for the temporary working
+ directories to be preserved for all conditions.
+
+ """
+ if conditions is ():
+ conditions = ('pass_test', 'fail_test', 'no_result')
+ for cond in conditions:
+ self._preserve[cond] = 1
+
+ def program_set(self, program, inpath):
+ """Set the executable program or script to be tested."""
+ if not inpath and program and not os.path.isabs(program[0]):
+ program[0] = os.path.join(self._cwd, program[0])
+ self.program = program
+
+ def read(self, file, mode='rb'):
+ """
+ Reads and returns the contents of the specified file name. The file
+ name may be a list, in which case the elements are concatenated with
+ the os.path.join() method. The file is assumed to be under the
+ temporary working directory unless it is an absolute path name. The I/O
+ mode for the file may be specified and must begin with an 'r'. The
+ default is 'rb' (binary read).
+
+ """
+ if type(file) is list:
+ file = os.path.join(*file)
+ if not os.path.isabs(file):
+ file = os.path.join(self.workdir, file)
+ if mode[0] != 'r':
+ raise ValueError("mode must begin with 'r'")
+ return open(file, mode).read()
+
+ def run(self, program=None, arguments=None, chdir=None, stdin=None,
+ universal_newlines=True):
+ """
+ Runs a test of the program or script for the test environment.
+ Standard output and error output are saved for future retrieval via the
+ stdout() and stderr() methods.
+
+ 'universal_newlines' parameter controls how the child process
+ input/output streams are opened as defined for the same named Python
+ subprocess.POpen constructor parameter.
+
+ """
+ if chdir:
+ if not os.path.isabs(chdir):
+ chdir = os.path.join(self.workpath(chdir))
+ if self.verbose:
+ sys.stderr.write("chdir(" + chdir + ")\n")
+ else:
+ chdir = self.workdir
+
+ cmd = []
+ if program and program[0]:
+ if program[0] != self.program[0] and not os.path.isabs(program[0]):
+ program[0] = os.path.join(self._cwd, program[0])
+ cmd += program
+ else:
+ cmd += self.program
+ if arguments:
+ cmd += arguments.split(" ")
+ if self.verbose:
+ sys.stderr.write(" ".join(cmd) + "\n")
+ p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=chdir,
+ universal_newlines=universal_newlines)
+
+ if stdin:
+ if type(stdin) is list:
+ stdin = "".join(stdin)
+ out, err = p.communicate(stdin)
+ if not type(out) is str:
+ out = out.decode()
+ if not type(err) is str:
+ err = err.decode()
+ self._stdout.append(out)
+ self._stderr.append(err)
+ self.status = p.returncode
+
+ if self.verbose:
+ sys.stdout.write(self._stdout[-1])
+ sys.stderr.write(self._stderr[-1])
+
+ def stderr(self, run=None):
+ """
+ Returns the error output from the specified run number. If there is
+ no specified run number, then returns the error output of the last run.
+ If the run number is less than zero, then returns the error output from
+ that many runs back from the current run.
+
+ """
+ if not run:
+ run = len(self._stderr)
+ elif run < 0:
+ run = len(self._stderr) + run
+ run -= 1
+ if run < 0:
+ return ''
+ return self._stderr[run]
+
+ def stdout(self, run=None):
+ """
+ Returns the standard output from the specified run number. If there
+ is no specified run number, then returns the standard output of the
+ last run. If the run number is less than zero, then returns the
+ standard output from that many runs back from the current run.
+
+ """
+ if not run:
+ run = len(self._stdout)
+ elif run < 0:
+ run = len(self._stdout) + run
+ run -= 1
+ if run < 0:
+ return ''
+ return self._stdout[run]
+
+ def subdir(self, *subdirs):
+ """
+ Create new subdirectories under the temporary working directory, one
+ for each argument. An argument may be a list, in which case the list
+ elements are concatenated using the os.path.join() method.
+ Subdirectories multiple levels deep must be created using a separate
+ argument for each level:
+
+ test.subdir('sub', ['sub', 'dir'], ['sub', 'dir', 'ectory'])
+
+ Returns the number of subdirectories actually created.
+
+ """
+ count = 0
+ for sub in subdirs:
+ if sub is None:
+ continue
+ if type(sub) is list:
+ sub = os.path.join(*tuple(sub))
+ new = os.path.join(self.workdir, sub)
+ try:
+ os.mkdir(new)
+ except:
+ pass
+ else:
+ count += 1
+ return count
+
+ def unlink(self, file):
+ """
+ Unlinks the specified file name. The file name may be a list, in
+ which case the elements are concatenated using the os.path.join()
+ method. The file is assumed to be under the temporary working directory
+ unless it is an absolute path name.
+
+ """
+ if type(file) is list:
+ file = os.path.join(*tuple(file))
+ if not os.path.isabs(file):
+ file = os.path.join(self.workdir, file)
+ os.unlink(file)
+
+ def verbose_set(self, verbose):
+ """Set the verbose level."""
+ self.verbose = verbose
+
+ def workdir_set(self, path):
+ """
+ Creates a temporary working directory with the specified path name.
+ If the path is a null string (''), a unique directory name is created.
+
+ """
+ if os.path.isabs(path):
+ self.workdir = path
+ else:
+ if path != None:
+ if path == '':
+ path = tempfile.mktemp()
+ if path != None:
+ os.mkdir(path)
+ self._dirlist.append(path)
+ global _Cleanup
+ try:
+ _Cleanup.index(self)
+ except ValueError:
+ _Cleanup.append(self)
+ # We would like to set self.workdir like this:
+ # self.workdir = path
+ # But symlinks in the path will report things differently from
+ # os.getcwd(), so chdir there and back to fetch the canonical
+ # path.
+ cwd = os.getcwd()
+ os.chdir(path)
+ self.workdir = os.getcwd()
+ os.chdir(cwd)
+ else:
+ self.workdir = None
+
+ def workpath(self, *args):
+ """
+ Returns the absolute path name to a subdirectory or file within the
+ current temporary working directory. Concatenates the temporary working
+ directory name with the specified arguments using os.path.join().
+
+ """
+ return os.path.join(self.workdir, *tuple(args))
+
+ def writable(self, top, write):
+ """
+ Make the specified directory tree writable (write == 1) or not
+ (write == None).
+
+ """
+ def _walk_chmod(arg, dirname, names):
+ st = os.stat(dirname)
+ os.chmod(dirname, arg(st[stat.ST_MODE]))
+ for name in names:
+ fullname = os.path.join(dirname, name)
+ st = os.stat(fullname)
+ os.chmod(fullname, arg(st[stat.ST_MODE]))
+
+ _mode_writable = lambda mode: stat.S_IMODE(mode|0o200)
+ _mode_non_writable = lambda mode: stat.S_IMODE(mode&~0o200)
+
+ if write:
+ f = _mode_writable
+ else:
+ f = _mode_non_writable
+ try:
+ for root, _, files in os.walk(top):
+ _walk_chmod(f, root, files)
+ except:
+ pass # Ignore any problems changing modes.
+
+ def write(self, file, content, mode='wb'):
+ """
+ Writes the specified content text (second argument) to the specified
+ file name (first argument). The file name may be a list, in which case
+ the elements are concatenated using the os.path.join() method. The file
+ is created under the temporary working directory. Any subdirectories in
+ the path must already exist. The I/O mode for the file may be specified
+ and must begin with a 'w'. The default is 'wb' (binary write).
+
+ """
+ if type(file) is list:
+ file = os.path.join(*tuple(file))
+ if not os.path.isabs(file):
+ file = os.path.join(self.workdir, file)
+ if mode[0] != 'w':
+ raise ValueError("mode must begin with 'w'")
+ open(file, mode).write(content)
diff --git a/src/boost/tools/build/test/TestToolset.py b/src/boost/tools/build/test/TestToolset.py
new file mode 100644
index 000000000..fefa6c2ea
--- /dev/null
+++ b/src/boost/tools/build/test/TestToolset.py
@@ -0,0 +1,121 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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)
+
+# validates a toolset using a mock of the compiler
+
+import BoostBuild
+import os
+import re
+import sys
+
+renames = {"debug": "variant=debug", "release": "variant=release"}
+
+def set_default_target_os(os):
+ global removed
+ global default_target_os
+ default_target_os = os
+ removed = set()
+ removed.add("target-os=" + default_target_os)
+
+def adjust_property(property):
+ global renames
+ if property in renames:
+ return renames[property]
+ else:
+ return property
+
+def adjust_properties(properties):
+ global removed
+ return [adjust_property(p) for p in properties if p not in removed]
+
+def has_property(name, properties):
+ return name in [re.sub("=.*", "", p) for p in properties]
+
+def get_property(name, properties):
+ for m in [re.match("(.*)=(.*)", p) for p in properties]:
+ if m and m.group(1) == name:
+ return m.group(2)
+
+def get_target_os(properties):
+ return get_property("target-os", properties) or default_target_os
+
+def expand_properties(properties):
+ result = properties[:]
+ if not has_property("variant", properties):
+ result += ["variant=debug"]
+ if not has_property("threading", properties):
+ result += ["threading=single"]
+ if not has_property("exception-handling", properties):
+ result += ["exception-handling=on"]
+ if not has_property("link", properties):
+ result += ["link=shared"]
+ if not has_property("rtti", properties):
+ result += ["rtti=on"]
+ if not has_property("runtime-link", properties):
+ result += ["runtime-link=shared"]
+ if not has_property("strip", properties):
+ result += ["strip=off"]
+ if not has_property("target-os", properties):
+ result += ["target-os=" + default_target_os]
+ return result
+
+def compute_path(properties, target_type):
+ path = ""
+ if "variant=release" in properties:
+ path += "/release"
+ else:
+ path += "/debug"
+ if has_property("address-model", properties):
+ path += "/address-model-" + get_property("address-model", properties)
+ if has_property("architecture", properties):
+ path += "/architecture-" + get_property("architecture", properties)
+ if "cxxstd=latest" in properties:
+ path += "/cxxstd-latest-iso"
+ if "exception-handling=off" in properties:
+ path += "/exception-handling-off"
+ if "link=static" in properties:
+ path += "/link-static"
+ if "rtti=off" in properties:
+ path += "/rtti-off"
+ if "runtime-link=static" in properties and target_type in ["exe"]:
+ path += "/runtime-link-static"
+ if "strip=on" in properties and target_type in ["dll", "exe", "obj2"]:
+ path += "/strip-on"
+ if get_target_os(properties) != default_target_os:
+ path += "/target-os-" + get_target_os(properties)
+ if "threading=multi" in properties:
+ path += "/threading-multi"
+ return path
+
+def test_toolset(toolset, version, property_sets):
+ t = BoostBuild.Tester()
+
+ t.set_tree("toolset-mock")
+
+ # Build necessary tools
+ t.run_build_system(["-sPYTHON_CMD=%s" % sys.executable], subdir="src")
+ set_default_target_os(t.read("src/bin/target-os.txt").strip())
+
+ for properties in property_sets:
+ t.set_toolset(toolset + "-" + version, get_target_os(properties))
+ properties = adjust_properties(properties)
+ def path(t):
+ return toolset.split("-")[0] + "-*" + version + compute_path(properties, t)
+ os.environ["B2_PROPERTIES"] = " ".join(expand_properties(properties))
+ t.run_build_system(["--user-config=", "-sPYTHON_CMD=%s" % sys.executable] + properties)
+ t.expect_addition("bin/%s/lib.obj" % (path("obj")))
+ if "link=static" not in properties:
+ t.expect_addition("bin/%s/l1.dll" % (path("dll")))
+ else:
+ t.expect_addition("bin/%s/l1.lib" % (path("lib")))
+ t.expect_addition("bin/%s/main.obj" % (path("obj2")))
+ t.expect_addition("bin/%s/test.exe" % (path("exe")))
+ t.expect_nothing_more()
+ t.rm("bin")
+
+ t.cleanup()
diff --git a/src/boost/tools/build/test/abs_workdir.py b/src/boost/tools/build/test/abs_workdir.py
new file mode 100644
index 000000000..fa6aadc58
--- /dev/null
+++ b/src/boost/tools/build/test/abs_workdir.py
@@ -0,0 +1,26 @@
+# Niklaus Giger, 2005-03-15
+# Testing whether we may run a test in absolute directories. There are no tests
+# for temporary directories as this is implictly tested in a lot of other cases.
+
+# TODO: Move to a separate testing-system test group.
+# TODO: Make the test not display any output on success.
+# TODO: Make sure implemented path handling is correct under Windows, Cygwin &
+# Unix/Linux.
+
+import BoostBuild
+import os
+import tempfile
+
+t = BoostBuild.Tester(["-ffile.jam"], workdir=os.getcwd(), pass_d0=False,
+ pass_toolset=False)
+
+t.write("file.jam", "EXIT [ PWD ] : 0 ;")
+
+t.run_build_system()
+t.expect_output_lines("*%s*" % tempfile.gettempdir(), False)
+t.expect_output_lines("*build/v2/test*")
+
+t.run_build_system(status=1, subdir="/must/fail/with/absolute/path",
+ stderr=None)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/absolute_sources.py b/src/boost/tools/build/test/absolute_sources.py
new file mode 100644
index 000000000..22ff1d080
--- /dev/null
+++ b/src/boost/tools/build/test/absolute_sources.py
@@ -0,0 +1,73 @@
+#!/usr/bin/python
+
+# Copyright 2003, 2004 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)
+
+# Test that sources with absolute names are handled OK.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "path-constant TOP : . ;")
+t.write("jamfile.jam", """\
+local pwd = [ PWD ] ;
+ECHO $(pwd) XXXXX ;
+exe hello : $(pwd)/hello.cpp $(TOP)/empty.cpp ;
+""")
+t.write("hello.cpp", "int main() {}\n")
+t.write("empty.cpp", "\n")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+t.rm(".")
+
+# Test a contrived case in which an absolute name is used in a standalone
+# project (not Jamfile). Moreover, the target with an absolute name is returned
+# via an 'alias' and used from another project.
+t.write("a.cpp", "int main() {}\n")
+t.write("jamfile.jam", "exe a : /standalone//a ;")
+t.write("jamroot.jam", "import standalone ;")
+t.write("standalone.jam", """\
+import project ;
+project.initialize $(__name__) ;
+project standalone ;
+local pwd = [ PWD ] ;
+alias a : $(pwd)/a.cpp ;
+""")
+
+t.write("standalone.py", """
+from b2.manager import get_manager
+
+# FIXME: this is ugly as death
+get_manager().projects().initialize(__name__)
+
+import os ;
+
+# This use of list as parameter is also ugly.
+project(['standalone'])
+
+pwd = os.getcwd()
+alias('a', [os.path.join(pwd, 'a.cpp')])
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+
+# Test absolute path in target ids.
+t.rm(".")
+
+t.write("d1/jamroot.jam", "")
+t.write("d1/jamfile.jam", "exe a : a.cpp ;")
+t.write("d1/a.cpp", "int main() {}\n")
+t.write("d2/jamroot.jam", "")
+t.write("d2/jamfile.jam", """\
+local pwd = [ PWD ] ;
+alias x : $(pwd)/../d1//a ;
+""")
+
+t.run_build_system(subdir="d2")
+t.expect_addition("d1/bin/$toolset/debug*/a.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/alias.py b/src/boost/tools/build/test/alias.py
new file mode 100644
index 000000000..132e4c390
--- /dev/null
+++ b/src/boost/tools/build/test/alias.py
@@ -0,0 +1,107 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# 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)
+
+import BoostBuild
+
+
+###############################################################################
+#
+# test_alias_rule()
+# -----------------
+#
+###############################################################################
+
+def test_alias_rule(t):
+ """Basic alias rule test."""
+
+ t.write("jamroot.jam", """\
+exe a : a.cpp ;
+exe b : b.cpp ;
+exe c : c.cpp ;
+
+alias bin1 : a ;
+alias bin2 : a b ;
+
+alias src : s.cpp ;
+exe hello : hello.cpp src ;
+""")
+
+ t.write("a.cpp", "int main() {}\n")
+ t.copy("a.cpp", "b.cpp")
+ t.copy("a.cpp", "c.cpp")
+ t.copy("a.cpp", "hello.cpp")
+ t.write("s.cpp", "")
+
+ # Check that targets to which "bin1" refers are updated, and only those.
+ t.run_build_system(["bin1"])
+ t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * "a.exe a.obj")
+ t.expect_nothing_more()
+
+ # Try again with "bin2"
+ t.run_build_system(["bin2"])
+ t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * "b.exe b.obj")
+ t.expect_nothing_more()
+
+ # Try building everything, making sure 'hello' target is created.
+ t.run_build_system()
+ t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * \
+ "hello.exe hello.obj")
+ t.expect_addition("bin/$toolset/debug*/s.obj")
+ t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * "c.exe c.obj")
+ t.expect_nothing_more()
+
+
+###############################################################################
+#
+# test_alias_source_usage_requirements()
+# --------------------------------------
+#
+###############################################################################
+
+def test_alias_source_usage_requirements(t):
+ """
+ Check whether usage requirements are propagated via "alias". In case they
+ are not, linking will fail as there will be no main() function defined
+ anywhere in the source.
+
+ """
+ t.write("jamroot.jam", """\
+lib l : l.cpp : : : <define>WANT_MAIN ;
+alias la : l ;
+exe main : main.cpp la ;
+""")
+
+ t.write("l.cpp", """\
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+ t.write("main.cpp", """\
+#ifdef WANT_MAIN
+int main() {}
+#endif
+""")
+
+ t.run_build_system()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+t = BoostBuild.Tester(use_test_config=False)
+
+test_alias_rule(t)
+test_alias_source_usage_requirements(t)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/alternatives.py b/src/boost/tools/build/test/alternatives.py
new file mode 100644
index 000000000..7a52427d2
--- /dev/null
+++ b/src/boost/tools/build/test/alternatives.py
@@ -0,0 +1,129 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# 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)
+
+# Test main target alternatives.
+
+import BoostBuild
+import string
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# Test that basic alternatives selection works.
+t.write("jamroot.jam", "")
+
+t.write("jamfile.jam", """
+exe a : a_empty.cpp ;
+exe a : a.cpp : <variant>release ;
+""")
+
+t.write("a_empty.cpp", "")
+
+t.write("a.cpp", "int main() {}\n")
+
+t.run_build_system(["release"])
+
+t.expect_addition("bin/$toolset/release*/a.exe")
+
+# Test that alternative selection works for ordinary properties, in particular
+# user-defined.
+t.write("jamroot.jam", "")
+
+t.write("jamfile.jam", """
+import feature ;
+feature.feature X : off on : propagated ;
+exe a : b.cpp ;
+exe a : a.cpp : <X>on ;
+""")
+t.write("b.cpp", "int main() {}\n")
+
+t.rm("bin")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/b.obj")
+
+t.run_build_system(["X=on"])
+t.expect_addition("bin/$toolset/debug/X-on*/a.obj")
+
+t.rm("bin")
+
+# Test that everything works ok even with the default build.
+t.write("jamfile.jam", """\
+exe a : a_empty.cpp : <variant>release ;
+exe a : a.cpp : <variant>debug ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+
+# Test that only properties which are in the build request matter for
+# alternative selection. IOW, alternative with <variant>release is better than
+# one with <variant>debug when building the release variant.
+t.write("jamfile.jam", """\
+exe a : a_empty.cpp : <variant>debug ;
+exe a : a.cpp : <variant>release ;
+""")
+
+t.run_build_system(["release"])
+t.expect_addition("bin/$toolset/release*/a.exe")
+
+# Test that free properties do not matter. We really do not want <cxxflags>
+# property in build request to affect alternative selection.
+t.write("jamfile.jam", """
+exe a : a_empty.cpp : <variant>debug <define>FOO <include>BAR ;
+exe a : a.cpp : <variant>release ;
+""")
+
+t.rm("bin/$toolset/release/a.exe")
+t.rm("bin/$toolset/release/*/a.exe")
+t.run_build_system(["release", "define=FOO"])
+t.expect_addition("bin/$toolset/release*/a.exe")
+
+# Test that ambiguity is reported correctly.
+t.write("jamfile.jam", """\
+exe a : a_empty.cpp ;
+exe a : a.cpp ;
+""")
+t.run_build_system(["--no-error-backtrace"], status=None)
+t.expect_output_lines("error: No best alternative for ./a")
+
+# Another ambiguity test: two matches properties in one alternative are neither
+# better nor worse than a single one in another alternative.
+t.write("jamfile.jam", """\
+exe a : a_empty.cpp : <optimization>off <profiling>off ;
+exe a : a.cpp : <debug-symbols>on ;
+""")
+
+t.run_build_system(["--no-error-backtrace"], status=None)
+t.expect_output_lines("error: No best alternative for ./a")
+t.rm("bin")
+
+# Test that we can have alternative without sources.
+t.write("jamfile.jam", """\
+alias specific-sources ;
+import feature ;
+feature.extend os : MAGIC ;
+alias specific-sources : b.cpp : <os>MAGIC ;
+exe a : a.cpp specific-sources ;
+""")
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+t.rm("bin")
+
+# Test that subfeatures are expanded in alternatives
+# and that unknown subfeatures fail to match instead of
+# causing errors.
+t.write("jamfile.jam", """\
+import feature : feature subfeature ;
+feature X : off on : propagated ;
+subfeature X on : version : 1 : propagated ;
+exe a : a.cpp : <X>on-1 ;
+exe a : a_empty.cpp ;
+exe a : a_empty.cpp : <X>on-2 ;
+""")
+t.run_build_system(["X=on-1"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/always.py b/src/boost/tools/build/test/always.py
new file mode 100644
index 000000000..954503467
--- /dev/null
+++ b/src/boost/tools/build/test/always.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+# Copyright 2016 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("main.cpp", """\
+int main() {}
+""")
+
+t.write("Jamroot", """\
+exe test : main.cpp ;
+always test ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/main.obj")
+t.expect_addition("bin/$toolset/debug*/test.exe")
+t.expect_nothing_more()
+
+t.run_build_system()
+t.expect_touch("bin/$toolset/debug*/main.obj")
+t.expect_touch("bin/$toolset/debug*/test.exe")
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/bad_dirname.py b/src/boost/tools/build/test/bad_dirname.py
new file mode 100644
index 000000000..47e4114b7
--- /dev/null
+++ b/src/boost/tools/build/test/bad_dirname.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+# 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)
+
+# Regression test: when directory of project root contained regex
+# metacharacters, B2 failed to work. Bug reported by Michael Stevens.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("bad[abc]dirname/jamfile.jam", """
+""")
+
+t.write("bad[abc]dirname/jamroot.jam", """
+""")
+
+t.run_build_system(subdir="bad[abc]dirname")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/boost-build.jam b/src/boost/tools/build/test/boost-build.jam
new file mode 100644
index 000000000..668452daf
--- /dev/null
+++ b/src/boost/tools/build/test/boost-build.jam
@@ -0,0 +1,14 @@
+# Copyright 2002, 2003 Dave Abrahams
+# 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)
+
+# Assume BOOST_BUILD_PATH point to the 'test' directory.
+# We need to leave 'test' there, so that 'test-config.jam'
+# can be found, but also add parent directory, to find
+# all the other modules.
+
+BOOST_BUILD_PATH = $(BOOST_BUILD_PATH)/.. $(BOOST_BUILD_PATH) ;
+
+# Find the boost build system in the ../kernel directory.
+boost-build ../src/kernel ;
diff --git a/src/boost/tools/build/test/boostbook.py b/src/boost/tools/build/test/boostbook.py
new file mode 100644
index 000000000..672d63da4
--- /dev/null
+++ b/src/boost/tools/build/test/boostbook.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+# Copyright 2004, 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)
+
+import BoostBuild
+import string
+
+t = BoostBuild.Tester()
+
+t.set_tree("boostbook")
+
+# For some reason, the messages are sent to stderr.
+t.run_build_system()
+t.fail_test(t.stdout().find("""Writing boost/A.html for refentry(boost.A)
+Writing library/reference.html for section(library.reference)
+Writing index.html for chapter(library)
+Writing docs_HTML.manifest
+""") == -1)
+t.expect_addition(["html/boost/A.html", "html/index.html"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/boostbook/a.hpp b/src/boost/tools/build/test/boostbook/a.hpp
new file mode 100644
index 000000000..5fab129a9
--- /dev/null
+++ b/src/boost/tools/build/test/boostbook/a.hpp
@@ -0,0 +1,16 @@
+/* Copyright 2004, 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) */
+
+
+// Seems like Boostbook does like classes outside of namespaces,
+// and won't generate anything for them.
+namespace boost {
+
+/// A class
+class A {
+public:
+ /// A constructor
+ A();
+};
+}
diff --git a/src/boost/tools/build/test/boostbook/docs.xml b/src/boost/tools/build/test/boostbook/docs.xml
new file mode 100644
index 000000000..c2d9b1f88
--- /dev/null
+++ b/src/boost/tools/build/test/boostbook/docs.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+
+<!-- Copyright 2004 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) -->
+
+<library
+ name="library"
+ dirname="librarys" id="library"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <author>
+ <firstname>Joe</firstname>
+ <surname>Hacker</surname>
+ </author>
+
+ <copyright>
+ <year>7002</year>
+ <holder>Joe Hacker</holder>
+ </copyright>
+
+ </libraryinfo>
+
+ <title>Documentation</title>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>This is introduction</para>
+
+ </section>
+
+ <xi:include href="autodoc.xml"/>
+</library>
diff --git a/src/boost/tools/build/test/boostbook/jamroot.jam b/src/boost/tools/build/test/boostbook/jamroot.jam
new file mode 100644
index 000000000..94564ca29
--- /dev/null
+++ b/src/boost/tools/build/test/boostbook/jamroot.jam
@@ -0,0 +1,3 @@
+
+boostbook docs : docs.xml autodoc ;
+doxygen autodoc : [ glob *.hpp ] ;
diff --git a/src/boost/tools/build/test/build_dir.py b/src/boost/tools/build/test/build_dir.py
new file mode 100644
index 000000000..3d1177bc0
--- /dev/null
+++ b/src/boost/tools/build/test/build_dir.py
@@ -0,0 +1,107 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 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)
+
+# Test that we can change build directory using the 'build-dir' project
+# attribute.
+
+import BoostBuild
+import string
+import os
+
+t = BoostBuild.Tester(use_test_config=False)
+
+
+# Test that top-level project can affect build dir.
+t.write("jamroot.jam", "import gcc ;")
+t.write("jamfile.jam", """\
+project : build-dir build ;
+exe a : a.cpp ;
+build-project src ;
+""")
+
+t.write("a.cpp", "int main() {}\n")
+
+t.write("src/jamfile.jam", "exe b : b.cpp ; ")
+
+t.write("src/b.cpp", "int main() {}\n")
+
+t.run_build_system()
+
+t.expect_addition(["build/$toolset/debug*/a.exe",
+ "build/src/$toolset/debug*/b.exe"])
+
+# Test that building from child projects work.
+t.run_build_system(subdir='src')
+t.ignore("build/config.log")
+t.ignore("build/project-cache.jam")
+t.expect_nothing_more()
+
+# Test that project can override build dir.
+t.write("jamfile.jam", """\
+exe a : a.cpp ;
+build-project src ;
+""")
+
+t.write("src/jamfile.jam", """\
+project : build-dir build ;
+exe b : b.cpp ;
+""")
+
+t.run_build_system()
+t.expect_addition(["bin/$toolset/debug*/a.exe",
+ "src/build/$toolset/debug*/b.exe"])
+
+# Now test the '--build-dir' option.
+t.rm(".")
+t.write("jamroot.jam", "")
+
+# Test that we get an error when no project id is specified.
+t.run_build_system(["--build-dir=foo"])
+t.fail_test(t.stdout().find(
+ "warning: the --build-dir option will be ignored") == -1)
+
+t.write("jamroot.jam", """\
+project foo ;
+exe a : a.cpp ;
+build-project sub ;
+""")
+t.write("a.cpp", "int main() {}\n")
+t.write("sub/jamfile.jam", "exe b : b.cpp ;\n")
+t.write("sub/b.cpp", "int main() {}\n")
+
+t.run_build_system(["--build-dir=build"])
+t.expect_addition(["build/foo/$toolset/debug*/a.exe",
+ "build/foo/sub/$toolset/debug*/b.exe"])
+
+t.write("jamroot.jam", """\
+project foo : build-dir bin.v2 ;
+exe a : a.cpp ;
+build-project sub ;
+""")
+
+t.run_build_system(["--build-dir=build"])
+t.expect_addition(["build/foo/bin.v2/$toolset/debug*/a.exe",
+ "build/foo/bin.v2/sub/$toolset/debug*/b.exe"])
+
+# Try building in subdir. We expect that the entire build tree with be in
+# 'sub/build'. Today, I am not sure if this is what the user expects, but let
+# it be.
+t.rm('build')
+t.run_build_system(["--build-dir=build"], subdir="sub")
+t.expect_addition(["sub/build/foo/bin.v2/sub/$toolset/debug*/b.exe"])
+
+t.write("jamroot.jam", """\
+project foo : build-dir %s ;
+exe a : a.cpp ;
+build-project sub ;
+""" % os.getcwd().replace('\\', '\\\\'))
+
+t.run_build_system(["--build-dir=build"], status=1)
+t.fail_test(t.stdout().find(
+ "Absolute directory specified via 'build-dir' project attribute") == -1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/build_file.py b/src/boost/tools/build/test/build_file.py
new file mode 100644
index 000000000..1ae860917
--- /dev/null
+++ b/src/boost/tools/build/test/build_file.py
@@ -0,0 +1,170 @@
+#!/usr/bin/python
+
+# Copyright (C) 2006. Vladimir Prus
+# Copyright (C) 2008. Jurko Gospodnetic
+# 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)
+
+# Tests that we explicitly request a file (not target) to be built by
+# specifying its name on the command line.
+
+import BoostBuild
+
+
+###############################################################################
+#
+# test_building_file_from_specific_project()
+# ------------------------------------------
+#
+###############################################################################
+
+def test_building_file_from_specific_project():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", """\
+exe hello : hello.cpp ;
+exe hello2 : hello.cpp ;
+build-project sub ;
+""")
+ t.write("hello.cpp", "int main() {}\n")
+ t.write("sub/jamfile.jam", """
+exe hello : hello.cpp ;
+exe hello2 : hello.cpp ;
+exe sub : hello.cpp ;
+""")
+ t.write("sub/hello.cpp", "int main() {}\n")
+
+ t.run_build_system(["sub", t.adjust_suffix("hello.obj")])
+ t.expect_output_lines("*depends on itself*", False)
+ t.expect_addition("sub/bin/$toolset/debug*/hello.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_building_file_from_specific_target()
+# -----------------------------------------
+#
+###############################################################################
+
+def test_building_file_from_specific_target():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", """\
+exe hello1 : hello1.cpp ;
+exe hello2 : hello2.cpp ;
+exe hello3 : hello3.cpp ;
+""")
+ t.write("hello1.cpp", "int main() {}\n")
+ t.write("hello2.cpp", "int main() {}\n")
+ t.write("hello3.cpp", "int main() {}\n")
+
+ t.run_build_system(["hello1", t.adjust_suffix("hello1.obj")])
+ t.expect_addition("bin/$toolset/debug*/hello1.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_building_missing_file_from_specific_target()
+# -------------------------------------------------
+#
+###############################################################################
+
+def test_building_missing_file_from_specific_target():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", """\
+exe hello1 : hello1.cpp ;
+exe hello2 : hello2.cpp ;
+exe hello3 : hello3.cpp ;
+""")
+ t.write("hello1.cpp", "int main() {}\n")
+ t.write("hello2.cpp", "int main() {}\n")
+ t.write("hello3.cpp", "int main() {}\n")
+
+ obj = t.adjust_suffix("hello2.obj")
+ t.run_build_system(["hello1", obj], status=1)
+ t.expect_output_lines("don't know how to make*" + obj)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_building_multiple_files_with_different_names()
+# ---------------------------------------------------
+#
+###############################################################################
+
+def test_building_multiple_files_with_different_names():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", """\
+exe hello1 : hello1.cpp ;
+exe hello2 : hello2.cpp ;
+exe hello3 : hello3.cpp ;
+""")
+ t.write("hello1.cpp", "int main() {}\n")
+ t.write("hello2.cpp", "int main() {}\n")
+ t.write("hello3.cpp", "int main() {}\n")
+
+ t.run_build_system([t.adjust_suffix("hello1.obj"), t.adjust_suffix(
+ "hello2.obj")])
+ t.expect_addition("bin/$toolset/debug*/hello1.obj")
+ t.expect_addition("bin/$toolset/debug*/hello2.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_building_multiple_files_with_the_same_name()
+# -------------------------------------------------
+#
+###############################################################################
+
+def test_building_multiple_files_with_the_same_name():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", """\
+exe hello : hello.cpp ;
+exe hello2 : hello.cpp ;
+build-project sub ;
+""")
+ t.write("hello.cpp", "int main() {}\n")
+ t.write("sub/jamfile.jam", """
+exe hello : hello.cpp ;
+exe hello2 : hello.cpp ;
+exe sub : hello.cpp ;
+""")
+ t.write("sub/hello.cpp", "int main() {}\n")
+
+ t.run_build_system([t.adjust_suffix("hello.obj")])
+ t.expect_output_lines("*depends on itself*", False)
+ t.expect_addition("bin/$toolset/debug*/hello.obj")
+ t.expect_addition("sub/bin/$toolset/debug*/hello.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+test_building_file_from_specific_project()
+test_building_file_from_specific_target()
+test_building_missing_file_from_specific_target()
+test_building_multiple_files_with_different_names()
+test_building_multiple_files_with_the_same_name()
diff --git a/src/boost/tools/build/test/build_hooks.py b/src/boost/tools/build/test/build_hooks.py
new file mode 100644
index 000000000..9b8d37af1
--- /dev/null
+++ b/src/boost/tools/build/test/build_hooks.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Tests add-pre-build-hook and add-post-build-hook
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("Jamroot.jam", """
+import build-system ;
+build-system.add-pre-build-hook pre-build ;
+build-system.add-post-build-hook post-build ;
+
+rule pre-build ( )
+{
+ ECHO "in" pre-build hook ;
+}
+
+rule post-build ( okay ? )
+{
+ ECHO "in" post-build hook $(okay) ;
+}
+
+message show : building main targets ;
+""")
+
+t.run_build_system(stdout="""\
+building main targets
+in pre-build hook
+...found 1 target...
+in post-build hook ok
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/build_no.py b/src/boost/tools/build/test/build_no.py
new file mode 100644
index 000000000..771e697a7
--- /dev/null
+++ b/src/boost/tools/build/test/build_no.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Tests that <build>no property prevents a target from being built.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "exe hello : hello.cpp : <variant>debug:<build>no ;")
+t.write("hello.cpp", "int main() {}\n")
+
+t.run_build_system()
+t.expect_nothing_more()
+
+t.run_build_system(["release"])
+t.expect_addition("bin/$toolset/release*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/builtin_echo.py b/src/boost/tools/build/test/builtin_echo.py
new file mode 100755
index 000000000..309236173
--- /dev/null
+++ b/src/boost/tools/build/test/builtin_echo.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+# Copyright 2012 Steven Watanabe
+# 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 tests the ECHO rule.
+
+import BoostBuild
+
+def test_echo(name):
+ t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
+
+ t.write("file.jam", """\
+%s ;
+UPDATE ;
+""" % name)
+ t.run_build_system(stdout="\n")
+
+ t.write("file.jam", """\
+%s a message ;
+UPDATE ;
+""" % name)
+ t.run_build_system(stdout="a message\n")
+
+ t.cleanup()
+
+test_echo("ECHO")
+test_echo("Echo")
+test_echo("echo")
diff --git a/src/boost/tools/build/test/builtin_exit.py b/src/boost/tools/build/test/builtin_exit.py
new file mode 100755
index 000000000..1db869366
--- /dev/null
+++ b/src/boost/tools/build/test/builtin_exit.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+# Copyright 2012 Steven Watanabe
+# 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 tests the EXIT rule.
+
+import BoostBuild
+
+def test_exit(name):
+ t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
+
+ t.write("file.jam", "%s ;" % name)
+ t.run_build_system(status=1, stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", "%s : 0 ;" % name)
+ t.run_build_system(stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", "%s : 1 ;" % name)
+ t.run_build_system(status=1, stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", "%s : 2 ;" % name)
+ t.run_build_system(status=2, stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", "%s a message ;" % name)
+ t.run_build_system(status=1, stdout="a message\n")
+ t.rm(".")
+
+ t.write("file.jam", "%s a message : 0 ;" % name)
+ t.run_build_system(stdout="a message\n")
+ t.rm(".")
+
+ t.cleanup()
+
+test_exit("EXIT")
+test_exit("Exit")
+test_exit("exit")
diff --git a/src/boost/tools/build/test/builtin_glob.py b/src/boost/tools/build/test/builtin_glob.py
new file mode 100755
index 000000000..b68e7eebe
--- /dev/null
+++ b/src/boost/tools/build/test/builtin_glob.py
@@ -0,0 +1,87 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# 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 tests the GLOB rule.
+
+import os
+import BoostBuild
+
+def test_glob(files, glob, expected, setup=""):
+ t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
+ t.write("file.jam", setup + """
+ for local p in [ SORT %s ]
+ {
+ ECHO $(p) ;
+ }
+ UPDATE ;
+ """ % glob)
+ for f in files:
+ t.write(f, "")
+ # convert / into \ on windows
+ expected = [os.path.join(*p.split("/")) for p in expected]
+ expected.sort()
+ t.run_build_system(stdout="\n".join(expected + [""]))
+ t.cleanup()
+
+# one or both arguments empty
+test_glob([], "[ GLOB : ]", [])
+test_glob([], "[ GLOB . : ]", [])
+test_glob([], "[ GLOB : * ]", [])
+
+# a single result
+test_glob([], "[ GLOB . : * ]", ["./file.jam"])
+
+# * can match any number of characters
+test_glob([], "[ GLOB . : file*.jam ]", ["./file.jam"])
+test_glob([], "[ GLOB . : f*am ]", ["./file.jam"])
+# ? should match a single character, but not more than one
+test_glob([], "[ GLOB . : fi?e.?am ]", ["./file.jam"])
+test_glob([], "[ GLOB . : fi?.jam ]", [])
+# [abc-fh-j] matches a set of characters
+test_glob([], '[ GLOB . : "[f][i][l][e].jam" ]', ["./file.jam"])
+test_glob([], '[ GLOB . : "[fghau][^usdrwe][k-o][^f-s].jam" ]', ["./file.jam"])
+# \x matches x
+test_glob([], "[ GLOB . : \\f\\i\\l\\e.jam ]", ["./file.jam"])
+
+# multiple results
+test_glob(["test.txt"], "[ GLOB . : * ]", ["./file.jam", "./test.txt"])
+
+# directories
+test_glob(["dir1/dir2/test.txt"], "[ GLOB dir1 : * ]", ["dir1/dir2"]);
+
+# non-existent directory
+test_glob([], "[ GLOB dir1 : * ] ", [])
+
+# multiple directories and patterns
+test_glob(["dir1/file1.txt", "dir2/file1.txt",
+ "dir2/file2.txt"],
+ "[ GLOB dir1 dir2 : file1* file2* ]",
+ ["dir1/file1.txt", "dir2/file1.txt",
+ "dir2/file2.txt"])
+
+# The directory can contain . and ..
+test_glob(["dir/test.txt"], "[ GLOB dir/. : test.txt ]", ["dir/./test.txt"])
+test_glob(["dir/test.txt"], "[ GLOB dir/.. : file.jam ]", ["dir/../file.jam"])
+
+# On case insensitive filesystems, the result should
+# be normalized. It should NOT be downcased.
+test_glob(["TEST.TXT"], "[ GLOB . : TEST.TXT ]", ["./TEST.TXT"])
+
+case_insensitive = (os.path.normcase("FILE") == "file")
+
+if case_insensitive:
+ test_glob(["TEST.TXT"], "[ GLOB . : test.txt ]", ["./TEST.TXT"])
+ # This used to fail because the caching routines incorrectly
+ # reported that . and .. do not exist.
+ test_glob(["D1/D2/TEST.TXT"], "[ GLOB D1/./D2 : test.txt ]",
+ ["D1/./D2/TEST.TXT"])
+ test_glob(["D1/TEST.TXT", "TEST.TXT"], "[ GLOB D1/../D1 : test.txt ]",
+ ["D1/../D1/TEST.TXT"])
+ # This also failed because directories that were first found
+ # by GLOB were recorded as non-existent.
+ test_glob(["D1/D2/TEST.TXT"], "[ GLOB d1/d2 : test.txt ]",
+ ["D1/D2/TEST.TXT"],
+ "GLOB . : * ;")
diff --git a/src/boost/tools/build/test/builtin_glob_archive.py b/src/boost/tools/build/test/builtin_glob_archive.py
new file mode 100644
index 000000000..8cbc3be58
--- /dev/null
+++ b/src/boost/tools/build/test/builtin_glob_archive.py
@@ -0,0 +1,217 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# 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 tests the GLOB_ARCHIVE rule.
+
+import os
+import sys
+try:
+ from StringIO import StringIO
+except:
+ from io import StringIO
+import BoostBuild
+
+vms = ( os.name == 'posix' and sys.platform == 'OpenVMS')
+
+t = BoostBuild.Tester()
+
+## Setup test archive sources and symbols they contain.
+sources = {
+ "a.cpp" : ["a"],
+ "b.cpp" : ["b"],
+ "b_match.cpp" : ["b_match"],
+ "c/nopath_check.cpp" : ["nopath_check"],
+ "CaseCheck.cpp" : ["CaseCheck"],
+ "seq_check1.cpp" : ["seq_check1"],
+ "seq_check2.cpp" : ["seq_check2"],
+ "seq_check3.cpp" : ["seq_check3"],
+ "symbols_check.c" : ["symbol", "symbol_match"],
+ "members_and_symbols_check.c" : ["member_and_symbol_match"],
+ "symbol_case_check.c" : ["SymbolCaseCheck"],
+ "main_check.cpp" : ["main"]
+}
+
+
+def create_sources(path, sources):
+ for s in sources :
+ f = os.path.join(path, s)
+ t.write(f, "")
+ output = StringIO()
+ for sym in sources[s] :
+ output.write("int %s() { return 0; }\n" % sym)
+ t.write(f, output.getvalue())
+
+
+def setup_archive(name, sources):
+ global archive
+ global obj_suffix
+ archive = t.adjust_names(name)[0]
+ obj_suffix = t.adjust_names(".obj")[0]
+ output = StringIO()
+ t.write("jamroot.jam","")
+ output.write("""\
+static-lib %s :
+""" % name.split(".")[0])
+ ## sort the sources, so we can test order of the globbed members
+ for s in sorted(sources) :
+ output.write("""\
+ %s
+""" % s)
+ output.write("""\
+ ;
+""")
+ t.write("lib/jamfile.jam", output.getvalue())
+ create_sources("lib", sources)
+ t.run_build_system(subdir="lib")
+ built_archive = "lib/bin/$toolset/debug*/%s" % name
+ t.expect_addition(built_archive)
+ t.copy(built_archive, name)
+ t.rm("lib")
+
+
+def test_glob_archive(archives, glob, expected, sort_results = False):
+ output = StringIO()
+ ## replace placeholders
+ glob = glob.replace("$archive1", archives[0]).replace("$obj", obj_suffix)
+ expected = [ m.replace("$archive1",
+ archives[0]).replace("$obj", obj_suffix) for m in expected ]
+ if len(archives) > 1 :
+ glob = glob.replace("$archive2", archives[1]).replace("$obj", obj_suffix)
+ expected = [ m.replace("$archive2",
+ archives[1]).replace("$obj", obj_suffix) for m in expected ]
+ ## create test jamfile
+ if sort_results : glob = "[ SORT %s ]" % glob
+ output.write("""\
+ for local p in %s
+ {
+ ECHO $(p) ;
+ }
+ UPDATE ;
+ """ % glob)
+ t.write("file.jam", output.getvalue())
+ ## run test jamfile and match against expected results
+ if sort_results : expected.sort()
+ t.run_build_system(["-ffile.jam"], stdout="\n".join(expected + [""]))
+ t.rm("file.jam")
+
+
+## RUN TESTS
+setup_archive("auxilliary1.lib", sources)
+archive1 = archive
+setup_archive("auxilliary2.lib", sources)
+archive2 = archive
+
+## all arguments empty
+test_glob_archive([archive1], "[ GLOB_ARCHIVE ]", [])
+
+## empty query
+test_glob_archive([archive1], "[ GLOB_ARCHIVE $archive1 : ]", [])
+
+## no-match
+test_glob_archive([archive1], "[ GLOB_ARCHIVE $archive1 : a ]", [])
+
+## match exact
+test_glob_archive([archive1], "[ GLOB_ARCHIVE $archive1 : a$obj ]",
+ ["$archive1(a$obj)"])
+
+## glob wildcards:1
+test_glob_archive([archive1], "[ GLOB_ARCHIVE $archive1 : b.* ]",
+ ["$archive1(b$obj)"])
+
+## glob wildcards:2
+test_glob_archive([archive1], '[ GLOB_ARCHIVE $archive1 : "\\b?match[\.]*" ]',
+ ["$archive1(b_match$obj)"])
+
+## glob wildcards:3
+test_glob_archive([archive1], "[ SORT [ GLOB_ARCHIVE $archive1 : b* ] ]",
+ ["$archive1(b$obj)", "$archive1(b_match$obj)"])
+
+## glob multiple patterns with multiple results.
+test_glob_archive([archive1], "[ SORT [ GLOB_ARCHIVE $archive1 : b.* b_* ] ]",
+ ["$archive1(b$obj)", "$archive1(b_match$obj)"])
+
+## glob multiple archives and patterns.
+test_glob_archive([archive1, archive2],
+ "[ SORT [ GLOB_ARCHIVE $archive1 $archive2 : b.* b_* ] ]",
+ ["$archive1(b$obj)", "$archive1(b_match$obj)",
+ "$archive2(b$obj)", "$archive2(b_match$obj)"])
+
+## glob same archive multiple times.
+test_glob_archive([archive1, archive1],
+ "[ GLOB_ARCHIVE $archive1 $archive2 $archive1 : b.* ]",
+ ["$archive1(b$obj)", "$archive2(b$obj)", "$archive1(b$obj)"])
+
+## returned archive member has no path, even though its source object-file did.
+## this is rather NT-specific, where members also store their object-file's path.
+test_glob_archive([archive1], "[ GLOB_ARCHIVE $archive1 : nopath_check$obj ]",
+ ["$archive1(nopath_check$obj)"])
+
+## case insensitive matching, when archives support case sensitive member names.
+## VMS implementation forces case-insensitive matching and downcased member names.
+
+case_sensitive_members = ( not vms )
+
+if case_sensitive_members:
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : casecheck$obj : true ]",
+ ["$archive1(CaseCheck$obj)"])
+elif vms:
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : CaseCheck$obj : false ]",
+ ["$archive1(casecheck$obj)"])
+
+
+## test the order of matched members, in general it should match the
+## insertion sequence.
+test_glob_archive([archive1], "[ SORT [ GLOB_ARCHIVE $archive1 : seq_check*$obj ] ]",
+ ["$archive1(seq_check1$obj)", "$archive1(seq_check2$obj)",
+ "$archive1(seq_check3$obj)"])
+
+
+## glob members by symbols they contain.
+## Currently supported only on VMS.
+symbol_glob_supported = ( vms )
+
+if symbol_glob_supported :
+ ## NOTE: generated symbols are compiler-dependent and may be specifically
+ ## mangled (as in C++ case), so globbing by exact symbol is non-trivial.
+ ## However, C-generated symbols are likely to have more portable names,
+ ## so for the glob-by-symbol tests we glob C-generated archive members.
+
+ ## glob members by exact symbol.
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : : : symbol ]",
+ ["$archive1(symbols_check$obj)"])
+
+ ## glob members by symbol wildcard.
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : : : symbol_* ]",
+ ["$archive1(symbols_check$obj)"])
+
+ ## glob members by member pattern AND symbol pattern.
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : *symbol* : : *member* ]",
+ ["$archive1(members_and_symbols_check$obj)"])
+
+ ## case insensitive symbol glob.
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : : true : symbolcasecheck ]",
+ ["$archive1(symbol_case_check$obj)"])
+
+ ## glob member that contains main symbol.
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : : : main _main ]",
+ ["$archive1(main_check$obj)"])
+
+else:
+ test_glob_archive([archive1],
+ "[ GLOB_ARCHIVE $archive1 : : : symbol ]",
+ [])
+
+
+t.cleanup()
+
diff --git a/src/boost/tools/build/test/builtin_readlink.py b/src/boost/tools/build/test/builtin_readlink.py
new file mode 100755
index 000000000..e57d7286a
--- /dev/null
+++ b/src/boost/tools/build/test/builtin_readlink.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+# Copyright 2012 Steven Watanabe
+# 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 BoostBuild
+import os
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("link-target", "")
+os.symlink("link-target", "link")
+
+t.write("file.jam", """
+ECHO [ READLINK link ] ;
+EXIT [ READLINK link-target ] : 0 ;
+""")
+
+t.run_build_system(["-ffile.jam"], stdout="""link-target
+
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/builtin_split_by_characters.py b/src/boost/tools/build/test/builtin_split_by_characters.py
new file mode 100755
index 000000000..4a0a0e061
--- /dev/null
+++ b/src/boost/tools/build/test/builtin_split_by_characters.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+
+# Copyright 2012. Jurko Gospodnetic
+# 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 tests the SPLIT_BY_CHARACTERS rule.
+
+import BoostBuild
+
+def test_invalid(params, expected_error_line):
+ t = BoostBuild.Tester(pass_toolset=0)
+ t.write("file.jam", "SPLIT_BY_CHARACTERS %s ;" % params)
+ t.run_build_system(["-ffile.jam"], status=1)
+ t.expect_output_lines("[*] %s" % expected_error_line)
+ t.cleanup()
+
+def test_valid():
+ t = BoostBuild.Tester(pass_toolset=0)
+ t.write("jamroot.jam", """\
+import assert ;
+
+assert.result FooBarBaz : SPLIT_BY_CHARACTERS FooBarBaz : "" ;
+assert.result FooBarBaz : SPLIT_BY_CHARACTERS FooBarBaz : x ;
+assert.result FooBa Baz : SPLIT_BY_CHARACTERS FooBarBaz : r ;
+assert.result FooBa Baz : SPLIT_BY_CHARACTERS FooBarBaz : rr ;
+assert.result FooBa Baz : SPLIT_BY_CHARACTERS FooBarBaz : rrr ;
+assert.result FooB rB z : SPLIT_BY_CHARACTERS FooBarBaz : a ;
+assert.result FooB B z : SPLIT_BY_CHARACTERS FooBarBaz : ar ;
+assert.result ooBarBaz : SPLIT_BY_CHARACTERS FooBarBaz : F ;
+assert.result FooBarBa : SPLIT_BY_CHARACTERS FooBarBaz : z ;
+assert.result ooBarBa : SPLIT_BY_CHARACTERS FooBarBaz : Fz ;
+assert.result F B rB z : SPLIT_BY_CHARACTERS FooBarBaz : oa ;
+assert.result Alib b : SPLIT_BY_CHARACTERS Alibaba : oa ;
+assert.result libaba : SPLIT_BY_CHARACTERS Alibaba : oA ;
+assert.result : SPLIT_BY_CHARACTERS FooBarBaz : FooBarBaz ;
+assert.result : SPLIT_BY_CHARACTERS FooBarBaz : FoBarz ;
+
+# Questionable results - should they return an empty string or an empty list?
+assert.result : SPLIT_BY_CHARACTERS "" : "" ;
+assert.result : SPLIT_BY_CHARACTERS "" : x ;
+assert.result : SPLIT_BY_CHARACTERS "" : r ;
+assert.result : SPLIT_BY_CHARACTERS "" : rr ;
+assert.result : SPLIT_BY_CHARACTERS "" : rrr ;
+assert.result : SPLIT_BY_CHARACTERS "" : oa ;
+""")
+ t.run_build_system()
+ t.cleanup()
+
+test_invalid("", "missing argument string")
+test_invalid("Foo", "missing argument delimiters")
+test_invalid(": Bar", "missing argument string")
+test_invalid("a : b : c", "extra argument c")
+test_invalid("a b : c", "extra argument b")
+test_invalid("a : b c", "extra argument c")
+test_valid()
diff --git a/src/boost/tools/build/test/bzip2.py b/src/boost/tools/build/test/bzip2.py
new file mode 100755
index 000000000..4e74c6023
--- /dev/null
+++ b/src/boost/tools/build/test/bzip2.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# 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 BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("bzip2/bzlib.h", 'bzip2')
+t.write("bzip2/blocksort.c", 'blocksort')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using bzip2 : : <source>$(here)/bzip2 ;
+alias bzip2 : /bzip2//bzip2 : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('blocksort.c', 'blocksort')
+action('-c -x c -I./bzip2 -o $blocksort.o $blocksort.c')
+action('--dll $blocksort.o -o $bz2.so')
+action('--archive $blocksort.o -o $bz2.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/bzip2/mock/debug/bz2.dll')
+t.expect_addition('bin/standalone/bzip2/mock/debug/link-static/bz2.lib')
+
+t.rm('bzip2')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('bzlib.h.cpp', '#include <bzlib.h>\\n')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using bzip2 ;
+exe test : test.cpp /bzip2//bzip2 : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=bz2 -o $config.exe')
+action('-c -x c++ $bzlib.h.cpp -o $bzlib.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=bz2 -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using bzip2 ;
+exe test : test.cpp /bzip2//bzip2 : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=bz2 -o $config.exe')
+action('-c -x c++ $bzlib.h.cpp -o $bzlib.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=bz2 -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using bzip2 : : <name>mybzlib <include>$(here)/bzip2 <search>$(here)/bzip2 ;
+exe test : test.cpp /bzip2//bzip2 : : <link>static <link>shared ;
+""")
+
+t.write('bzip2/bzlib.h', 'bzip2')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./bzip2 --static-lib=mybzlib -o $config.exe')
+action('-c -x c++ $test.cpp -I./bzip2 -o $test.o')
+action('$test.o -L./bzip2 --static-lib=mybzlib -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using bzip2 : : <name>mybzlib <include>$(here)/bzip2 <search>$(here)/bzip2 ;
+exe test : test.cpp /bzip2//bzip2 : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./bzip2 --shared-lib=mybzlib -o $config.exe')
+action('-c -x c++ $test.cpp -I./bzip2 -o $test.o')
+action('$test.o -L./bzip2 --shared-lib=mybzlib -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/c_file.py b/src/boost/tools/build/test/c_file.py
new file mode 100644
index 000000000..85407d5f1
--- /dev/null
+++ b/src/boost/tools/build/test/c_file.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# 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)
+
+# Test that C files are compiled by a C compiler.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+project ;
+exe hello : hello.cpp a.c ;
+""")
+
+t.write("hello.cpp", """
+extern "C" int foo();
+int main() { return foo(); }
+""")
+
+t.write("a.c", """
+// This will not compile unless in C mode.
+int foo()
+{
+ int new = 0;
+ new = (new+1)*7;
+ return new;
+}
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/chain.py b/src/boost/tools/build/test/chain.py
new file mode 100644
index 000000000..981e6ad11
--- /dev/null
+++ b/src/boost/tools/build/test/chain.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 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 tests that :
+# 1) the 'make' correctly assigns types to produced targets
+# 2) if 'make' creates targets of type CPP, they are correctly used.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# In order to correctly link this app, 'b.cpp', created by a 'make' rule, should
+# be compiled.
+
+t.write("jamroot.jam", "import gcc ;")
+
+t.write("jamfile.jam", r'''
+import os ;
+if [ os.name ] = NT
+{
+ actions create
+ {
+ echo int main() {} > $(<)
+ }
+}
+else
+{
+ actions create
+ {
+ echo "int main() {}" > $(<)
+ }
+}
+
+IMPORT $(__name__) : create : : create ;
+
+exe a : l dummy.cpp ;
+
+# Needs to be a static lib for Windows - main() cannot appear in DLL.
+static-lib l : a.cpp b.cpp ;
+
+make b.cpp : : create ;
+''')
+
+t.write("a.cpp", "")
+
+t.write("dummy.cpp", "// msvc needs at least one object file\n")
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/a.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/clean.py b/src/boost/tools/build/test/clean.py
new file mode 100644
index 000000000..dc72b924c
--- /dev/null
+++ b/src/boost/tools/build/test/clean.py
@@ -0,0 +1,104 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("a.cpp", "int main() {}\n")
+t.write("jamroot.jam", "exe a : a.cpp sub1//sub1 sub2//sub2 sub3//sub3 ;")
+t.write("sub1/jamfile.jam", """\
+lib sub1 : sub1.cpp sub1_2 ../sub2//sub2 ;
+lib sub1_2 : sub1_2.cpp ;
+""")
+
+t.write("sub1/sub1.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void sub1() {}
+""")
+
+t.write("sub1/sub1_2.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void sub1() {}
+""")
+
+t.write("sub2/jamfile.jam", "lib sub2 : sub2.cpp ;")
+t.write("sub2/sub2.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void sub2() {}
+""")
+
+t.write("sub3/jamroot.jam", "lib sub3 : sub3.cpp ;")
+t.write("sub3/sub3.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void sub3() {}
+""")
+
+# 'clean' should not remove files under separate jamroot.jam.
+t.run_build_system()
+t.run_build_system(["--clean"])
+t.expect_removal("bin/$toolset/debug*/a.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
+t.expect_removal("sub2/bin/$toolset/debug*/sub2.obj")
+t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
+
+# 'clean-all' removes everything it can reach.
+t.run_build_system()
+t.run_build_system(["--clean-all"])
+t.expect_removal("bin/$toolset/debug*/a.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
+t.expect_removal("sub2/bin/$toolset/debug*/sub2.obj")
+t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
+
+# 'clean' together with project target removes only under that project.
+t.run_build_system()
+t.run_build_system(["sub1", "--clean"])
+t.expect_nothing("bin/$toolset/debug*/a.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
+t.expect_nothing("sub2/bin/$toolset/debug*/sub2.obj")
+t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
+
+# 'clean-all' removes everything.
+t.run_build_system()
+t.run_build_system(["sub1", "--clean-all"])
+t.expect_nothing("bin/$toolset/debug*/a.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
+t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
+t.expect_removal("sub2/bin/$toolset/debug*/sub2.obj")
+t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
+
+# If main target is explicitly named, we should not remove files from other
+# targets.
+t.run_build_system()
+t.run_build_system(["sub1//sub1", "--clean"])
+t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
+t.expect_nothing("sub1/bin/$toolset/debug*/sub1_2.obj")
+t.expect_nothing("sub2/bin/$toolset/debug*/sub2.obj")
+t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
+
+# Regression test: sources of the 'cast' rule were mistakenly deleted.
+t.rm(".")
+t.write("jamroot.jam", """\
+import cast ;
+cast a cpp : a.h ;
+""")
+t.write("a.h", "")
+t.run_build_system(["--clean"])
+t.expect_nothing("a.h")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/cli_property_expansion.py b/src/boost/tools/build/test/cli_property_expansion.py
new file mode 100644
index 000000000..24c821617
--- /dev/null
+++ b/src/boost/tools/build/test/cli_property_expansion.py
@@ -0,0 +1,41 @@
+#!/usr/bin/python
+
+# Copyright 2015 Aaron Boman
+# 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)
+
+# Test that free property inside.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "")
+t.write(
+ "subdir/build.jam",
+ """
+ import feature ;
+ feature.feature my-feature : : free ;
+ """
+)
+t.write(
+ "subdir/subsubdir/build.jam",
+ """
+ exe hello : hello.c ;
+ """
+)
+t.write(
+ "subdir/subsubdir/hello.c",
+ r"""
+ #include <stdio.h>
+
+ int main(int argc, char **argv){
+ printf("%s\n", "Hello, World!");
+ }
+ """
+)
+
+# run from the root directory
+t.run_build_system(['subdir/subsubdir', 'my-feature="some value"'])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/collect_debug_info.py b/src/boost/tools/build/test/collect_debug_info.py
new file mode 100755
index 000000000..27a664928
--- /dev/null
+++ b/src/boost/tools/build/test/collect_debug_info.py
@@ -0,0 +1,341 @@
+#!/usr/bin/python
+
+# Copyright 2012 Jurko Gospodnetic
+# 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)
+
+# Temporarily enabled dummy test that always fails and is used to collect
+# extra debugging information from Boost Build test runner sites.
+
+import BoostBuild
+
+import os
+import re
+import sys
+
+
+###############################################################################
+#
+# Public interface.
+#
+###############################################################################
+
+def collectDebugInfo():
+ t = _init()
+
+ global tag
+
+ tag = "Python version"
+ try:
+ _info(sys.version)
+ except:
+ _info_exc()
+
+ tag = "Python platform"
+ try:
+ _info(sys.platform)
+ except:
+ _info_exc()
+
+ tag = "Boost Jam/Build version"
+ try:
+ _infoX(_getJamVersionInfo(t))
+ except:
+ _info_exc()
+
+ #_collectDebugInfo_environ()
+
+ # Report prepared annotations.
+ t.fail_test(1, dump_difference=False, dump_stdio=False, dump_stack=False)
+
+
+###############################################################################
+#
+# Private interface.
+#
+###############################################################################
+
+varSeparator = "###$^%~~~"
+
+
+def _collect(results, prefix, name, t):
+ results.append("%s - %s - os.getenv(): %r" % (prefix, name, os.getenv(
+ name)))
+ results.append("%s - %s - os.environ.get(): %r" % (prefix, name,
+ os.environ.get(name)))
+ external_values = _getExternalValues(t, name)
+ results.append("%s - %s - external: %r" % (prefix, name,
+ external_values[name]))
+
+
+def _collectDebugInfo_environ(t):
+ dummyVars = ["WOOF_WOOFIE_%d" % x for x in range(4)]
+ global tag
+
+ tag = "XXX in os.environ"
+ try:
+ def f(name):
+ return "%s: %s" % (name, name in os.environ)
+ _infoX(f(x) for x in dummyVars)
+ except:
+ _info_exc()
+
+ tag = "os.environ[XXX]"
+ try:
+ def f(name):
+ try:
+ result = os.environ[name]
+ except:
+ result = _str_exc()
+ return "%s: %r" % (name, result)
+ _infoX(f(x) for x in dummyVars)
+ except:
+ _info_exc()
+
+ tag = "os.environ.get(XXX)"
+ try:
+ def f(name):
+ return "%s: %r" % (name, os.environ.get(name))
+ _infoX(f(x) for x in dummyVars)
+ except:
+ _info_exc()
+
+ tag = "os.getenv(XXX)"
+ try:
+ def f(name):
+ return "%s: %r" % (name, os.getenv(name))
+ _infoX(f(x) for x in dummyVars)
+ except:
+ _info_exc()
+
+ name = dummyVars[0]
+ value = "foo"
+ tag = "os.putenv(%s) to %r" % (name, value)
+ try:
+ results = []
+ _collect(results, "before", name, t)
+ os.putenv(name, value)
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[1]
+ value = "bar"
+ tag = "os.environ[%s] to %r" % (name, value)
+ try:
+ results = []
+ _collect(results, "before", name, t)
+ os.environ[name] = value
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[1]
+ value = "baz"
+ tag = "os.putenv(%s) to %r" % (name, value)
+ try:
+ results = []
+ _collect(results, "before", name, t)
+ os.putenv(name, value)
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[1]
+ value = ""
+ tag = "os.putenv(%s) to %r" % (name, value)
+ try:
+ results = []
+ _collect(results, "before", name, t)
+ os.putenv(name, value)
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[2]
+ value = "foo"
+ tag = "os.unsetenv(%s) from %r" % (name, value)
+ try:
+ results = []
+ os.environ[name] = value
+ _collect(results, "before", name, t)
+ os.unsetenv(name)
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[2]
+ value = "foo"
+ tag = "del os.environ[%s] from %r" % (name, value)
+ try:
+ results = []
+ os.environ[name] = value
+ _collect(results, "before", name, t)
+ del os.environ[name]
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[2]
+ value = "foo"
+ tag = "os.environ.pop(%s) from %r" % (name, value)
+ try:
+ results = []
+ os.environ[name] = value
+ _collect(results, "before", name, t)
+ os.environ.pop(name)
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[2]
+ value1 = "foo"
+ value2 = ""
+ tag = "os.environ[%s] to %r from %r" % (name, value2, value1)
+ try:
+ results = []
+ os.environ[name] = value1
+ _collect(results, "before", name, t)
+ os.environ[name] = value2
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+ name = dummyVars[3]
+ value = '""'
+ tag = "os.environ[%s] to %r" % (name, value)
+ try:
+ results = []
+ _collect(results, "before", name, t)
+ os.environ[name] = value
+ _collect(results, "after", name, t)
+ _infoX(results)
+ except:
+ _info_exc()
+
+
+def _getExternalValues(t, *args):
+ t.run_build_system(["---var-name=%s" % x for x in args])
+ result = dict()
+ for x in args:
+ m = re.search(r"^\*\*\*ENV\*\*\* %s: '(.*)' \*\*\*$" % x, t.stdout(),
+ re.MULTILINE)
+ if m:
+ result[x] = m.group(1)
+ else:
+ result[x] = None
+ return result
+
+
+def _getJamVersionInfo(t):
+ result = []
+
+ # JAM version variables.
+ t.run_build_system(["---version"])
+ for m in re.finditer(r"^\*\*\*VAR\*\*\* ([^:]*): (.*)\*\*\*$", t.stdout(),
+ re.MULTILINE):
+ name = m.group(1)
+ value = m.group(2)
+ if not value:
+ value = []
+ elif value[-1] == ' ':
+ value = value[:-1].split(varSeparator)
+ else:
+ value = "!!!INVALID!!! - '%s'" % value
+ result.append("%s = %s" % (name, value))
+ result.append("")
+
+ # bjam -v output.
+ t.run_build_system(["-v"])
+ result.append("--- output for 'bjam -v' ---")
+ result.append(t.stdout())
+
+ # bjam --version output.
+ t.run_build_system(["--version"], status=1)
+ result.append("--- output for 'bjam --version' ---")
+ result.append(t.stdout())
+
+ return result
+
+
+def _init():
+ toolsetName = "__myDummyToolset__"
+
+ t = BoostBuild.Tester(["toolset=%s" % toolsetName], pass_toolset=False,
+ use_test_config=False)
+
+ # Prepare a dummy toolset so we do not get errors in case the default one
+ # is not found.
+ t.write(toolsetName + ".jam", """\
+import feature ;
+feature.extend toolset : %s ;
+rule init ( ) { }
+""" % toolsetName )
+
+ # Python version of the same dummy toolset.
+ t.write(toolsetName + ".py", """\
+from b2.build import feature
+feature.extend('toolset', ['%s'])
+def init(): pass
+""" % toolsetName )
+
+ t.write("jamroot.jam", """\
+import os ;
+.argv = [ modules.peek : ARGV ] ;
+local names = [ MATCH ^---var-name=(.*) : $(.argv) ] ;
+for x in $(names)
+{
+ value = [ os.environ $(x) ] ;
+ ECHO ***ENV*** $(x): '$(value)' *** ;
+}
+if ---version in $(.argv)
+{
+ for x in JAMVERSION JAM_VERSION JAMUNAME JAM_TIMESTAMP_RESOLUTION OS
+ {
+ v = [ modules.peek : $(x) ] ;
+ ECHO ***VAR*** $(x): "$(v:J=%s)" *** ;
+ }
+}
+""" % varSeparator)
+
+ return t
+
+
+def _info(*values):
+ values = list(values) + [""]
+ BoostBuild.annotation(tag, "\n".join(str(x) for x in values))
+
+
+def _infoX(values):
+ _info(*values)
+
+
+def _info_exc():
+ _info(_str_exc())
+
+
+def _str_exc():
+ exc_type, exc_value = sys.exc_info()[0:2]
+ if exc_type is None:
+ exc_type_name = "None"
+ else:
+ exc_type_name = exc_type.__name__
+ return "*** EXCEPTION *** %s - %s ***" % (exc_type_name, exc_value)
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+collectDebugInfo()
diff --git a/src/boost/tools/build/test/command_line_properties.py b/src/boost/tools/build/test/command_line_properties.py
new file mode 100644
index 000000000..518991b6c
--- /dev/null
+++ b/src/boost/tools/build/test/command_line_properties.py
@@ -0,0 +1,166 @@
+#!/usr/bin/python
+
+import BoostBuild
+
+def test_basic():
+ '''Tests that feature=value works'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature ;
+ import toolset : flags ;
+ feature f1 : 1 2 ;
+ make output.txt : : @run ;
+ flags run OPTIONS <f1> ;
+ actions run { echo $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['f1=2'])
+ t.expect_content("bin/*/output.txt", "2")
+ t.cleanup()
+
+def test_implicit():
+ '''Tests that implicit features can be named without a feature'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature ;
+ import toolset : flags ;
+ feature f1 : v1 v2 : implicit ;
+ make output.txt : : @run ;
+ flags run OPTIONS <f1> ;
+ actions run { echo $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['v2'])
+ t.expect_content("bin/*/output.txt", "v2")
+ t.cleanup()
+
+def test_optional():
+ '''Tests that feature= works for optional features'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature ;
+ import toolset : flags ;
+ feature f1 : 1 2 : optional ;
+ make output.txt : : @run ;
+ flags run OPTIONS <f1> ;
+ actions run { echo b $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['f1='])
+ t.expect_content("bin/*/output.txt", "b")
+ t.cleanup()
+
+def test_free():
+ '''Free features named on the command line apply to all targets
+ everywhere. Free features can contain any characters, even those
+ that have a special meaning.'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature ;
+ import toolset : flags ;
+ feature f1 : : free ;
+ make output1.txt : : @run : <dependency>output2.txt ;
+ make output2.txt : : @run ;
+ explicit output2.txt ;
+ flags run OPTIONS <f1> ;
+ actions run { echo $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['f1=x,/:-'])
+ t.expect_content("bin*/output1.txt", "x,/:-")
+ t.expect_content("bin*/output2.txt", "x,/:-")
+ t.cleanup()
+
+def test_subfeature():
+ '''Subfeatures should be expressed as feature=value-subvalue'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature subfeature ;
+ import toolset : flags ;
+ feature f1 : 1 2 ;
+ subfeature f1 2 : sub : x y ;
+ make output.txt : : @run ;
+ flags run OPTIONS <f1-2:sub> ;
+ actions run { echo $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['f1=2-y'])
+ t.expect_content("bin/*/output.txt", "y")
+ t.cleanup()
+
+def test_multiple_values():
+ '''Multiple values of a feature can be given in a comma-separated list'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature ;
+ import toolset : flags ;
+ feature f1 : 1 2 3 ;
+ make output.txt : : @run ;
+ flags run OPTIONS <f1> ;
+ actions run { echo $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['f1=2,3'])
+ t.expect_content("bin*/f1-2*/output.txt", "2")
+ t.expect_content("bin*/f1-3*/output.txt", "3")
+ t.cleanup()
+
+def test_multiple_properties():
+ '''Multiple properties can be grouped with /'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature ;
+ import toolset : flags ;
+ feature f1 : 1 2 ;
+ feature f2 : 3 4 ;
+ make output.txt : : @run ;
+ flags run OPTIONS <f1> ;
+ flags run OPTIONS <f2> ;
+ actions run { echo $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['f1=2/f2=4'])
+ t.expect_content("bin/*/output.txt", "2 4")
+ t.cleanup()
+
+def test_cross_product():
+ '''If multiple properties are specified on the command line
+ we expand to every possible maximum set of non-conflicting features.
+ This test should be run after testing individual components in
+ isolation.'''
+ t = BoostBuild.Tester()
+ t.write('Jamroot.jam', '''
+ import feature : feature ;
+ import toolset : flags ;
+ # Make features symmetric to make the paths easier to distinguish
+ feature f1 : 11 12 13 14 15 : symmetric ;
+ feature f2 : 21 22 23 : symmetric ;
+ feature f3 : v1 v2 v3 v4 : implicit symmetric ;
+ feature f4 : : free ;
+ make output.txt : : @run ;
+ flags run OPTIONS <f1> ;
+ flags run OPTIONS <f2> ;
+ flags run OPTIONS <f3> ;
+ flags run OPTIONS <f4> ;
+ actions run { echo $(OPTIONS) > $(<) }
+ ''')
+ t.run_build_system(['f1=12,13/f2=22', 'v2', 'v3', 'f1=14', 'f2=23',
+ 'f4=xxx', 'f4=yyy', 'v4/f1=15/f4=zzz'])
+ t.expect_content("bin*/v2*/f1-12/f2-22*/output.txt", "12 22 v2 xxx yyy")
+ t.expect_addition("bin*/v2*/f1-12/f2-22*/output.txt")
+ t.expect_content("bin*/v2*/f1-13/f2-22*/output.txt", "13 22 v2 xxx yyy")
+ t.expect_addition("bin*/v2*/f1-13/f2-22*/output.txt")
+ t.expect_content("bin*/v2*/f1-14/f2-23*/output.txt", "14 23 v2 xxx yyy")
+ t.expect_addition("bin*/v2*/f1-14/f2-23*/output.txt")
+ t.expect_content("bin*/v3*/f1-12/f2-22*/output.txt", "12 22 v3 xxx yyy")
+ t.expect_addition("bin*/v3*/f1-12/f2-22*/output.txt")
+ t.expect_content("bin*/v3*/f1-13/f2-22*/output.txt", "13 22 v3 xxx yyy")
+ t.expect_addition("bin*/v3*/f1-13/f2-22*/output.txt")
+ t.expect_content("bin*/v3*/f1-14/f2-23*/output.txt", "14 23 v3 xxx yyy")
+ t.expect_addition("bin*/v3*/f1-14/f2-23*/output.txt")
+ t.expect_content("bin*/v4*/f1-15/f2-23*/output.txt", "15 23 v4 xxx yyy zzz")
+ t.expect_addition("bin*/v4*/f1-15/f2-23*/output.txt")
+ t.expect_nothing_more()
+ t.cleanup()
+
+test_basic()
+test_implicit()
+test_optional()
+test_free()
+test_subfeature()
+test_multiple_values()
+test_multiple_properties()
+test_cross_product()
diff --git a/src/boost/tools/build/test/composite.py b/src/boost/tools/build/test/composite.py
new file mode 100644
index 000000000..e3a334b4f
--- /dev/null
+++ b/src/boost/tools/build/test/composite.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+# 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)
+
+# Test that composite properties are handled correctly.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+exe hello : hello.cpp : <variant>release ;
+""")
+
+t.write("hello.cpp", """
+int main() {}
+""")
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/release*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/conditionals.py b/src/boost/tools/build/test/conditionals.py
new file mode 100644
index 000000000..3ad36466c
--- /dev/null
+++ b/src/boost/tools/build/test/conditionals.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004 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)
+
+# Test conditional properties.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# Arrange a project which will build only if 'a.cpp' is compiled with "STATIC"
+# define.
+t.write("a.cpp", """\
+#ifdef STATIC
+int main() {}
+#endif
+""")
+
+# Test conditionals in target requirements.
+t.write("jamroot.jam", "exe a : a.cpp : <link>static:<define>STATIC ;")
+t.run_build_system(["link=static"])
+t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
+t.rm("bin")
+
+# Test conditionals in project requirements.
+t.write("jamroot.jam", """
+project : requirements <link>static:<define>STATIC ;
+exe a : a.cpp ;
+""")
+t.run_build_system(["link=static"])
+t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
+t.rm("bin")
+
+# Regression test for a bug found by Ali Azarbayejani. Conditionals inside
+# usage requirement were not being evaluated.
+t.write("jamroot.jam", """
+lib l : l.cpp : : : <link>static:<define>STATIC ;
+exe a : a.cpp l ;
+""")
+t.write("l.cpp", "int i;")
+t.run_build_system(["link=static"])
+t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/conditionals2.py b/src/boost/tools/build/test/conditionals2.py
new file mode 100644
index 000000000..585e5ca77
--- /dev/null
+++ b/src/boost/tools/build/test/conditionals2.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+
+# 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)
+
+# Regression test: it was possible that due to evaluation of conditional
+# requirements, two different values of non-free features were present in a
+# property set.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("a.cpp", "")
+
+t.write("jamroot.jam", """
+import feature ;
+import common ;
+
+feature.feature the_feature : false true : propagated ;
+
+rule maker ( targets * : sources * : properties * )
+{
+ if <the_feature>false in $(properties) &&
+ <the_feature>true in $(properties)
+ {
+ EXIT "Oops, two different values of non-free feature" ;
+ }
+ CMD on $(targets) = [ common.file-creation-command ] ;
+}
+
+actions maker
+{
+ $(CMD) $(<) ;
+}
+
+make a : a.cpp : maker : <variant>debug:<the_feature>true ;
+""")
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/conditionals3.py b/src/boost/tools/build/test/conditionals3.py
new file mode 100644
index 000000000..feffe4900
--- /dev/null
+++ b/src/boost/tools/build/test/conditionals3.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+# 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)
+
+# Test that conditional properties work, even if property is free, and value
+# includes a colon.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+exe hello : hello.cpp : <variant>debug:<define>"CLASS=Foo::Bar" ;
+""")
+
+t.write("hello.cpp", """
+namespace Foo { class Bar { } ; }
+int main()
+{
+ CLASS c;
+ c; // Disables the unused variable warning.
+}
+""")
+
+t.run_build_system(stdout=None, stderr=None)
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/conditionals_multiple.py b/src/boost/tools/build/test/conditionals_multiple.py
new file mode 100755
index 000000000..cb0cfa8c5
--- /dev/null
+++ b/src/boost/tools/build/test/conditionals_multiple.py
@@ -0,0 +1,312 @@
+#!/usr/bin/python
+
+# Copyright 2008 Jurko Gospodnetic
+# 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)
+
+# Tests that properties conditioned on more than one other property work as
+# expected.
+
+import BoostBuild
+
+
+###############################################################################
+#
+# test_multiple_conditions()
+# --------------------------
+#
+###############################################################################
+
+def test_multiple_conditions():
+ """Basic tests for properties conditioned on multiple other properties."""
+
+ t = BoostBuild.Tester(["--user-config=", "--ignore-site-config",
+ "toolset=testToolset"], pass_toolset=False, use_test_config=False)
+
+ t.write("testToolset.jam", """\
+import feature ;
+feature.extend toolset : testToolset ;
+rule init ( ) { }
+""")
+
+ t.write("testToolset.py", """\
+from b2.build import feature
+feature.extend('toolset', ["testToolset"])
+def init ( ): pass
+""")
+
+ t.write("jamroot.jam", """\
+import feature ;
+import notfile ;
+import toolset ;
+
+feature.feature description : : free incidental ;
+feature.feature aaa : 1 0 : incidental ;
+feature.feature bbb : 1 0 : incidental ;
+feature.feature ccc : 1 0 : incidental ;
+
+rule buildRule ( name : targets ? : properties * )
+{
+ for local description in [ feature.get-values description : $(properties) ]
+ {
+ ECHO "description:" /$(description)/ ;
+ }
+}
+
+notfile testTarget1 : @buildRule : :
+ <description>d
+ <aaa>0:<description>a0
+ <aaa>1:<description>a1
+ <aaa>0,<bbb>0:<description>a0-b0
+ <aaa>0,<bbb>1:<description>a0-b1
+ <aaa>1,<bbb>0:<description>a1-b0
+ <aaa>1,<bbb>1:<description>a1-b1
+ <aaa>0,<bbb>0,<ccc>0:<description>a0-b0-c0
+ <aaa>0,<bbb>0,<ccc>1:<description>a0-b0-c1
+ <aaa>0,<bbb>1,<ccc>1:<description>a0-b1-c1
+ <aaa>1,<bbb>0,<ccc>1:<description>a1-b0-c1
+ <aaa>1,<bbb>1,<ccc>0:<description>a1-b1-c0
+ <aaa>1,<bbb>1,<ccc>1:<description>a1-b1-c1 ;
+""")
+
+ t.run_build_system(["aaa=1", "bbb=1", "ccc=1"])
+ t.expect_output_lines("description: /d/" )
+ t.expect_output_lines("description: /a0/" , False)
+ t.expect_output_lines("description: /a1/" )
+ t.expect_output_lines("description: /a0-b0/" , False)
+ t.expect_output_lines("description: /a0-b1/" , False)
+ t.expect_output_lines("description: /a1-b0/" , False)
+ t.expect_output_lines("description: /a1-b1/" )
+ t.expect_output_lines("description: /a0-b0-c0/", False)
+ t.expect_output_lines("description: /a0-b0-c1/", False)
+ t.expect_output_lines("description: /a0-b1-c1/", False)
+ t.expect_output_lines("description: /a1-b0-c1/", False)
+ t.expect_output_lines("description: /a1-b1-c0/", False)
+ t.expect_output_lines("description: /a1-b1-c1/" )
+
+ t.run_build_system(["aaa=0", "bbb=0", "ccc=1"])
+ t.expect_output_lines("description: /d/" )
+ t.expect_output_lines("description: /a0/" )
+ t.expect_output_lines("description: /a1/" , False)
+ t.expect_output_lines("description: /a0-b0/" )
+ t.expect_output_lines("description: /a0-b1/" , False)
+ t.expect_output_lines("description: /a1-b0/" , False)
+ t.expect_output_lines("description: /a1-b1/" , False)
+ t.expect_output_lines("description: /a0-b0-c0/", False)
+ t.expect_output_lines("description: /a0-b0-c1/" )
+ t.expect_output_lines("description: /a0-b1-c1/", False)
+ t.expect_output_lines("description: /a1-b0-c1/", False)
+ t.expect_output_lines("description: /a1-b1-c0/", False)
+ t.expect_output_lines("description: /a1-b1-c1/", False)
+
+ t.run_build_system(["aaa=0", "bbb=0", "ccc=0"])
+ t.expect_output_lines("description: /d/" )
+ t.expect_output_lines("description: /a0/" )
+ t.expect_output_lines("description: /a1/" , False)
+ t.expect_output_lines("description: /a0-b0/" )
+ t.expect_output_lines("description: /a0-b1/" , False)
+ t.expect_output_lines("description: /a1-b0/" , False)
+ t.expect_output_lines("description: /a1-b1/" , False)
+ t.expect_output_lines("description: /a0-b0-c0/" )
+ t.expect_output_lines("description: /a0-b0-c1/", False)
+ t.expect_output_lines("description: /a0-b1-c1/", False)
+ t.expect_output_lines("description: /a1-b0-c1/", False)
+ t.expect_output_lines("description: /a1-b1-c0/", False)
+ t.expect_output_lines("description: /a1-b1-c1/", False)
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_multiple_conditions_with_toolset_version()
+# -----------------------------------------------
+#
+###############################################################################
+
+def test_multiple_conditions_with_toolset_version():
+ """
+ Regression tests for properties conditioned on the toolset version
+ subfeature and some additional properties.
+
+ """
+ toolset = "testToolset" ;
+
+ t = BoostBuild.Tester(["--user-config=", "--ignore-site-config"],
+ pass_toolset=False, use_test_config=False)
+
+ t.write(toolset + ".jam", """\
+import feature ;
+feature.extend toolset : %(toolset)s ;
+feature.subfeature toolset %(toolset)s : version : 0 1 ;
+rule init ( version ? ) { }
+""" % {"toolset": toolset})
+
+ t.write("testToolset.py", """\
+from b2.build import feature
+feature.extend('toolset', ["%(toolset)s"])
+feature.subfeature('toolset', "%(toolset)s", "version", ['0','1'])
+def init (version=''): pass
+""" % {"toolset": toolset})
+
+ t.write("jamroot.jam", """\
+import feature ;
+import notfile ;
+import toolset ;
+
+toolset.using testToolset ;
+
+feature.feature description : : free incidental ;
+feature.feature aaa : 0 1 : incidental ;
+feature.feature bbb : 0 1 : incidental ;
+feature.feature ccc : 0 1 : incidental ;
+
+rule buildRule ( name : targets ? : properties * )
+{
+ local ttt = [ feature.get-values toolset : $(properties) ] ;
+ local vvv = [ feature.get-values "toolset-testToolset:version" : $(properties) ] ;
+ local aaa = [ feature.get-values aaa : $(properties) ] ;
+ local bbb = [ feature.get-values bbb : $(properties) ] ;
+ local ccc = [ feature.get-values ccc : $(properties) ] ;
+ ECHO "toolset:" /$(ttt)/ "version:" /$(vvv)/ "aaa/bbb/ccc:" /$(aaa)/$(bbb)/$(ccc)/ ;
+ for local description in [ feature.get-values description : $(properties) ]
+ {
+ ECHO "description:" /$(description)/ ;
+ }
+}
+
+notfile testTarget1 : @buildRule : :
+ <toolset>testToolset,<aaa>0:<description>t-a0
+ <toolset>testToolset,<aaa>1:<description>t-a1
+
+ <toolset>testToolset-0,<aaa>0:<description>t0-a0
+ <toolset>testToolset-0,<aaa>1:<description>t0-a1
+ <toolset>testToolset-1,<aaa>0:<description>t1-a0
+ <toolset>testToolset-1,<aaa>1:<description>t1-a1
+
+ <toolset>testToolset,<aaa>0,<bbb>0:<description>t-a0-b0
+ <toolset>testToolset,<aaa>0,<bbb>1:<description>t-a0-b1
+ <toolset>testToolset,<aaa>1,<bbb>0:<description>t-a1-b0
+ <toolset>testToolset,<aaa>1,<bbb>1:<description>t-a1-b1
+
+ <aaa>0,<toolset>testToolset,<bbb>0:<description>a0-t-b0
+ <aaa>0,<toolset>testToolset,<bbb>1:<description>a0-t-b1
+ <aaa>1,<toolset>testToolset,<bbb>0:<description>a1-t-b0
+ <aaa>1,<toolset>testToolset,<bbb>1:<description>a1-t-b1
+
+ <aaa>0,<bbb>0,<toolset>testToolset:<description>a0-b0-t
+ <aaa>0,<bbb>1,<toolset>testToolset:<description>a0-b1-t
+ <aaa>1,<bbb>0,<toolset>testToolset:<description>a1-b0-t
+ <aaa>1,<bbb>1,<toolset>testToolset:<description>a1-b1-t
+
+ <toolset>testToolset-0,<aaa>0,<bbb>0:<description>t0-a0-b0
+ <toolset>testToolset-0,<aaa>0,<bbb>1:<description>t0-a0-b1
+ <toolset>testToolset-0,<aaa>1,<bbb>0:<description>t0-a1-b0
+ <toolset>testToolset-0,<aaa>1,<bbb>1:<description>t0-a1-b1
+ <toolset>testToolset-1,<aaa>0,<bbb>0:<description>t1-a0-b0
+ <toolset>testToolset-1,<aaa>0,<bbb>1:<description>t1-a0-b1
+ <toolset>testToolset-1,<aaa>1,<bbb>0:<description>t1-a1-b0
+ <toolset>testToolset-1,<aaa>1,<bbb>1:<description>t1-a1-b1
+
+ <aaa>0,<toolset>testToolset-1,<bbb>0:<description>a0-t1-b0
+ <aaa>0,<toolset>testToolset-1,<bbb>1:<description>a0-t1-b1
+ <aaa>1,<toolset>testToolset-0,<bbb>0:<description>a1-t0-b0
+ <aaa>1,<toolset>testToolset-0,<bbb>1:<description>a1-t0-b1
+
+ <bbb>0,<aaa>1,<toolset>testToolset-0:<description>b0-a1-t0
+ <bbb>0,<aaa>0,<toolset>testToolset-1:<description>b0-a0-t1
+ <bbb>0,<aaa>1,<toolset>testToolset-1:<description>b0-a1-t1
+ <bbb>1,<aaa>0,<toolset>testToolset-1:<description>b1-a0-t1
+ <bbb>1,<aaa>1,<toolset>testToolset-0:<description>b1-a1-t0
+ <bbb>1,<aaa>1,<toolset>testToolset-1:<description>b1-a1-t1 ;
+""")
+
+ t.run_build_system(["aaa=1", "bbb=1", "ccc=1", "toolset=%s-0" % toolset])
+ t.expect_output_lines("description: /t-a0/" , False)
+ t.expect_output_lines("description: /t-a1/" )
+ t.expect_output_lines("description: /t0-a0/" , False)
+ t.expect_output_lines("description: /t0-a1/" )
+ t.expect_output_lines("description: /t1-a0/" , False)
+ t.expect_output_lines("description: /t1-a1/" , False)
+ t.expect_output_lines("description: /t-a0-b0/" , False)
+ t.expect_output_lines("description: /t-a0-b1/" , False)
+ t.expect_output_lines("description: /t-a1-b0/" , False)
+ t.expect_output_lines("description: /t-a1-b1/" )
+ t.expect_output_lines("description: /a0-t-b0/" , False)
+ t.expect_output_lines("description: /a0-t-b1/" , False)
+ t.expect_output_lines("description: /a1-t-b0/" , False)
+ t.expect_output_lines("description: /a1-t-b1/" )
+ t.expect_output_lines("description: /a0-b0-t/" , False)
+ t.expect_output_lines("description: /a0-b1-t/" , False)
+ t.expect_output_lines("description: /a1-b0-t/" , False)
+ t.expect_output_lines("description: /a1-b1-t/" )
+ t.expect_output_lines("description: /t0-a0-b0/", False)
+ t.expect_output_lines("description: /t0-a0-b1/", False)
+ t.expect_output_lines("description: /t0-a1-b0/", False)
+ t.expect_output_lines("description: /t0-a1-b1/" )
+ t.expect_output_lines("description: /t1-a0-b0/", False)
+ t.expect_output_lines("description: /t1-a0-b1/", False)
+ t.expect_output_lines("description: /t1-a1-b0/", False)
+ t.expect_output_lines("description: /t1-a1-b1/", False)
+ t.expect_output_lines("description: /a0-t1-b0/", False)
+ t.expect_output_lines("description: /a0-t1-b1/", False)
+ t.expect_output_lines("description: /a1-t0-b0/", False)
+ t.expect_output_lines("description: /a1-t0-b1/" )
+ t.expect_output_lines("description: /b0-a1-t0/", False)
+ t.expect_output_lines("description: /b0-a0-t1/", False)
+ t.expect_output_lines("description: /b0-a1-t1/", False)
+ t.expect_output_lines("description: /b1-a0-t1/", False)
+ t.expect_output_lines("description: /b1-a1-t0/" )
+ t.expect_output_lines("description: /b1-a1-t1/", False)
+
+ t.run_build_system(["aaa=1", "bbb=1", "ccc=1", "toolset=%s-1" % toolset])
+ t.expect_output_lines("description: /t-a0/" , False)
+ t.expect_output_lines("description: /t-a1/" )
+ t.expect_output_lines("description: /t0-a0/" , False)
+ t.expect_output_lines("description: /t0-a1/" , False)
+ t.expect_output_lines("description: /t1-a0/" , False)
+ t.expect_output_lines("description: /t1-a1/" )
+ t.expect_output_lines("description: /t-a0-b0/" , False)
+ t.expect_output_lines("description: /t-a0-b1/" , False)
+ t.expect_output_lines("description: /t-a1-b0/" , False)
+ t.expect_output_lines("description: /t-a1-b1/" )
+ t.expect_output_lines("description: /a0-t-b0/" , False)
+ t.expect_output_lines("description: /a0-t-b1/" , False)
+ t.expect_output_lines("description: /a1-t-b0/" , False)
+ t.expect_output_lines("description: /a1-t-b1/" )
+ t.expect_output_lines("description: /a0-b0-t/" , False)
+ t.expect_output_lines("description: /a0-b1-t/" , False)
+ t.expect_output_lines("description: /a1-b0-t/" , False)
+ t.expect_output_lines("description: /a1-b1-t/" )
+ t.expect_output_lines("description: /t0-a0-b0/", False)
+ t.expect_output_lines("description: /t0-a0-b1/", False)
+ t.expect_output_lines("description: /t0-a1-b0/", False)
+ t.expect_output_lines("description: /t0-a1-b1/", False)
+ t.expect_output_lines("description: /t1-a0-b0/", False)
+ t.expect_output_lines("description: /t1-a0-b1/", False)
+ t.expect_output_lines("description: /t1-a1-b0/", False)
+ t.expect_output_lines("description: /t1-a1-b1/" )
+ t.expect_output_lines("description: /a0-t1-b0/", False)
+ t.expect_output_lines("description: /a0-t1-b1/", False)
+ t.expect_output_lines("description: /a1-t0-b0/", False)
+ t.expect_output_lines("description: /a1-t0-b1/", False)
+ t.expect_output_lines("description: /b0-a1-t0/", False)
+ t.expect_output_lines("description: /b0-a0-t1/", False)
+ t.expect_output_lines("description: /b0-a1-t1/", False)
+ t.expect_output_lines("description: /b1-a0-t1/", False)
+ t.expect_output_lines("description: /b1-a1-t0/", False)
+ t.expect_output_lines("description: /b1-a1-t1/" )
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+test_multiple_conditions()
+test_multiple_conditions_with_toolset_version()
diff --git a/src/boost/tools/build/test/configuration.py b/src/boost/tools/build/test/configuration.py
new file mode 100755
index 000000000..fea326320
--- /dev/null
+++ b/src/boost/tools/build/test/configuration.py
@@ -0,0 +1,397 @@
+#!/usr/bin/python
+
+# Copyright 2008, 2012 Jurko Gospodnetic
+# 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)
+
+# Test Boost Build configuration file handling.
+
+import BoostBuild
+import TestCmd
+
+import os
+import os.path
+import re
+
+
+###############################################################################
+#
+# test_user_configuration()
+# -------------------------
+#
+###############################################################################
+
+def test_user_configuration():
+ """
+ Test Boost Build user configuration handling. Both relative and absolute
+ path handling is tested.
+
+ """
+
+ implicitConfigLoadMessage = \
+ "notice: Loading user-config configuration file: *"
+ explicitConfigLoadMessage = \
+ "notice: Loading explicitly specified user configuration file:"
+ disabledConfigLoadMessage = \
+ "notice: User configuration file loading explicitly disabled."
+ testMessage = "_!_!_!_!_!_!_!_!_ %s _!_!_!_!_!_!_!_!_"
+ toolsetName = "__myDummyToolset__"
+ subdirName = "ASubDirectory"
+ configFileNames = ["ups_lala_1.jam", "ups_lala_2.jam",
+ os.path.join(subdirName, "ups_lala_3.jam")]
+
+ t = BoostBuild.Tester(["toolset=%s" % toolsetName,
+ "--debug-configuration"], pass_toolset=False, use_test_config=False)
+
+ for configFileName in configFileNames:
+ message = "ECHO \"%s\" ;" % testMessage % configFileName
+ # We need to double any backslashes in the message or Jam will
+ # interpret them as escape characters.
+ t.write(configFileName, message.replace("\\", "\\\\"))
+
+ # Prepare a dummy toolset so we do not get errors in case the default one
+ # is not found.
+ t.write(toolsetName + ".jam", """\
+import feature ;
+feature.extend toolset : %s ;
+rule init ( ) { }
+""" % toolsetName)
+
+ # Python version of the same dummy toolset.
+ t.write(toolsetName + ".py", """\
+from b2.build import feature
+feature.extend('toolset', ['%s'])
+def init(): pass
+""" % toolsetName)
+
+ t.write("jamroot.jam", """\
+local test-index = [ MATCH ---test-id---=(.*) : [ modules.peek : ARGV ] ] ;
+ECHO test-index: $(test-index:E=(unknown)) ;
+""")
+
+ class LocalTester:
+ def __init__(self, tester):
+ self.__tester = tester
+ self.__test_ids = []
+
+ def __assertionFailure(self, message):
+ BoostBuild.annotation("failure", "Internal test assertion failure "
+ "- %s" % message)
+ self.__tester.fail_test(1)
+
+ def __call__(self, test_id, env, extra_args=None, *args, **kwargs):
+ if env == "" and not canSetEmptyEnvironmentVariable:
+ self.__assertionFailure("Can not set empty environment "
+ "variables on this platform.")
+ self.__registerTestId(str(test_id))
+ if extra_args is None:
+ extra_args = []
+ extra_args.append("---test-id---=%s" % test_id)
+ env_name = "BOOST_BUILD_USER_CONFIG"
+ previous_env = os.environ.get(env_name)
+ _env_set(env_name, env)
+ try:
+ self.__tester.run_build_system(extra_args, *args, **kwargs)
+ finally:
+ _env_set(env_name, previous_env)
+
+ def __registerTestId(self, test_id):
+ if test_id in self.__test_ids:
+ self.__assertionFailure("Multiple test cases encountered "
+ "using the same test id '%s'." % test_id)
+ self.__test_ids.append(test_id)
+
+ test = LocalTester(t)
+
+ test(1, None)
+ t.expect_output_lines(explicitConfigLoadMessage, False)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(2, None, ["--user-config="])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage, False)
+ t.expect_output_lines(disabledConfigLoadMessage)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(3, None, ['--user-config=""'])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage, False)
+ t.expect_output_lines(disabledConfigLoadMessage)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(4, None, ['--user-config="%s"' % configFileNames[0]])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0])
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(5, None, ['--user-config="%s"' % configFileNames[2]])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2])
+
+ test(6, None, ['--user-config="%s"' % os.path.abspath(configFileNames[1])])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1])
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(7, None, ['--user-config="%s"' % os.path.abspath(configFileNames[2])])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2])
+
+ if canSetEmptyEnvironmentVariable:
+ test(8, "")
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage, False)
+ t.expect_output_lines(disabledConfigLoadMessage, True)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(9, '""')
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage, False)
+ t.expect_output_lines(disabledConfigLoadMessage)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(10, configFileNames[1])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1])
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(11, configFileNames[1], ['--user-config=""'])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage, False)
+ t.expect_output_lines(disabledConfigLoadMessage)
+ t.expect_output_lines(testMessage % configFileNames[0], False)
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(12, configFileNames[1], ['--user-config="%s"' % configFileNames[0]])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0])
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ if canSetEmptyEnvironmentVariable:
+ test(13, "", ['--user-config="%s"' % configFileNames[0]])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0])
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(14, '""', ['--user-config="%s"' % configFileNames[0]])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0])
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ test(15, "invalid", ['--user-config="%s"' % configFileNames[0]])
+ t.expect_output_lines(implicitConfigLoadMessage, False)
+ t.expect_output_lines(explicitConfigLoadMessage)
+ t.expect_output_lines(disabledConfigLoadMessage, False)
+ t.expect_output_lines(testMessage % configFileNames[0])
+ t.expect_output_lines(testMessage % configFileNames[1], False)
+ t.expect_output_lines(testMessage % configFileNames[2], False)
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# Private interface.
+#
+###############################################################################
+
+def _canSetEmptyEnvironmentVariable():
+ """
+ Unfortunately different OSs (and possibly Python implementations as well)
+ have different interpretations of what it means to set an environment
+ variable to an empty string. Some (e.g. Windows) interpret it as unsetting
+ the variable and some (e.g. AIX or Darwin) actually set it to an empty
+ string.
+
+ """
+ dummyName = "UGNABUNGA_FOO_BAR_BAZ_FEE_FAE_FOU_FAM"
+ original = os.environ.get(dummyName)
+ _env_set(dummyName, "")
+ result = _getExternalEnv(dummyName) == ""
+ _env_set(dummyName, original)
+ return result
+
+
+def _env_del(name):
+ """
+ Unsets the given environment variable if it is currently set.
+
+ Note that we can not use os.environ.pop() or os.environ.clear() here
+ since prior to Python 2.6 these functions did not remove the actual
+ environment variable by calling os.unsetenv().
+
+ """
+ try:
+ del os.environ[name]
+ except KeyError:
+ pass
+
+
+def _env_set(name, value):
+ """
+ Sets the given environment variable value or unsets it, if the value is
+ None.
+
+ """
+ if value is None:
+ _env_del(name)
+ else:
+ os.environ[name] = value
+
+
+def _getExternalEnv(name):
+ toolsetName = "__myDummyToolset__"
+
+ t = BoostBuild.Tester(["toolset=%s" % toolsetName], pass_toolset=False,
+ use_test_config=False)
+ try:
+ # Prepare a dummy toolset so we do not get errors in case the default
+ # one is not found.
+ t.write(toolsetName + ".jam", """\
+import feature ;
+feature.extend toolset : %s ;
+rule init ( ) { }
+""" % toolsetName)
+
+ # Python version of the same dummy toolset.
+ t.write(toolsetName + ".py", """\
+from b2.build import feature
+feature.extend('toolset', ['%s'])
+def init(): pass
+""" % toolsetName)
+
+ t.write("jamroot.jam", """\
+import os ;
+local names = [ MATCH ^---var-name---=(.*) : [ modules.peek : ARGV ] ] ;
+for x in $(names)
+{
+ value = [ os.environ $(x) ] ;
+ ECHO "###" $(x): '$(value)' "###" ;
+}
+""")
+
+ t.run_build_system(["---var-name---=%s" % name])
+ m = re.search("^### %s: '(.*)' ###$" % name, t.stdout(), re.MULTILINE)
+ if m:
+ return m.group(1)
+ finally:
+ t.cleanup()
+
+
+def test_site_config():
+ # Ignore user-config, just in case it depends on the user's site-config.jam
+ t = BoostBuild.Tester(["--user-config="], use_test_config=False,
+ pass_toolset=0)
+ # We can immediately exit after we finish loading the config files
+ t.write("Jamroot", "EXIT Done : 0 ;")
+ t.write("my-site-config.jam", "ECHO Loaded my-site-config ;")
+
+ t.run_build_system(["--site-config=my-site-config.jam"],
+ stdout="Loaded my-site-config\nDone\n")
+
+ t.run_build_system(["--ignore-site-config", "--debug-configuration"])
+ t.expect_output_lines("""\
+notice: Site configuration files will be ignored due to the
+notice: --ignore-site-config command-line option.""")
+
+ t.run_build_system(["--site-config=", "--debug-configuration"])
+ t.expect_output_lines("""\
+notice: Site configuration file loading explicitly disabled.""")
+
+ t.cleanup()
+
+def test_global_config():
+ t = BoostBuild.Tester(use_test_config=False, pass_toolset=0)
+ t.write("my-config.jam", "ECHO Loading my-config ;")
+ t.write("Jamroot", "EXIT Done : 0 ;")
+ t.write("project-config.jam", "ECHO bad ;")
+ t.run_build_system(["--config=my-config.jam", "--debug-configuration"],
+ match=TestCmd.match_re, stdout=
+r"""notice: found boost-build\.jam at .*
+notice: loading B2 from .*
+notice: Searching '.*' for all-config configuration file 'my-config\.jam'\.
+notice: Loading all-config configuration file 'my-config\.jam' from '.*'\.
+Loading my-config
+notice: Regular configuration files will be ignored due
+notice: to the global configuration being loaded\.
+Done
+""")
+ t.run_build_system(["--config=", "--debug-configuration"],
+ match=TestCmd.match_re, stdout=
+r"""notice: found boost-build\.jam at .*
+notice: loading B2 from .*
+notice: Configuration file loading explicitly disabled.
+Done
+""")
+ t.cleanup()
+
+def test_project_config():
+ t = BoostBuild.Tester(["--user-config=", "--site-config="],
+ use_test_config=False, pass_toolset=False)
+ t.write("Jamroot", "EXIT Done : 0 ;")
+ t.write("project-config.jam", "ECHO Loading Root ;")
+ t.write("my-project-config.jam", "ECHO Loading explicit ;")
+ t.write("sub/project-config.jam", "ECHO Loading subdir ;")
+ t.write("sub/Jamfile", "")
+
+ t.run_build_system(stdout="Loading Root\nDone\n")
+ t.run_build_system(subdir="sub", stdout="Loading subdir\nDone\n")
+ t.rm("sub/project-config.jam")
+ t.run_build_system(subdir="sub", stdout="Loading Root\nDone\n")
+ t.run_build_system(["--project-config=my-project-config.jam"],
+ stdout="Loading explicit\nDone\n")
+
+ t.cleanup()
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+canSetEmptyEnvironmentVariable = _canSetEmptyEnvironmentVariable()
+
+test_user_configuration()
+test_site_config()
+test_global_config()
+test_project_config()
diff --git a/src/boost/tools/build/test/configure.py b/src/boost/tools/build/test/configure.py
new file mode 100644
index 000000000..9e47af2e5
--- /dev/null
+++ b/src/boost/tools/build/test/configure.py
@@ -0,0 +1,267 @@
+#!/usr/bin/python
+
+# Copyright 2017 Steven Watanabe
+# 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)
+
+# Tests configure.check-target-builds and friends
+
+import BoostBuild
+
+def test_check_target_builds():
+ t = BoostBuild.Tester(use_test_config=0)
+ t.write("Jamroot", """
+import configure ;
+obj pass : pass.cpp ;
+obj fail : fail.cpp ;
+explicit pass fail ;
+obj foo : foo.cpp :
+ [ configure.check-target-builds pass : <define>PASS : <define>FAIL ] ;
+obj bar : foo.cpp :
+ [ configure.check-target-builds fail : <define>FAIL : <define>PASS ] ;
+""")
+ t.write("pass.cpp", "void f() {}\n")
+ t.write("fail.cpp", "#error fail.cpp\n")
+ t.write("foo.cpp", """
+#ifndef PASS
+#error PASS not defined
+#endif
+#ifdef FAIL
+#error FAIL is defined
+#endif
+""")
+ t.run_build_system()
+ t.expect_output_lines([
+ " - pass builds : yes",
+ " - fail builds : no"])
+ t.expect_addition("bin/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/$toolset/debug*/foo.obj")
+ t.expect_addition("bin/$toolset/debug*/bar.obj")
+ t.expect_nothing_more()
+
+ # An up-to-date build should use the cache
+ t.run_build_system()
+ t.expect_output_lines([
+ " - pass builds : yes (cached)",
+ " - fail builds : no (cached)"])
+ t.expect_nothing_more()
+
+ # -a should re-run everything, including configuration checks
+ t.run_build_system(["-a"])
+ t.expect_output_lines([
+ " - pass builds : yes",
+ " - fail builds : no"])
+ t.expect_touch("bin/$toolset/debug*/pass.obj")
+ t.expect_touch("bin/$toolset/debug*/foo.obj")
+ t.expect_touch("bin/$toolset/debug*/bar.obj")
+ t.expect_nothing_more()
+
+ # --reconfigure should re-run configuration checks only
+ t.run_build_system(["--reconfigure"])
+ t.expect_output_lines([
+ " - pass builds : yes",
+ " - fail builds : no"])
+ t.expect_touch("bin/$toolset/debug*/pass.obj")
+ t.expect_nothing_more()
+
+ # -a -n should not rebuild configuration checks
+ t.run_build_system(["-a", "-n"])
+ t.expect_output_lines([
+ " - pass builds : yes (cached)",
+ " - fail builds : no (cached)"])
+ t.expect_nothing_more()
+
+ # --clean-all should clear all configuration checks
+ t.run_build_system(["--clean-all"])
+ t.expect_output_lines([
+ " - pass builds : yes (cached)",
+ " - fail builds : no (cached)"])
+ t.expect_removal("bin/$toolset/debug*/pass.obj")
+ t.expect_removal("bin/$toolset/debug*/foo.obj")
+ t.expect_removal("bin/$toolset/debug*/bar.obj")
+ t.expect_nothing_more()
+
+ # If configuration checks are absent, then --clean-all
+ # should create them and then delete them again. This
+ # currently fails because clean cannot remove targets
+ # that were created in the same build.
+ #t.run_build_system(["--clean-all"])
+ #t.expect_output_lines([
+ # " - pass builds : yes",
+ # " - fail builds : no"])
+ #t.expect_nothing_more()
+
+ # Just verify that we're actually in the initial
+ # state here.
+ t.run_build_system()
+ t.expect_output_lines([
+ " - pass builds : yes",
+ " - fail builds : no"])
+ t.expect_addition("bin/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/$toolset/debug*/foo.obj")
+ t.expect_addition("bin/$toolset/debug*/bar.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_choose():
+ t = BoostBuild.Tester(use_test_config=0)
+ t.write("Jamroot", """
+import configure ;
+obj pass : pass.cpp ;
+obj fail : fail.cpp ;
+explicit pass fail ;
+obj foo : foo.cpp :
+ [ configure.choose "which one?" : fail <define>FAIL : pass <define>PASS ] ;
+""")
+ t.write("pass.cpp", "void f() {}\n")
+ t.write("fail.cpp", "#error fail.cpp\n")
+ t.write("foo.cpp", """
+#ifndef PASS
+#error PASS not defined
+#endif
+#ifdef FAIL
+#error FAIL is defined
+#endif
+""")
+ t.run_build_system()
+ t.expect_output_lines([
+ " - which one? : pass"])
+ t.expect_addition("bin/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/$toolset/debug*/foo.obj")
+ t.expect_nothing_more()
+
+ # An up-to-date build should use the cache
+ t.run_build_system()
+ t.expect_output_lines([
+ " - which one? : pass (cached)"])
+ t.expect_nothing_more()
+
+ # -a should re-run everything, including configuration checks
+ t.run_build_system(["-a"])
+ t.expect_output_lines([
+ " - which one? : pass"])
+ t.expect_touch("bin/$toolset/debug*/pass.obj")
+ t.expect_touch("bin/$toolset/debug*/foo.obj")
+ t.expect_nothing_more()
+
+ # --reconfigure should re-run configuration checks only
+ t.run_build_system(["--reconfigure"])
+ t.expect_output_lines([
+ " - which one? : pass"])
+ t.expect_touch("bin/$toolset/debug*/pass.obj")
+ t.expect_nothing_more()
+
+ # -a -n should not rebuild configuration checks
+ t.run_build_system(["-a", "-n"])
+ t.expect_output_lines([
+ " - which one? : pass (cached)"])
+ t.expect_nothing_more()
+
+ # --clean-all should clear all configuration checks
+ t.run_build_system(["--clean-all"])
+ t.expect_output_lines([
+ " - which one? : pass (cached)"])
+ t.expect_removal("bin/$toolset/debug*/pass.obj")
+ t.expect_removal("bin/$toolset/debug*/foo.obj")
+ t.expect_nothing_more()
+
+ # If configuration checks are absent, then --clean-all
+ # should create them and then delete them again. This
+ # currently fails because clean cannot remove targets
+ # that were created in the same build.
+ #t.run_build_system(["--clean-all"])
+ #t.expect_output_lines([
+ # " - which one? : pass"])
+ #t.expect_nothing_more()
+
+ # Just verify that we're actually in the initial
+ # state here.
+ t.run_build_system()
+ t.expect_output_lines([
+ " - which one? : pass"])
+ t.expect_addition("bin/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/$toolset/debug*/foo.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_translation():
+ """Tests scoping for targets, paths, and rules within check-target-builds"""
+ t = BoostBuild.Tester(use_test_config=0)
+ t.write("Jamroot", "")
+ t.write("subdir/Jamfile", """
+import configure ;
+obj pass : pass.cpp ;
+obj fail : fail.cpp ;
+explicit pass fail ;
+obj foo : :
+ [ configure.check-target-builds pass
+ : [ configure.check-target-builds fail : <define>FAIL
+ : <define>PASS <include>include1 <conditional>@c1 ]
+ : <define>FAIL ] ;
+obj bar : :
+ [ configure.choose "which one?" : pass
+ [ configure.choose "Try again?" : pass
+ <define>PASS <include>include1 <conditional>@c1 ] ] ;
+rule c1 ( properties * )
+{
+ return <include>include2 <source>foo.cpp ;
+}
+""")
+ t.write("subdir/include1/a.h", "")
+ t.write("subdir/include2/b.h", "")
+ t.write("subdir/pass.cpp", "void f() {}\n")
+ t.write("subdir/fail.cpp", "#error fail.cpp\n")
+ t.write("subdir/foo.cpp", """
+#include <a.h>
+#include <b.h>
+#ifndef PASS
+#error PASS not defined
+#endif
+#ifdef FAIL
+#error FAIL is defined
+#endif
+""")
+ t.run_build_system(["subdir"])
+ t.expect_output_lines([
+ " - pass builds : yes",
+ " - fail builds : no"])
+ t.expect_addition("subdir/bin/$toolset/debug*/pass.obj")
+ t.expect_addition("subdir/bin/$toolset/debug*/foo.obj")
+ t.expect_addition("subdir/bin/$toolset/debug*/bar.obj")
+ t.expect_nothing_more()
+ t.cleanup()
+
+def test_choose_none():
+ """Tests choose when none of the alternatives match."""
+ t = BoostBuild.Tester(use_test_config=0)
+ t.write("Jamroot", """
+import configure ;
+obj fail : fail.cpp ;
+explicit pass fail ;
+obj foo : foo.cpp :
+ [ configure.choose "which one?" : fail <define>FAIL ] ;
+""")
+ t.write("fail.cpp", "#error fail.cpp\n")
+ t.write("foo.cpp", """
+#ifdef FAIL
+#error FAIL is defined
+#endif
+""")
+ t.run_build_system()
+ t.expect_output_lines([
+ " - which one? : none"])
+
+ # An up-to-date build should use the cache
+ t.run_build_system()
+ t.expect_output_lines([
+ " - which one? : none (cached)"])
+ t.expect_nothing_more()
+ t.cleanup()
+
+test_check_target_builds()
+test_choose()
+test_translation()
+test_choose_none()
diff --git a/src/boost/tools/build/test/copy_time.py b/src/boost/tools/build/test/copy_time.py
new file mode 100755
index 000000000..a036fe62b
--- /dev/null
+++ b/src/boost/tools/build/test/copy_time.py
@@ -0,0 +1,69 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2008 Steven Watanabe
+#
+# 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)
+
+# Test that the common.copy rule set the modification date of the new file to
+# the current time.
+
+import BoostBuild
+
+tester = BoostBuild.Tester(use_test_config=False)
+
+tester.write("test1.cpp", """\
+template<bool, int M, class Next>
+struct time_waster {
+ typedef typename time_waster<true, M-1, time_waster>::type type1;
+ typedef typename time_waster<false, M-1, time_waster>::type type2;
+ typedef void type;
+};
+template<bool B, class Next>
+struct time_waster<B, 0, Next> {
+ typedef void type;
+};
+typedef time_waster<true, 10, void>::type type;
+int f() { return 0; }
+""")
+
+tester.write("test2.cpp", """\
+template<bool, int M, class Next>
+struct time_waster {
+ typedef typename time_waster<true, M-1, time_waster>::type type1;
+ typedef typename time_waster<false, M-1, time_waster>::type type2;
+ typedef void type;
+};
+template<bool B, class Next>
+struct time_waster<B, 0, Next> {
+ typedef void type;
+};
+typedef time_waster<true, 10, void>::type type;
+int g() { return 0; }
+""")
+
+tester.write("jamroot.jam", """\
+obj test2 : test2.cpp ;
+obj test1 : test1.cpp : <dependency>test2 ;
+install test2i : test2 : <dependency>test1 ;
+""")
+
+tester.run_build_system()
+tester.expect_addition("bin/$toolset/debug*/test2.obj")
+tester.expect_addition("bin/$toolset/debug*/test1.obj")
+tester.expect_addition("test2i/test2.obj")
+tester.expect_nothing_more()
+
+test2src = tester.read("test2i/test2.obj", binary=True)
+test2dest = tester.read("bin/$toolset/debug*/test2.obj", binary=True)
+if test2src != test2dest:
+ BoostBuild.annotation("failure", "The object file was not copied "
+ "correctly")
+ tester.fail_test(1)
+
+tester.run_build_system(["-d1"])
+tester.expect_output_lines("common.copy*", False)
+tester.expect_nothing_more()
+
+tester.cleanup()
diff --git a/src/boost/tools/build/test/core-language/test.jam b/src/boost/tools/build/test/core-language/test.jam
new file mode 100644
index 000000000..778bd5723
--- /dev/null
+++ b/src/boost/tools/build/test/core-language/test.jam
@@ -0,0 +1,1563 @@
+# Copyright 2011 Steven Watanabe.
+# 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)
+
+# Tools
+
+passed = 0 ;
+failed = 0 ;
+
+rule show-result ( id : test-result )
+{
+ if ! ( --quiet in $(ARGV) )
+ {
+ ECHO $(test-result): $(id) ;
+ }
+ $(test-result) = [ CALC $($(test-result)) + 1 ] ;
+}
+
+rule check-equal ( id : values * : expected * )
+{
+ local test-result ;
+ if x$(values) = x$(expected)
+ {
+ test-result = passed ;
+ }
+ else
+ {
+ ECHO error: "[" $(values) "] != [" $(expected) "]" ;
+ test-result = failed ;
+ }
+ show-result $(id) : $(test-result) ;
+}
+
+rule mark-order ( id : result * )
+{
+ order += $(id) ;
+ return $(result) ;
+}
+
+rule check-order ( id : expected * )
+{
+ check-equal $(id) : $(order) : $(expected) ;
+ order = ;
+}
+
+# Check variable expansion
+
+{
+
+local v1 = 1 2 3 ;
+local v2 = 4 5 6 ;
+local v3 = 0 1 2 3 4 5 6 7 8 9 10 ;
+local g = g1 g2 ;
+local v4 = String/With/Mixed/Case ;
+local v5 = path\\with\\backslashes ;
+local v6 = <grist>generic/path.txt(member.txt) ;
+local v7 = <Grist1>Dir1/File1.cpp(M1.c) <Grist2>Dir2/File2.hpp(M2.c) ;
+local v8 = <Grist3>Dir3/File3.c(M3.c) <Grist4>Dir4/File4.h(M4.c) ;
+local select1 = GU BL DBST ;
+local case1 = L U ;
+local vars = 7 8 ;
+local sub = 2 1 ;
+local p0 = name ;
+local p1 = dir/name ;
+local p2 = dir/sub/name ;
+local j1 = , - ;
+
+check-equal var-product : $(v1)$(v2) : 14 15 16 24 25 26 34 35 36 ;
+
+check-equal var-set-grist : $(v1:G=grist) : <grist>1 <grist>2 <grist>3 ;
+check-equal var-set-grist-multi : $(v1:G=$(g)) : <g1>1 <g1>2 <g1>3 <g2>1 <g2>2 <g2>3 ;
+
+check-equal var-lower : $(v4:L) : string/with/mixed/case ;
+check-equal var-upper : $(v4:U) : STRING/WITH/MIXED/CASE ;
+check-equal var-LU : $(v4:LU) : STRING/WITH/MIXED/CASE ;
+check-equal var-slashes : $(v5:T) : path/with/backslashes ;
+check-equal var-grist : $(v6:G) : <grist> ;
+check-equal var-grist-none : $(v1:G) : "" "" "" ;
+check-equal var-base : $(v6:B) : path ;
+check-equal var-suffix : $(v6:S) : .txt ;
+check-equal var-dir : $(v6:D) : generic ;
+check-equal var-member : $(v6:M) : (member.txt) ;
+check-equal var-multi : $(v6:$(select1)) : <GRIST> path generic/path.txt ;
+
+check-equal var-join-0 : $(:J=,) : ;
+check-equal var-join-1 : $(p0:J=,) : name ;
+check-equal var-join-3 : $(v1:J=,) : 1,2,3 ;
+check-equal var-set-grist-join : $(v1:G=grist:J=,) : <grist>1,<grist>2,<grist>3 ;
+# behavior change. In the past, a J= modifier would
+# cause only the last element of the other modifiers
+# to take effect.
+check-equal var-set-grist-multi-join : $(v1:G=$(g):J=,) : <g1>1,<g1>2,<g1>3 <g2>1,<g2>2,<g2>3 ;
+check-equal var-set-grist-multi-join-multi : $(v1:G=$(g):J=$(j1)) : <g1>1,<g1>2,<g1>3 <g1>1-<g1>2-<g1>3 <g2>1,<g2>2,<g2>3 <g2>1-<g2>2-<g2>3 ;
+
+check-equal var-D=-0 : name : $(p0:D=) ;
+check-equal var-D=-1 : name : $(p1:D=) ;
+check-equal var-D=-2 : name : $(p2:D=) ;
+check-equal var-D-0 : "" : $(p0:D) ;
+check-equal var-D-1 : dir : $(p1:D) ;
+check-equal var-D-2 : dir/sub : $(p2:D) ;
+check-equal var-S-1 : "" : $(p0:S) ;
+check-equal var-no-at-file-0 : ($(p0)) : [ MATCH ^@(.*) : "@($(p0))" ] ;
+check-equal var-no-at-file-1 : ($(p0)) : [ MATCH @(.*) : "--@($(p0))" ] ;
+
+if $(OS) = CYGWIN
+{
+ local cyg-root = $(:WE=/) ;
+ local cyg1 = /cygdrive/c/path1.txt ;
+ check-equal cygwin-to-cygdrive : $(cyg1:W) : C:\\path1.txt ;
+ local cyg2 = /bin/bash ;
+ check-equal cygwin-to-windows : $(cyg2:W) : $(cyg-root)\\bin\\bash ;
+ check-equal cygwin-combine-WT : $(cyg2:WT) : $(cyg-root)\\bin\\bash ;
+
+ local cyg3 = /home/boost/devel/trunk/bin.v2/ ; # exactly 31 characters
+ local win3 = $(cyg-root)\\home\\boost\\devel\\trunk\\bin.v2\\ ;
+ # This is is the easiest way to demonstrate a bug
+ # that used to cause undefined behavior. Longer paths
+ # resulted in a use-after-free error, which happened
+ # to work most of the time.
+ check-equal cygwin-long-WU : $(cyg3:WU) : $(win3:U) ;
+
+ local cyg-grist = <grist>$(cyg1) ;
+ check-equal cygwin-grist : $(cyg-grist:W) : <grist>\\cygdrive\\c\\path1.txt ;
+
+ check-equal cygwin-WU : $(cyg2:WU) : $(cyg-root:U)\\BIN\\BASH ;
+ # behavior change: L now consistently applied after W.
+ # used to affect all except the drive letter.
+ check-equal cygwin-WL : $(cyg2:WL) : $(cyg-root:L)\\bin\\bash ;
+}
+
+# behavior change
+check-equal var-test1 : $(v7[2]:G:L) : <grist2> ;
+
+check-equal var-multi-product-smm : $(v$(vars)[$(sub)]:G=$(g):$(case1)) :
+ <g1>dir2/file2.hpp(m2.c) <G1>DIR2/FILE2.HPP(M2.C)
+ <g2>dir2/file2.hpp(m2.c) <G2>DIR2/FILE2.HPP(M2.C)
+ <g1>dir1/file1.cpp(m1.c) <G1>DIR1/FILE1.CPP(M1.C)
+ <g2>dir1/file1.cpp(m1.c) <G2>DIR1/FILE1.CPP(M1.C)
+ <g1>dir4/file4.h(m4.c) <G1>DIR4/FILE4.H(M4.C)
+ <g2>dir4/file4.h(m4.c) <G2>DIR4/FILE4.H(M4.C)
+ <g1>dir3/file3.c(m3.c) <G1>DIR3/FILE3.C(M3.C)
+ <g2>dir3/file3.c(m3.c) <G2>DIR3/FILE3.C(M3.C)
+;
+check-equal var-nopathmods : $(:E=//) : // ;
+
+# showcases all the idiosyncracies of indexing
+# key: h = high, l = low, p = positive, m = minus, e = end.
+
+check-equal var-subscript-one-p : $(v3[3]) : 2 ;
+check-equal var-subscript-one-m : $(v3[-3]) : 8 ;
+check-equal var-subscript-one-0 : $(v3[0]) : 0 ;
+check-equal var-subscript-one-h : $(v3[20]) : ;
+check-equal var-subscript-one-l : $(v3[-20]) : 0 ;
+check-equal var-subscript-range-pp : $(v3[2-4]) : 1 2 3 ;
+check-equal var-subscript-range-pm : $(v3[2--3]) : 1 2 3 4 5 6 7 8 ;
+check-equal var-subscript-range-pe : $(v3[2-]) : 1 2 3 4 5 6 7 8 9 10 ;
+check-equal var-subscript-range-ph : $(v3[2-20]) : 1 2 3 4 5 6 7 8 9 10 ;
+check-equal var-subscript-range-pl : $(v3[2--20]) : ;
+check-equal var-subscript-range-mp : $(v3[-3-10]) : 8 9 ;
+check-equal var-subscript-range-mm : $(v3[-4--2]) : 7 8 9 ;
+check-equal var-subscript-range-me : $(v3[-4-]) : 7 8 9 10 ;
+check-equal var-subscript-range-mh : $(v3[-4-20]) : 7 8 9 10 ;
+check-equal var-subscript-range-mh : $(v3[-4--20]) : ;
+check-equal var-subscript-range-0p : $(v3[0-2]) : 0 1 2 ;
+check-equal var-subscript-range-0m : $(v3[0--4]) : 0 1 2 3 4 5 6 7 8 ;
+check-equal var-subscript-range-0e : $(v3[0-]) : 0 1 2 3 4 5 6 7 8 9 10 ;
+check-equal var-subscript-range-0h : $(v3[0-20]) : 0 1 2 3 4 5 6 7 8 9 10 ;
+check-equal var-subscript-range-0l : $(v3[0--20]) : ;
+check-equal var-subscript-range-hp : $(v3[20-4]) : ;
+check-equal var-subscript-range-hm : $(v3[20--4]) : ;
+check-equal var-subscript-range-he : $(v3[20-]) : ;
+check-equal var-subscript-range-hh : $(v3[20-20]) : ;
+check-equal var-subscript-range-hl : $(v3[20--20]) : ;
+check-equal var-subscript-range-lp : $(v3[-13-4]) : 0 1 2 3 4 5 ;
+check-equal var-subscript-range-lm : $(v3[-13--4]) : 0 1 2 3 4 5 6 7 8 9 ;
+check-equal var-subscript-range-le : $(v3[-13-]) : 0 1 2 3 4 5 6 7 8 9 10 ;
+check-equal var-subscript-range-lh : $(v3[-13-20]) : 0 1 2 3 4 5 6 7 8 9 10 ;
+check-equal var-subscript-range-ll : $(v3[-13--13]) : 0 ;
+check-equal var-subscript-range-empty : $(v3[4-3]) : ;
+
+}
+
+# Check rules
+
+{
+
+rule test-rule
+{
+ return $(<) - $(>) - $(1) - $(2) - $(3) - $(4) - $(5) - $(6) - $(7) - $(8) - $(9) - $(10) - $(11) - $(12) - $(13) - $(14) - $(15) - $(16) - $(17) - $(18) - $(19) ;
+}
+
+check-equal rule-arguments-numbered :
+ [ test-rule a1 : a2 : a3 : a4 : a5 : a6 : a7 : a8 : a9 : a10 : a11 : a12 : a13 : a14 : a15 : a16 : a17 : a18 : a19 ] :
+ a1 - a2 - a1 - a2 - a3 - a4 - a5 - a6 - a7 - a8 - a9 - a10 - a11 - a12 - a13 - a14 - a15 - a16 - a17 - a18 - a19 ;
+
+rule test-rule
+{
+ return $(<:L) - $(>:L) - $(1:L) - $(2:L) - $(3:L) - $(4:L) - $(5:L) - $(6:L) - $(7:L) - $(8:L) - $(9:L) - $(10:L) - $(11:L) - $(12:L) - $(13:L) - $(14:L) - $(15:L) - $(16:L) - $(17:L) - $(18:L) - $(19:L) ;
+}
+
+# behavior change
+check-equal rule-arguments-numbered-lower :
+ [ test-rule a1 : a2 : a3 : a4 : a5 : a6 : a7 : a8 : a9 : a10 : a11 : a12 : a13 : a14 : a15 : a16 : a17 : a18 : a19 ] :
+ a1 - a2 - a1 - a2 - a3 - a4 - a5 - a6 - a7 - a8 - a9 - a10 - a11 - a12 - a13 - a14 - a15 - a16 - a17 - a18 - a19 ;
+
+
+rule test-rule ( p1 : p2 : p3 : p4 : p5 : p6 : p7 : p8 : p9 :
+ p10 : p11 : p12 : p13 : p14 : p15 : p16 : p17 : p18 : p19 )
+
+
+{
+ return $(p1) - $(p2) - $(p3) - $(p4) - $(p5) - $(p6) - $(p7) - $(p8) - $(p9) - $(p10) - $(p11) - $(p12) - $(p13) - $(p14) - $(p15) - $(p16) - $(p17) - $(p18) - $(p19) ;
+}
+
+check-equal rule-arguments-named :
+ [ test-rule a1 : a2 : a3 : a4 : a5 : a6 : a7 : a8 : a9 : a10 : a11 : a12 : a13 : a14 : a15 : a16 : a17 : a18 : a19 ] :
+ a1 - a2 - a3 - a4 - a5 - a6 - a7 - a8 - a9 - a10 - a11 - a12 - a13 - a14 - a15 - a16 - a17 - a18 - a19 ;
+
+#
+# test rule indirection
+#
+rule select ( n list * )
+{
+ return $(list[$(n)]) ;
+}
+
+rule indirect1 ( rule + : args * )
+{
+ return [ $(rule) $(args) ] ;
+}
+
+check-equal rule-indirect-1 : [ indirect1 select 1 : a b c d e ] : a ;
+check-equal rule-indirect-2 : [ indirect1 select 2 : a b c d e ] : b ;
+
+x = reset ;
+rule reset-x ( new-value )
+{
+ x = $(new-value) ;
+}
+$(x)-x bar ; # invokes reset-x...
+check-equal rule-reset : $(x) : bar ; # which changes x
+
+rule bar-x ( new-value )
+{
+ mark-order r3 ;
+}
+
+# The arguments are evaluated in forward order
+# before the rule name
+$(x)-x [ mark-order r1 : [ reset-x reset ] ] : [ mark-order r2 ] ;
+check-order rule-order : r1 r2 ;
+
+# Cases that look like member calls
+rule looks.like-a-member ( args * )
+{
+ return $(args) ;
+}
+
+rule call-non-member ( rule + )
+{
+ return [ $(rule).like-a-member ] ;
+}
+
+rule call-non-member-with-args ( rule + )
+{
+ return [ $(rule).like-a-member a2 ] ;
+}
+
+check-equal rule-non-member : [ call-non-member looks ] : ;
+#check-equal rule-non-member-a1 : [ call-non-member looks a1 ] : looks.a1 ;
+check-equal rule-non-member-args : [ call-non-member-with-args looks ] : a2 ;
+#check-equal rule-non-member-args-a1 : [ call-non-member-with-args looks a1 ] : looks.a1 a2 ;
+
+}
+
+# Check append
+
+{
+
+local value = [ mark-order r1 : v1 v2 ] [ mark-order r2 : v3 v4 ] ;
+check-equal append : $(value) : v1 v2 v3 v4 ;
+check-order append-order : r1 r2 ;
+
+}
+
+# Check foreach
+
+{
+
+local v1 = 1 2 3 ;
+local x = old ;
+local result ;
+
+for local x in $(v1)
+{
+ result += $(x) + ;
+}
+
+check-equal foreach-local-item : $(result) : 1 + 2 + 3 + ;
+check-equal foreach-local : $(x) : old ;
+
+result = ;
+
+for x in $(v1)
+{
+ result += $(x) + ;
+}
+
+check-equal foreach-nonlocal-item : $(result) : 1 + 2 + 3 + ;
+check-equal foreach-nonlocal : $(x) : 3 ;
+
+rule call-foreach ( values * )
+{
+ for local x in $(values)
+ {
+ return $(x) ;
+ }
+}
+
+check-equal foreach-result : [ call-foreach 1 2 3 ] : 1 ;
+
+result = ;
+local varname = x ;
+x = old ;
+
+for local $(varname) in $(v1)
+{
+ result += $(x) + ;
+}
+
+check-equal foreach-no-expand : $(result) : old + old + old + ;
+
+result = ;
+
+for local v1 in $(v1)
+{
+ result += $(v1) + ;
+}
+
+check-equal foreach-order : $(result) : 1 + 2 + 3 + ;
+
+}
+
+# Check if
+
+{
+
+if true
+{
+ mark-order r1 ;
+}
+
+check-order if-true : r1 ;
+
+if $(false)
+{
+ mark-order r1 ;
+}
+
+check-order if-false : ;
+
+if true
+{
+ mark-order r1 ;
+}
+else
+{
+ mark-order r2 ;
+}
+
+check-order if-else-true : r1 ;
+
+if $(false)
+{
+ mark-order r1 ;
+}
+else
+{
+ mark-order r2 ;
+}
+
+check-order if-else-false : r2 ;
+
+rule test-rule
+{
+ if true
+ {
+ return result ;
+ }
+}
+
+check-equal if-true-result : [ test-rule ] : result ;
+
+rule test-rule
+{
+ local idx = 1 2 ;
+ local values = true ;
+ while $(idx)
+ {
+ local v = $(values[$(idx[1])]) ;
+ idx = $(idx[2-]) ;
+ if $(v)
+ {
+ return result ;
+ }
+ }
+}
+
+check-equal if-false-result : [ test-rule ] : result ;
+
+rule test-rule
+{
+ if true
+ {
+ return r1 ;
+ }
+ else
+ {
+ return r2 ;
+ }
+}
+
+check-equal if-else-true-result : [ test-rule ] : r1 ;
+
+rule test-rule
+{
+ if $(false)
+ {
+ return r1 ;
+ }
+ else
+ {
+ return r2 ;
+ }
+}
+
+check-equal if-else-false-result : [ test-rule ] : r2 ;
+
+}
+
+# Check the evaluation of conditions
+
+{
+
+local test-result ;
+local v1 = "" "" "" ;
+local v2 = ;
+local v3 = a b c ;
+local v4 = a b c d ;
+local v5 = a b d ;
+local v6 = "" "" "" d ;
+
+rule test-comparison ( id : equal less greater )
+{
+ check-equal $(id)-empty-1 : [ eval-$(id) $(v1) : $(v2) ] : $(equal) ;
+ check-equal $(id)-empty-2 : [ eval-$(id) $(v1) : $(v2) ] : $(equal) ;
+ check-equal $(id)-equal : [ eval-$(id) $(v3) : $(v3) ] : $(equal) ;
+ check-equal $(id)-less-1 : [ eval-$(id) $(v3) : $(v4) ] : $(less) ;
+ check-equal $(id)-less-2 : [ eval-$(id) $(v3) : $(v5) ] : $(less) ;
+ check-equal $(id)-less-3 : [ eval-$(id) $(v4) : $(v5) ] : $(less) ;
+ check-equal $(id)-greater-1 : [ eval-$(id) $(v4) : $(v3) ] : $(greater) ;
+ check-equal $(id)-greater-2 : [ eval-$(id) $(v5) : $(v3) ] : $(greater) ;
+ check-equal $(id)-greater-3 : [ eval-$(id) $(v5) : $(v4) ] : $(greater) ;
+}
+
+rule eval-lt ( lhs * : rhs * )
+{
+ if $(lhs) < $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-comparison lt : false true false ;
+
+rule eval-gt ( lhs * : rhs * )
+{
+ if $(lhs) > $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-comparison gt : false false true ;
+
+rule eval-le ( lhs * : rhs * )
+{
+ if $(lhs) <= $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-comparison le : true true false ;
+
+rule eval-ge ( lhs * : rhs * )
+{
+ if $(lhs) >= $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-comparison ge : true false true ;
+
+rule eval-eq ( lhs * : rhs * )
+{
+ if $(lhs) = $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-comparison eq : true false false ;
+
+rule eval-ne ( lhs * : rhs * )
+{
+ if $(lhs) != $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-comparison ne : false true true ;
+
+rule eval-not-lt ( lhs * : rhs * )
+{
+ if ! ( $(lhs) < $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-comparison not-lt : true false true ;
+
+rule eval-not-gt ( lhs * : rhs * )
+{
+ if ! ( $(lhs) > $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-comparison not-gt : true true false ;
+
+rule eval-not-le ( lhs * : rhs * )
+{
+ if ! ( $(lhs) <= $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-comparison not-le : false false true ;
+
+rule eval-not-ge ( lhs * : rhs * )
+{
+ if ! ( $(lhs) >= $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-comparison not-ge : false true false ;
+
+rule eval-not-eq ( lhs * : rhs * )
+{
+ if ! ( $(lhs) = $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-comparison not-eq : false true true ;
+
+rule eval-not-ne ( lhs * : rhs * )
+{
+ if ! ( $(lhs) != $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-comparison not-ne : true false false ;
+
+local v7 = a a a a a a ;
+local v8 = c b ;
+local v9 = c d b ;
+local v10 = c a b c c b a a a ;
+
+rule test-in ( id : subset not-subset )
+{
+ check-equal $(id)-0-0 : [ eval-$(id) $(v2) : $(v2) ] : $(subset) ;
+ check-equal $(id)-0-empty : [ eval-$(id) $(v2) : $(v1) ] : $(subset) ;
+ check-equal $(id)-empty-0 : [ eval-$(id) $(v1) : $(v2) ] : $(not-subset) ;
+ check-equal $(id)-equal : [ eval-$(id) $(v3) : $(v3) ] : $(subset) ;
+ check-equal $(id)-simple : [ eval-$(id) $(v3) : $(v4) ] : $(subset) ;
+ check-equal $(id)-extra : [ eval-$(id) $(v4) : $(v3) ] : $(not-subset) ;
+ check-equal $(id)-multiple : [ eval-$(id) $(v7) : $(v3) ] : $(subset) ;
+ check-equal $(id)-unordered : [ eval-$(id) $(v8) : $(v3) ] : $(subset) ;
+ check-equal $(id)-unordered-extra : [ eval-$(id) $(v9) : $(v3) ] : $(not-subset) ;
+ check-equal $(id)-unordered-multiple : [ eval-$(id) $(v10) : $(v3) ] : $(subset) ;
+}
+
+rule eval-in ( lhs * : rhs * )
+{
+ if $(lhs) in $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-in "in" : true false ;
+
+rule eval-not-in ( lhs * : rhs * )
+{
+ if ! ( $(lhs) in $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-in not-in : false true ;
+
+rule test-truth-table ( id : tt tf ft ff )
+{
+ check-equal $(id)-tt : [ eval-$(id) 1 : 1 ] : $(tt) ;
+ check-equal $(id)-tf : [ eval-$(id) 1 : ] : $(tf) ;
+ check-equal $(id)-ft : [ eval-$(id) : 1 ] : $(ft) ;
+ check-equal $(id)-ff : [ eval-$(id) : ] : $(ff) ;
+}
+
+rule eval-and ( lhs ? : rhs ? )
+{
+ if $(lhs) && $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-truth-table and : true false false false ;
+
+rule eval-or ( lhs ? : rhs ? )
+{
+ if $(lhs) || $(rhs) { return true ; }
+ else { return false ; }
+}
+
+test-truth-table or : true true true false ;
+
+rule eval-not-and ( lhs ? : rhs ? )
+{
+ if ! ( $(lhs) && $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-truth-table not-and : false true true true ;
+
+rule eval-not-or ( lhs ? : rhs ? )
+{
+ if ! ( $(lhs) || $(rhs) ) { return true ; }
+ else { return false ; }
+}
+
+test-truth-table not-or : false false false true ;
+
+if [ mark-order r1 : test1 ] < [ mark-order r2 : test2 ] { }
+check-order lt-order : r1 r2 ;
+if [ mark-order r1 : test1 ] > [ mark-order r2 : test2 ] { }
+check-order gt-order : r1 r2 ;
+if [ mark-order r1 : test1 ] <= [ mark-order r2 : test2 ] { }
+check-order le-order : r1 r2 ;
+if [ mark-order r1 : test1 ] >= [ mark-order r2 : test2 ] { }
+check-order ge-order : r1 r2 ;
+if [ mark-order r1 : test1 ] = [ mark-order r2 : test2 ] { }
+check-order eq-order : r1 r2 ;
+if [ mark-order r1 : test1 ] != [ mark-order r2 : test2 ] { }
+check-order ne-order : r1 r2 ;
+if [ mark-order r1 : test1 ] in [ mark-order r2 : test2 ] { }
+check-order in-order : r1 r2 ;
+
+if [ mark-order r1 : test1 ] && [ mark-order r2 : test2 ] { }
+check-order and-order : r1 r2 ;
+if [ mark-order r1 ] && [ mark-order r2 : test2 ] { }
+check-order and-order-short-circuit : r1 ;
+
+if [ mark-order r1 ] || [ mark-order r2 : test2 ] { }
+check-order or-order : r1 r2 ;
+if [ mark-order r1 : test1 ] || [ mark-order r2 : test2 ] { }
+check-order or-order-short-circuit : r1 ;
+
+}
+
+# Check include
+
+{
+#FIXME:
+# plain include
+# include in module
+# include returns an empty list
+# rule arguments are available inside include
+}
+
+# Check local
+
+{
+
+local v1 = a b c ;
+local v2 = f g h ;
+
+{
+ local v1 ;
+ check-equal local-no-init : $(v1) : ;
+}
+
+check-equal local-restore : $(v1) : a b c ;
+
+{
+ local v1 = d e f ;
+ check-equal local-init : $(v1) : d e f ;
+}
+
+check-equal local-restore-init : $(v1) : a b c ;
+
+{
+ local v1 v2 ;
+ check-equal local-multiple-no-init : $(v1) - $(v2) : - ;
+}
+
+check-equal local-multiple-restore : $(v1) - $(v2) : a b c - f g h ;
+
+{
+ local v1 v2 = d e f ;
+ check-equal local-multiple-init : $(v1) - $(v2) : d e f - d e f ;
+}
+
+{
+ local v1 v1 = d e f ;
+ check-equal local-duplicate : $(v1) - $(v1) : d e f - d e f ;
+}
+
+check-equal local-duplicate-restore : $(v1) : a b c ;
+
+{
+ local [ mark-order r1 : v1 ] = [ mark-order r2 : d e f ] ;
+ check-order local-order : r1 r2 ;
+}
+
+}
+
+# Check module
+
+{
+ local var1 = root-module-var ;
+ module my_module
+ {
+ var1 = module-var ;
+ rule get ( )
+ {
+ return $(var1) ;
+ }
+ local rule not_really ( ) { return nothing ; }
+ }
+
+ check-equal module-var-not-root : $(var1) : root-module-var ;
+
+ check-equal module-rulenames : [ RULENAMES my_module ] : get ;
+
+ IMPORT_MODULE my_module ;
+ check-equal module-rule-import-module : [ my_module.get ] : module-var ;
+
+ IMPORT my_module : get : : module-get ;
+ check-equal module-rule-imort : [ module-get ] : module-var ;
+
+ IMPORT my_module : get : : module-get : LOCALIZE ;
+ check-equal module-rule-imort-localize : [ module-get ] : root-module-var ;
+
+}
+
+# Check class
+{
+#FIXME:
+# ...
+}
+
+# Check on
+
+{
+
+local target1 = test-on-target1 ;
+local target2 = test-on-target2 ;
+local targets = $(target1) $(target2) ;
+local v1 v2 v3 ;
+
+VAR on $(target1) = value1 ;
+V2 on $(target2) = value2 ;
+
+check-equal on-return : [ on $(target1) return $(VAR) ] : value1 ;
+
+rule test-rule
+{
+ return $(VAR) ;
+}
+
+check-equal on-rule : [ on $(target1) test-rule ] : value1 ;
+
+check-equal on-multiple : [ on $(targets) return $(V2) ] : ;
+
+rule test-rule
+{
+ on $(target1)
+ {
+ return $(VAR) ;
+ }
+}
+
+check-equal on-block : [ test-rule ] : value1 ;
+
+# FIXME: crazy implementation artifacts:
+
+v1 on test-on-target3 = x1 ;
+on test-on-target3
+{
+ v1 on test-on-target3 += x1 ;
+ v1 = y1 ;
+ v2 on test-on-target3 += x2 ;
+ v2 = y2 ;
+ v3 = y3 ;
+}
+
+check-equal on-swap-old1 : $(v1) : x1 ;
+check-equal on-swap-old2 : [ on test-on-target3 return $(v1) ] : y1 ;
+check-equal on-swap-new1 : $(v2) : x2 ;
+check-equal on-swap-new2 : [ on test-on-target3 return $(v2) ] : y2 ;
+check-equal on-no-swap : $(v3) : y3 ;
+
+}
+
+# Check rule
+
+{
+#FIXME:
+# argument order
+# expand rule name
+}
+
+# Check rules
+
+{
+#FIXME:
+}
+
+# Check set
+
+{
+local v1 ;
+local v2 ;
+local v3 ;
+local vars = v1 v2 v3 ;
+
+v1 = x1 ;
+check-equal set-set-empty : $(v1) : x1 ;
+v2 += x2 ;
+check-equal set-append-empty : $(v2) : x2 ;
+v3 ?= x3 ;
+check-equal set-default-empty : $(v3) : x3 ;
+
+v1 = y1 ;
+check-equal set-set-non-empty : $(v1) : y1 ;
+v2 += y2 ;
+check-equal set-append-non-empty : $(v2) : x2 y2 ;
+v3 ?= y3 ;
+check-equal set-default-non-empty : $(v3) : x3 ;
+
+v1 = ;
+v2 = ;
+v3 = ;
+$(vars) = z ;
+check-equal set-set-empty-group : $(v1) - $(v2) - $(v3) : z - z - z ;
+
+v1 = ;
+v2 = ;
+v3 = ;
+$(vars) += z ;
+check-equal set-append-empty-group : $(v1) - $(v2) - $(v3) : z - z - z ;
+
+v1 = ;
+v2 = ;
+v3 = ;
+$(vars) ?= z ;
+check-equal set-default-empty-group : $(v1) - $(v2) - $(v3) : z - z - z ;
+
+v1 = x1 ;
+v2 = x2 ;
+v3 = x3 ;
+$(vars) = z ;
+check-equal set-set-non-empty-group : $(v1) - $(v2) - $(v3) : z - z - z ;
+
+v1 = x1 ;
+v2 = x2 ;
+v3 = x3 ;
+$(vars) += z ;
+check-equal set-append-non-empty-group : $(v1) - $(v2) - $(v3) : x1 z - x2 z - x3 z ;
+
+v1 = x1 ;
+v2 = x2 ;
+v3 = x3 ;
+$(vars) ?= z ;
+check-equal set-default-non-empty-group : $(v1) - $(v2) - $(v3) : x1 - x2 - x3 ;
+
+v1 = x1 ;
+v2 = ;
+v3 = x3 ;
+$(vars) = z ;
+check-equal set-set-mixed-group : $(v1) - $(v2) - $(v3) : z - z - z ;
+
+v1 = x1 ;
+v2 = ;
+v3 = x3 ;
+$(vars) += z ;
+check-equal set-append-mixed-group : $(v1) - $(v2) - $(v3) : x1 z - z - x3 z ;
+
+v1 = x1 ;
+v2 = ;
+v3 = x3 ;
+$(vars) ?= z ;
+check-equal set-default-mixed-group : $(v1) - $(v2) - $(v3) : x1 - z - x3 ;
+
+vars = v1 v1 ;
+
+v1 = ;
+$(vars) = z ;
+check-equal set-set-duplicate-empty : $(v1) : z ;
+v1 = ;
+$(vars) += z ;
+check-equal set-append-duplicate-empty : $(v1) : z z ;
+v1 = ;
+$(vars) ?= z ;
+check-equal set-default-duplicate-empty : $(v1) : z ;
+
+v1 = x1 ;
+$(vars) = z ;
+check-equal set-set-duplicate-non-empty : $(v1) : z ;
+v1 = x1 ;
+$(vars) += z ;
+check-equal set-append-duplicate-non-empty : $(v1) : x1 z z ;
+v1 = x1 ;
+$(vars) ?= z ;
+check-equal set-default-duplicate-non-empty : $(v1) : x1 ;
+
+rule test-rule { v1 = x1 ; }
+check-equal set-set-result : [ test-rule ] : x1 ;
+rule test-rule { v1 += x1 ; }
+check-equal set-append-result : [ test-rule ] : x1 ;
+rule test-rule { v1 ?= x1 ; }
+check-equal set-default-result : [ test-rule ] : x1 ;
+
+[ mark-order r1 ] = [ mark-order r2 ] ;
+check-order set-set-order : r1 r2 ;
+[ mark-order r1 ] += [ mark-order r2 ] ;
+check-order set-append-order : r1 r2 ;
+[ mark-order r1 ] ?= [ mark-order r2 ] ;
+check-order set-default-order : r1 r2 ;
+
+}
+
+# Check setcomp
+
+{
+#FIXME
+# Expand arguments
+# Don't expand name
+}
+
+# Check setexec
+
+{
+#FIXME:
+# Don't expand name
+# Evaluate bindlist
+}
+
+# Check settings ;
+
+{
+
+local target1 = test-settings-target1 ;
+local target2 = test-settings-target2 ;
+local target3 = test-settings-target3 ;
+local targets = $(target2) $(target3) ;
+
+local vars = v1 v2 v3 ;
+
+v1 on $(target1) = x1 ;
+check-equal settings-set-empty : [ on $(target1) return $(v1) ] : x1 ;
+v2 on $(target1) += x2 ;
+check-equal settings-append-empty : [ on $(target1) return $(v2) ] : x2 ;
+v3 on $(target1) ?= x3 ;
+check-equal settings-default-empty : [ on $(target1) return $(v3) ] : x3 ;
+
+v1 on $(target1) = y1 ;
+check-equal settings-set-non-empty : [ on $(target1) return $(v1) ] : y1 ;
+v2 on $(target1) += y2 ;
+check-equal settings-append-non-empty : [ on $(target1) return $(v2) ] : x2 y2 ;
+v3 on $(target1) ?= y3 ;
+check-equal settings-default-non-empty : [ on $(target1) return $(v3) ] : x3 ;
+
+$(vars) on setting-target2 = z ;
+check-equal settings-set-empty-group : [ on setting-target2 return $(v1) ] - [ on setting-target2 return $(v2) ] - [ on setting-target2 return $(v3) ] : z - z - z ;
+
+$(vars) on setting-target3 += z ;
+check-equal settings-append-empty-group : [ on setting-target3 return $(v1) ] - [ on setting-target3 return $(v2) ] - [ on setting-target3 return $(v3) ] : z - z - z ;
+
+$(vars) on setting-target4 ?= z ;
+check-equal settings-default-empty-group : [ on setting-target4 return $(v1) ] - [ on setting-target4 return $(v2) ] - [ on setting-target4 return $(v3) ] : z - z - z ;
+
+v1 on $(target1) = x1 ;
+v2 on $(target1) = x2 ;
+v3 on $(target1) = x3 ;
+$(vars) on $(target1) = z ;
+check-equal settings-set-non-empty-group : [ on $(target1) return $(v1) ] - [ on $(target1) return $(v2) ] - [ on $(target1) return $(v3) ] : z - z - z ;
+
+v1 on $(target1) = x1 ;
+v2 on $(target1) = x2 ;
+v3 on $(target1) = x3 ;
+$(vars) on $(target1) += z ;
+check-equal settings-append-non-empty-group : [ on $(target1) return $(v1) ] - [ on $(target1) return $(v2) ] - [ on $(target1) return $(v3) ] : x1 z - x2 z - x3 z ;
+
+v1 on $(target1) = x1 ;
+v2 on $(target1) = x2 ;
+v3 on $(target1) = x3 ;
+$(vars) on $(target1) ?= z ;
+check-equal settings-default-non-empty-group : [ on $(target1) return $(v1) ] - [ on $(target1) return $(v2) ] - [ on $(target1) return $(v3) ] : x1 - x2 - x3 ;
+
+v1 on setting-target5 = x1 ;
+v3 on setting-target5 = x3 ;
+$(vars) on setting-target5 = z ;
+check-equal settings-set-mixed-group : [ on setting-target5 return $(v1) ] - [ on setting-target5 return $(v2) ] - [ on setting-target5 return $(v3) ] : z - z - z ;
+
+v1 on setting-target6 = x1 ;
+v3 on setting-target6 = x3 ;
+$(vars) on setting-target6 += z ;
+check-equal settings-append-mixed-group : [ on setting-target6 return $(v1) ] - [ on setting-target6 return $(v2) ] - [ on setting-target6 return $(v3) ] : x1 z - z - x3 z ;
+
+v1 on setting-target7 = x1 ;
+v3 on setting-target7 = x3 ;
+$(vars) on setting-target7 ?= z ;
+check-equal settings-default-mixed-group : [ on setting-target7 return $(v1) ] - [ on setting-target7 return $(v2) ] - [ on setting-target7 return $(v3) ] : x1 - z - x3 ;
+
+vars = v1 v1 ;
+
+$(vars) on setting-target8 = z ;
+check-equal settings-set-duplicate-empty : [ on setting-target8 return $(v1) ] : z ;
+$(vars) on setting-target9 += z ;
+check-equal settings-append-duplicate-empty : [ on setting-target9 return $(v1) ] : z z ;
+$(vars) on setting-target10 ?= z ;
+check-equal settings-default-duplicate-empty : [ on setting-target10 return $(v1) ] : z ;
+
+v1 on $(target1) = x1 ;
+$(vars) on $(target1) = z ;
+check-equal settings-set-duplicate-non-empty : [ on $(target1) return $(v1) ] : z ;
+v1 on $(target1) = x1 ;
+$(vars) on $(target1) += z ;
+check-equal settings-append-duplicate-non-empty : [ on $(target1) return $(v1) ] : x1 z z ;
+v1 on $(target1) = x1 ;
+$(vars) on $(target1) ?= z ;
+check-equal settings-default-duplicate-non-empty : [ on $(target1) return $(v1) ] : x1 ;
+
+v1 on $(target1) = ;
+v1 on $(target1) ?= z ;
+check-equal settings-default-set-but-empty : [ on $(target1) return $(v1) ] : ;
+
+v1 on $(targets) = multi ;
+check-equal settings-set-multi-empty : [ on $(target2) return $(v1) ] - [ on $(target3) return $(v1) ] : multi - multi ;
+v2 on $(targets) += multi ;
+check-equal settings-append-multi-empty : [ on $(target2) return $(v2) ] - [ on $(target3) return $(v2) ] : multi - multi ;
+v3 on $(targets) ?= multi ;
+check-equal settings-default-multi-empty : [ on $(target2) return $(v3) ] - [ on $(target3) return $(v3) ] : multi - multi ;
+
+v1 on $(targets) = multi2 ;
+check-equal settings-set-multi-empty : [ on $(target2) return $(v1) ] - [ on $(target3) return $(v1) ] : multi2 - multi2 ;
+v2 on $(targets) += multi2 ;
+check-equal settings-append-multi-empty : [ on $(target2) return $(v2) ] - [ on $(target3) return $(v2) ] : multi multi2 - multi multi2 ;
+v3 on $(targets) ?= multi2 ;
+check-equal settings-default-multi-empty : [ on $(target2) return $(v3) ] - [ on $(target3) return $(v3) ] : multi - multi ;
+
+rule test-rule { v1 on $(target1) = x1 ; }
+check-equal settings-set-result : [ test-rule ] : x1 ;
+rule test-rule { v1 on $(target1) += x1 ; }
+check-equal settings-append-result : [ test-rule ] : x1 ;
+rule test-rule { v1 on $(target1) ?= x1 ; }
+check-equal settings-default-result : [ test-rule ] : x1 ;
+
+[ mark-order r1 : var ] on [ mark-order r3 : $(target1) ] = [ mark-order r2 : value ] ;
+check-order settings-set-order : r1 r2 r3 ;
+[ mark-order r1 : var ] on [ mark-order r3 : $(target1) ] += [ mark-order r2 : value ] ;
+check-order settings-append-order : r1 r2 r3 ;
+[ mark-order r1 : var ] on [ mark-order r3 : $(target1) ] ?= [ mark-order r2 : value ] ;
+check-order settings-default-order : r1 r2 r3 ;
+
+}
+
+# Check switch
+
+{
+
+local pattern = * ;
+
+switch value
+{
+ case * : mark-order r1 ;
+}
+
+check-order switch-match-any : r1 ;
+
+switch value
+{
+ case v2 : mark-order r1 ;
+}
+
+check-order switch-no-match : ;
+
+switch value
+{
+ case $(pattern) : mark-order r1 ;
+}
+
+check-order switch-no-expand : ;
+
+switch value
+{
+ case value : mark-order r1 ;
+ case * : mark-order r2 ;
+}
+
+check-order switch-match-several : r1 ;
+
+rule test-rule ( value )
+{
+ switch $(value)
+ {
+ case value : return 1 ;
+ }
+}
+
+check-equal switch-result-match : [ test-rule value ] : 1 ;
+check-equal switch-result-match : [ test-rule v1 ] : ;
+
+switch $()
+{
+ case "" : mark-order r1 ;
+ case * : mark-order r2 ;
+}
+
+check-order switch-empty : r1 ;
+
+local values = v1 v2 v3 ;
+switch $(values)
+{
+ case v1 : mark-order r1 ;
+ case v2 : mark-order r2 ;
+ case v3 : mark-order r3 ;
+}
+
+check-order switch-multiple : r1 ;
+
+# Test glob matching
+
+switch value { case * : mark-order r1 ; }
+check-order switch-glob-star : r1 ;
+
+switch value { case va*e : mark-order r1 ; }
+check-order switch-glob-star-1 : r1 ;
+
+switch value { case *a* : mark-order r1 ; }
+check-order switch-glob-star-2 : r1 ;
+
+switch value { case *a*ue* : mark-order r1 ; }
+check-order switch-glob-star-3 : r1 ;
+
+switch value { case *[eaiou]*ue : mark-order r1 ; }
+check-order switch-glob-group : r1 ;
+
+switch value { case *[eaiou]ue : mark-order r1 ; }
+check-order switch-glob-group-fail : ;
+
+switch value { case ?a?ue : mark-order r1 ; }
+check-order switch-glob-any : r1 ;
+
+switch value { case ?lue : mark-order r1 ; }
+check-order switch-glob-any-fail : ;
+
+}
+
+# Test while
+
+{
+
+local value = 1 2 3 ;
+
+while $(value)
+{
+ mark-order r$(value[1]) ;
+ value = $(value[2-]) ;
+}
+
+check-order while-exec : r1 r2 r3 ;
+
+rule test-rule
+{
+ local value = 1 2 3 ;
+ while $(value)
+ {
+ value = $(value[2-]) ;
+ return x ;
+ }
+}
+
+check-equal while-result : [ test-rule ] : x ;
+
+rule test-rule
+{
+ local value = 1 2 ;
+ while $(value)
+ {
+ value = $(value[2-]) ;
+ local inner = $(value) ;
+ while $(inner)
+ {
+ inner = $(inner[2-]) ;
+ return x ;
+ }
+ }
+}
+
+check-equal while-result-2 : [ test-rule ] : x ;
+
+}
+
+
+#
+# test break
+#
+
+{
+
+local z = original ;
+local done ;
+while ! $(done)
+{
+ local z = inner ;
+ mark-order r1 ;
+ break ;
+ mark-order r2 ;
+ done = true ;
+}
+
+check-order break-while-exec : r1 ;
+check-equal break-while-cleanup : $(z) : original ;
+
+local values = v1 v2 ;
+
+for y in $(values)
+{
+ local z = inner ;
+ mark-order r1-$(y) ;
+ break ;
+ mark-order r2-$(y) ;
+}
+
+check-order break-for-exec : r1-v1 ;
+check-equal break-for-cleanup : $(z) : original ;
+
+for local y in $(values)
+{
+ local z = inner ;
+ mark-order r1-$(y) ;
+ break ;
+ mark-order r2-$(y) ;
+}
+
+check-order break-for-local-exec : r1-v1 ;
+check-equal break-for-local-cleanup : $(z) : original ;
+
+local z1 = z1val ;
+local z2 = z2val ;
+done = ;
+while ! $(done)
+{
+ local z1 = z1new ;
+ mark-order r1 ;
+ for local y in $(values)
+ {
+ local z2 = z2new ;
+ mark-order r2 ;
+ break ;
+ mark-order r3 ;
+ }
+ mark-order r4 ;
+ break ;
+ mark-order r5 ;
+ done = true ;
+}
+
+check-order break-nested-exec : r1 r2 r4 ;
+check-equal break-nested-cleanup1 : $(z1) : z1val ;
+check-equal break-nested-cleanup2 : $(z2) : z2val ;
+
+}
+
+#
+# test continue
+#
+
+{
+
+local z = original ;
+local done ;
+while ! [ mark-order r1 : $(done) ]
+{
+ local z = inner ;
+ done = true ;
+ mark-order r2 ;
+ continue ;
+ mark-order r3 ;
+}
+
+check-order continue-while-exec : r1 r2 r1 ;
+check-equal continue-while-cleanup : $(z) : original ;
+
+local values = v1 v2 ;
+for y in $(values)
+{
+ local z = inner ;
+ mark-order r1-$(y) ;
+ continue ;
+ mark-order r2-$(y) ;
+}
+
+check-order continue-for-exec : r1-v1 r1-v2 ;
+check-equal continue-for-cleanup : $(z) : original ;
+
+for local y in $(values)
+{
+ local z = inner ;
+ mark-order r1-$(y) ;
+ continue ;
+ mark-order r2-$(y) ;
+}
+
+check-order continue-for-local-exec : r1-v1 r1-v2 ;
+check-equal continue-for-local-cleanup : $(z) : original ;
+
+local z1 = z1val ;
+local z2 = z2val ;
+done = ;
+while ! [ mark-order r1 : $(done) ]
+{
+ local z1 = z1new ;
+ done = true ;
+ mark-order r2 ;
+ for local y in $(values)
+ {
+ local z2 = z2new ;
+ mark-order r3-$(y) ;
+ continue ;
+ mark-order r4-$(y) ;
+ }
+ mark-order r5 ;
+ continue ;
+ mark-order r6 ;
+}
+
+check-order continue-nested-exec : r1 r2 r3-v1 r3-v2 r5 r1 ;
+check-equal continue-nested-cleanup1 : $(z1) : z1val ;
+check-equal continue-nested-cleanup2 : $(z2) : z2val ;
+
+}
+
+#
+# test CALLER_MODULE and backtrace
+#
+
+{
+ local base = [ BACKTRACE ] ;
+ base = $(base[2]) ;
+ rule backtrace ( )
+ {
+ local bt = [ BACKTRACE ] ;
+ check-equal backtrace-1-file : $(bt) :
+ test.jam [ CALC $(base) + 4 ] "" backtrace
+ test.jam [ CALC $(base) + 28 ] module2. module2.f
+ test.jam [ CALC $(base) + 19 ] module1. module1.f
+ test.jam [ CALC $(base) + 32 ] "" "module scope"
+ ;
+ }
+ module module1
+ {
+ IMPORT_MODULE module2 : module1 ;
+ rule f ( )
+ {
+ local m = [ CALLER_MODULE ] ;
+ check-equal caller-module-root : $(m) ;
+ module2.f ;
+ }
+ }
+ module module2
+ {
+ rule f ( )
+ {
+ local m = [ CALLER_MODULE ] ;
+ check-equal caller-module : module1 : $(m) ;
+ backtrace ;
+ }
+ }
+ IMPORT_MODULE module1 ;
+ module1.f ;
+}
+
+
+# Test NORMALIZE_PATH
+
+{
+check-equal normalize-path : "." : [ NORMALIZE_PATH ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "" ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "." ] ;
+check-equal normalize-path : ".." : [ NORMALIZE_PATH ".." ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "/" ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "\\" ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "//" ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "\\\\" ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "//\\\\//\\\\" ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "/." ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "/./" ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "\\\\///.///\\\\\\" ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "./././././." ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "/./././././." ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo" ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo/" ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo\\" ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo\\\\/////" ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo\\\\/////././." ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo\\\\/////./././" ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "foo/.." ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "foo////.." ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "///foo/\\\\/.." ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "\\\\\\foo\\//\\.." ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "foo/./.." ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "foo/././././.." ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo/./././bar/./././.././././baz/./././.." ] ;
+check-equal normalize-path : "/foo" : [ NORMALIZE_PATH "/foo/./././bar/./././.././././baz/./././.." ] ;
+check-equal normalize-path : "foo" : [ NORMALIZE_PATH "foo/./././bar/./././////.././././baz/./././.." ] ;
+check-equal normalize-path : "/foo" : [ NORMALIZE_PATH "/foo/./././bar/./././////.././././baz/./././.." ] ;
+check-equal normalize-path : ".." : [ NORMALIZE_PATH "./.." ] ;
+check-equal normalize-path : ".." : [ NORMALIZE_PATH "././././.." ] ;
+check-equal normalize-path : "../.." : [ NORMALIZE_PATH "../.." ] ;
+check-equal normalize-path : "../.." : [ NORMALIZE_PATH "./../.." ] ;
+check-equal normalize-path : "../.." : [ NORMALIZE_PATH "././././../.." ] ;
+check-equal normalize-path : "../.." : [ NORMALIZE_PATH "./.././././.." ] ;
+check-equal normalize-path : "../.." : [ NORMALIZE_PATH "././././.././././.." ] ;
+check-equal normalize-path : "../.." : [ NORMALIZE_PATH "..//\\\\\\//.." ] ;
+check-equal normalize-path : "../.." : [ NORMALIZE_PATH "../..\\\\/\\\\" ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "foo/../bar/../baz/.." ] ;
+check-equal normalize-path : "." : [ NORMALIZE_PATH "foo////..////bar////.//////.////../baz/.." ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "/foo/../bar/../baz/.." ] ;
+check-equal normalize-path : "/" : [ NORMALIZE_PATH "/foo////..////bar////.//////.////../baz/.." ] ;
+
+# Invalid rooted paths with leading dotdots.
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "/.." ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "/../" ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "//\\\\//\\\\/.." ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "\\\\//\\\\//\\.." ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "/../.." ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "/../../.." ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "/foo/bar/../baz/../../.." ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "/../for/././../././bar/././../././.." ] ;
+check-equal normalize-path-invalid : : [ NORMALIZE_PATH "/../foo/bar" ] ;
+
+}
+
+# Test W32_GETREGNAMES
+
+{
+
+if $(NT)
+{
+ local sound = "Beep" "ExtendedSounds" ;
+ local r1 = [ W32_GETREGNAMES "HKEY_CURRENT_USER\\Control Panel\\Sound" :
+ values ] ;
+ check-equal w32_getregnames : $(sound:L) : [ SORT $(r1:L) ] ;
+ local r2 = [ W32_GETREGNAMES "HKCU\\Control Panel\\Sound" : values ] ;
+ check-equal w32_getregnames : $(sound:L) : [ SORT $(r2:L) ] ;
+
+ # Some Windows platforms may have additional keys under
+ # 'CurrentControlSet' which we then remove here so they would not be
+ # reported as errors by our test.
+ local rule remove-policies ( param * )
+ {
+ local found ;
+ local r ;
+ for local x in $(param:L)
+ {
+ if ! x in $(found) &&
+ $(x) in "addservices" "policies" "deleted device ids" "software"
+ {
+ found += $(x) ;
+ }
+ else
+ {
+ r += $(x) ;
+ }
+ }
+ return $(r) ;
+ }
+ local CurrentControlSet = "Control" "Enum" "Hardware Profiles" "Services" ;
+ local r3 = [ W32_GETREGNAMES "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet"
+ : subkeys ] ;
+ check-equal w32_getregnames : $(CurrentControlSet:L) : [ remove-policies
+ $(r3:L) ] ;
+ local r4 = [ W32_GETREGNAMES "HKLM\\SYSTEM\\CurrentControlSet" : subkeys ] ;
+ check-equal w32_getregnames : $(CurrentControlSet:L) : [ remove-policies
+ $(r4:L) ] ;
+}
+
+}
+
+# Test SHELL
+
+{
+
+local c = "echo value" ;
+if $(OS) = VMS { c = "PIPE WRITE SYS$OUTPUT \"value\"" ; }
+
+check-equal shell : "value\n" : [ SHELL $(c) ] ;
+check-equal shell : "" : [ SHELL $(c) : no-output ] ;
+check-equal shell : "value\n" 0 : [ SHELL $(c) : exit-status ] ;
+check-equal shell : "" 0 : [ SHELL $(c) : no-output : exit-status ] ;
+check-equal shell : "" 0 : [ SHELL $(c) : no-output : exit-status : strip-eol ] ;
+check-equal command : "value\n" : [ COMMAND $(c) ] ;
+check-equal command : "" : [ COMMAND $(c) : no-output ] ;
+check-equal command : "value\n" 0 : [ COMMAND $(c) : exit-status ] ;
+check-equal command : "" 0 : [ COMMAND $(c) : no-output : exit-status ] ;
+
+# buffered output
+
+local expected = "When the shell output buffer splits on whitespace, the whitespace shouldn't be trimmed. end." ;
+local buffered = "echo \"$(expected)\"" ;
+if $(OS) = VMS { buffered = "PIPE WRITE SYS$OUTPUT \"$(expected)\"" ; }
+if $(OS) = NT { buffered = "echo $(expected)" ; }
+
+check-equal shell : "$(expected)\n" : [ SHELL $(buffered) ] ;
+check-equal shell : "" : [ SHELL $(buffered) : no-output ] ;
+check-equal shell : "$(expected)\n" 0 : [ SHELL $(buffered) : exit-status ] ;
+check-equal shell : "$(expected)" 0 : [ SHELL $(buffered) : strip-eol : exit-status ] ;
+check-equal shell : "" 0 : [ SHELL $(buffered) : no-output : exit-status ] ;
+check-equal shell : "" 0 : [ SHELL $(buffered) : no-output : exit-status : strip-eol ] ;
+check-equal shell : "$(expected)" 0 : [ SHELL $(buffered) : strip-eol : exit-status ] ;
+
+check-equal command : "$(expected)\n" : [ COMMAND $(buffered) ] ;
+check-equal command : "" : [ COMMAND $(buffered) : no-output ] ;
+check-equal command : "$(expected)\n" 0 : [ COMMAND $(buffered) : exit-status ] ;
+check-equal command : "$(expected)" 0 : [ COMMAND $(buffered) : strip-eol : exit-status ] ;
+check-equal command : "" 0 : [ COMMAND $(buffered) : no-output : exit-status ] ;
+
+}
+
+# Test SUBST
+
+{
+
+# Check that unmatched subst returns an empty list
+check-equal subst-nomatch : [ SUBST "abc" "d+" x ] : ;
+
+# Check that a matched subst works
+check-equal subst-match : [ SUBST "ddd" "d+" x ] : x ;
+
+# Check that we can get multiple substitutions from a single invocation
+check-equal subst-multiple : [ SUBST "x/y/z" "([^/]*)/([^/]*).*" "\\1" $2 "\\1-\\2" ] : x y x-y ;
+
+}
+
+# Test summary
+
+if $(failed) = 0
+{
+ status = 0 ;
+}
+else
+{
+ status = 1 ;
+}
+
+EXIT $(passed) passed $(failed) failed : $(status) ;
diff --git a/src/boost/tools/build/test/core_action_output.py b/src/boost/tools/build/test/core_action_output.py
new file mode 100755
index 000000000..757519863
--- /dev/null
+++ b/src/boost/tools/build/test/core_action_output.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+
+# Copyright 2012. Jurko Gospodnetic
+# 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)
+
+# Test correct "-p" option handling.
+
+import BoostBuild
+
+t = BoostBuild.Tester(["-d1"], pass_toolset=False)
+
+t.write("file.jam", """\
+prefix = "echo \\"" ;
+suffix = "\\"" ;
+if $(NT)
+{
+ prefix = "(echo " ;
+ suffix = ")" ;
+}
+actions go
+{
+ $(prefix)stdout$(suffix)
+ $(prefix)stderr$(suffix) 1>&2
+}
+ECHO "{{{" $(XXX) "}}}" ;
+ALWAYS all ;
+go all ;
+""")
+
+t.run_build_system(["-ffile.jam", "-sXXX=1"], stderr="")
+t.expect_output_lines("{{{ 1 }}}")
+t.expect_output_lines("stdout")
+t.expect_output_lines("stderr")
+t.expect_nothing_more()
+
+t.run_build_system(["-ffile.jam", "-sXXX=2", "-p0"], stderr="")
+t.expect_output_lines("{{{ 2 }}}")
+t.expect_output_lines("stdout")
+t.expect_output_lines("stderr")
+t.expect_nothing_more()
+
+t.run_build_system(["-ffile.jam", "-sXXX=3", "-p1"], stderr="")
+t.expect_output_lines("{{{ 3 }}}")
+t.expect_output_lines("stdout")
+t.expect_output_lines("stderr*", False)
+t.expect_nothing_more()
+
+t.run_build_system(["-ffile.jam", "-sXXX=4", "-p2"], stderr="stderr\n")
+t.expect_output_lines("{{{ 4 }}}")
+t.expect_output_lines("stdout*", False)
+t.expect_output_lines("stderr*", False)
+t.expect_nothing_more()
+
+t.run_build_system(["-ffile.jam", "-sXXX=5", "-p3"], stderr="stderr\n")
+t.expect_output_lines("{{{ 5 }}}")
+t.expect_output_lines("stdout")
+t.expect_output_lines("stderr*", False)
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_action_status.py b/src/boost/tools/build/test/core_action_status.py
new file mode 100755
index 000000000..7ebd43869
--- /dev/null
+++ b/src/boost/tools/build/test/core_action_status.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+# Copyright 2007 Rene Rivera.
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("file.jam", """\
+actions quietly .a. { $(ACTION) }
+
+rule .a.
+{
+ DEPENDS $(<) : $(>) ;
+}
+
+NOTFILE subtest ;
+.a. subtest_a : subtest ;
+DEPENDS all : subtest_a ;
+""")
+
+t.run_build_system(["-ffile.jam", "-sACTION=invalid"], status=1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_actions_quietly.py b/src/boost/tools/build/test/core_actions_quietly.py
new file mode 100755
index 000000000..c020846d5
--- /dev/null
+++ b/src/boost/tools/build/test/core_actions_quietly.py
@@ -0,0 +1,61 @@
+#!/usr/bin/python
+
+# Copyright 2007 Rene Rivera.
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("file.jam", """\
+actions quietly .a.
+{
+echo [$(<:B)] 0
+echo [$(<:B)] 1
+echo [$(<:B)] 2
+}
+
+rule .a.
+{
+ DEPENDS $(<) : $(>) ;
+}
+
+NOTFILE subtest ;
+.a. subtest_a : subtest ;
+.a. subtest_b : subtest ;
+DEPENDS all : subtest_a subtest_b ;
+""")
+
+t.run_build_system(["-ffile.jam", "-d2"], stdout="""\
+...found 4 targets...
+...updating 2 targets...
+.a. subtest_a
+
+echo [subtest_a] 0
+echo [subtest_a] 1
+echo [subtest_a] 2
+
+[subtest_a] 0
+[subtest_a] 1
+[subtest_a] 2
+.a. subtest_b
+
+echo [subtest_b] 0
+echo [subtest_b] 1
+echo [subtest_b] 2
+
+[subtest_b] 0
+[subtest_b] 1
+[subtest_b] 2
+...updated 2 targets...
+""")
+
+t.run_build_system(["-ffile.jam", "-d1"], stdout="""\
+...found 4 targets...
+...updating 2 targets...
+...updated 2 targets...
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_arguments.py b/src/boost/tools/build/test/core_arguments.py
new file mode 100755
index 000000000..1e0bd4b0c
--- /dev/null
+++ b/src/boost/tools/build/test/core_arguments.py
@@ -0,0 +1,103 @@
+#!/usr/bin/python
+
+# Copyright 2001 Dave Abrahams
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+
+def simple_args(start, finish):
+ return " : ".join("%d" % x for x in range(start, finish + 1))
+
+
+def test(t, type, input, output, status=0):
+ code = ["include echo_args.jam ; echo_%s" % type]
+ if input: code.append(input)
+ code.append(";")
+ t.write("file.jam", " ".join(code))
+ t.run_build_system(["-ffile.jam"], status=status)
+ t.expect_output_lines(output)
+
+
+def test_args(t, *args, **kwargs):
+ test(t, "args", *args, **kwargs)
+
+
+def test_varargs(t, *args, **kwargs):
+ test(t, "varargs", *args, **kwargs)
+
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("echo_args.jam", """\
+NOCARE all ;
+
+rule echo_args ( a b ? c ? : d + : e * )
+{
+ ECHO a= $(a) b= $(b) c= $(c) ":" d= $(d) ":" e= $(e) ;
+}
+
+rule echo_varargs ( a b ? c ? : d + : e * : * )
+{
+ ECHO a= $(a) b= $(b) c= $(c) ":" d= $(d) ":" e= $(e)
+ ": rest= "$(4[1]) $(4[2-])
+ ": "$(5[1]) $(5[2-]) ": "$(6[1]) $(6[2-]) ": "$(7[1]) $(7[2-])
+ ": "$(8[1]) $(8[2-]) ": "$(9[1]) $(9[2-]) ": "$(10[1]) $(10[2-])
+ ": "$(11[1]) $(11[2-]) ": "$(12[1]) $(12[2-]) ": "$(13[1]) $(13[2-])
+ ": "$(14[1]) $(14[2-]) ": "$(15[1]) $(15[2-]) ": "$(16[1]) $(16[2-])
+ ": "$(17[1]) $(17[2-]) ": "$(18[1]) $(18[2-]) ": "$(19[1]) $(19[2-])
+ ": "$(20[1]) $(20[2-]) ": "$(21[1]) $(21[2-]) ": "$(22[1]) $(22[2-])
+ ": "$(23[1]) $(23[2-]) ": "$(24[1]) $(24[2-]) ": "$(25[1]) $(25[2-]) ;
+}
+""")
+
+test_args(t, "", "* missing argument a", status=1)
+test_args(t, "1 2 : 3 : 4 : 5", "* extra argument 5", status=1)
+test_args(t, "a b c1 c2 : d", "* extra argument c2", status=1)
+
+# Check modifier '?'
+test_args(t, "1 2 3 : 4", "a= 1 b= 2 c= 3 : d= 4 : e=")
+test_args(t, "1 2 : 3", "a= 1 b= 2 c= : d= 3 : e=")
+test_args(t, "1 2 : 3", "a= 1 b= 2 c= : d= 3 : e=")
+test_args(t, "1 : 2", "a= 1 b= c= : d= 2 : e=")
+
+# Check modifier '+'
+test_args(t, "1", "* missing argument d", status=1)
+test_args(t, "1 : 2 3", "a= 1 b= c= : d= 2 3 : e=")
+test_args(t, "1 : 2 3 4", "a= 1 b= c= : d= 2 3 4 : e=")
+
+# Check modifier '*'
+test_args(t, "1 : 2 : 3", "a= 1 b= c= : d= 2 : e= 3")
+test_args(t, "1 : 2 : 3 4", "a= 1 b= c= : d= 2 : e= 3 4")
+test_args(t, "1 : 2 : 3 4 5", "a= 1 b= c= : d= 2 : e= 3 4 5")
+
+# Check varargs
+test_varargs(t, "1 : 2 : 3 4 5", "a= 1 b= c= : d= 2 : e= 3 4 5")
+test_varargs(t, "1 : 2 : 3 4 5 : 6", "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6")
+test_varargs(t, "1 : 2 : 3 4 5 : 6 7",
+ "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7")
+test_varargs(t, "1 : 2 : 3 4 5 : 6 7 : 8",
+ "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7 : 8")
+test_varargs(t, "1 : 2 : 3 4 5 : 6 7 : 8 : 9",
+ "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7 : 8 : 9")
+test_varargs(t, "1 : 2 : 3 4 5 : 6 7 : 8 : 9 : 10 : 11 : 12 : 13 : 14 : 15 : "
+ "16 : 17 : 18 : 19a 19b", "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= 6 7 : 8 : "
+ "9 : 10 : 11 : 12 : 13 : 14 : 15 : 16 : 17 : 18 : 19a 19b")
+test_varargs(t, "1 : 2 : 3 4 5 : 6 7 : 8 : 9 : 10 : 11 : 12 : 13 : 14 : 15 : "
+ "16 : 17 : 18 : 19a 19b 19c : 20", "a= 1 b= c= : d= 2 : e= 3 4 5 : rest= "
+ "6 7 : 8 : 9 : 10 : 11 : 12 : 13 : 14 : 15 : 16 : 17 : 18 : 19a 19b 19c : "
+ "20")
+
+# Check varargs upper limit
+expected = "a= 1 b= c= : d= 2 : e= 3 : rest= " + simple_args(4, 19)
+test_varargs(t, simple_args(1, 19), expected)
+test_varargs(t, simple_args(1, 19) + " 19b 19c 19d", expected + " 19b 19c 19d")
+test_varargs(t, simple_args(1, 19) + " 19b 19c 19d : 20", expected + " 19b "
+ "19c 19d")
+test_varargs(t, simple_args(1, 20), expected)
+test_varargs(t, simple_args(1, 50), expected)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_at_file.py b/src/boost/tools/build/test/core_at_file.py
new file mode 100755
index 000000000..50fa51220
--- /dev/null
+++ b/src/boost/tools/build/test/core_at_file.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
+
+t.write("file.jam", """\
+name = n1 n2 ;
+contents = M1 M2 ;
+EXIT "file:" "@(o$(name) .txt:E= test -D$(contents))" : 0 ;
+""")
+
+t.run_build_system()
+t.expect_output_lines("file: on1 on2 .txt");
+t.expect_addition("on1 on2 .txt")
+t.expect_content("on1 on2 .txt", " test -DM1 -DM2", True)
+
+t.rm(".")
+
+t.write("file.jam", """\
+name = n1 n2 ;
+contents = M1 M2 ;
+actions run { echo file: "@(o$(name) .txt:E= test -D$(contents))" }
+run all ;
+""")
+
+t.run_build_system(["-d2"])
+t.expect_output_lines(' echo file: "on1 on2 .txt" ');
+t.expect_addition("on1 on2 .txt")
+t.expect_content("on1 on2 .txt", " test -DM1 -DM2", True)
+
+t.rm(".")
+
+t.write("file.jam", """\
+name = n1 n2 ;
+contents = M1 M2 ;
+file = "@($(STDOUT):E= test -D$(contents)\n)" ;
+actions run { $(file) }
+run all ;
+""")
+
+t.run_build_system(["-d1"])
+t.expect_output_lines(" test -DM1 -DM2")
+
+t.rm(".")
+
+t.write("file.jam", """\
+name = n1 n2 ;
+contents = M1 M2 ;
+actions run { @($(STDOUT):E= test -D$(contents)\n) }
+run all ;
+""")
+
+t.run_build_system(["-d1"])
+t.expect_output_lines(" test -DM1 -DM2")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_bindrule.py b/src/boost/tools/build/test/core_bindrule.py
new file mode 100755
index 000000000..f97a31f56
--- /dev/null
+++ b/src/boost/tools/build/test/core_bindrule.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+
+# Copyright 2001 Dave Abrahams
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+import os
+
+t = BoostBuild.Tester(["-d1"], pass_toolset=0)
+
+t.write("subdir1/file-to-bind", "# This file intentionally left blank")
+
+t.write("file.jam", """\
+rule do-nothing ( target : source )
+{
+ DEPENDS $(target) : $(source) ;
+}
+actions quietly do-nothing { }
+
+# Make a non-file target which depends on a file that exists
+NOTFILE fake-target ;
+SEARCH on file-to-bind = subdir1 ;
+
+do-nothing fake-target : file-to-bind ;
+
+# Set jam up to call our bind-rule
+BINDRULE = bind-rule ;
+
+rule bind-rule ( target : path )
+{
+ ECHO "found:" $(target) at $(path) ;
+}
+
+DEPENDS all : fake-target ;
+""")
+
+t.run_build_system(["-ffile.jam"], stdout="""\
+found: all at all
+found: file-to-bind at subdir1%sfile-to-bind
+...found 3 targets...
+""" % os.sep)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_d12.py b/src/boost/tools/build/test/core_d12.py
new file mode 100644
index 000000000..370fc4bf1
--- /dev/null
+++ b/src/boost/tools/build/test/core_d12.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+
+# Copyright 2002, 2003 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)
+
+# This tests correct handling of "-d1" and "-d2" options.
+
+import BoostBuild
+
+t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
+
+t.write("file.jam", """\
+actions a { }
+actions quietly b { }
+ALWAYS all ;
+a all ;
+b all ;
+""")
+
+t.run_build_system(["-d0"], stdout="")
+
+t.run_build_system(["-d1"])
+t.expect_output_lines("a all")
+t.expect_output_lines("b all", False)
+
+t.run_build_system(["-d2"])
+t.expect_output_lines("a all")
+t.expect_output_lines("b all")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_delete_module.py b/src/boost/tools/build/test/core_delete_module.py
new file mode 100644
index 000000000..d56ffe6e7
--- /dev/null
+++ b/src/boost/tools/build/test/core_delete_module.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave 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)
+
+# This tests the facilities for deleting modules.
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("file.jam", """
+module foo
+{
+ rule bar { }
+ var = x y ;
+}
+DELETE_MODULE foo ;
+if [ RULENAMES foo ]
+{
+ EXIT DELETE_MODULE failed to kill foo's rules: [ RULENAMES foo ] ;
+}
+
+module foo
+{
+ if $(var)
+ {
+ EXIT DELETE_MODULE failed to kill foo's variables ;
+ }
+
+ rule bar { }
+ var = x y ;
+
+ DELETE_MODULE foo ;
+
+ if $(var)
+ {
+ EXIT internal DELETE_MODULE failed to kill foo's variables ;
+ }
+ if [ RULENAMES foo ]
+ {
+ EXIT internal DELETE_MODULE failed to kill foo's rules: [ RULENAMES foo ] ;
+ }
+}
+DEPENDS all : xx ;
+NOTFILE xx ;
+""")
+
+t.run_build_system(["-ffile.jam"], status=0)
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_dependencies.py b/src/boost/tools/build/test/core_dependencies.py
new file mode 100644
index 000000000..4c60537d9
--- /dev/null
+++ b/src/boost/tools/build/test/core_dependencies.py
@@ -0,0 +1,157 @@
+#!/usr/bin/python
+
+# 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 tests correct handling of dependencies, specifically, on generated
+# sources, and from generated sources.
+
+import BoostBuild
+
+import string
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("core-dependency-helpers", """
+rule hdrrule
+{
+ INCLUDES $(1) : $(2) ;
+}
+actions copy
+{
+ cp $(>) $(<)
+}
+""")
+
+code = """include core-dependency-helpers ;
+DEPENDS all : a ;
+DEPENDS a : b ;
+
+actions create-b
+{
+ echo '#include <foo.h>' > $(<)
+}
+copy a : b ;
+create-b b ;
+HDRRULE on b foo.h bar.h = hdrrule ;
+HDRSCAN on b foo.h bar.h = \"#include <(.*)>\" ;
+"""
+
+# This creates 'a' which depends on 'b', which is generated. The generated 'b'
+# contains '#include <foo.h>' and no rules for foo.h are given. The system
+# should error out on the first invocation.
+t.run_build_system("-f-", stdin=code)
+t.fail_test(t.stdout().find("...skipped a for lack of foo.h...") == -1)
+
+t.rm('b')
+
+# Now test that if target 'c' also depends on 'b', then it will not be built, as
+# well.
+t.run_build_system("-f-", stdin=code + " copy c : b ; DEPENDS c : b ; DEPENDS all : c ; ")
+t.fail_test(t.stdout().find("...skipped c for lack of foo.h...") == -1)
+
+t.rm('b')
+
+# Now add a rule for creating foo.h.
+code += """
+actions create-foo
+{
+ echo // > $(<)
+}
+create-foo foo.h ;
+"""
+t.run_build_system("-f-", stdin=code)
+
+# Run two times, adding explicit dependency from all to foo.h at the beginning
+# and at the end, to make sure that foo.h is generated before 'a' in all cases.
+
+def mk_correct_order_func(s1, s2):
+ def correct_order(s):
+ n1 = s.find(s1)
+ n2 = s.find(s2)
+ return ( n1 != -1 ) and ( n2 != -1 ) and ( n1 < n2 )
+ return correct_order
+
+correct_order = mk_correct_order_func("create-foo", "copy a")
+
+t.rm(["a", "b", "foo.h"])
+t.run_build_system("-d+2 -f-", stdin=code + " DEPENDS all : foo.h ;")
+t.fail_test(not correct_order(t.stdout()))
+
+t.rm(["a", "b", "foo.h"])
+t.run_build_system("-d+2 -f-", stdin=" DEPENDS all : foo.h ; " + code)
+t.fail_test(not correct_order(t.stdout()))
+
+# Now foo.h exists. Test include from b -> foo.h -> bar.h -> biz.h. b and foo.h
+# already have updating actions.
+t.rm(["a", "b"])
+t.write("foo.h", "#include <bar.h>")
+t.write("bar.h", "#include <biz.h>")
+t.run_build_system("-d+2 -f-", stdin=code)
+t.fail_test(t.stdout().find("...skipped a for lack of biz.h...") == -1)
+
+# Add an action for biz.h.
+code += """
+actions create-biz
+{
+ echo // > $(<)
+}
+create-biz biz.h ;
+"""
+
+t.rm(["b"])
+correct_order = mk_correct_order_func("create-biz", "copy a")
+t.run_build_system("-d+2 -f-", stdin=code + " DEPENDS all : biz.h ;")
+t.fail_test(not correct_order(t.stdout()))
+
+t.rm(["a", "biz.h"])
+t.run_build_system("-d+2 -f-", stdin=" DEPENDS all : biz.h ; " + code)
+t.fail_test(not correct_order(t.stdout()))
+
+t.write("a", "")
+
+code="""
+DEPENDS all : main d ;
+
+actions copy
+{
+ cp $(>) $(<) ;
+}
+
+DEPENDS main : a ;
+copy main : a ;
+
+INCLUDES a : <1>c ;
+
+NOCARE <1>c ;
+SEARCH on <1>c = . ;
+
+actions create-c
+{
+ echo d > $(<)
+}
+
+actions create-d
+{
+ echo // > $(<)
+}
+
+create-c <2>c ;
+LOCATE on <2>c = . ;
+create-d d ;
+
+HDRSCAN on <1>c = (.*) ;
+HDRRULE on <1>c = hdrrule ;
+
+rule hdrrule
+{
+ INCLUDES $(1) : d ;
+}
+"""
+
+correct_order = mk_correct_order_func("create-d", "copy main")
+t.run_build_system("-d2 -f-", stdin=code)
+t.fail_test(not correct_order(t.stdout()))
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_fail_expected.py b/src/boost/tools/build/test/core_fail_expected.py
new file mode 100644
index 000000000..0865a0b7a
--- /dev/null
+++ b/src/boost/tools/build/test/core_fail_expected.py
@@ -0,0 +1,139 @@
+#!/usr/bin/python
+
+# Copyright 2017 Steven Watanabe
+# 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 BoostBuild
+
+def test_basic():
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+ actions fail
+ {
+ invalid-dd0eeb5899734622
+ }
+
+ FAIL_EXPECTED t1 ;
+ fail t1 ;
+
+ UPDATE t1 ;
+ """)
+
+ t.run_build_system(["-ffile.jam"])
+ t.expect_output_lines("...failed*", False)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_error():
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+ actions pass
+ {
+ echo okay >$(<)
+ }
+
+ FAIL_EXPECTED t1 ;
+ pass t1 ;
+
+ UPDATE t1 ;
+ """)
+
+ t.run_build_system(["-ffile.jam"], status=1)
+ t.expect_output_lines("...failed pass t1...")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_multiple_actions():
+ """FAIL_EXPECTED targets are considered to pass if the first
+ updating action fails. Further actions will be skipped."""
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+ actions fail
+ {
+ invalid-dd0eeb5899734622
+ }
+
+ actions pass
+ {
+ echo okay >$(<)
+ }
+
+ FAIL_EXPECTED t1 ;
+ fail t1 ;
+ pass t1 ;
+
+ UPDATE t1 ;
+ """)
+
+ t.run_build_system(["-ffile.jam", "-d1"])
+ t.expect_output_lines("...failed*", False)
+ t.expect_output_lines("pass t1", False)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_quitquick():
+ """Tests that FAIL_EXPECTED targets do not cause early exit
+ on failure."""
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+ actions fail
+ {
+ invalid-dd0eeb5899734622
+ }
+
+ actions pass
+ {
+ echo okay >$(<)
+ }
+
+ FAIL_EXPECTED t1 ;
+ fail t1 ;
+
+ pass t2 ;
+
+ UPDATE t1 t2 ;
+ """)
+
+ t.run_build_system(["-ffile.jam", "-q", "-d1"])
+ t.expect_output_lines("pass t2")
+ t.expect_addition("t2")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_quitquick_error():
+ """FAIL_EXPECTED targets should cause early exit if they unexpectedly pass."""
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+ actions pass
+ {
+ echo okay >$(<)
+ }
+
+ FAIL_EXPECTED t1 ;
+ pass t1 ;
+ pass t2 ;
+
+ UPDATE t1 t2 ;
+ """)
+
+ t.run_build_system(["-ffile.jam", "-q", "-d1"], status=1)
+ t.expect_output_lines("pass t2", False)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+test_basic()
+test_error()
+test_multiple_actions()
+test_quitquick()
+test_quitquick_error()
diff --git a/src/boost/tools/build/test/core_import_module.py b/src/boost/tools/build/test/core_import_module.py
new file mode 100644
index 000000000..5903dcd64
--- /dev/null
+++ b/src/boost/tools/build/test/core_import_module.py
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+
+# Copyright 2003 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("code", """\
+module a
+{
+ rule r1 ( )
+ {
+ ECHO R1 ;
+ }
+
+ local rule l1 ( )
+ {
+ ECHO A.L1 ;
+ }
+}
+module a2
+{
+ rule r2 ( )
+ {
+ ECHO R2 ;
+ }
+}
+IMPORT a2 : r2 : : a2.r2 ;
+
+rule a.l1 ( )
+{
+ ECHO L1 ;
+}
+
+module b
+{
+ IMPORT_MODULE a : b ;
+ rule test
+ {
+ # Call rule visible via IMPORT_MODULE
+ a.r1 ;
+ # Call rule in global scope
+ a2.r2 ;
+ # Call rule in global scope. Doesn't find local rule
+ a.l1 ;
+ # Make l1 visible
+ EXPORT a : l1 ;
+ a.l1 ;
+ }
+}
+
+IMPORT b : test : : test ;
+test ;
+
+module c
+{
+ rule test
+ {
+ ECHO CTEST ;
+ }
+}
+
+IMPORT_MODULE c : ;
+c.test ;
+
+EXIT : 0 ;
+""")
+
+t.run_build_system(["-fcode"], stdout="""\
+R1
+R2
+L1
+A.L1
+CTEST
+
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_jamshell.py b/src/boost/tools/build/test/core_jamshell.py
new file mode 100644
index 000000000..7020ac0b6
--- /dev/null
+++ b/src/boost/tools/build/test/core_jamshell.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# 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 BoostBuild
+import sys
+
+t = BoostBuild.Tester(pass_toolset=False)
+
+t.write("file.jam", """
+actions run {
+ $(ACTION)
+}
+
+# Raw commands only work on Windows
+if $(OS) = NT
+{
+ JAMSHELL on test-raw = % ;
+ JAMSHELL on test-raw-fail = % ;
+}
+ACTION on test-raw = "\"$(PYTHON)\" -V" ;
+run test-raw ;
+
+ACTION on test-raw-fail = missing-executable ;
+run test-raw-fail ;
+
+# On Windows, the command is stored in a temporary
+# file. On other systems it is passed directly.
+if $(OS) = NT
+{
+ JAMSHELL on test-py = $(PYTHON) ;
+}
+else
+{
+ JAMSHELL on test-py = $(PYTHON) -c ;
+}
+ACTION on test-py = "
+from __future__ import print_function
+print(\\\",\\\".join([str(x) for x in range(3)]))
+" ;
+run test-py ;
+
+DEPENDS all : test-raw test-raw-fail test-py ;
+""")
+
+t.run_build_system(["-ffile.jam", "-d1", "-sPYTHON=" + sys.executable], status=1)
+t.expect_output_lines([
+ "...failed run test-raw-fail...",
+ "0,1,2",
+ "...failed updating 1 target...",
+ "...updated 2 targets..."])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_language.py b/src/boost/tools/build/test/core_language.py
new file mode 100755
index 000000000..88a6d1934
--- /dev/null
+++ b/src/boost/tools/build/test/core_language.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+# Copyright 2002, 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+t.set_tree("core-language")
+t.run_build_system(["-ftest.jam"])
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_modifiers.py b/src/boost/tools/build/test/core_modifiers.py
new file mode 100644
index 000000000..241443583
--- /dev/null
+++ b/src/boost/tools/build/test/core_modifiers.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+# 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 tests the "existing" and "updated" modifiers on actions.
+
+import BoostBuild
+import string
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+code = """
+DEPENDS all : a ;
+ALWAYS a ;
+NOTFILE a ;
+
+actions existing make-a
+{
+ echo $(>) > list
+}
+make-a a : a-1 a-2 a-3 ;
+DEPENDS a : a-1 a-2 a-3 ;
+NOCARE a-1 a-2 ;
+
+actions make-a3
+{
+ echo foo > $(<)
+}
+make-a3 a-3 ;
+"""
+
+t.write("file.jam", code)
+t.write("a-1", "")
+
+t.run_build_system("-ffile.jam")
+t.fail_test(string.strip(t.read("list")) != "a-1")
+t.rm(["a-3", "list"])
+
+code = code.replace("existing", "updated")
+t.write("file.jam", code)
+t.run_build_system("-ffile.jam")
+t.fail_test(string.strip(t.read("list")) != "a-3")
+
+code = code.replace("updated", "existing updated")
+t.write("file.jam", code)
+t.run_build_system("-ffile.jam")
+t.fail_test(string.strip(t.read("list")) != "a-1 a-3")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_multifile_actions.py b/src/boost/tools/build/test/core_multifile_actions.py
new file mode 100755
index 000000000..a9c7f4790
--- /dev/null
+++ b/src/boost/tools/build/test/core_multifile_actions.py
@@ -0,0 +1,202 @@
+#!/usr/bin/python
+
+# Copyright 2013 Steven Watanabe
+# 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)
+
+# Tests that actions that produce multiple targets are handled
+# correctly. The rules are as follows:
+#
+# - If any action that updates a target is run, then the target
+# is considered to be out-of-date and all of its updating actions
+# are run in order.
+# - A target is considered updated when all of its updating actions
+# have completed successfully.
+# - If any updating action for a target fails, then the remaining
+# actions are skipped and the target is marked as failed.
+#
+# Note that this is a more thorough test case for the same
+# problem that core_parallel_multifile_actions_N.py checks for.
+
+import BoostBuild
+
+t = BoostBuild.Tester(["-d1"], pass_toolset=0)
+
+t.write("file.jam", """
+actions update
+{
+ echo updating $(<)
+}
+
+update x1 x2 ;
+update x2 x3 ;
+""")
+
+# Updating x1 should force x2 to update as well.
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 3 targets...
+...updating 3 targets...
+update x1
+updating x1 x2
+update x2
+updating x2 x3
+...updated 3 targets...
+""")
+
+# If x1 is up-to-date, we don't need to update x2,
+# even though x2 is missing.
+t.write("x1", "")
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 1 target...
+""")
+
+# Building x3 should update x1 and x2, even though
+# x1 would be considered up-to-date, taken alone.
+t.run_build_system(["-ffile.jam", "x3"], stdout="""\
+...found 3 targets...
+...updating 2 targets...
+update x1
+updating x1 x2
+update x2
+updating x2 x3
+...updated 3 targets...
+""")
+
+# Updating x2 should succeed, but x3 should be skipped
+t.rm("x1")
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+actions fail
+{
+ echo failed $(<)
+ exit 1
+}
+
+update x1 x2 ;
+fail x1 ;
+update x1 x3 ;
+update x2 ;
+update x3 ;
+""")
+
+t.run_build_system(["-ffile.jam", "x3"], status=1, stdout="""\
+...found 3 targets...
+...updating 3 targets...
+update x1
+updating x1 x2
+fail x1
+failed x1
+
+ echo failed x1
+ exit 1
+
+...failed fail x1...
+update x2
+updating x2
+...failed updating 2 targets...
+...updated 1 target...
+""")
+
+# Make sure that dependencies of targets that are
+# updated as a result of a multifile action are
+# processed correctly.
+t.rm("x1")
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+
+update x1 ;
+update x2 ;
+DEPENDS x2 : x1 ;
+update x2 x3 ;
+""")
+t.run_build_system(["-ffile.jam", "x3"], stdout="""\
+...found 3 targets...
+...updating 3 targets...
+update x1
+updating x1
+update x2
+updating x2
+update x2
+updating x2 x3
+...updated 3 targets...
+""")
+
+# JAM_SEMAPHORE rules:
+#
+# - if two updating actions have targets that share a semaphore,
+# these actions cannot be run in parallel.
+#
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+
+targets = x1 x2 ;
+JAM_SEMAPHORE on $(targets) = <s>update_sem ;
+update x1 x2 ;
+""")
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 2 targets...
+...updating 2 targets...
+update x1
+updating x1 x2
+...updated 2 targets...
+""")
+
+# A target can appear multiple times in an action
+t.write("file.jam", """\
+actions update
+{
+ echo updating $(<)
+}
+
+update x1 x1 ;
+""")
+t.run_build_system(["-ffile.jam", "x1"], stdout="""\
+...found 1 target...
+...updating 1 target...
+update x1
+updating x1 x1
+...updated 1 target...
+""")
+
+# Together actions should check that all the targets are the same
+# before combining.
+t.write("file.jam", """\
+actions together update
+{
+ echo updating $(<) : $(>)
+}
+
+update x1 x2 : s1 ;
+update x1 x2 : s2 ;
+
+update x3 : s3 ;
+update x3 x4 : s4 ;
+update x4 x3 : s5 ;
+DEPENDS all : x1 x2 x3 x4 ;
+""")
+t.run_build_system(["-ffile.jam"], stdout="""\
+...found 5 targets...
+...updating 4 targets...
+update x1
+updating x1 x2 : s1 s2
+update x3
+updating x3 : s3
+update x3
+updating x3 x4 : s4
+update x4
+updating x4 x3 : s5
+...updated 4 targets...
+""")
+
+
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_nt_cmd_line.py b/src/boost/tools/build/test/core_nt_cmd_line.py
new file mode 100755
index 000000000..be21f6ca5
--- /dev/null
+++ b/src/boost/tools/build/test/core_nt_cmd_line.py
@@ -0,0 +1,266 @@
+#!/usr/bin/python
+
+# Copyright 2001 Dave Abrahams
+# Copyright 2011 Steven Watanabe
+# 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)
+
+# Tests Windows command line construction.
+#
+# Note that the regular 'echo' is an internal shell command on Windows and
+# therefore can not be called directly as a standalone Windows process.
+
+import BoostBuild
+import os
+import re
+import sys
+
+
+executable = sys.executable.replace("\\", "/")
+if " " in executable:
+ executable = '"%s"' % executable
+
+
+def string_of_length(n):
+ if n <= 0:
+ return ""
+ n -= 1
+ y = ['', '$(1x10-1)', '$(10x10-1)', '$(100x10-1)', '$(1000x10-1)']
+ result = []
+ for i in reversed(range(5)):
+ x, n = divmod(n, 10 ** i)
+ result += [y[i]] * x
+ result.append('x')
+ return " ".join(result)
+
+
+# Boost Jam currently does not allow preparing actions with completely empty
+# content and always requires at least a single whitespace after the opening
+# brace in order to satisfy its Boost Jam language grammar rules.
+def test_raw_empty():
+ whitespace_in = " \n\n\r\r\v\v\t\t \t \r\r \n\n"
+
+ # We tell the testing system to read its child process output as raw
+ # binary data but the bjam process we run will read its input file and
+ # write out its output as text, i.e. convert all of our "\r\n" sequences to
+ # "\n" on input and all of its "\n" characters back to "\r\n" on output.
+ # This means that any lone "\n" input characters not preceded by "\r" will
+ # get an extra "\r" added in front of it on output.
+ whitespace_out = whitespace_in.replace("\r\n", "\n").replace("\n", "\r\n")
+
+ t = BoostBuild.Tester(["-d2", "-d+4"], pass_toolset=0,
+ use_test_config=False)
+ t.write("file.jam", """\
+actions do_empty {%s}
+JAMSHELL = %% ;
+do_empty all ;
+""" % (whitespace_in))
+ t.run_build_system(["-ffile.jam"], universal_newlines=False)
+ t.expect_output_lines("do_empty all")
+ t.expect_output_lines("Executing raw command directly", False)
+ if "\r\n%s\r\n" % whitespace_out not in t.stdout():
+ BoostBuild.annotation("failure", "Whitespace action content not found "
+ "on stdout.")
+ t.fail_test(1, dump_difference=False)
+ t.cleanup()
+
+
+def test_raw_nt(n=None, error=False):
+ t = BoostBuild.Tester(["-d1", "-d+4"], pass_toolset=0,
+ use_test_config=False)
+
+ cmd_prefix = "%s -c \"print('XXX: " % executable
+ cmd_suffix = "')\""
+ cmd_extra_length = len(cmd_prefix) + len(cmd_suffix)
+
+ if n == None:
+ n = cmd_extra_length
+
+ data_length = n - cmd_extra_length
+ if data_length < 0:
+ BoostBuild.annotation("failure", """\
+Can not construct Windows command of desired length. Requested command length
+too short for the current test configuration.
+ Requested command length: %d
+ Minimal supported command length: %d
+""" % (n, cmd_extra_length))
+ t.fail_test(1, dump_difference=False)
+
+ # Each $(Xx10-1) variable contains X words of 9 characters each, which,
+ # including spaces between words, brings the total number of characters in
+ # its string representation to X * 10 - 1 (X * 9 characters + (X - 1)
+ # spaces).
+ t.write("file.jam", """\
+ten = 0 1 2 3 4 5 6 7 8 9 ;
+
+1x10-1 = 123456789 ;
+10x10-1 = $(ten)12345678 ;
+100x10-1 = $(ten)$(ten)1234567 ;
+1000x10-1 = $(ten)$(ten)$(ten)123456 ;
+
+actions do_echo
+{
+ %s%s%s
+}
+JAMSHELL = %% ;
+do_echo all ;
+""" % (cmd_prefix, string_of_length(data_length), cmd_suffix))
+ if error:
+ expected_status = 1
+ else:
+ expected_status = 0
+ t.run_build_system(["-ffile.jam"], status=expected_status)
+ if error:
+ t.expect_output_lines("Executing raw command directly", False)
+ t.expect_output_lines("do_echo action is too long (%d, max 32766):" % n
+ )
+ t.expect_output_lines("XXX: *", False)
+ else:
+ t.expect_output_lines("Executing raw command directly")
+ t.expect_output_lines("do_echo action is too long*", False)
+
+ m = re.search("^XXX: (.*)$", t.stdout(), re.MULTILINE)
+ if not m:
+ BoostBuild.annotation("failure", "Expected output line starting "
+ "with 'XXX: ' not found.")
+ t.fail_test(1, dump_difference=False)
+ if len(m.group(1)) != data_length:
+ BoostBuild.annotation("failure", """Unexpected output data length.
+ Expected: %d
+ Received: %d""" % (n, len(m.group(1))))
+ t.fail_test(1, dump_difference=False)
+
+ t.cleanup()
+
+
+def test_raw_to_shell_fallback_nt():
+ t = BoostBuild.Tester(["-d1", "-d+4"], pass_toolset=0,
+ use_test_config=False)
+
+ cmd_prefix = '%s -c print(' % executable
+ cmd_suffix = ')'
+
+ t.write("file_multiline.jam", """\
+actions do_multiline
+{
+ echo one
+
+
+ echo two
+}
+JAMSHELL = % ;
+do_multiline all ;
+""")
+ t.run_build_system(["-ffile_multiline.jam"])
+ t.expect_output_lines("do_multiline all")
+ t.expect_output_lines("one")
+ t.expect_output_lines("two")
+ t.expect_output_lines("Executing raw command directly", False)
+ t.expect_output_lines("Executing using a command file and the shell: "
+ "cmd.exe /Q/C")
+
+ t.write("file_redirect.jam", """\
+actions do_redirect { echo one > two.txt }
+JAMSHELL = % ;
+do_redirect all ;
+""")
+ t.run_build_system(["-ffile_redirect.jam"])
+ t.expect_output_lines("do_redirect all")
+ t.expect_output_lines("one", False)
+ t.expect_output_lines("Executing raw command directly", False)
+ t.expect_output_lines("Executing using a command file and the shell: "
+ "cmd.exe /Q/C")
+ t.expect_addition("two.txt")
+
+ t.write("file_pipe.jam", """\
+actions do_pipe
+{
+ echo one | echo two
+}
+JAMSHELL = % ;
+do_pipe all ;
+""")
+ t.run_build_system(["-ffile_pipe.jam"])
+ t.expect_output_lines("do_pipe all")
+ t.expect_output_lines("one*", False)
+ t.expect_output_lines("two")
+ t.expect_output_lines("Executing raw command directly", False)
+ t.expect_output_lines("Executing using a command file and the shell: "
+ "cmd.exe /Q/C")
+
+ t.write("file_single_quoted.jam", """\
+actions do_single_quoted { %s'5>10'%s }
+JAMSHELL = %% ;
+do_single_quoted all ;
+""" % (cmd_prefix, cmd_suffix))
+ t.run_build_system(["-ffile_single_quoted.jam"])
+ t.expect_output_lines("do_single_quoted all")
+ t.expect_output_lines("5>10")
+ t.expect_output_lines("Executing raw command directly")
+ t.expect_output_lines("Executing using a command file and the shell: "
+ "cmd.exe /Q/C", False)
+ t.expect_nothing_more()
+
+ t.write("file_double_quoted.jam", """\
+actions do_double_quoted { %s"5>10"%s }
+JAMSHELL = %% ;
+do_double_quoted all ;
+""" % (cmd_prefix, cmd_suffix))
+ t.run_build_system(["-ffile_double_quoted.jam"])
+ t.expect_output_lines("do_double_quoted all")
+ # The difference between this example and the similar previous one using
+ # single instead of double quotes stems from how the used Python executable
+ # parses the command-line string received from Windows.
+ t.expect_output_lines("False")
+ t.expect_output_lines("Executing raw command directly")
+ t.expect_output_lines("Executing using a command file and the shell: "
+ "cmd.exe /Q/C", False)
+ t.expect_nothing_more()
+
+ t.write("file_escaped_quote.jam", """\
+actions do_escaped_quote { %s\\"5>10\\"%s }
+JAMSHELL = %% ;
+do_escaped_quote all ;
+""" % (cmd_prefix, cmd_suffix))
+ t.run_build_system(["-ffile_escaped_quote.jam"])
+ t.expect_output_lines("do_escaped_quote all")
+ t.expect_output_lines("5>10")
+ t.expect_output_lines("Executing raw command directly", False)
+ t.expect_output_lines("Executing using a command file and the shell: "
+ "cmd.exe /Q/C")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+if os.name == 'nt':
+ test_raw_empty()
+
+ # Can not test much shorter lengths as the shortest possible command line
+ # line length constructed in this depends on the runtime environment, e.g.
+ # path to the Panther executable running this test.
+ test_raw_nt()
+ test_raw_nt(255)
+ test_raw_nt(1000)
+ test_raw_nt(8000)
+ test_raw_nt(8191)
+ test_raw_nt(8192)
+ test_raw_nt(10000)
+ test_raw_nt(30000)
+ test_raw_nt(32766)
+ # CreateProcessA() Windows API places a limit of 32768 on the allowed
+ # command-line length, including a trailing Unicode (2-byte) nul-terminator
+ # character.
+ test_raw_nt(32767, error=True)
+ test_raw_nt(40000, error=True)
+ test_raw_nt(100001, error=True)
+
+ test_raw_to_shell_fallback_nt() \ No newline at end of file
diff --git a/src/boost/tools/build/test/core_option_d2.py b/src/boost/tools/build/test/core_option_d2.py
new file mode 100755
index 000000000..8e6b05a45
--- /dev/null
+++ b/src/boost/tools/build/test/core_option_d2.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+# Copyright 2007 Rene Rivera.
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("file.jam", """\
+actions .a.
+{
+echo [$(<:B)] 0
+echo [$(<:B)] 1
+echo [$(<:B)] 2
+}
+
+rule .a.
+{
+ DEPENDS $(<) : $(>) ;
+}
+
+NOTFILE subtest ;
+.a. subtest_a : subtest ;
+.a. subtest_b : subtest ;
+DEPENDS all : subtest_a subtest_b ;
+""")
+
+t.run_build_system(["-ffile.jam", "-d2"], stdout="""\
+...found 4 targets...
+...updating 2 targets...
+.a. subtest_a
+
+echo [subtest_a] 0
+echo [subtest_a] 1
+echo [subtest_a] 2
+
+[subtest_a] 0
+[subtest_a] 1
+[subtest_a] 2
+.a. subtest_b
+
+echo [subtest_b] 0
+echo [subtest_b] 1
+echo [subtest_b] 2
+
+[subtest_b] 0
+[subtest_b] 1
+[subtest_b] 2
+...updated 2 targets...
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_option_l.py b/src/boost/tools/build/test/core_option_l.py
new file mode 100755
index 000000000..e237dcf63
--- /dev/null
+++ b/src/boost/tools/build/test/core_option_l.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python
+
+# Copyright 2007 Rene Rivera.
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("sleep.bat", """\
+::@timeout /T %1 /NOBREAK >nul
+@ping 127.0.0.1 -n 2 -w 1000 >nul
+@ping 127.0.0.1 -n %1 -w 1000 >nul
+@exit /B 0
+""")
+
+t.write("file.jam", """\
+if $(NT)
+{
+ SLEEP = @call sleep.bat ;
+}
+else
+{
+ SLEEP = sleep ;
+}
+
+actions .a. {
+echo 001
+$(SLEEP) 4
+echo 002
+}
+
+.a. sleeper ;
+
+DEPENDS all : sleeper ;
+""")
+
+t.run_build_system(["-ffile.jam", "-d1", "-l2"], status=1)
+t.expect_output_lines("2 second time limit exceeded")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_option_n.py b/src/boost/tools/build/test/core_option_n.py
new file mode 100755
index 000000000..af3ee0c3e
--- /dev/null
+++ b/src/boost/tools/build/test/core_option_n.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+# Copyright 2007 Rene Rivera.
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("file.jam", """\
+actions .a.
+{
+echo [$(<:B)] 0
+echo [$(<:B)] 1
+echo [$(<:B)] 2
+}
+
+rule .a.
+{
+ DEPENDS $(<) : $(>) ;
+}
+
+NOTFILE subtest ;
+.a. subtest_a : subtest ;
+.a. subtest_b : subtest ;
+FAIL_EXPECTED subtest_b ;
+DEPENDS all : subtest_a subtest_b ;
+""")
+
+t.run_build_system(["-ffile.jam", "-n"], stdout="""\
+...found 4 targets...
+...updating 2 targets...
+.a. subtest_a
+
+echo [subtest_a] 0
+echo [subtest_a] 1
+echo [subtest_a] 2
+
+.a. subtest_b
+
+echo [subtest_b] 0
+echo [subtest_b] 1
+echo [subtest_b] 2
+
+...updated 2 targets...
+""")
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_parallel_actions.py b/src/boost/tools/build/test/core_parallel_actions.py
new file mode 100755
index 000000000..4f1627c20
--- /dev/null
+++ b/src/boost/tools/build/test/core_parallel_actions.py
@@ -0,0 +1,103 @@
+#!/usr/bin/python
+
+# Copyright 2006 Rene Rivera.
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(["-d1"], pass_toolset=0)
+
+t.write("sleep.bat", """\
+::@timeout /T %1 /NOBREAK >nul
+@ping 127.0.0.1 -n 2 -w 1000 >nul
+@ping 127.0.0.1 -n %1 -w 1000 >nul
+@exit /B 0
+""")
+
+t.write("file.jam", """\
+if $(NT)
+{
+ actions sleeper
+ {
+ echo [$(<:S)] 0
+ call sleep.bat 1
+ echo [$(<:S)] 1
+ call sleep.bat 1
+ echo [$(<:S)] 2
+ call sleep.bat $(<:B)
+ }
+}
+else
+{
+ actions sleeper
+ {
+ echo "[$(<:S)] 0"
+ sleep 1
+ echo "[$(<:S)] 1"
+ sleep 1
+ echo "[$(<:S)] 2"
+ sleep $(<:B)
+ }
+}
+
+rule sleeper
+{
+ DEPENDS $(<) : $(>) ;
+}
+
+NOTFILE front ;
+sleeper 1.a : front ;
+sleeper 2.a : front ;
+sleeper 3.a : front ;
+sleeper 4.a : front ;
+NOTFILE choke ;
+DEPENDS choke : 1.a 2.a 3.a 4.a ;
+sleeper 1.b : choke ;
+sleeper 2.b : choke ;
+sleeper 3.b : choke ;
+sleeper 4.b : choke ;
+DEPENDS bottom : 1.b 2.b 3.b 4.b ;
+DEPENDS all : bottom ;
+""")
+
+t.run_build_system(["-ffile.jam", "-j4"], stdout="""\
+...found 12 targets...
+...updating 8 targets...
+sleeper 1.a
+[.a] 0
+[.a] 1
+[.a] 2
+sleeper 2.a
+[.a] 0
+[.a] 1
+[.a] 2
+sleeper 3.a
+[.a] 0
+[.a] 1
+[.a] 2
+sleeper 4.a
+[.a] 0
+[.a] 1
+[.a] 2
+sleeper 1.b
+[.b] 0
+[.b] 1
+[.b] 2
+sleeper 2.b
+[.b] 0
+[.b] 1
+[.b] 2
+sleeper 3.b
+[.b] 0
+[.b] 1
+[.b] 2
+sleeper 4.b
+[.b] 0
+[.b] 1
+[.b] 2
+...updated 8 targets...
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_parallel_multifile_actions_1.py b/src/boost/tools/build/test/core_parallel_multifile_actions_1.py
new file mode 100755
index 000000000..4b800a788
--- /dev/null
+++ b/src/boost/tools/build/test/core_parallel_multifile_actions_1.py
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+
+# Copyright 2007 Rene Rivera.
+# Copyright 2011 Steven Watanabe
+# 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)
+
+# Added to guard against a bug causing targets to be used before they
+# themselves have finished building. This used to happen for targets built by a
+# multi-file action that got triggered by another target.
+#
+# Example:
+# When target A and target B were declared as created by a single action and
+# target A triggered running that action then, while the action was still
+# running, target B was already reporting as being built causing other targets
+# depending on target A to be built prematurely.
+
+import BoostBuild
+
+t = BoostBuild.Tester(["-d1"], pass_toolset=0)
+
+t.write("sleep.bat", """\
+::@timeout /T %1 /NOBREAK >nul
+@ping 127.0.0.1 -n 2 -w 1000 >nul
+@ping 127.0.0.1 -n %1 -w 1000 >nul
+@exit /B 0
+""")
+
+t.write("file.jam", """\
+if $(NT)
+{
+ SLEEP = @call sleep.bat ;
+}
+else
+{
+ SLEEP = sleep ;
+}
+
+actions .gen.
+{
+ echo 001
+ $(SLEEP) 4
+ echo 002
+}
+rule .use.1 { DEPENDS $(<) : $(>) ; }
+actions .use.1
+{
+ echo 003
+}
+
+rule .use.2 { DEPENDS $(<) : $(>) ; }
+actions .use.2
+{
+ $(SLEEP) 1
+ echo 004
+}
+
+.gen. g1.generated g2.generated ;
+.use.1 u1.user : g1.generated ;
+.use.2 u2.user : g2.generated ;
+
+DEPENDS all : u1.user u2.user ;
+""")
+
+t.run_build_system(["-ffile.jam", "-j2"], stdout="""\
+...found 5 targets...
+...updating 4 targets...
+.gen. g1.generated
+001
+002
+.use.1 u1.user
+003
+.use.2 u2.user
+004
+...updated 4 targets...
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_parallel_multifile_actions_2.py b/src/boost/tools/build/test/core_parallel_multifile_actions_2.py
new file mode 100755
index 000000000..c49e92380
--- /dev/null
+++ b/src/boost/tools/build/test/core_parallel_multifile_actions_2.py
@@ -0,0 +1,71 @@
+#!/usr/bin/python
+
+# Copyright 2008 Jurko Gospodnetic, Vladimir Prus
+# Copyright 2011 Steven Watanabe
+# 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)
+
+# Added to guard against a bug causing targets to be used before they
+# themselves have finished building. This used to happen for targets built by a
+# multi-file action that got triggered by another target, except when the
+# target triggering the action was the first one in the list of targets
+# produced by that action.
+#
+# Example:
+# When target A and target B were declared as created by a single action with
+# A being the first one listed, and target B triggered running that action
+# then, while the action was still running, target A was already reporting as
+# being built causing other targets depending on target A to be built
+# prematurely.
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("sleep.bat", """\
+::@timeout /T %1 /NOBREAK >nul
+@ping 127.0.0.1 -n 2 -w 1000 >nul
+@ping 127.0.0.1 -n %1 -w 1000 >nul
+@exit /B 0
+""")
+
+t.write("file.jam", """\
+if $(NT)
+{
+ SLEEP = @call sleep.bat ;
+}
+else
+{
+ SLEEP = sleep ;
+}
+
+actions link
+{
+ $(SLEEP) 1
+ echo 001 - linked
+}
+
+link dll lib ;
+
+actions install
+{
+ echo 002 - installed
+}
+
+install installed_dll : dll ;
+DEPENDS installed_dll : dll ;
+
+DEPENDS all : lib installed_dll ;
+""")
+
+t.run_build_system(["-ffile.jam", "-j2"], stdout="""\
+...found 4 targets...
+...updating 3 targets...
+link dll
+001 - linked
+install installed_dll
+002 - installed
+...updated 3 targets...
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_scanner.py b/src/boost/tools/build/test/core_scanner.py
new file mode 100644
index 000000000..af078a00b
--- /dev/null
+++ b/src/boost/tools/build/test/core_scanner.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# Copyright 2018 Steven Watanabe
+# 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)
+
+# Tests the parsing of tokens
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("file.jam", """\
+rule test1 ( args * )
+{
+ EXIT $(args) : 0 ;
+}
+
+test1
+a # a comment
+# another comment
+b
+c #| a multiline comment |# d
+#| another
+multiline
+comment
+|#
+e "#f" ;
+""")
+
+t.run_build_system(["-ffile.jam"], stdout="""\
+a b c d e #f
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_source_line_tracking.py b/src/boost/tools/build/test/core_source_line_tracking.py
new file mode 100755
index 000000000..61526a2c5
--- /dev/null
+++ b/src/boost/tools/build/test/core_source_line_tracking.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+
+# Copyright 2012. Jurko Gospodnetic
+# 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)
+
+# Test Boost Jam parser's source line tracking & reporting.
+
+import BoostBuild
+
+
+def test_eof_in_string():
+ t = BoostBuild.Tester(pass_toolset=False)
+ t.write("file.jam", '\n\n\naaa = "\n\n\n\n\n\n')
+ t.run_build_system(["-ffile.jam"], status=1)
+ t.expect_output_lines('file.jam:4: unmatched " in string at keyword =')
+ t.expect_output_lines("file.jam:4: syntax error at EOF")
+ t.cleanup()
+
+
+def test_error_missing_argument(eof):
+ """
+ This use case used to cause a missing argument error to be reported in
+ module '(builtin)' in line -1 when the input file did not contain a
+ trailing newline.
+
+ """
+ t = BoostBuild.Tester(pass_toolset=False)
+ t.write("file.jam", """\
+rule f ( param ) { }
+f ;%s""" % __trailing_newline(eof))
+ t.run_build_system(["-ffile.jam"], status=1)
+ t.expect_output_lines("file.jam:2: in module scope")
+ t.expect_output_lines("file.jam:1:see definition of rule 'f' being called")
+ t.cleanup()
+
+
+def test_error_syntax(eof):
+ t = BoostBuild.Tester(pass_toolset=False)
+ t.write("file.jam", "ECHO%s" % __trailing_newline(eof))
+ t.run_build_system(["-ffile.jam"], status=1)
+ t.expect_output_lines("file.jam:1: syntax error at EOF")
+ t.cleanup()
+
+
+def test_traceback():
+ t = BoostBuild.Tester(pass_toolset=False)
+ t.write("file.jam", """\
+NOTFILE all ;
+ECHO [ BACKTRACE ] ;""")
+ t.run_build_system(["-ffile.jam"])
+ t.expect_output_lines("file.jam 2 module scope")
+ t.cleanup()
+
+
+def __trailing_newline(eof):
+ """
+ Helper function returning an empty string or a newling character to
+ append to the current output line depending on whether we want that line to
+ be the last line in the file (eof == True) or not (eof == False).
+
+ """
+ if eof:
+ return ""
+ return "\n"
+
+
+test_error_missing_argument(eof=False)
+test_error_missing_argument(eof=True)
+test_error_syntax(eof=False)
+test_error_syntax(eof=True)
+test_traceback()
+test_eof_in_string()
diff --git a/src/boost/tools/build/test/core_syntax_error_exit_status.py b/src/boost/tools/build/test/core_syntax_error_exit_status.py
new file mode 100644
index 000000000..452ea4304
--- /dev/null
+++ b/src/boost/tools/build/test/core_syntax_error_exit_status.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+# Copyright (C) Mateusz Loskot 2020.
+# 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)
+
+# Test that Jam syntax error results in non-zero exit status
+
+import BoostBuild
+
+# Create a temporary working directory.
+t = BoostBuild.Tester()
+
+# Create the needed files.
+t.write("jamroot.jam", """
+exe hello : hello.cpp
+
+""")
+
+t.run_build_system(status=1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_typecheck.py b/src/boost/tools/build/test/core_typecheck.py
new file mode 100644
index 000000000..de1bece16
--- /dev/null
+++ b/src/boost/tools/build/test/core_typecheck.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+
+# 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 tests the typechecking facilities.
+
+import BoostBuild
+
+t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
+
+t.write("file.jam", """
+module .typecheck
+{
+ rule "[path]" ( x )
+ {
+ if ! [ MATCH "^(::)" : $(x) ]
+ {
+ ECHO "Error: $(x) is not a path" ;
+ return true ;
+ }
+ }
+}
+
+rule do ( [path] a )
+{
+}
+
+do $(ARGUMENT) ;
+
+actions dummy { }
+dummy all ;
+""")
+
+t.run_build_system(["-sARGUMENT=::a/b/c"])
+t.run_build_system(["-sARGUMENT=a/b/c"], status=1, stdout="""\
+Error: a/b/c is not a path
+file.jam:18: in module scope
+*** argument error
+* rule do ( [path] a )
+* called with: ( a/b/c )
+* true a
+file.jam:16:see definition of rule 'do' being called
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_update_now.py b/src/boost/tools/build/test/core_update_now.py
new file mode 100755
index 000000000..627594bf8
--- /dev/null
+++ b/src/boost/tools/build/test/core_update_now.py
@@ -0,0 +1,377 @@
+#!/usr/bin/python
+
+# Copyright 2011 Steven Watanabe
+# 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 BoostBuild
+import os
+
+
+def basic():
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+actions do-print
+{
+ echo updating $(<)
+}
+
+NOTFILE target1 ;
+ALWAYS target1 ;
+do-print target1 ;
+
+UPDATE_NOW target1 ;
+
+DEPENDS all : target1 ;
+""")
+
+ t.run_build_system(["-ffile.jam"], stdout="""\
+...found 1 target...
+...updating 1 target...
+do-print target1
+updating target1
+...updated 1 target...
+...found 1 target...
+""")
+
+ t.cleanup()
+
+
+def ignore_minus_n():
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+actions do-print
+{
+ echo updating $(<)
+}
+
+NOTFILE target1 ;
+ALWAYS target1 ;
+do-print target1 ;
+
+UPDATE_NOW target1 : : ignore-minus-n ;
+
+DEPENDS all : target1 ;
+""")
+
+ t.run_build_system(["-ffile.jam", "-n"], stdout="""\
+...found 1 target...
+...updating 1 target...
+do-print target1
+
+ echo updating target1
+
+updating target1
+...updated 1 target...
+...found 1 target...
+""")
+
+ t.cleanup()
+
+
+def failed_target():
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+actions fail
+{
+ exit 1
+}
+
+NOTFILE target1 ;
+ALWAYS target1 ;
+fail target1 ;
+
+actions do-print
+{
+ echo updating $(<)
+}
+
+NOTFILE target2 ;
+do-print target2 ;
+DEPENDS target2 : target1 ;
+
+UPDATE_NOW target1 : : ignore-minus-n ;
+
+DEPENDS all : target1 target2 ;
+""")
+
+ t.run_build_system(["-ffile.jam", "-n"], stdout="""\
+...found 1 target...
+...updating 1 target...
+fail target1
+
+ exit 1
+
+...failed fail target1...
+...failed updating 1 target...
+...found 2 targets...
+...updating 1 target...
+do-print target2
+
+ echo updating target2
+
+...updated 1 target...
+""")
+
+ t.cleanup()
+
+
+def missing_target():
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+actions do-print
+{
+ echo updating $(<)
+}
+
+NOTFILE target2 ;
+do-print target2 ;
+DEPENDS target2 : target1 ;
+
+UPDATE_NOW target1 : : ignore-minus-n ;
+
+DEPENDS all : target1 target2 ;
+""")
+
+ t.run_build_system(["-ffile.jam", "-n"], status=1, stdout="""\
+don't know how to make target1
+...found 1 target...
+...can't find 1 target...
+...found 2 targets...
+...can't make 1 target...
+""")
+
+ t.cleanup()
+
+
+def build_once():
+ """
+ Make sure that if we call UPDATE_NOW with ignore-minus-n, the target gets
+ updated exactly once regardless of previous calls to UPDATE_NOW with -n in
+ effect.
+
+ """
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+actions do-print
+{
+ echo updating $(<)
+}
+
+NOTFILE target1 ;
+ALWAYS target1 ;
+do-print target1 ;
+
+UPDATE_NOW target1 ;
+UPDATE_NOW target1 : : ignore-minus-n ;
+UPDATE_NOW target1 : : ignore-minus-n ;
+
+DEPENDS all : target1 ;
+""")
+
+ t.run_build_system(["-ffile.jam", "-n"], stdout="""\
+...found 1 target...
+...updating 1 target...
+do-print target1
+
+ echo updating target1
+
+...updated 1 target...
+do-print target1
+
+ echo updating target1
+
+updating target1
+...updated 1 target...
+...found 1 target...
+""")
+
+ t.cleanup()
+
+
+def return_status():
+ """
+ Make sure that UPDATE_NOW returns a failure status if
+ the target failed in a previous call to UPDATE_NOW
+ """
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+actions fail
+{
+ exit 1
+}
+
+NOTFILE target1 ;
+ALWAYS target1 ;
+fail target1 ;
+
+ECHO "update1:" [ UPDATE_NOW target1 ] ;
+ECHO "update2:" [ UPDATE_NOW target1 ] ;
+
+DEPENDS all : target1 ;
+""")
+
+ t.run_build_system(["-ffile.jam"], status=1, stdout="""\
+...found 1 target...
+...updating 1 target...
+fail target1
+
+ exit 1
+
+...failed fail target1...
+...failed updating 1 target...
+update1:
+update2:
+...found 1 target...
+""")
+
+ t.cleanup()
+
+
+def save_restore():
+ """Tests that ignore-minus-n and ignore-minus-q are
+ local to the call to UPDATE_NOW"""
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("actions.jam", """\
+rule fail
+{
+ NOTFILE $(<) ;
+ ALWAYS $(<) ;
+}
+actions fail
+{
+ exit 1
+}
+
+rule pass
+{
+ NOTFILE $(<) ;
+ ALWAYS $(<) ;
+}
+actions pass
+{
+ echo updating $(<)
+}
+""")
+ t.write("file.jam", """
+include actions.jam ;
+fail target1 ;
+fail target2 ;
+UPDATE_NOW target1 target2 : : $(IGNORE_MINUS_N) : $(IGNORE_MINUS_Q) ;
+fail target3 ;
+fail target4 ;
+UPDATE_NOW target3 target4 ;
+UPDATE ;
+""")
+ t.run_build_system(['-n', '-sIGNORE_MINUS_N=1', '-ffile.jam'],
+ stdout='''...found 2 targets...
+...updating 2 targets...
+fail target1
+
+ exit 1
+
+...failed fail target1...
+fail target2
+
+ exit 1
+
+...failed fail target2...
+...failed updating 2 targets...
+...found 2 targets...
+...updating 2 targets...
+fail target3
+
+ exit 1
+
+fail target4
+
+ exit 1
+
+...updated 2 targets...
+''')
+
+ t.run_build_system(['-q', '-sIGNORE_MINUS_N=1', '-ffile.jam'],
+ status=1, stdout='''...found 2 targets...
+...updating 2 targets...
+fail target1
+
+ exit 1
+
+...failed fail target1...
+...failed updating 1 target...
+...found 2 targets...
+...updating 2 targets...
+fail target3
+
+ exit 1
+
+...failed fail target3...
+...failed updating 1 target...
+''')
+
+ t.run_build_system(['-n', '-sIGNORE_MINUS_Q=1', '-ffile.jam'],
+ stdout='''...found 2 targets...
+...updating 2 targets...
+fail target1
+
+ exit 1
+
+fail target2
+
+ exit 1
+
+...updated 2 targets...
+...found 2 targets...
+...updating 2 targets...
+fail target3
+
+ exit 1
+
+fail target4
+
+ exit 1
+
+...updated 2 targets...
+''')
+
+ t.run_build_system(['-q', '-sIGNORE_MINUS_Q=1', '-ffile.jam'],
+ status=1, stdout='''...found 2 targets...
+...updating 2 targets...
+fail target1
+
+ exit 1
+
+...failed fail target1...
+fail target2
+
+ exit 1
+
+...failed fail target2...
+...failed updating 2 targets...
+...found 2 targets...
+...updating 2 targets...
+fail target3
+
+ exit 1
+
+...failed fail target3...
+...failed updating 1 target...
+''')
+
+ t.cleanup()
+
+
+basic()
+ignore_minus_n()
+failed_target()
+missing_target()
+build_once()
+return_status()
+save_restore()
diff --git a/src/boost/tools/build/test/core_variables_in_actions.py b/src/boost/tools/build/test/core_variables_in_actions.py
new file mode 100755
index 000000000..77834f430
--- /dev/null
+++ b/src/boost/tools/build/test/core_variables_in_actions.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+
+# Copyright 2012. Jurko Gospodnetic
+# 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)
+
+# Tests that variables in actions get expanded but double quote characters
+# get treated as regular characters and not string literal delimiters when
+# determining string tokens concatenated to the variable being expanded.
+#
+# We also take care to make this test work correctly when run using both
+# Windows and Unix echo command variant. That is why we add the extra single
+# quotes around the text being echoed - they will make the double quotes be
+# displayed as regular characters in both cases but will be displayed
+# themselves only when using the Windows cmd shell's echo command.
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+t.write("file.jam", """\
+rule dummy ( i )
+{
+ local a = 1 2 3 ;
+ ECHO From "rule:" $(a)" seconds" ;
+ a on $(i) = $(a) ;
+}
+
+actions dummy
+{
+ echo 'From action: $(a)" seconds"'
+}
+
+dummy all ;
+""")
+t.run_build_system(["-ffile.jam", "-d1"])
+t.expect_output_lines("From rule: 1 seconds 2 seconds 3 seconds")
+t.expect_output_lines('*From action: 1" 2" 3" seconds"*')
+t.cleanup()
diff --git a/src/boost/tools/build/test/core_varnames.py b/src/boost/tools/build/test/core_varnames.py
new file mode 100644
index 000000000..6b61ffcd3
--- /dev/null
+++ b/src/boost/tools/build/test/core_varnames.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave 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)
+
+# This tests the core rule for enumerating the variable names in a module.
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("file.jam", """\
+module foo
+{
+ rule bar { }
+ var1 = x y ;
+ var2 = fubar ;
+}
+
+expected = var1 var2 ;
+names = [ VARNAMES foo ] ;
+if $(names) in $(expected) && $(expected) in $(names)
+{
+ # everything OK
+}
+else
+{
+ EXIT expected to find variables $(expected:J=", ") in module foo,
+ but found $(names:J=", ") instead. ;
+}
+DEPENDS all : xx ;
+NOTFILE xx ;
+""")
+
+t.run_build_system(["-ffile.jam"], status=0)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/custom_generator.py b/src/boost/tools/build/test/custom_generator.py
new file mode 100644
index 000000000..00860f643
--- /dev/null
+++ b/src/boost/tools/build/test/custom_generator.py
@@ -0,0 +1,66 @@
+#!/usr/bin/python
+
+# Copyright 2003, 2004, 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)
+
+# Attempt to declare a generator for creating OBJ from RC files. That generator
+# should be considered together with standard CPP->OBJ generators and
+# successfully create the target. Since we do not have a RC compiler everywhere,
+# we fake the action. The resulting OBJ will be unusable, but it must be
+# created.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", """
+import rcc ;
+""")
+
+t.write("rcc.jam", """
+import type ;
+import generators ;
+import print ;
+
+# Use 'RCC' to avoid conflicts with definitions in the standard rc.jam and
+# msvc.jam
+type.register RCC : rcc ;
+
+rule resource-compile ( targets * : sources * : properties * )
+{
+ print.output $(targets[1]) ;
+ print.text "rc-object" ;
+}
+
+generators.register-standard rcc.resource-compile : RCC : OBJ ;
+""")
+
+t.write("rcc.py", """
+import b2.build.type as type
+import b2.build.generators as generators
+
+from b2.manager import get_manager
+
+# Use 'RCC' to avoid conflicts with definitions in the standard rc.jam and
+# msvc.jam
+type.register('RCC', ['rcc'])
+
+generators.register_standard("rcc.resource-compile", ["RCC"], ["OBJ"])
+
+get_manager().engine().register_action(
+ "rcc.resource-compile",
+ '@($(STDOUT):E=rc-object) > "$(<)"')
+""")
+
+t.write("jamfile.jam", """
+obj r : r.rcc ;
+""")
+
+t.write("r.rcc", """
+""")
+
+t.run_build_system()
+t.expect_content("bin/r.obj", "rc-object")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/debugger-mi.py b/src/boost/tools/build/test/debugger-mi.py
new file mode 100644
index 000000000..fda2bd80f
--- /dev/null
+++ b/src/boost/tools/build/test/debugger-mi.py
@@ -0,0 +1,326 @@
+#!/usr/bin/python
+
+# Copyright 2016 Steven Watanabe
+# 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)
+
+# Test the mi interface for the debugger
+
+import BoostBuild
+import TestCmd
+import re
+
+def split_stdin_stdout(text):
+ """stdin is all text after the prompt up to and including
+ the next newline. Everything else is stdout. stdout
+ may contain regular expressions enclosed in {{}}."""
+ prompt = re.escape('(gdb) \n')
+ pattern = re.compile('(?<=%s)((?:\d*-.*)\n)' % prompt)
+ stdin = ''.join(re.findall(pattern, text))
+ stdout = re.sub(pattern, '', text)
+ outside_pattern = re.compile(r'(?:\A|(?<=\}\}))(?:[^\{]|(?:\{(?!\{)))*(?:(?=\{\{)|\Z)')
+
+ def escape_line(line):
+ line = re.sub(outside_pattern, lambda m: re.escape(m.group(0)), line)
+ return re.sub(r'\{\{|\}\}', '', line)
+
+ stdout = '\n'.join([escape_line(line) for line in stdout.split('\n')])
+ return (stdin,stdout)
+
+def run(tester, io):
+ (input,output) = split_stdin_stdout(io)
+ tester.run_build_system(stdin=input, stdout=output, match=TestCmd.match_re)
+
+def make_tester():
+ return BoostBuild.Tester(["-dmi"], pass_toolset=False, pass_d0=False,
+ use_test_config=False, ignore_toolset_requirements=False, match=TestCmd.match_re)
+
+def test_exec_run():
+ t = make_tester()
+ t.write("test.jam", """\
+ UPDATE ;
+ """)
+
+ run(t, """\
+=thread-group-added,id="i1"
+(gdb)
+72-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+72^running
+(gdb)
+*stopped,reason="exited-normally"
+(gdb)
+73-gdb-exit
+73^exit
+""")
+
+ t.cleanup()
+
+def test_exit_status():
+ t = make_tester()
+ t.write("test.jam", """\
+ EXIT : 1 ;
+ """)
+ run(t, """\
+=thread-group-added,id="i1"
+(gdb)
+72-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+72^running
+(gdb)
+
+*stopped,reason="exited",exit-code="1"
+(gdb)
+73-gdb-exit
+73^exit
+""")
+ t.cleanup()
+
+def test_exec_step():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule g ( )
+ {
+ a = 1 ;
+ b = 2 ;
+ }
+ rule f ( )
+ {
+ g ;
+ c = 3 ;
+ }
+ f ;
+ """)
+ run(t, """\
+=thread-group-added,id="i1"
+(gdb)
+-break-insert f
+^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",func="f"}
+(gdb)
+72-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+72^running
+(gdb)
+*stopped,reason="breakpoint-hit",bkptno="1",disp="keep",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="8"},thread-id="1",stopped-threads="all"
+(gdb)
+1-exec-step
+1^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="g",args=[],file="test.jam",fullname="{{.*}}test.jam",line="3"},thread-id="1"
+(gdb)
+2-exec-step
+2^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="g",args=[],file="test.jam",fullname="{{.*}}test.jam",line="4"},thread-id="1"
+(gdb)
+3-exec-step
+3^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="9"},thread-id="1"
+(gdb)
+73-gdb-exit
+73^exit
+""")
+ t.cleanup()
+
+def test_exec_next():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule g ( )
+ {
+ a = 1 ;
+ }
+ rule f ( )
+ {
+ g ;
+ b = 2 ;
+ c = 3 ;
+ }
+ rule h ( )
+ {
+ f ;
+ g ;
+ }
+ h ;
+ d = 4 ;
+ """)
+ run(t, """\
+=thread-group-added,id="i1"
+(gdb)
+-break-insert f
+^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",func="f"}
+(gdb)
+72-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+72^running
+(gdb)
+*stopped,reason="breakpoint-hit",bkptno="1",disp="keep",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="7"},thread-id="1",stopped-threads="all"
+(gdb)
+1-exec-next
+1^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="8"},thread-id="1"
+(gdb)
+2-exec-next
+2^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="9"},thread-id="1"
+(gdb)
+3-exec-next
+3^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="h",args=[],file="test.jam",fullname="{{.*}}test.jam",line="14"},thread-id="1"
+(gdb)
+4-exec-next
+4^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="module scope",args=[],file="test.jam",fullname="{{.*}}test.jam",line="17"},thread-id="1"
+(gdb)
+73-gdb-exit
+73^exit
+""")
+ t.cleanup()
+
+def test_exec_finish():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( )
+ {
+ a = 1 ;
+ }
+ rule g ( )
+ {
+ f ;
+ b = 2 ;
+ i ;
+ }
+ rule h ( )
+ {
+ g ;
+ i ;
+ }
+ rule i ( )
+ {
+ c = 3 ;
+ }
+ h ;
+ d = 4 ;
+ """)
+ run(t, """\
+=thread-group-added,id="i1"
+(gdb)
+-break-insert f
+^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",func="f"}
+(gdb)
+72-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+72^running
+(gdb)
+*stopped,reason="breakpoint-hit",bkptno="1",disp="keep",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="3"},thread-id="1",stopped-threads="all"
+(gdb)
+1-exec-finish
+1^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="g",args=[],file="test.jam",fullname="{{.*}}test.jam",line="8"},thread-id="1"
+(gdb)
+2-exec-finish
+2^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="h",args=[],file="test.jam",fullname="{{.*}}test.jam",line="14"},thread-id="1"
+(gdb)
+3-exec-finish
+3^running
+(gdb)
+*stopped,reason="end-stepping-range",frame={func="module scope",args=[],file="test.jam",fullname="{{.*}}test.jam",line="21"},thread-id="1"
+(gdb)
+73-gdb-exit
+73^exit
+""")
+ t.cleanup()
+
+
+def test_breakpoints():
+ """Tests the interaction between the following commands:
+ break, clear, delete, disable, enable"""
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( )
+ {
+ a = 1 ;
+ }
+ rule g ( )
+ {
+ b = 2 ;
+ }
+ rule h ( )
+ {
+ c = 3 ;
+ d = 4 ;
+ }
+ f ;
+ g ;
+ h ;
+ UPDATE ;
+ """)
+ run(t, """\
+=thread-group-added,id="i1"
+(gdb)
+-break-insert f
+^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",func="f"}
+(gdb)
+72-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+72^running
+(gdb)
+*stopped,reason="breakpoint-hit",bkptno="1",disp="keep",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="3"},thread-id="1",stopped-threads="all"
+(gdb)
+-interpreter-exec console kill
+^done
+(gdb)
+-break-insert g
+^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",func="g"}
+(gdb)
+-break-disable 1
+^done
+(gdb)
+73-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+73^running
+(gdb)
+*stopped,reason="breakpoint-hit",bkptno="2",disp="keep",frame={func="g",args=[],file="test.jam",fullname="{{.*}}test.jam",line="7"},thread-id="1",stopped-threads="all"
+(gdb)
+-interpreter-exec console kill
+^done
+(gdb)
+-break-enable 1
+^done
+(gdb)
+74-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+74^running
+(gdb)
+*stopped,reason="breakpoint-hit",bkptno="1",disp="keep",frame={func="f",args=[],file="test.jam",fullname="{{.*}}test.jam",line="3"},thread-id="1",stopped-threads="all"
+(gdb)
+-interpreter-exec console kill
+^done
+(gdb)
+-break-delete 1
+^done
+(gdb)
+75-exec-run -ftest.jam
+=thread-created,id="1",group-id="i1"
+75^running
+(gdb)
+*stopped,reason="breakpoint-hit",bkptno="2",disp="keep",frame={func="g",args=[],file="test.jam",fullname="{{.*}}test.jam",line="7"},thread-id="1",stopped-threads="all"
+(gdb)
+76-gdb-exit
+76^exit
+""")
+ t.cleanup()
+
+test_exec_run()
+test_exit_status()
+test_exec_step()
+test_exec_next()
+test_exec_finish()
+test_breakpoints()
diff --git a/src/boost/tools/build/test/debugger.py b/src/boost/tools/build/test/debugger.py
new file mode 100644
index 000000000..24bbb9c4a
--- /dev/null
+++ b/src/boost/tools/build/test/debugger.py
@@ -0,0 +1,674 @@
+#!/usr/bin/python
+
+# Copyright 2016 Steven Watanabe
+# 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)
+
+# Test for the debugger
+
+import BoostBuild
+import TestCmd
+import re
+
+def split_stdin_stdout(text):
+ """stdin is all text after the prompt up to and including
+ the next newline. Everything else is stdout. stdout
+ may contain regular expressions enclosed in {{}}."""
+ prompt = re.escape('(b2db) ')
+ pattern = re.compile('(?<=%s)(.*\n)' % prompt)
+ text = text.replace("{{bjam}}", "{{.*}}b2{{(?:\\.exe)?}}")
+ stdin = ''.join(re.findall(pattern, text))
+ stdout = re.sub(pattern, '', text)
+ outside_pattern = re.compile(r'(?:\A|(?<=\}\}))(?:[^\{]|(?:\{(?!\{)))*(?:(?=\{\{)|\Z)')
+
+ def escape_line(line):
+ line = re.sub(outside_pattern, lambda m: re.escape(m.group(0)), line)
+ return re.sub(r'\{\{|\}\}', '', line)
+
+ stdout = '\n'.join([escape_line(line) for line in stdout.split('\n')])
+ return (stdin,stdout)
+
+def run(tester, io):
+ (input,output) = split_stdin_stdout(io)
+ tester.run_build_system(stdin=input, stdout=output, match=TestCmd.match_re)
+
+def make_tester():
+ return BoostBuild.Tester(["-dconsole"], pass_toolset=False, pass_d0=False,
+ use_test_config=False, ignore_toolset_requirements=False, match=TestCmd.match_re)
+
+def test_run():
+ t = make_tester()
+ t.write("test.jam", """\
+ UPDATE ;
+ """)
+
+ run(t, """\
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Child {{\d+}} exited with status 0
+(b2db) quit
+""")
+
+ t.cleanup()
+
+def test_exit_status():
+ t = make_tester()
+ t.write("test.jam", """\
+ EXIT : 1 ;
+ """)
+ run(t, """\
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+
+Child {{\d+}} exited with status 1
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_step():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule g ( )
+ {
+ a = 1 ;
+ b = 2 ;
+ }
+ rule f ( )
+ {
+ g ;
+ c = 3 ;
+ }
+ f ;
+ """)
+ run(t, """\
+(b2db) break f
+Breakpoint 1 set at f
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( ) at test.jam:8
+8 g ;
+(b2db) step
+3 a = 1 ;
+(b2db) step
+4 b = 2 ;
+(b2db) step
+9 c = 3 ;
+(b2db) quit
+""")
+ t.cleanup()
+
+# Note: step doesn't need to worry about breakpoints,
+# as it always stops at the next line executed.
+
+def test_next():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule g ( )
+ {
+ a = 1 ;
+ }
+ rule f ( )
+ {
+ g ;
+ b = 2 ;
+ c = 3 ;
+ }
+ rule h ( )
+ {
+ f ;
+ g ;
+ }
+ h ;
+ d = 4 ;
+ """)
+ run(t, """\
+(b2db) break f
+Breakpoint 1 set at f
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( ) at test.jam:7
+7 g ;
+(b2db) next
+8 b = 2 ;
+(b2db) next
+9 c = 3 ;
+(b2db) next
+14 g ;
+(b2db) next
+17 d = 4 ;
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_next_breakpoint():
+ """next should stop if it encounters a breakpoint.
+ If the normal end point happens to be a breakpoint,
+ then it should be reported as normal stepping."""
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( recurse ? )
+ {
+ if $(recurse) { f ; }
+ a = 1 ;
+ }
+ rule g ( )
+ {
+ b = 2 ;
+ }
+ f true ;
+ g ;
+ """)
+ run(t, """\
+(b2db) break f
+Breakpoint 1 set at f
+(b2db) break g
+Breakpoint 2 set at g
+(b2db) break test.jam:4
+Breakpoint 3 set at test.jam:4
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( true ) at test.jam:3
+3 if $(recurse) { f ; }
+(b2db) next
+Breakpoint 1, f ( ) at test.jam:3
+3 if $(recurse) { f ; }
+(b2db) next
+4 a = 1 ;
+(b2db) next
+4 a = 1 ;
+(b2db) next
+11 g ;
+(b2db) next
+Breakpoint 2, g ( ) at test.jam:8
+8 b = 2 ;
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_finish():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( )
+ {
+ a = 1 ;
+ }
+ rule g ( )
+ {
+ f ;
+ b = 2 ;
+ i ;
+ }
+ rule h ( )
+ {
+ g ;
+ i ;
+ }
+ rule i ( )
+ {
+ c = 3 ;
+ }
+ h ;
+ d = 4 ;
+ """)
+ run(t, """\
+(b2db) break f
+Breakpoint 1 set at f
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( ) at test.jam:3
+3 a = 1 ;
+(b2db) finish
+8 b = 2 ;
+(b2db) finish
+14 i ;
+(b2db) finish
+21 d = 4 ;
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_finish_breakpoints():
+ """finish should stop when it reaches a breakpoint."""
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( recurse * )
+ {
+ if $(recurse)
+ {
+ a = [ f $(recurse[2-]) ] ;
+ }
+ }
+ rule g ( list * )
+ {
+ for local v in $(list)
+ {
+ x = $(v) ;
+ }
+ }
+ f 1 2 ;
+ g 1 2 ;
+ """)
+ run(t, """\
+(b2db) break test.jam:5
+Breakpoint 1 set at test.jam:5
+(b2db) break test.jam:12
+Breakpoint 2 set at test.jam:12
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( 1 2 ) at test.jam:5
+5 a = [ f $(recurse[2-]) ] ;
+(b2db) finish
+Breakpoint 1, f ( 2 ) at test.jam:5
+5 a = [ f $(recurse[2-]) ] ;
+(b2db) finish
+5 a = [ f $(recurse[2-]) ] ;
+(b2db) finish
+16 g 1 2 ;
+(b2db) finish
+Breakpoint 2, g ( 1 2 ) at test.jam:12
+12 x = $(v) ;
+(b2db) finish
+Breakpoint 2, g ( 1 2 ) at test.jam:12
+12 x = $(v) ;
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_continue_breakpoints():
+ """continue should stop when it reaches a breakpoint"""
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( recurse * )
+ {
+ if $(recurse)
+ {
+ a = [ f $(recurse[2-]) ] ;
+ }
+ }
+ rule g ( list * )
+ {
+ for local v in $(list)
+ {
+ x = $(v) ;
+ }
+ }
+ f 1 2 ;
+ g 1 2 ;
+ """)
+ run(t, """\
+(b2db) break test.jam:5
+Breakpoint 1 set at test.jam:5
+(b2db) break test.jam:12
+Breakpoint 2 set at test.jam:12
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( 1 2 ) at test.jam:5
+5 a = [ f $(recurse[2-]) ] ;
+(b2db) continue
+Breakpoint 1, f ( 2 ) at test.jam:5
+5 a = [ f $(recurse[2-]) ] ;
+(b2db) continue
+Breakpoint 1, f ( 1 2 ) at test.jam:5
+5 a = [ f $(recurse[2-]) ] ;
+(b2db) continue
+Breakpoint 2, g ( 1 2 ) at test.jam:12
+12 x = $(v) ;
+(b2db) continue
+Breakpoint 2, g ( 1 2 ) at test.jam:12
+12 x = $(v) ;
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_breakpoints():
+ """Tests the interaction between the following commands:
+ break, clear, delete, disable, enable"""
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( )
+ {
+ a = 1 ;
+ }
+ rule g ( )
+ {
+ b = 2 ;
+ }
+ rule h ( )
+ {
+ c = 3 ;
+ d = 4 ;
+ }
+ f ;
+ g ;
+ h ;
+ UPDATE ;
+ """)
+ run(t, """\
+(b2db) break f
+Breakpoint 1 set at f
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( ) at test.jam:3
+3 a = 1 ;
+(b2db) kill
+(b2db) break g
+Breakpoint 2 set at g
+(b2db) disable 1
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 2, g ( ) at test.jam:7
+7 b = 2 ;
+(b2db) kill
+(b2db) enable 1
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( ) at test.jam:3
+3 a = 1 ;
+(b2db) kill
+(b2db) delete 1
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 2, g ( ) at test.jam:7
+7 b = 2 ;
+(b2db) kill
+(b2db) break test.jam:12
+Breakpoint 3 set at test.jam:12
+(b2db) clear g
+Deleted breakpoint 2
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 3, h ( ) at test.jam:12
+12 d = 4 ;
+(b2db) kill
+(b2db) clear test.jam:12
+Deleted breakpoint 3
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Child {{\d+}} exited with status 0
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_breakpoints_running():
+ """Tests that breakpoints can be added and modified
+ while the program is running."""
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( )
+ {
+ a = 1 ;
+ }
+ rule g ( )
+ {
+ b = 2 ;
+ }
+ rule h ( )
+ {
+ c = 3 ;
+ d = 4 ;
+ }
+ f ;
+ g ;
+ h ;
+ UPDATE ;
+ """)
+ run(t, """\
+(b2db) break test.jam:14
+Breakpoint 1 set at test.jam:14
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:14
+14 f ;
+(b2db) break f
+Breakpoint 2 set at f
+(b2db) continue
+Breakpoint 2, f ( ) at test.jam:3
+3 a = 1 ;
+(b2db) kill
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:14
+14 f ;
+(b2db) break g
+Breakpoint 3 set at g
+(b2db) disable 2
+(b2db) continue
+Breakpoint 3, g ( ) at test.jam:7
+7 b = 2 ;
+(b2db) kill
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:14
+14 f ;
+(b2db) enable 2
+(b2db) continue
+Breakpoint 2, f ( ) at test.jam:3
+3 a = 1 ;
+(b2db) kill
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:14
+14 f ;
+(b2db) delete 2
+(b2db) continue
+Breakpoint 3, g ( ) at test.jam:7
+7 b = 2 ;
+(b2db) kill
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:14
+14 f ;
+(b2db) break test.jam:12
+Breakpoint 4 set at test.jam:12
+(b2db) clear g
+Deleted breakpoint 3
+(b2db) continue
+Breakpoint 4, h ( ) at test.jam:12
+12 d = 4 ;
+(b2db) kill
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:14
+14 f ;
+(b2db) clear test.jam:12
+Deleted breakpoint 4
+(b2db) continue
+Child {{\d+}} exited with status 0
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_backtrace():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( x * : y * : z * )
+ {
+ return $(x) ;
+ }
+ rule g ( x * : y * : z * )
+ {
+ return [ f $(x) : $(y) : $(z) ] ;
+ }
+ g 1 : 2 : 3 ;
+ """)
+ run(t, """\
+(b2db) break f
+Breakpoint 1 set at f
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( 1 : 2 : 3 ) at test.jam:3
+3 return $(x) ;
+(b2db) backtrace
+#0 in f ( 1 : 2 : 3 ) at test.jam:3
+#1 in g ( 1 : 2 : 3 ) at test.jam:7
+#2 in module scope at test.jam:9
+(b2db) quit
+""")
+ t.cleanup()
+
+def test_print():
+ t = make_tester()
+ t.write("test.jam", """\
+ rule f ( args * )
+ {
+ return $(args) ;
+ }
+ f x ;
+ f x y ;
+ """)
+
+ run(t, """\
+(b2db) break f
+Breakpoint 1 set at f
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, f ( x ) at test.jam:3
+3 return $(args) ;
+(b2db) print $(args)
+x
+(b2db) continue
+Breakpoint 1, f ( x y ) at test.jam:3
+3 return $(args) ;
+(b2db) print $(args)
+x y
+(b2db) disable 1
+(b2db) print [ f z ]
+z
+(b2db) quit
+""")
+
+ t.cleanup()
+
+def test_run_running():
+ t = make_tester()
+ t.write("test.jam", """\
+ UPDATE ;
+ """)
+
+ run(t, """\
+(b2db) break test.jam:1
+Breakpoint 1 set at test.jam:1
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:1
+1 UPDATE ;
+(b2db) run -ftest.jam
+Child {{\d+}} exited with status 0
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:1
+1 UPDATE ;
+(b2db) quit
+""")
+
+ t.cleanup()
+
+def test_error_not_running():
+ t = make_tester()
+ run(t, """\
+(b2db) continue
+The program is not being run.
+(b2db) step
+The program is not being run.
+(b2db) next
+The program is not being run.
+(b2db) finish
+The program is not being run.
+(b2db) kill
+The program is not being run.
+(b2db) backtrace
+The program is not being run.
+(b2db) print 1
+The program is not being run.
+(b2db) quit
+""")
+
+ t.cleanup()
+
+def test_bad_arguments():
+ t = make_tester()
+ t.write("test.jam", """\
+ UPDATE ;
+ """)
+
+ run(t, """\
+(b2db) break test.jam:1
+Breakpoint 1 set at test.jam:1
+(b2db) run -ftest.jam
+Starting program: {{bjam}} -ftest.jam
+Breakpoint 1, module scope at test.jam:1
+1 UPDATE ;
+(b2db) continue 1
+Too many arguments to continue.
+(b2db) step 1
+Too many arguments to step.
+(b2db) next 1
+Too many arguments to next.
+(b2db) finish 1
+Too many arguments to finish.
+(b2db) break
+Missing argument to break.
+(b2db) break x y
+Too many arguments to break.
+(b2db) disable
+Missing argument to disable.
+(b2db) disable 1 2
+Too many arguments to disable.
+(b2db) disable x
+Invalid breakpoint number x.
+(b2db) disable 2
+Unknown breakpoint 2.
+(b2db) enable
+Missing argument to enable.
+(b2db) enable 1 2
+Too many arguments to enable.
+(b2db) enable x
+Invalid breakpoint number x.
+(b2db) enable 2
+Unknown breakpoint 2.
+(b2db) delete
+Missing argument to delete.
+(b2db) delete 1 2
+Too many arguments to delete.
+(b2db) delete x
+Invalid breakpoint number x.
+(b2db) delete 2
+Unknown breakpoint 2.
+(b2db) clear
+Missing argument to clear.
+(b2db) clear test.jam:1 test.jam:1
+Too many arguments to clear.
+(b2db) clear test.jam:2
+No breakpoint at test.jam:2.
+(b2db) quit
+""")
+
+ t.cleanup()
+
+def test_unknown_command():
+ t = make_tester()
+ run(t, """\
+(b2db) xyzzy
+Unknown command: xyzzy
+(b2db) gnusto rezrov
+Unknown command: gnusto
+(b2db) quit
+""")
+
+ t.cleanup()
+
+test_run()
+test_exit_status()
+test_step()
+test_next()
+test_next_breakpoint()
+test_finish()
+test_finish_breakpoints()
+test_continue_breakpoints()
+test_breakpoints()
+test_breakpoints_running()
+test_backtrace()
+test_print()
+test_run_running()
+test_error_not_running()
+test_bad_arguments()
+test_unknown_command()
diff --git a/src/boost/tools/build/test/default_build.py b/src/boost/tools/build/test/default_build.py
new file mode 100644
index 000000000..6206507f4
--- /dev/null
+++ b/src/boost/tools/build/test/default_build.py
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 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)
+
+# Test that default build clause actually has any effect.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "")
+t.write("jamfile.jam", "exe a : a.cpp : : debug release ;")
+t.write("a.cpp", "int main() {}\n")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+t.expect_addition("bin/$toolset/release*/a.exe")
+
+# Check that explictly-specified build variant suppresses default-build.
+t.rm("bin")
+t.run_build_system(["release"])
+t.expect_addition(BoostBuild.List("bin/$toolset/release*/") * "a.exe a.obj")
+t.expect_nothing_more()
+
+# Now check that we can specify explicit build request and default-build will be
+# combined with it.
+t.run_build_system(["optimization=space"])
+t.expect_addition("bin/$toolset/debug/optimization-space*/a.exe")
+t.expect_addition("bin/$toolset/release/optimization-space*/a.exe")
+
+# Test that default-build must be identical in all alternatives. Error case.
+t.write("jamfile.jam", """\
+exe a : a.cpp : : debug ;
+exe a : b.cpp : : ;
+""")
+t.run_build_system(["-n", "--no-error-backtrace"], status=1)
+t.fail_test(t.stdout().find("default build must be identical in all alternatives") == -1)
+
+# Test that default-build must be identical in all alternatives. No Error case,
+# empty default build.
+t.write("jamfile.jam", """\
+exe a : a.cpp : <variant>debug ;
+exe a : b.cpp : <variant>release ;
+""")
+t.run_build_system(["-n", "--no-error-backtrace"], status=0)
+
+# Now try a harder example: default build which contains <define> should cause
+# <define> to be present when "b" is compiled. This happens only if
+# "build-project b" is placed first.
+t.write("jamfile.jam", """\
+project : default-build <define>FOO ;
+build-project a ;
+build-project b ;
+""")
+
+t.write("a/jamfile.jam", "exe a : a.cpp ../b//b ;")
+t.write("a/a.cpp", """\
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+void foo();
+int main() { foo(); }
+""")
+
+t.write("b/jamfile.jam", "lib b : b.cpp ;")
+t.write("b/b.cpp", """\
+#ifdef FOO
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo() {}
+#endif
+""")
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/default_features.py b/src/boost/tools/build/test/default_features.py
new file mode 100644
index 000000000..1d6d72a6f
--- /dev/null
+++ b/src/boost/tools/build/test/default_features.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+
+# 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)
+
+# Test that features with default values are always present in build properties
+# of any target.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# Declare *non-propagated* feature foo.
+t.write("jamroot.jam", """
+import feature : feature ;
+feature foo : on off ;
+""")
+
+# Note that '<foo>on' will not be propagated to 'd/l'.
+t.write("jamfile.jam", """
+exe hello : hello.cpp d//l ;
+""")
+
+t.write("hello.cpp", """
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+void foo();
+int main() { foo(); }
+""")
+
+t.write("d/jamfile.jam", """
+lib l : l.cpp : <foo>on:<define>FOO ;
+""")
+
+t.write("d/l.cpp", """
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+#ifdef FOO
+void foo() {}
+#endif
+""")
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/default_toolset.py b/src/boost/tools/build/test/default_toolset.py
new file mode 100755
index 000000000..682e7fcc1
--- /dev/null
+++ b/src/boost/tools/build/test/default_toolset.py
@@ -0,0 +1,215 @@
+#!/usr/bin/python
+
+# Copyright 2008 Jurko Gospodnetic
+# 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)
+
+# Test that the expected default toolset is used when no toolset is explicitly
+# specified on the command line or used from code via the using rule. Test that
+# the default toolset is correctly used just like any other explicitly used
+# toolset (e.g. toolset prerequisites, properties conditioned on toolset
+# related features, etc.).
+#
+# Note that we need to ignore regular site/user/test configuration files to
+# avoid them marking any toolsets not under our control as used.
+
+import BoostBuild
+
+
+# Line displayed by Boost Build when using the default toolset.
+configuring_default_toolset_message = \
+ 'warning: Configuring default toolset "%s".'
+
+
+###############################################################################
+#
+# test_conditions_on_default_toolset()
+# ------------------------------------
+#
+###############################################################################
+
+def test_conditions_on_default_toolset():
+ """Test that toolset and toolset subfeature conditioned properties get
+ applied correctly when the toolset is selected by default. Implicitly tests
+ that we can use the set-default-toolset rule to set the default toolset to
+ be used by Boost Build.
+ """
+
+ t = BoostBuild.Tester("--user-config= --ignore-site-config",
+ pass_toolset=False, use_test_config=False)
+
+ toolset_name = "myCustomTestToolset"
+ toolset_version = "v"
+ toolset_version_unused = "v_unused"
+ message_loaded = "Toolset '%s' loaded." % toolset_name
+ message_initialized = "Toolset '%s' initialized." % toolset_name ;
+
+ # Custom toolset.
+ t.write(toolset_name + ".jam", """
+import feature ;
+ECHO "%(message_loaded)s" ;
+feature.extend toolset : %(toolset_name)s ;
+feature.subfeature toolset %(toolset_name)s : version : %(toolset_version)s %(toolset_version_unused)s ;
+rule init ( version ) { ECHO "%(message_initialized)s" ; }
+""" % {'message_loaded' : message_loaded ,
+ 'message_initialized' : message_initialized,
+ 'toolset_name' : toolset_name ,
+ 'toolset_version' : toolset_version ,
+ 'toolset_version_unused': toolset_version_unused})
+
+ # Main Boost Build project script.
+ t.write("jamroot.jam", """
+import build-system ;
+import errors ;
+import feature ;
+import notfile ;
+
+build-system.set-default-toolset %(toolset_name)s : %(toolset_version)s ;
+
+feature.feature description : : free incidental ;
+
+# We use a rule instead of an action to avoid problems with action output not
+# getting piped to stdout by the testing system.
+rule buildRule ( names : targets ? : properties * )
+{
+ local descriptions = [ feature.get-values description : $(properties) ] ;
+ ECHO "descriptions:" /$(descriptions)/ ;
+ local toolset = [ feature.get-values toolset : $(properties) ] ;
+ ECHO "toolset:" /$(toolset)/ ;
+ local toolset-version = [ feature.get-values "toolset-$(toolset):version" : $(properties) ] ;
+ ECHO "toolset-version:" /$(toolset-version)/ ;
+}
+
+notfile testTarget
+ : @buildRule
+ :
+ :
+ <description>stand-alone
+ <toolset>%(toolset_name)s:<description>toolset
+ <toolset>%(toolset_name)s-%(toolset_version)s:<description>toolset-version
+ <toolset>%(toolset_name)s-%(toolset_version_unused)s:<description>toolset-version-unused ;
+""" % {'toolset_name' : toolset_name ,
+ 'toolset_version' : toolset_version,
+ 'toolset_version_unused': toolset_version_unused})
+
+ t.run_build_system()
+ t.expect_output_lines(configuring_default_toolset_message % toolset_name)
+ t.expect_output_lines(message_loaded)
+ t.expect_output_lines(message_initialized)
+ t.expect_output_lines("descriptions: /stand-alone/ /toolset/ "
+ "/toolset-version/")
+ t.expect_output_lines("toolset: /%s/" % toolset_name)
+ t.expect_output_lines("toolset-version: /%s/" % toolset_version)
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_default_toolset_on_os()
+# ----------------------------
+#
+###############################################################################
+
+def test_default_toolset_on_os( os, expected_toolset ):
+ """Test that the given toolset is used as the default toolset on the given
+ os. Uses hardcoded knowledge of how Boost Build decides on which host OS it
+ is currently running. Note that we must not do much after tricking Boost
+ Build into believing it has a specific host OS as this might mess up other
+ important internal Boost Build state.
+ """
+
+ t = BoostBuild.Tester("--user-config= --ignore-site-config",
+ pass_toolset=False, use_test_config=False)
+
+ t.write("jamroot.jam", "modules.poke os : .name : %s ;" % os)
+
+ # We need to tell the test system to ignore stderr output as attempting to
+ # load missing toolsets might cause random failures with which we are not
+ # concerned in this test.
+ t.run_build_system(stderr=None)
+ t.expect_output_lines(configuring_default_toolset_message %
+ expected_toolset)
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_default_toolset_requirements()
+# -----------------------------------
+#
+###############################################################################
+
+def test_default_toolset_requirements():
+ """Test that default toolset's requirements get applied correctly.
+ """
+
+ t = BoostBuild.Tester("--user-config= --ignore-site-config",
+ pass_toolset=False, use_test_config=False,
+ ignore_toolset_requirements=False)
+
+ toolset_name = "customTestToolsetWithRequirements"
+
+ # Custom toolset.
+ t.write(toolset_name + ".jam", """
+import feature ;
+import toolset ;
+feature.extend toolset : %(toolset_name)s ;
+toolset.add-requirements <description>toolset-requirement ;
+rule init ( ) { }
+""" % {'toolset_name': toolset_name})
+
+ # Main Boost Build project script.
+ t.write("jamroot.jam", """
+import build-system ;
+import errors ;
+import feature ;
+import notfile ;
+
+build-system.set-default-toolset %(toolset_name)s ;
+
+feature.feature description : : free incidental ;
+
+# We use a rule instead of an action to avoid problems with action output not
+# getting piped to stdout by the testing system.
+rule buildRule ( names : targets ? : properties * )
+{
+ local descriptions = [ feature.get-values description : $(properties) ] ;
+ ECHO "descriptions:" /$(descriptions)/ ;
+ local toolset = [ feature.get-values toolset : $(properties) ] ;
+ ECHO "toolset:" /$(toolset)/ ;
+}
+
+notfile testTarget
+ : @buildRule
+ :
+ :
+ <description>target-requirement
+ <description>toolset-requirement:<description>conditioned-requirement
+ <description>unrelated-condition:<description>unrelated-description ;
+""" % {'toolset_name': toolset_name})
+
+ t.run_build_system()
+ t.expect_output_lines(configuring_default_toolset_message % toolset_name)
+ t.expect_output_lines("descriptions: /conditioned-requirement/ "
+ "/target-requirement/ /toolset-requirement/")
+ t.expect_output_lines("toolset: /%s/" % toolset_name)
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+test_default_toolset_on_os("NT" , "msvc")
+test_default_toolset_on_os("LINUX" , "gcc" )
+test_default_toolset_on_os("CYGWIN" , "gcc" )
+test_default_toolset_on_os("SomeOtherOS", "gcc" )
+test_default_toolset_requirements()
+test_conditions_on_default_toolset()
diff --git a/src/boost/tools/build/test/dependency_property.py b/src/boost/tools/build/test/dependency_property.py
new file mode 100644
index 000000000..b67539255
--- /dev/null
+++ b/src/boost/tools/build/test/dependency_property.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+
+# 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)
+
+# Regression test: virtual targets with different dependency properties were
+# considered different by 'virtual-target.register', but the code which
+# determined the actual target paths ignored dependency properties so both
+# targets ended up being in the same location.
+#
+# This test has flip-flopped several times between passing and failing.
+# Currently, the library is only considered relevant for linking and thus
+# does not cause a conflict. SJW 20180115
+
+import BoostBuild
+
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", """\
+lib foo : foo.cpp ;
+exe hello : hello.cpp ;
+exe hello2 : hello.cpp : <library>foo ;
+""")
+
+t.write("hello.cpp", "int main() {}\n")
+
+t.write("foo.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo() {}
+""")
+
+t.run_build_system(["--no-error-backtrace"], status=0)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/dependency_test.py b/src/boost/tools/build/test/dependency_test.py
new file mode 100644
index 000000000..852955775
--- /dev/null
+++ b/src/boost/tools/build/test/dependency_test.py
@@ -0,0 +1,239 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 2005, 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)
+
+import BoostBuild
+
+
+def test_basic():
+ t = BoostBuild.Tester(["-d3", "-d+12"], use_test_config=False)
+
+ t.write("a.cpp", """
+#include <a.h>
+# include "a.h"
+#include <x.h>
+int main() {}
+""")
+ t.write("a.h", "\n")
+ t.write("a_c.c", """\
+#include <a.h>
+# include "a.h"
+#include <x.h>
+""")
+ t.write("b.cpp", """\
+#include "a.h"
+int main() {}
+""")
+ t.write("b.h", "\n")
+ t.write("c.cpp", """\
+#include "x.h"
+int main() {}
+""")
+ t.write("e.cpp", """\
+#include "x.h"
+int main() {}
+""")
+ t.write("x.foo", "")
+ t.write("y.foo", "")
+
+ t.write("src1/a.h", '#include "b.h"\n')
+ t.write("src1/b.h", '#include "c.h"\n')
+ t.write("src1/c.h", "\n")
+ t.write("src1/z.h", """\
+extern int dummy_variable_suppressing_empty_file_warning_on_hp_cxx_compiler;
+""")
+
+ t.write("src2/b.h", "\n")
+
+ t.write("jamroot.jam", """\
+import foo ;
+import types/cpp ;
+import types/exe ;
+
+project test : requirements <include>src1 ;
+
+exe a : x.foo a.cpp a_c.c ;
+exe b : b.cpp ;
+
+# Because of <define>FOO, c.cpp will be compiled to a different directory than
+# everything for main target "a". Therefore, without <implicit-dependency>, C
+# preprocessor processing that module will not find "x.h", which is part of
+# "a"'s dependency graph.
+#
+# --------------------------
+# More detailed explanation:
+# --------------------------
+# c.cpp includes x.h which does not exist on the current include path so Boost
+# Jam will try to match it to existing Jam targets to cover cases as this one
+# where the file is generated by the same build.
+#
+# However, as x.h is not part of "c" metatarget's dependency graph, Boost
+# Build will not actualize its target by default, i.e. create its Jam target.
+#
+# To get the Jam target created in time, we use the <implicit-dependency>
+# feature. This tells Boost Build that it needs to actualize the dependency
+# graph for metatarget "a", even though that metatarget has not been directly
+# mentioned and is not a dependency for any of the metatargets mentioned in the
+# current build request.
+#
+# Note that Boost Build does not automatically add a dependency between the
+# Jam targets in question so, if Boost Jam does not add a dependency on a target
+# from that other dependency graph (x.h in our case), i.e. if c.cpp does not
+# actually include x.h, us actualizing it will have no effect in the end as
+# Boost Jam will not have a reason to actually build those targets in spite of
+# knowing about them.
+exe c : c.cpp : <define>FOO <implicit-dependency>a ;
+""")
+
+ t.write("foo.jam", """\
+import generators ;
+import modules ;
+import os ;
+import print ;
+import type ;
+import types/cpp ;
+
+type.register FOO : foo ;
+
+generators.register-standard foo.foo : FOO : CPP H ;
+
+nl = "
+" ;
+
+rule foo ( targets * : sources * : properties * )
+{
+ # On NT, you need an exported symbol in order to have an import library
+ # generated. We will not really use the symbol defined here, just force the
+ # import library creation.
+ if ( [ os.name ] = NT || [ modules.peek : OS ] in CYGWIN ) &&
+ <main-target-type>LIB in $(properties)
+ {
+ .decl = "void __declspec(dllexport) foo() {}" ;
+ }
+ print.output $(<[1]) ;
+ print.text $(.decl:E="//")$(nl) ;
+ print.output $(<[2]) ;
+ print.text "#include <z.h>"$(nl) ;
+}
+""")
+
+ t.write("foo.py",
+r"""import bjam
+import b2.build.type as type
+import b2.build.generators as generators
+
+from b2.manager import get_manager
+
+type.register("FOO", ["foo"])
+generators.register_standard("foo.foo", ["FOO"], ["CPP", "H"])
+
+def prepare_foo(targets, sources, properties):
+ if properties.get('os') in ['windows', 'cygwin']:
+ bjam.call('set-target-variable', targets, "DECL",
+ "void __declspec(dllexport) foo() {}")
+
+get_manager().engine().register_action("foo.foo",
+ "echo -e $(DECL:E=//)\\n > $(<[1])\n"
+ "echo -e "#include <z.h>\\n" > $(<[2])\n", function=prepare_foo)
+""")
+
+ # Check that main target 'c' was able to find 'x.h' from 'a's dependency
+ # graph.
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug*/c.exe")
+
+ # Check handling of first level includes.
+
+ # Both 'a' and 'b' include "a.h" and should be updated.
+ t.touch("a.h")
+ t.run_build_system()
+
+ t.expect_touch("bin/$toolset/debug*/a.exe")
+ t.expect_touch("bin/$toolset/debug*/a.obj")
+ t.expect_touch("bin/$toolset/debug*/a_c.obj")
+ t.expect_touch("bin/$toolset/debug*/b.exe")
+ t.expect_touch("bin/$toolset/debug*/b.obj")
+ t.expect_nothing_more()
+
+ # Only source files using include <a.h> should be compiled.
+ t.touch("src1/a.h")
+ t.run_build_system()
+
+ t.expect_touch("bin/$toolset/debug*/a.exe")
+ t.expect_touch("bin/$toolset/debug*/a.obj")
+ t.expect_touch("bin/$toolset/debug*/a_c.obj")
+ t.expect_nothing_more()
+
+ # "src/a.h" includes "b.h" (in the same dir).
+ t.touch("src1/b.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/a.exe")
+ t.expect_touch("bin/$toolset/debug*/a.obj")
+ t.expect_touch("bin/$toolset/debug*/a_c.obj")
+ t.expect_nothing_more()
+
+ # Included by "src/b.h". We had a bug: file included using double quotes
+ # (e.g. "b.h") was not scanned at all in this case.
+ t.touch("src1/c.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/a.exe")
+
+ t.touch("b.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ # Test dependency on a generated header.
+ #
+ # TODO: we have also to check that generated header is found correctly if
+ # it is different for different subvariants. Lacking any toolset support,
+ # this check will be implemented later.
+ t.touch("x.foo")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/a.obj")
+ t.expect_touch("bin/$toolset/debug*/a_c.obj")
+
+ # Check that generated headers are scanned for dependencies as well.
+ t.touch("src1/z.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/a.obj")
+ t.expect_touch("bin/$toolset/debug*/a_c.obj")
+
+ t.cleanup()
+
+
+def test_scanned_includes_with_absolute_paths():
+ """
+ Regression test: on Windows, <includes> with absolute paths were not
+ considered when scanning dependencies.
+
+ """
+ t = BoostBuild.Tester(["-d3", "-d+12"])
+
+ t.write("jamroot.jam", """\
+path-constant TOP : . ;
+exe app : main.cpp : <include>$(TOP)/include ;
+""");
+
+ t.write("main.cpp", """\
+#include <dir/header.h>
+int main() {}
+""")
+
+ t.write("include/dir/header.h", "\n")
+
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug*/main.obj")
+
+ t.touch("include/dir/header.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/main.obj")
+
+ t.cleanup()
+
+
+test_basic()
+test_scanned_includes_with_absolute_paths()
diff --git a/src/boost/tools/build/test/disambiguation.py b/src/boost/tools/build/test/disambiguation.py
new file mode 100644
index 000000000..9544aa0f6
--- /dev/null
+++ b/src/boost/tools/build/test/disambiguation.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test that it is possible to add a suffix to a main target name to disambiguate
+# that main target from another, and that this does not affect the names of the
+# generated targets.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+exe hello.exe : hello.obj ;
+obj hello.obj : hello.cpp : <variant>debug ;
+obj hello.obj2 : hello.cpp : <variant>release ;
+""")
+
+t.write("hello.cpp", """
+int main() {}
+""")
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+t.expect_addition("bin/$toolset/debug*/hello.obj")
+t.expect_addition("bin/$toolset/release*/hello.obj")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/dll_path.py b/src/boost/tools/build/test/dll_path.py
new file mode 100644
index 000000000..f7331cdfb
--- /dev/null
+++ b/src/boost/tools/build/test/dll_path.py
@@ -0,0 +1,163 @@
+#!/usr/bin/python
+
+# Copyright (C) 2003. 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)
+
+# Test that the <dll-path> property is correctly set when using
+# <hardcode-dll-paths>true.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# The point of this test is to have exe "main" which uses library "b", which
+# uses library "a". When "main" is built with <hardcode-dll-paths>true, paths
+# to both libraries should be present as values of <dll-path> feature. We
+# create a special target type which reports <dll-path> values on its sources
+# and compare the list of found values with out expectations.
+
+t.write("jamroot.jam", "using dll_paths ;")
+t.write("jamfile.jam", """\
+exe main : main.cpp b//b ;
+explicit main ;
+path-list mp : main ;
+""")
+
+t.write("main.cpp", "int main() {}\n")
+t.write("dll_paths.jam", """\
+import "class" : new ;
+import feature ;
+import generators ;
+import print ;
+import sequence ;
+import type ;
+
+rule init ( )
+{
+ type.register PATH_LIST : pathlist ;
+
+ class dll-paths-list-generator : generator
+ {
+ rule __init__ ( )
+ {
+ generator.__init__ dll_paths.list : EXE : PATH_LIST ;
+ }
+
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ local dll-paths ;
+ for local s in $(sources)
+ {
+ local a = [ $(s).action ] ;
+ if $(a)
+ {
+ local p = [ $(a).properties ] ;
+ dll-paths += [ $(p).get <dll-path> ] ;
+ }
+ }
+ return [ generator.generated-targets $(sources) :
+ [ $(property-set).add-raw $(dll-paths:G=<dll-path>) ] :
+ $(project) $(name) ] ;
+ }
+ }
+ generators.register [ new dll-paths-list-generator ] ;
+}
+
+rule list ( target : sources * : properties * )
+{
+ local paths = [ feature.get-values <dll-path> : $(properties) ] ;
+ paths = [ sequence.insertion-sort $(paths) ] ;
+ print.output $(target) ;
+ print.text $(paths) ;
+}
+""")
+
+t.write("dll_paths.py", """\
+import bjam
+
+import b2.build.type as type
+import b2.build.generators as generators
+
+from b2.manager import get_manager
+
+def init():
+ type.register("PATH_LIST", ["pathlist"])
+
+ class DllPathsListGenerator(generators.Generator):
+
+ def __init__(self):
+ generators.Generator.__init__(self, "dll_paths.list", False,
+ ["EXE"], ["PATH_LIST"])
+
+ def generated_targets(self, sources, ps, project, name):
+ dll_paths = []
+ for s in sources:
+ a = s.action()
+ if a:
+ p = a.properties()
+ dll_paths += p.get('dll-path')
+ dll_paths.sort()
+ return generators.Generator.generated_targets(self, sources,
+ ps.add_raw(["<dll-path>" + p for p in dll_paths]), project,
+ name)
+
+ generators.register(DllPathsListGenerator())
+
+command = \"\"\"
+echo $(PATHS) > $(<[1])
+\"\"\"
+def function(target, sources, ps):
+ bjam.call('set-target-variable', target, "PATHS", ps.get('dll-path'))
+
+get_manager().engine().register_action("dll_paths.list", command,
+ function=function)
+""")
+
+t.write("a/jamfile.jam", "lib a : a.cpp ;")
+t.write("a/a.cpp", """\
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+t.write("b/jamfile.jam", "lib b : b.cpp ../a//a ;")
+t.write("b/b.cpp", """\
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+bar() {}
+""")
+
+t.run_build_system(["hardcode-dll-paths=true"])
+
+t.expect_addition("bin/$toolset/debug*/mp.pathlist")
+
+es1 = t.adjust_name("a/bin/$toolset/debug*")
+es2 = t.adjust_name("b/bin/$toolset/debug*")
+
+t.expect_content_lines("bin/$toolset/debug*/mp.pathlist", "*" + es1)
+t.expect_content_lines("bin/$toolset/debug*/mp.pathlist", "*" + es2)
+
+t.rm("bin/$toolset/debug*/mp.pathlist")
+
+# Now run the same checks with pre-built libraries
+adll = t.glob_file("a/bin/$toolset/debug*/a.dll")
+bdll = t.glob_file("b/bin/$toolset/debug*/b.dll")
+t.write("b/jamfile.jam", """
+local bdll = %s ;
+# Make sure that it is found even with multiple source-locations
+project : source-location c $(bdll:D) ;
+lib b : ../a//a : <file>$(bdll:D=) ;
+""" % bdll.replace("\\", "\\\\"))
+t.run_build_system(["hardcode-dll-paths=true"])
+t.expect_addition("bin/$toolset/debug*/mp.pathlist")
+
+t.expect_content_lines("bin/$toolset/debug*/mp.pathlist", "*" + es1)
+t.expect_content_lines("bin/$toolset/debug*/mp.pathlist", "*" + es2)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/double_loading.py b/src/boost/tools/build/test/double_loading.py
new file mode 100644
index 000000000..c708b00f7
--- /dev/null
+++ b/src/boost/tools/build/test/double_loading.py
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+
+# Copyright 2003 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+# Regression test for double loading of the same Jamfile.
+t.write("jamroot.jam", "")
+t.write("jamfile.jam", "build-project subdir ;")
+t.write("subdir/jamfile.jam", 'ECHO "Loaded subdir" ;')
+
+t.run_build_system(subdir="subdir")
+t.expect_output_lines("Loaded subdir")
+
+
+# Regression test for a more contrived case. The top-level Jamfile refers to
+# subdir via use-project, while subdir's Jamfile is being loaded. The
+# motivation why use-project referring to subprojects is useful can be found
+# at: http://article.gmane.org/gmane.comp.lib.boost.build/3906
+t.write("jamroot.jam", "")
+t.write("jamfile.jam", "use-project /subdir : subdir ;")
+t.write("subdir/jamfile.jam", "project subdir ;")
+
+t.run_build_system(subdir="subdir");
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/duplicate.py b/src/boost/tools/build/test/duplicate.py
new file mode 100644
index 000000000..1d0d5f7f2
--- /dev/null
+++ b/src/boost/tools/build/test/duplicate.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+
+# Copyright 2004 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 test tries to stage the same file to the same location by *two* different
+# stage rules, in two different projects. This is not exactly good thing to do,
+# but still, V2 should handle this. We had two bugs:
+# - since the file is referred from two projects, we created to different
+# virtual targets
+# - we also failed to figure out that the two target corresponding to the copied
+# files (created in two projects) are actually equivalent.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("a.cpp", """
+""")
+
+t.write("jamroot.jam", """
+build-project a ;
+build-project b ;
+""")
+
+t.write("a/jamfile.jam", """
+stage bin : ../a.cpp : <location>../dist ;
+""")
+
+t.write("b/jamfile.jam", """
+stage bin : ../a.cpp : <location>../dist ;
+""")
+
+t.run_build_system()
+t.expect_addition("dist/a.cpp")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/example_customization.py b/src/boost/tools/build/test/example_customization.py
new file mode 100644
index 000000000..462de5622
--- /dev/null
+++ b/src/boost/tools/build/test/example_customization.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test the 'customization' example.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.set_tree("../example/customization")
+
+t.run_build_system()
+
+t.expect_addition(["bin/$toolset/debug*/codegen.exe",
+ "bin/$toolset/debug*/usage.cpp"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/example_gettext.py b/src/boost/tools/build/test/example_gettext.py
new file mode 100644
index 000000000..aa836130e
--- /dev/null
+++ b/src/boost/tools/build/test/example_gettext.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test the 'gettext' example.
+
+import BoostBuild
+import os
+import string
+
+t = BoostBuild.Tester()
+
+t.set_tree("../example/gettext")
+
+t.run_build_system(stderr=None)
+
+t.expect_addition(["bin/$toolset/debug*/main.exe",
+ "bin/$toolset/debug*/russian.mo"])
+
+file = t.adjust_names(["bin/$toolset/debug*/main.exe"])[0]
+
+input_fd = os.popen(file)
+input = input_fd.read();
+
+t.fail_test(input.find("international hello") != 0)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/example_libraries.py b/src/boost/tools/build/test/example_libraries.py
new file mode 100644
index 000000000..60607b149
--- /dev/null
+++ b/src/boost/tools/build/test/example_libraries.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test the 'libraries' example.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.set_tree("../example/libraries")
+
+t.run_build_system()
+
+t.expect_addition(["app/bin/$toolset/debug*/app.exe",
+ "util/foo/bin/$toolset/debug*/bar.dll"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/example_make.py b/src/boost/tools/build/test/example_make.py
new file mode 100644
index 000000000..d72423cb2
--- /dev/null
+++ b/src/boost/tools/build/test/example_make.py
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test the 'make' example.
+
+import BoostBuild
+import sys
+
+t = BoostBuild.Tester(['example.python.interpreter=%s' % sys.executable])
+t.set_tree("../example/make")
+t.run_build_system()
+t.expect_addition(["bin/main.cpp"])
+t.cleanup()
diff --git a/src/boost/tools/build/test/example_qt4.py b/src/boost/tools/build/test/example_qt4.py
new file mode 100644
index 000000000..936e6f718
--- /dev/null
+++ b/src/boost/tools/build/test/example_qt4.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test the 'qt4' examples.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.set_tree("../example/qt/qt4/hello")
+t.run_build_system()
+t.expect_addition(["bin/$toolset/debug*/threading-multi/arrow"])
+
+t.set_tree("../example/qt/qt4/moccable-cpp")
+t.run_build_system()
+t.expect_addition(["bin/$toolset/debug*/threading-multi/main"])
+
+t.set_tree("../example/qt/qt4/uic")
+t.run_build_system()
+t.expect_addition(["bin/$toolset/debug*/threading-multi/hello"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/exit_status.py b/src/boost/tools/build/test/exit_status.py
new file mode 100755
index 000000000..11c4abf76
--- /dev/null
+++ b/src/boost/tools/build/test/exit_status.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 2010.
+# 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)
+
+# Test that build failure results in non-zero exit status
+
+import BoostBuild
+
+# Create a temporary working directory.
+t = BoostBuild.Tester()
+
+# Create the needed files.
+t.write("jamroot.jam", """
+exe hello : hello.cpp ;
+""")
+
+t.write("hello.cpp", """
+int main() {
+""")
+
+t.run_build_system(status=1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/expansion.py b/src/boost/tools/build/test/expansion.py
new file mode 100644
index 000000000..9042407f7
--- /dev/null
+++ b/src/boost/tools/build/test/expansion.py
@@ -0,0 +1,140 @@
+#!/usr/bin/python
+
+# 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)
+
+
+import BoostBuild
+
+t = BoostBuild.Tester(arguments=["--config="], pass_toolset=0)
+
+t.write("source.input", "")
+
+t.write("test-properties.jam", """
+import feature : feature ;
+import generators ;
+import toolset ;
+import type ;
+
+# We're not using the toolset at all, and we want to
+# suppress toolset initialization to avoid surprises.
+feature.extend toolset : null ;
+
+type.register CHECK : check ;
+type.register INPUT : input ;
+feature expected-define : : free ;
+feature unexpected-define : : free ;
+toolset.flags test-properties DEFINES : <define> ;
+toolset.flags test-properties EXPECTED : <expected-define> ;
+toolset.flags test-properties UNEXPECTED : <unexpected-define> ;
+generators.register-standard test-properties.check : INPUT : CHECK ;
+rule check ( target : source : properties * )
+{
+ local defines = [ on $(target) return $(DEFINES) ] ;
+ for local macro in [ on $(target) return $(EXPECTED) ]
+ {
+ if ! ( $(macro) in $(defines) )
+ {
+ EXIT expected $(macro) for $(target) in $(properties) : 1 ;
+ }
+ }
+ for local macro in [ on $(target) return $(UNEXPECTED) ]
+ {
+ if $(macro) in $(defines)
+ {
+ EXIT unexpected $(macro) for $(target) in $(properties) : 1 ;
+ }
+ }
+}
+actions check
+{
+ echo okay > $(<)
+}
+""")
+
+t.write("jamfile.jam", """
+import test-properties ;
+# See if default value of composite feature 'cf' will be expanded to
+# <define>CF_IS_OFF.
+check a : source.input : <expected-define>CF_IS_OFF ;
+
+# See if subfeature in requirements in expanded.
+check b : source.input : <cf>on-1
+ <expected-define>CF_1 <unexpected-define>CF_IS_OFF ;
+
+# See if conditional requirements are recursively expanded.
+check c : source.input : <toolset>null:<variant>release
+ <variant>release:<define>FOO <expected-define>FOO
+ ;
+
+# Composites specified in the default build should not
+# be expanded if they are overridden in the the requirements.
+check d : source.input : <cf>on <unexpected-define>CF_IS_OFF : <cf>off ;
+
+# Overriding a feature should clear subfeatures and
+# apply default values of subfeatures.
+check e : source.input : <cf>always
+ <unexpected-define>CF_IS_OFF <expected-define>CF_2 <unexpected-define>CF_1
+ : <cf>on-1 ;
+
+# Subfeatures should not be changed if the parent feature doesn't change
+check f : source.input : <cf>on <expected-define>CF_1 : <cf>on-1 ;
+
+# If a subfeature is not specific to the value of the parent feature,
+# then changing the parent value should not clear the subfeature.
+check g : source.input : <fopt>off <expected-define>FOPT_2 : <fopt>on-2 ;
+
+# If the default value of a composite feature adds an optional
+# feature which has a subfeature with a default, then that
+# default should be added.
+check h : source.input : <expected-define>CX_2 ;
+
+# If the default value of a feature is used, then the
+# default value of its subfeatures should also be used.
+check i : source.input : <expected-define>SF_1 ;
+
+# Subfeatures should be expanded when listed in a
+# target reference.
+check j-impl : source.input : <expected-define>CF_1 ;
+explicit j-impl ;
+alias j : j-impl/<cf>on-1 ;
+""")
+
+t.write("jamroot.jam", """
+import feature ;
+feature.feature cf : off on always : composite incidental ;
+feature.compose <cf>off : <define>CF_IS_OFF ;
+feature.subfeature cf on : version : 1 2 : composite optional incidental ;
+feature.compose <cf-on:version>1 : <define>CF_1 ;
+feature.subfeature cf always : version : 1 2 : composite incidental ;
+feature.compose <cf-always:version>1 : <define>CF_2 ;
+feature.feature fopt : on off : optional incidental ;
+feature.subfeature fopt : version : 1 2 : composite incidental ;
+feature.compose <fopt-version>2 : <define>FOPT_2 ;
+
+feature.feature cx1 : on : composite incidental ;
+feature.feature cx2 : on : optional incidental ;
+feature.subfeature cx2 on : sub : 1 : composite incidental ;
+feature.compose <cx1>on : <cx2>on ;
+feature.compose <cx2-on:sub>1 : <define>CX_2 ;
+
+feature.feature sf : a : incidental ;
+feature.subfeature sf a : sub : 1 : composite incidental ;
+feature.compose <sf-a:sub>1 : <define>SF_1 ;
+""")
+
+t.expand_toolset("jamfile.jam")
+
+t.run_build_system()
+t.expect_addition(["bin/debug/a.check",
+ "bin/debug/b.check",
+ "bin/null/release/c.check",
+ "bin/debug/d.check",
+ "bin/debug/e.check",
+ "bin/debug/f.check",
+ "bin/debug/g.check",
+ "bin/debug/h.check",
+ "bin/debug/i.check"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/explicit.py b/src/boost/tools/build/test/explicit.py
new file mode 100644
index 000000000..14d421752
--- /dev/null
+++ b/src/boost/tools/build/test/explicit.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+
+# 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """\
+exe hello : hello.cpp ;
+exe hello2 : hello.cpp ;
+explicit hello2 ;
+""")
+
+t.write("hello.cpp", "int main() {}\n")
+
+t.run_build_system()
+t.ignore("*.tds")
+t.expect_addition(BoostBuild.List("bin/$toolset/debug*/hello") * \
+ [".exe", ".obj"])
+t.expect_nothing_more()
+
+t.run_build_system(["hello2"])
+t.expect_addition("bin/$toolset/debug*/hello2.exe")
+
+t.rm(".")
+
+
+# Test that 'explicit' used in a helper rule applies to the current project, and
+# not to the Jamfile where the helper rule is defined.
+t.write("jamroot.jam", """\
+rule myinstall ( name : target )
+{
+ install $(name)-bin : $(target) ;
+ explicit $(name)-bin ;
+ alias $(name) : $(name)-bin ;
+}
+""")
+
+t.write("sub/a.cpp", "\n")
+t.write("sub/jamfile.jam", "myinstall dist : a.cpp ;")
+
+t.run_build_system(subdir="sub")
+t.expect_addition("sub/dist-bin/a.cpp")
+
+t.rm("sub/dist-bin")
+
+t.write("sub/jamfile.jam", """\
+myinstall dist : a.cpp ;
+explicit dist ;
+""")
+
+t.run_build_system(subdir="sub")
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/feature_cxxflags.py b/src/boost/tools/build/test/feature_cxxflags.py
new file mode 100755
index 000000000..a4eeb52d4
--- /dev/null
+++ b/src/boost/tools/build/test/feature_cxxflags.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# 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)
+
+# Tests the cxxflags feature
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# cxxflags should be applied to C++ compilation,
+# but not to C.
+t.write("Jamroot.jam", """
+obj test-cpp : test.cpp : <cxxflags>-DOKAY ;
+obj test-c : test.c : <cxxflags>-DBAD ;
+""")
+
+t.write("test.cpp", """
+#ifndef OKAY
+#error Cannot compile without OKAY
+#endif
+""")
+
+t.write("test.c", """
+#ifdef BAD
+#error Cannot compile with BAD
+#endif
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/test-cpp.obj")
+t.expect_addition("bin/$toolset/debug*/test-c.obj")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/feature_implicit_dependency.py b/src/boost/tools/build/test/feature_implicit_dependency.py
new file mode 100644
index 000000000..0b40da1bf
--- /dev/null
+++ b/src/boost/tools/build/test/feature_implicit_dependency.py
@@ -0,0 +1,113 @@
+#!/usr/bin/python
+
+# Copyright (c) Steven Watanabe 2018.
+# 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)
+
+# Tests that a single main target can be used for
+# implicit dependencies of multiple different types.
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=False)
+
+t.write("input.sss", "")
+
+t.write("Jamroot.jam", """
+import type ;
+import common ;
+import generators ;
+import "class" : new ;
+import feature : feature ;
+import toolset : flags ;
+
+type.register AAA : aaa ;
+type.register BBB : bbb ;
+type.register CCC : ccc ;
+type.register DDD : ddd ;
+type.register SSS : sss ;
+
+feature aaa-path : : free path ;
+feature bbb-path : : free path ;
+
+class aaa-action : action
+{
+ rule adjust-properties ( property-set )
+ {
+ local s = [ $(self.targets[1]).creating-subvariant ] ;
+ return [ $(property-set).add-raw
+ [ $(s).implicit-includes aaa-path : AAA ] ] ;
+ }
+}
+
+class aaa-generator : generator
+{
+ rule action-class ( )
+ {
+ return aaa-action ;
+ }
+}
+
+class bbb-action : action
+{
+ rule adjust-properties ( property-set )
+ {
+ local s = [ $(self.targets[1]).creating-subvariant ] ;
+ return [ $(property-set).add-raw
+ [ $(s).implicit-includes bbb-path : BBB ] ] ;
+ }
+}
+
+class bbb-generator : generator
+{
+ rule action-class ( )
+ {
+ return bbb-action ;
+ }
+}
+
+generators.register-standard common.copy : SSS : AAA ;
+generators.register-standard common.copy : SSS : BBB ;
+
+# Produce two targets from a single source
+rule make-aaa-bbb ( project name ? : property-set : sources * )
+{
+ local result ;
+ local aaa = [ generators.construct $(project) $(name) : AAA :
+ [ $(property-set).add-raw <location-prefix>a-loc ] : $(sources) ] ;
+ local bbb = [ generators.construct $(project) $(name) : BBB :
+ [ $(property-set).add-raw <location-prefix>b-loc ] : $(sources) ] ;
+ return [ $(aaa[1]).add $(bbb[1]) ] $(aaa[2-]) $(bbb[2-]) ;
+}
+
+generate input : input.sss : <generating-rule>@make-aaa-bbb ;
+explicit input ;
+
+flags make-ccc AAAPATH : <aaa-path> ;
+rule make-ccc ( target : sources * : properties * )
+{
+ ECHO aaa path\: [ on $(target) return $(AAAPATH) ] ;
+ common.copy $(target) : $(sources) ;
+}
+
+flags make-ddd BBBPATH : <bbb-path> ;
+rule make-ddd ( target : sources * : properties * )
+{
+ ECHO bbb path\: [ on $(target) return $(BBBPATH) ] ;
+ common.copy $(target) : $(sources) ;
+}
+
+generators.register [ new aaa-generator $(__name__).make-ccc : SSS : CCC ] ;
+generators.register [ new bbb-generator $(__name__).make-ddd : SSS : DDD ] ;
+
+# This should have <aaapath>bin/a-loc
+ccc output-c : input.sss : <implicit-dependency>input ;
+# This should have <bbbpath>bin/b-loc
+ddd output-d : input.sss : <implicit-dependency>input ;
+""")
+
+t.run_build_system()
+t.expect_output_lines(["aaa path: bin/a-loc", "bbb path: bin/b-loc"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/feature_relevant.py b/src/boost/tools/build/test/feature_relevant.py
new file mode 100644
index 000000000..4e7a0c451
--- /dev/null
+++ b/src/boost/tools/build/test/feature_relevant.py
@@ -0,0 +1,142 @@
+#!/usr/bin/python
+
+# Copyright 2018 Steven Watanabe
+# 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)
+
+# Tests the <relevant> feature
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("xxx.jam", """
+import type ;
+import feature : feature ;
+import toolset : flags ;
+import generators ;
+type.register XXX : xxx ;
+type.register YYY : yyy ;
+feature xxxflags : : free ;
+generators.register-standard xxx.run : YYY : XXX ;
+# xxxflags is relevant because it is used by flags
+flags xxx.run OPTIONS : <xxxflags> ;
+actions run
+{
+ echo okay > $(<)
+}
+""")
+
+t.write("zzz.jam", """
+import xxx ;
+import type ;
+import feature : feature ;
+import generators ;
+type.register ZZZ : zzz ;
+feature zzz.enabled : off on : propagated ;
+# zzz.enabled is relevant because it is used in the generator's
+# requirements
+generators.register-standard zzz.run : XXX : ZZZ : <zzz.enabled>on ;
+actions run
+{
+ echo okay > $(<)
+}
+""")
+
+t.write("aaa.jam", """
+import zzz ;
+import type ;
+import feature : feature ;
+import generators ;
+import toolset : flags ;
+type.register AAA : aaa ;
+feature aaaflags : : free ;
+generators.register-standard aaa.run : ZZZ : AAA ;
+flags aaa.run OPTIONS : <aaaflags> ;
+actions run
+{
+ echo okay > $(<)
+}
+""")
+
+t.write("Jamroot.jam", """
+import xxx ;
+import zzz ;
+import aaa ;
+import feature : feature ;
+
+# f1 is relevant, because it is composite and <xxxflags> is relevant
+feature f1 : n y : composite propagated ;
+feature.compose <f1>y : <xxxflags>-no1 ;
+# f2 is relevant, because it is used in a conditional
+feature f2 : n y : propagated ;
+# f3 is relevant, because it is used to choose the target alternative
+feature f3 : n y : propagated ;
+# f4 is relevant, because it is marked as such explicitly
+feature f4 : n y : propagated ;
+# f5 is relevant because of the conditional usage-requirements
+feature f5 : n y : propagated ;
+# f6 is relevant because the indirect conditional indicates so
+feature f6 : n y : propagated ;
+# f7 is relevant because the icond7 says so
+feature f7 : n y : propagated ;
+
+# The same as f[n], except not propagated
+feature g1 : n y : composite ;
+feature.compose <g1>y : <xxxflags>-no1 ;
+feature g2 : n y ;
+feature g3 : n y ;
+feature g4 : n y ;
+feature g5 : n y ;
+feature g6 : n y ;
+feature g7 : n y ;
+
+project : default-build
+ <f1>y <f2>y <f3>y <f4>y <f5>y <f6>y <f7>y
+ <g1>y <g2>y <g3>y <g4>y <g5>y <g6>y <g7>y <zzz.enabled>on ;
+
+rule icond6 ( properties * )
+{
+ local result ;
+ if <f6>y in $(properties) || <g6>y in $(properties)
+ {
+ result += <xxxflags>-yes6 ;
+ }
+ return $(result)
+ <relevant>xxxflags:<relevant>f6
+ <relevant>xxxflags:<relevant>g6 ;
+}
+
+rule icond7 ( properties * )
+{
+ local result ;
+ if <f7>y in $(properties) || <g7>y in $(properties)
+ {
+ result += <aaaflags>-yes7 ;
+ }
+ return $(result)
+ <relevant>aaaflags:<relevant>f7
+ <relevant>aaaflags:<relevant>g7 ;
+}
+
+zzz out : in.yyy
+ : <f2>y:<xxxflags>-no2 <g2>y:<xxxflags>-no2 <relevant>f4 <relevant>g4
+ <conditional>@icond6
+ :
+ : <f5>y:<aaaflags>-yes5 <g5>y:<aaaflags>-yes5 <conditional>@icond7
+ ;
+alias out : : <f3>n ;
+alias out : : <g3>n ;
+# Features that are relevant for out are also relevant for check-propagate
+aaa check-propagate : out ;
+""")
+
+t.write("in.yyy", "")
+
+t.run_build_system()
+t.expect_addition("bin/f1-y/f2-y/f3-y/f4-y/f6-y/g1-y/g2-y/g3-y/g4-y/g6-y/out.xxx")
+t.expect_addition("bin/f1-y/f2-y/f3-y/f4-y/f6-y/g1-y/g2-y/g3-y/g4-y/g6-y/zzz.enabled-on/out.zzz")
+t.expect_addition("bin/f1-y/f2-y/f3-y/f4-y/f5-y/f6-y/f7-y/zzz.enabled-on/check-propagate.aaa")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/feature_suppress_import_lib.py b/src/boost/tools/build/test/feature_suppress_import_lib.py
new file mode 100644
index 000000000..8dc666727
--- /dev/null
+++ b/src/boost/tools/build/test/feature_suppress_import_lib.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+# Copyright 2018 Steven Watanabe
+# 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)
+
+# Tests the suppress-import-lib feature
+
+# This used to cause the pdb and the import lib to get mixed up
+# if there are any exports.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("Jamroot.jam", """
+lib l : l.cpp : <suppress-import-lib>true ;
+""")
+
+t.write("l.cpp", """
+void
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+f() {}
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/l.obj")
+t.expect_addition("bin/$toolset/debug*/l.dll")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/file_types.py b/src/boost/tools/build/test/file_types.py
new file mode 100644
index 000000000..e6d9bf840
--- /dev/null
+++ b/src/boost/tools/build/test/file_types.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python
+#
+# Copyright 2018 Steven Watanabe
+#
+# 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)
+
+# Tests the mapping of various suffixes
+# In particular, .so[.version] needs to
+# be mapped as a SHARED_LIB.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("Jamroot.jam", """\
+import type : type ;
+ECHO [ type source.c ] ;
+ECHO [ type source.cc ] ;
+ECHO [ type source.cxx ] ;
+ECHO [ type source.cpp ] ;
+ECHO [ type source.o ] ;
+ECHO [ type source.obj ] ;
+ECHO [ type boost_system.lib ] ;
+ECHO [ type boost_system.so ] ;
+ECHO [ type boost_system.dll ] ;
+EXIT [ type boost_system.so.1.66.0 ] : 0 ;
+""")
+
+t.run_build_system(stdout="""\
+C
+CPP
+CPP
+CPP
+OBJ
+OBJ
+STATIC_LIB
+SHARED_LIB
+SHARED_LIB
+SHARED_LIB
+""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/flags.py b/src/boost/tools/build/test/flags.py
new file mode 100644
index 000000000..bdb2b6b7d
--- /dev/null
+++ b/src/boost/tools/build/test/flags.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+
+# Copyright (C) Steven Watanabe 2018
+# 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)
+
+# Tests the check-has-flag rule
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# We need an object file before we can run the actual test.
+t.write('input.cpp', 'void f() {}\n')
+t.write('Jamroot.jam', 'obj input : input.cpp ;')
+t.run_build_system()
+
+linker_input = t.glob_file('bin/$toolset/debug*/input.obj')
+
+# Check every possible result of pass or fail.
+t.write('Jamroot.jam', '''
+import flags ;
+import modules ;
+OBJECT_FILE = [ modules.peek : OBJECT_FILE ] ;
+obj fail_cpp : test.cpp : [ check-has-flag <cxxflags>--illegal-flag-cpp
+ : <define>ERROR : <define>OK ] ;
+obj pass_cpp : test.cpp : [ check-has-flag <cxxflags>-DMACRO_CPP
+ : <define>OK : <define>ERROR ] ;
+obj fail_c : test.cpp : [ check-has-flag <cflags>--illegal-flag-c
+ : <define>ERROR : <define>OK ] ;
+obj pass_c : test.cpp : [ check-has-flag <cflags>-DMACRO_C
+ : <define>OK : <define>ERROR ] ;
+obj fail_link : test.cpp : [ check-has-flag <linkflags>--illegal-flag-link
+ : <define>ERROR : <define>OK ] ;
+# The only thing that we can be certain the linker
+# will accept is the name of an object file.
+obj pass_link : test.cpp : [ check-has-flag <linkflags>$(OBJECT_FILE)
+ : <define>OK : <define>ERROR ] ;
+''')
+
+t.write('test.cpp', '''
+#ifdef ERROR
+#error ERROR defined
+#endif
+#ifndef OK
+#error ERROR not defined
+#endif
+''')
+
+# Don't check the status immediately, so that we have a chance
+# to print config.log. Also, we need a minimum of d2 to make
+# sure that we always see the commands and output.
+t.run_build_system(['-sOBJECT_FILE=' + linker_input, '-d2'], status=None)
+
+if t.status != 0:
+ log_file = t.read('bin/config.log')
+ BoostBuild.annotation("config.log", log_file)
+ t.fail_test(True)
+
+t.expect_output_lines([' - has --illegal-flag-cpp : no',
+ ' - has -DMACRO_CPP : yes',
+ ' - has --illegal-flag-c : no',
+ ' - has -DMACRO_C : yes',
+ ' - has --illegal-flag-link : no',
+ ' - has *bin*/input.* : yes'])
+t.expect_addition('bin/$toolset/debug*/fail_cpp.obj')
+t.expect_addition('bin/$toolset/debug*/pass_cpp.obj')
+t.expect_addition('bin/$toolset/debug*/fail_c.obj')
+t.expect_addition('bin/$toolset/debug*/pass_c.obj')
+t.expect_addition('bin/$toolset/debug*/fail_link.obj')
+t.expect_addition('bin/$toolset/debug*/pass_link.obj')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/gcc_runtime.py b/src/boost/tools/build/test/gcc_runtime.py
new file mode 100644
index 000000000..684afed10
--- /dev/null
+++ b/src/boost/tools/build/test/gcc_runtime.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+# Copyright 2004 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)
+
+# Tests that on gcc, we correctly report a problem when static runtime is
+# requested for building a shared library.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+t.write("jamroot.jam", "lib hello : hello.cpp ;")
+t.write("hello.cpp", "int main() {}\n")
+
+t.run_build_system(["runtime-link=static"])
+t.expect_output_lines("warning: On gcc, DLLs can not be built with "
+ "'<runtime-link>static'.")
+t.expect_nothing_more()
+
+t.run_build_system(["link=static", "runtime-link=static"])
+t.expect_addition("bin/$toolset/debug*/link-static*/hello.obj")
+t.expect_addition("bin/$toolset/debug*/link-static*/hello.lib")
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/generator_selection.py b/src/boost/tools/build/test/generator_selection.py
new file mode 100755
index 000000000..50d4ff3cd
--- /dev/null
+++ b/src/boost/tools/build/test/generator_selection.py
@@ -0,0 +1,158 @@
+#!/usr/bin/python
+
+# Copyright 2008, 2012 Jurko Gospodnetic
+# 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)
+
+# Tests that generators get selected correctly.
+#
+# We do not use the internal C++-compiler CPP --> OBJ generator to avoid
+# problems with specific compilers or their configurations, e.g. IBM's AIX test
+# runner 'AIX Version 5.3 TL7 SP5 (5300-07-05-0831)' using the 'IBM XL C/C++
+# for AIX, V12.1 (Version: 12.01.0000.0000)' reporting errors when run with a
+# source file whose suffix is not '.cpp'.
+
+import BoostBuild
+
+
+###############################################################################
+#
+# test_generator_added_after_already_building_a_target_of_its_target_type()
+# -------------------------------------------------------------------------
+#
+###############################################################################
+
+def test_generator_added_after_already_building_a_target_of_its_target_type():
+ """
+ Regression test for a Boost Build bug causing it to not use a generator
+ if it got added after already building a target of its target type.
+
+ """
+ t = BoostBuild.Tester()
+
+ t.write("dummy.cpp", "void f() {}\n")
+
+ t.write("jamroot.jam", """\
+import common ;
+import generators ;
+import type ;
+type.register MY_OBJ : my_obj ;
+generators.register-standard common.copy : CPP : MY_OBJ ;
+
+# Building this dummy target must not cause a later defined CPP target type
+# generator not to be recognized as viable.
+my-obj dummy : dummy.cpp ;
+alias the-other-obj : Other//other-obj ;
+""")
+
+ t.write("Other/source.extension", "A dummy source file.")
+
+ t.write("Other/mygen.jam", """\
+import common ;
+import generators ;
+import type ;
+type.register MY_TYPE : extension ;
+generators.register-standard $(__name__).generate-a-cpp-file : MY_TYPE : CPP ;
+rule generate-a-cpp-file { ECHO Generating a CPP file... ; }
+CREATE-FILE = [ common.file-creation-command ] ;
+actions generate-a-cpp-file { $(CREATE-FILE) "$(<)" }
+""")
+
+ t.write("Other/mygen.py", """\
+from __future__ import print_function
+import b2.build.generators as generators
+import b2.build.type as type
+
+from b2.manager import get_manager
+
+import os
+
+type.register('MY_TYPE', ['extension'])
+generators.register_standard('mygen.generate-a-cpp-file', ['MY_TYPE'], ['CPP'])
+if os.name == 'nt':
+ action = 'echo void g() {} > "$(<)"'
+else:
+ action = 'echo "void g() {}" > "$(<)"'
+def f(*args):
+ print("Generating a CPP file...")
+
+get_manager().engine().register_action("mygen.generate-a-cpp-file", action,
+ function=f)
+""")
+
+ t.write("Other/jamfile.jam", """\
+import mygen ;
+my-obj other-obj : source.extension ;
+""")
+
+ t.run_build_system()
+ t.expect_output_lines("Generating a CPP file...")
+ t.expect_addition("bin/dummy.my_obj")
+ t.expect_addition("Other/bin/other-obj.cpp")
+ t.expect_addition("Other/bin/other-obj.my_obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# test_using_a_derived_source_type_created_after_generator_already_used()
+# -----------------------------------------------------------------------
+#
+###############################################################################
+
+def test_using_a_derived_source_type_created_after_generator_already_used():
+ """
+ Regression test for a Boost Build bug causing it to not use a generator
+ with a source type derived from one of the generator's sources but created
+ only after already using the generateor.
+
+ """
+ t = BoostBuild.Tester()
+
+ t.write("dummy.xxx", "Hello. My name is Peter Pan.\n")
+
+ t.write("jamroot.jam", """\
+import common ;
+import generators ;
+import type ;
+type.register XXX : xxx ;
+type.register YYY : yyy ;
+generators.register-standard common.copy : XXX : YYY ;
+
+# Building this dummy target must not cause a later defined XXX2 target type not
+# to be recognized as a viable source type for building YYY targets.
+yyy dummy : dummy.xxx ;
+alias the-test-output : Other//other ;
+""")
+
+ t.write("Other/source.xxx2", "Hello. My name is Tinkerbell.\n")
+
+ t.write("Other/jamfile.jam", """\
+import type ;
+type.register XXX2 : xxx2 : XXX ;
+# We are careful not to do anything between defining our new XXX2 target type
+# and using the XXX --> YYY generator that could potentially cover the Boost
+# Build bug by clearing its internal viable source target type state.
+yyy other : source.xxx2 ;
+""")
+
+ t.run_build_system()
+ t.expect_addition("bin/dummy.yyy")
+ t.expect_addition("Other/bin/other.yyy")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+test_generator_added_after_already_building_a_target_of_its_target_type()
+test_using_a_derived_source_type_created_after_generator_already_used()
diff --git a/src/boost/tools/build/test/generators_test.py b/src/boost/tools/build/test/generators_test.py
new file mode 100644
index 000000000..f612a25eb
--- /dev/null
+++ b/src/boost/tools/build/test/generators_test.py
@@ -0,0 +1,433 @@
+#!/usr/bin/python
+
+# Copyright 2002, 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004, 2005 Vladimir Prus
+# Copyright 2012 Jurko Gospodnetic
+# 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 BoostBuild
+import re
+
+
+def test_basic():
+ t = BoostBuild.Tester()
+ __write_appender(t, "appender.jam")
+ t.write("a.cpp", "")
+ t.write("b.cxx", "")
+ t.write("c.tui", "")
+ t.write("d.wd", "")
+ t.write("e.cpp", "")
+ t.write("x.l", "")
+ t.write("y.x_pro", "")
+ t.write("z.cpp", "")
+ t.write("lib/c.cpp", "int bar() { return 0; }\n")
+ t.write("lib/jamfile.jam", "my-lib auxilliary : c.cpp ;")
+ t.write("jamroot.jam",
+r"""import appender ;
+
+import "class" : new ;
+import generators ;
+import type ;
+
+
+################################################################################
+#
+# We use our own custom EXE, LIB & OBJ target generators as using the regular
+# ones would force us to have to deal with different compiler/linker specific
+# 'features' that really have nothing to do with this test. For example, IBM XL
+# C/C++ for AIX, V12.1 (Version: 12.01.0000.0000) compiler exits with a non-zero
+# exit code and thus fails our build when run with a source file using an
+# unknown suffix like '.marked_cpp'.
+#
+################################################################################
+
+type.register MY_EXE : my_exe ;
+type.register MY_LIB : my_lib ;
+type.register MY_OBJ : my_obj ;
+
+appender.register compile-c : C : MY_OBJ ;
+appender.register compile-cpp : CPP : MY_OBJ ;
+appender.register link-lib composing : MY_OBJ : MY_LIB ;
+appender.register link-exe composing : MY_OBJ MY_LIB : MY_EXE ;
+
+
+################################################################################
+#
+# LEX --> C
+#
+################################################################################
+
+type.register LEX : l ;
+
+appender.register lex-to-c : LEX : C ;
+
+
+################################################################################
+#
+# /--> tUI_H --\
+# tUI --< >--> CPP
+# \------------/
+#
+################################################################################
+
+type.register tUI : tui ;
+type.register tUI_H : tui_h ;
+
+appender.register ui-to-cpp : tUI tUI_H : CPP ;
+appender.register ui-to-h : tUI : tUI_H ;
+
+
+################################################################################
+#
+# /--> X1 --\
+# X_PRO --< >--> CPP
+# \--> X2 --/
+#
+################################################################################
+
+type.register X1 : x1 ;
+type.register X2 : x2 ;
+type.register X_PRO : x_pro ;
+
+appender.register x1-x2-to-cpp : X1 X2 : CPP ;
+appender.register x-pro-to-x1-x2 : X_PRO : X1 X2 ;
+
+
+################################################################################
+#
+# When the main target type is NM_EXE, build OBJ from CPP-MARKED and not from
+# anything else, e.g. directly from CPP.
+#
+################################################################################
+
+type.register CPP_MARKED : marked_cpp : CPP ;
+type.register POSITIONS : positions ;
+type.register NM.TARGET.CPP : target_cpp : CPP ;
+type.register NM_EXE : : MY_EXE ;
+
+appender.register marked-to-target-cpp : CPP_MARKED : NM.TARGET.CPP ;
+appender.register cpp-to-marked-positions : CPP : CPP_MARKED POSITIONS ;
+
+class "nm::target::cpp-obj-generator" : generator
+{
+ rule __init__ ( id )
+ {
+ generator.__init__ $(id) : NM.TARGET.CPP : MY_OBJ ;
+ generator.set-rule-name appender.appender ;
+ }
+
+ rule requirements ( )
+ {
+ return <main-target-type>NM_EXE ;
+ }
+
+ rule run ( project name ? : properties * : source : multiple ? )
+ {
+ if [ $(source).type ] = CPP
+ {
+ local converted = [ generators.construct $(project) : NM.TARGET.CPP
+ : $(properties) : $(source) ] ;
+ if $(converted)
+ {
+ return [ generators.construct $(project) : MY_OBJ :
+ $(properties) : $(converted[2]) ] ;
+ }
+ }
+ }
+}
+generators.register [ new "nm::target::cpp-obj-generator" target-obj ] ;
+generators.override target-obj : all ;
+
+
+################################################################################
+#
+# A more complex test case scenario with the following generators:
+# 1. WHL --> CPP, WHL_LR0, H, H(%_symbols)
+# 2. DLP --> CPP
+# 3. WD --> WHL(%_parser) DLP(%_lexer)
+# 4. A custom generator of higher priority than generators 1. & 2. that helps
+# disambiguate between them when generating CPP files from WHL and DLP
+# sources.
+#
+################################################################################
+
+type.register WHL : whl ;
+type.register DLP : dlp ;
+type.register WHL_LR0 : lr0 ;
+type.register WD : wd ;
+
+local whale-generator-id = [ appender.register whale : WHL : CPP WHL_LR0 H
+ H(%_symbols) ] ;
+local dolphin-generator-id = [ appender.register dolphin : DLP : CPP ] ;
+appender.register wd : WD : WHL(%_parser) DLP(%_lexer) ;
+
+class wd-to-cpp : generator
+{
+ rule __init__ ( id : sources * : targets * )
+ {
+ generator.__init__ $(id) : $(sources) : $(targets) ;
+ }
+
+ rule run ( project name ? : property-set : source )
+ {
+ local new-sources = $(source) ;
+ if ! [ $(source).type ] in WHL DLP
+ {
+ local r1 = [ generators.construct $(project) $(name) : WHL :
+ $(property-set) : $(source) ] ;
+ local r2 = [ generators.construct $(project) $(name) : DLP :
+ $(property-set) : $(source) ] ;
+ new-sources = [ sequence.unique $(r1[2-]) $(r2[2-]) ] ;
+ }
+
+ local result ;
+ for local i in $(new-sources)
+ {
+ local t = [ generators.construct $(project) $(name) : CPP :
+ $(property-set) : $(i) ] ;
+ result += $(t[2-]) ;
+ }
+ return $(result) ;
+ }
+}
+generators.override $(__name__).wd-to-cpp : $(whale-generator-id) ;
+generators.override $(__name__).wd-to-cpp : $(dolphin-generator-id) ;
+generators.register [ new wd-to-cpp $(__name__).wd-to-cpp : : CPP ] ;
+
+
+################################################################################
+#
+# Declare build targets.
+#
+################################################################################
+
+# This should not cause two CPP --> MY_OBJ constructions for a.cpp or b.cpp.
+my-exe a : a.cpp b.cxx obj_1 obj_2 c.tui d.wd x.l y.x_pro lib//auxilliary ;
+my-exe f : a.cpp b.cxx obj_1 obj_2 lib//auxilliary ;
+
+# This should cause two CPP --> MY_OBJ constructions for z.cpp.
+my-obj obj_1 : z.cpp ;
+my-obj obj_2 : z.cpp ;
+
+nm-exe e : e.cpp ;
+""")
+
+ t.run_build_system()
+ t.expect_addition("bin/" * BoostBuild.List("a.my_exe "
+ "a.my_obj b.my_obj c.tui_h c.cpp c.my_obj d_parser.whl d_lexer.dlp "
+ "d_parser.cpp d_lexer.cpp d_lexer.my_obj d_parser.lr0 d_parser.h "
+ "d_parser.my_obj d_parser_symbols.h x.c x.my_obj y.x1 y.x2 y.cpp "
+ "y.my_obj e.marked_cpp e.positions e.target_cpp e.my_obj e.my_exe "
+ "f.my_exe obj_1.my_obj obj_2.my_obj"))
+ t.expect_addition("lib/bin/" * BoostBuild.List("c.my_obj "
+ "auxilliary.my_lib"))
+ t.expect_nothing_more()
+
+ folder = "bin"
+ t.expect_content_lines("%s/obj_1.my_obj" % folder, " Sources: 'z.cpp'")
+ t.expect_content_lines("%s/obj_2.my_obj" % folder, " Sources: 'z.cpp'")
+ t.expect_content_lines("%s/a.my_obj" % folder, " Sources: 'a.cpp'")
+
+ lines = t.stdout().splitlines()
+ source_lines = [x for x in lines if re.match("^ Sources: '", x)]
+ if not __match_count_is(source_lines, "'z.cpp'", 2):
+ BoostBuild.annotation("failure", "z.cpp must be compiled exactly "
+ "twice.")
+ t.fail_test(1)
+ if not __match_count_is(source_lines, "'a.cpp'", 1):
+ BoostBuild.annotation("failure", "a.cpp must be compiled exactly "
+ "once.")
+ t.fail_test(1)
+ t.cleanup()
+
+
+def test_generated_target_names():
+ """
+ Test generator generated target names. Unless given explicitly, target
+ names should be determined based on their specified source names. All
+ sources for generating a target need to have matching names in order for
+ Boost Build to be able to implicitly determine the target's name.
+
+ We use the following target generation structure with differently named
+ BBX targets:
+ /---> BB1 ---\
+ AAA --<----> BB2 ---->--> CCC --(composing)--> DDD
+ \---> BB3 ---/
+
+ The extra generator at the end is needed because generating a top-level
+ CCC target directly would requires us to explicitly specify a name for it.
+ The extra generator needs to be composing in order not to explicitly
+ request a specific name for its CCC source target based on its own target
+ name.
+
+ We also check for a regression where only the first two sources were
+ checked to see if their names match. Note that we need to try out all file
+ renaming combinations as we do not know what ordering Boost Build is going
+ to use when passing in those files as generator sources.
+
+ """
+ jamfile_template = """\
+import type ;
+type.register AAA : _a ;
+type.register BB1 : _b1 ;
+type.register BB2 : _b2 ;
+type.register BB3 : _b3 ;
+type.register CCC : _c ;
+type.register DDD : _d ;
+
+import appender ;
+appender.register aaa-to-bbX : AAA : BB1%s BB2%s BB3%s ;
+appender.register bbX-to-ccc : BB1 BB2 BB3 : CCC ;
+appender.register ccc-to-ddd composing : CCC : DDD ;
+
+ddd _xxx : _xxx._a ;
+"""
+
+ t = BoostBuild.Tester()
+ __write_appender(t, "appender.jam")
+ t.write("_xxx._a", "")
+
+ def test_one(t, rename1, rename2, rename3, status):
+ def f(rename):
+ if rename: return "(%_x)"
+ return ""
+
+ jamfile = jamfile_template % (f(rename1), f(rename2), f(rename3))
+ t.write("jamroot.jam", jamfile, wait=False)
+
+ # Remove any preexisting targets left over from a previous test run
+ # so we do not have to be careful about tracking which files have been
+ # newly added and which preexisting ones have only been modified.
+ t.rm("bin")
+
+ t.run_build_system(status=status)
+
+ if status:
+ t.expect_output_lines("*.bbX-to-ccc: source targets have "
+ "different names: cannot determine target name")
+ else:
+ def suffix(rename):
+ if rename: return "_x"
+ return ""
+ name = "bin/_xxx"
+ e = t.expect_addition
+ e("%s%s._b1" % (name, suffix(rename1)))
+ e("%s%s._b2" % (name, suffix(rename2)))
+ e("%s%s._b3" % (name, suffix(rename3)))
+ e("%s%s._c" % (name, suffix(rename1 and rename2 and rename3)))
+ e("%s._d" % name)
+ t.expect_nothing_more()
+
+ test_one(t, False, False, False, status=0)
+ test_one(t, True , False, False, status=1)
+ test_one(t, False, True , False, status=1)
+ test_one(t, False, False, True , status=1)
+ test_one(t, True , True , False, status=1)
+ test_one(t, True , False, True , status=1)
+ test_one(t, False, True , True , status=1)
+ test_one(t, True , True , True , status=0)
+ t.cleanup()
+
+
+def __match_count_is(lines, pattern, expected):
+ count = 0
+ for x in lines:
+ if re.search(pattern, x):
+ count += 1
+ if count > expected:
+ return False
+ return count == expected
+
+
+def __write_appender(t, name):
+ t.write(name,
+r"""# Copyright 2012 Jurko Gospodnetic
+# 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)
+
+# Support for registering test generators that construct their targets by
+# simply appending their given input data, e.g. list of sources & targets.
+
+import "class" : new ;
+import generators ;
+import modules ;
+import sequence ;
+
+rule register ( id composing ? : source-types + : target-types + )
+{
+ local caller-module = [ CALLER_MODULE ] ;
+ id = $(caller-module).$(id) ;
+ local g = [ new generator $(id) $(composing) : $(source-types) :
+ $(target-types) ] ;
+ $(g).set-rule-name $(__name__).appender ;
+ generators.register $(g) ;
+ return $(id) ;
+}
+
+if [ modules.peek : NT ]
+{
+ X = ")" ;
+ ECHO_CMD = (echo. ;
+}
+else
+{
+ X = \" ;
+ ECHO_CMD = "echo $(X)" ;
+}
+
+local appender-runs ;
+
+# We set up separate actions for building each target in order to avoid having
+# to iterate over them in action (i.e. shell) code. We have to be extra careful
+# though to achieve the exact same effect as if doing all the work in just one
+# action. Otherwise Boost Jam might, under some circumstances, run only some of
+# our actions. To achieve this we register a series of actions for all the
+# targets (since they all have the same target list - either all or none of them
+# get run independent of which target actually needs to get built), each
+# building only a single target. Since all our actions use the same targets, we
+# can not use 'on-target' parameters to pass data to a specific action so we
+# pass them using the second 'sources' parameter which our actions then know how
+# to interpret correctly. This works well since Boost Jam does not automatically
+# add dependency relations between specified action targets & sources and so the
+# second argument, even though most often used to pass in a list of sources, can
+# actually be used for passing in any type of information.
+rule appender ( targets + : sources + : properties * )
+{
+ appender-runs = [ CALC $(appender-runs:E=0) + 1 ] ;
+ local target-index = 0 ;
+ local target-count = [ sequence.length $(targets) ] ;
+ local original-targets ;
+ for t in $(targets)
+ {
+ target-index = [ CALC $(target-index) + 1 ] ;
+ local appender-run = $(appender-runs) ;
+ if $(targets[2])-defined
+ {
+ appender-run += "[$(target-index)/$(target-count)]" ;
+ }
+ append $(targets) : $(appender-run:J=" ") $(t) $(sources) ;
+ }
+}
+
+actions append
+{
+ $(ECHO_CMD)-------------------------------------------------$(X)
+ $(ECHO_CMD)Appender run: $(>[1])$(X)
+ $(ECHO_CMD)Appender run: $(>[1])$(X)>> "$(>[2])"
+ $(ECHO_CMD)Target group: $(<:J=' ')$(X)
+ $(ECHO_CMD)Target group: $(<:J=' ')$(X)>> "$(>[2])"
+ $(ECHO_CMD) Target: '$(>[2])'$(X)
+ $(ECHO_CMD) Target: '$(>[2])'$(X)>> "$(>[2])"
+ $(ECHO_CMD) Sources: '$(>[3-]:J=' ')'$(X)
+ $(ECHO_CMD) Sources: '$(>[3-]:J=' ')'$(X)>> "$(>[2])"
+ $(ECHO_CMD)=================================================$(X)
+ $(ECHO_CMD)-------------------------------------------------$(X)>> "$(>[2])"
+}
+""")
+
+
+test_basic()
+test_generated_target_names()
diff --git a/src/boost/tools/build/test/implicit_dependency.py b/src/boost/tools/build/test/implicit_dependency.py
new file mode 100644
index 000000000..dac9c7c54
--- /dev/null
+++ b/src/boost/tools/build/test/implicit_dependency.py
@@ -0,0 +1,81 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test the <implicit-dependency> is respected even if the target referred to is
+# not built itself, but only referred to by <implicit-dependency>.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+make a.h : : gen-header ;
+explicit a.h ;
+
+exe hello : hello.cpp : <implicit-dependency>a.h ;
+
+import os ;
+if [ os.name ] = NT
+{
+ actions gen-header
+ {
+ echo int i; > $(<)
+ }
+}
+else
+{
+ actions gen-header
+ {
+ echo "int i;" > $(<)
+ }
+}
+""")
+
+t.write("hello.cpp", """
+#include "a.h"
+int main() { return i; }
+""")
+
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+
+t.rm("bin")
+
+t.write("jamroot.jam", """
+make dir/a.h : : gen-header ;
+explicit dir/a.h ;
+
+exe hello : hello.cpp : <implicit-dependency>dir/a.h ;
+
+import os ;
+if [ os.name ] = NT
+{
+ actions gen-header
+ {
+ echo int i; > $(<)
+ }
+}
+else
+{
+ actions gen-header
+ {
+ echo "int i;" > $(<)
+ }
+}
+""")
+
+t.write("hello.cpp", """
+#include "dir/a.h"
+int main() { return i; }
+""")
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/indirect_conditional.py b/src/boost/tools/build/test/indirect_conditional.py
new file mode 100644
index 000000000..b59c7800d
--- /dev/null
+++ b/src/boost/tools/build/test/indirect_conditional.py
@@ -0,0 +1,148 @@
+#!/usr/bin/python
+
+# Copyright (C) 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)
+
+import BoostBuild
+
+def test_basic():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", """\
+exe a1 : a1.cpp : <conditional>@a1-rule ;
+rule a1-rule ( properties * )
+{
+ if <variant>debug in $(properties)
+ {
+ return <define>OK ;
+ }
+}
+
+exe a2 : a2.cpp : <conditional>@$(__name__).a2-rule
+ <variant>debug:<optimization>speed ;
+rule a2-rule ( properties * )
+{
+ if <optimization>speed in $(properties)
+ {
+ return <define>OK ;
+ }
+}
+
+exe a3 : a3.cpp :
+ <conditional>@$(__name__).a3-rule-1
+ <conditional>@$(__name__).a3-rule-2 ;
+rule a3-rule-1 ( properties * )
+{
+ if <optimization>speed in $(properties)
+ {
+ return <define>OK ;
+ }
+}
+rule a3-rule-2 ( properties * )
+{
+ if <variant>debug in $(properties)
+ {
+ return <optimization>speed ;
+ }
+}
+""")
+
+ t.write("a1.cpp", "#ifdef OK\nint main() {}\n#endif\n")
+ t.write("a2.cpp", "#ifdef OK\nint main() {}\n#endif\n")
+ t.write("a3.cpp", "#ifdef OK\nint main() {}\n#endif\n")
+
+ t.run_build_system()
+
+ t.expect_addition("bin/$toolset/debug*/a1.exe")
+ t.expect_addition("bin/$toolset/debug/optimization-speed*/a2.exe")
+ t.expect_addition("bin/$toolset/debug/optimization-speed*/a3.exe")
+
+ t.cleanup()
+
+def test_inherit():
+ """Tests that paths etc. are handled correctly when an indirect
+ conditional is inherited by a subproject."""
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("Jamroot.jam", """
+import feature ;
+import indirect ;
+exe d1 : d1.cpp ;
+explicit d1 ;
+project : requirements <conditional>@c1 ;
+build-project subdir ;
+feature.feature myrule : : free ;
+rule c1 ( properties * )
+{
+ return <dependency>d1 <include>include <myrule>@parent-generate ;
+}
+rule parent-generate ( project name : property-set : sources * )
+{
+ return $(sources) ;
+}
+rule my-generate ( project name : property-set : sources * )
+{
+ local r = [ $(property-set).get <myrule> ] ;
+ r = [ MATCH @(.*) : $(r) ] ;
+ return [ indirect.call
+ $(r) $(project) $(name) : $(property-set) : $(sources) ] ;
+}
+""")
+ t.write("d1.cpp", "int main(){}\n")
+ t.write("subdir/Jamfile", """
+generate srcs : main.cpp : <generating-rule>@my-generate ;
+exe main : srcs ;
+""")
+ t.write("include/a.h", "")
+ t.write("subdir/main.cpp", "#include <a.h>\nint main() {}\n")
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug*/d1.obj")
+ t.expect_addition("bin/$toolset/debug*/d1.exe")
+ t.expect_addition("subdir/bin/$toolset/debug*/main.obj")
+ t.expect_addition("subdir/bin/$toolset/debug*/main.exe")
+ t.expect_nothing_more()
+ t.cleanup()
+
+def test_glob_in_indirect_conditional():
+ """
+ Regression test: project-rules.glob rule run from inside an indirect
+ conditional should report an error as it depends on the 'currently loaded
+ project' concept and indirect conditional rules get called only after all
+ the project modules have already finished loading.
+
+ """
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", """\
+use-project /library-example/foo : util/foo ;
+build-project app ;
+""")
+ t.write("app/app.cpp", "int main() {}\n");
+ t.write("app/jamfile.jam", "exe app : app.cpp /library-example/foo//bar ;")
+ t.write("util/foo/bar.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo() {}
+""")
+ t.write("util/foo/jamfile.jam", """\
+rule print-my-sources ( properties * )
+{
+ ECHO My sources: ;
+ ECHO [ glob *.cpp ] ;
+}
+lib bar : bar.cpp : <conditional>@print-my-sources ;
+""")
+
+ t.run_build_system(status=1)
+ t.expect_output_lines(["My sources:", "bar.cpp"], False)
+ t.expect_output_lines("error: Reference to the project currently being "
+ "loaded requested when there was no project module being loaded.")
+
+ t.cleanup()
+
+
+test_basic()
+test_inherit()
+test_glob_in_indirect_conditional()
diff --git a/src/boost/tools/build/test/inherit_toolset.py b/src/boost/tools/build/test/inherit_toolset.py
new file mode 100644
index 000000000..f80b1fec7
--- /dev/null
+++ b/src/boost/tools/build/test/inherit_toolset.py
@@ -0,0 +1,100 @@
+#!/usr/bin/python
+
+# 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)
+
+import BoostBuild
+import string
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("a.cpp", "\n")
+
+t.write("yfc1.jam", """\
+import feature ;
+import generators ;
+
+feature.extend toolset : yfc1 ;
+rule init ( ) { }
+
+generators.register-standard yfc1.compile : CPP : OBJ : <toolset>yfc1 ;
+generators.register-standard yfc1.link : OBJ : EXE : <toolset>yfc1 ;
+
+actions compile { yfc1-compile }
+actions link { yfc1-link }
+""")
+
+t.write(
+ 'yfc1.py',
+"""
+from b2.build import feature, generators
+from b2.manager import get_manager
+
+MANAGER = get_manager()
+ENGINE = MANAGER.engine()
+
+feature.extend('toolset', ['yfc1'])
+
+generators.register_standard('yfc1.compile', ['CPP'], ['OBJ'], ['<toolset>yfc1'])
+generators.register_standard('yfc1.link', ['OBJ'], ['EXE'], ['<toolset>yfc1'])
+
+ENGINE.register_action(
+ 'yfc1.compile',
+ 'yfc1-compile'
+)
+
+ENGINE.register_action(
+ 'yfc1.link',
+ 'yfc1-link'
+)
+
+def init(*args):
+ pass
+
+"""
+)
+
+t.write("yfc2.jam", """\
+import feature ;
+import toolset ;
+
+feature.extend toolset : yfc2 ;
+toolset.inherit yfc2 : yfc1 ;
+rule init ( ) { }
+
+actions link { yfc2-link }
+""")
+
+t.write(
+ 'yfc2.py',
+"""
+from b2.build import feature, toolset
+from b2.manager import get_manager
+
+MANAGER = get_manager()
+ENGINE = MANAGER.engine()
+
+feature.extend('toolset', ['yfc2'])
+toolset.inherit('yfc2', 'yfc1')
+
+ENGINE.register_action('yfc2.link', 'yfc2-link')
+
+def init(*args):
+ pass
+"""
+)
+
+t.write("jamfile.jam", "exe a : a.cpp ;")
+t.write("jamroot.jam", "using yfc1 ;")
+
+t.run_build_system(["-n", "-d2", "yfc1"])
+t.fail_test(t.stdout().find("yfc1-link") == -1)
+
+# Make sure we do not have to explicitly 'use' yfc1.
+t.write("jamroot.jam", "using yfc2 ;")
+
+t.run_build_system(["-n", "-d2", "yfc2"])
+t.fail_test(t.stdout().find("yfc2-link") == -1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/inherited_dependency.py b/src/boost/tools/build/test/inherited_dependency.py
new file mode 100755
index 000000000..ae939f487
--- /dev/null
+++ b/src/boost/tools/build/test/inherited_dependency.py
@@ -0,0 +1,237 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2008 Steven Watanabe
+#
+# 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 BoostBuild
+
+tester = BoostBuild.Tester(use_test_config=False)
+
+
+################################################################################
+#
+# Test without giving the project an explicit id.
+#
+################################################################################
+
+tester.write("jamroot.jam", """
+lib test : test.cpp ;
+project : requirements <library>test ;
+build-project a ;
+""")
+
+tester.write("test.cpp", """
+#ifdef _WIN32
+ __declspec(dllexport)
+#endif
+void foo() {}
+""")
+
+tester.write("a/test1.cpp", """
+int main() {}
+""")
+
+tester.write("a/jamfile.jam", """
+exe test1 : test1.cpp ;
+""")
+
+tester.run_build_system()
+
+tester.expect_addition("bin/$toolset/debug*/test.obj")
+tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
+
+tester.rm("bin")
+tester.rm("a/bin")
+
+
+################################################################################
+#
+# Run the same test from the "a" directory.
+#
+################################################################################
+
+tester.run_build_system(subdir="a")
+
+tester.expect_addition("bin/$toolset/debug*/test.obj")
+tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
+
+tester.rm("bin")
+tester.rm("a/bin")
+
+
+################################################################################
+#
+# This time, do give the project an id.
+#
+################################################################################
+
+tester.write("jamroot.jam", """
+lib test : test.cpp ;
+project test_project : requirements <library>test ;
+build-project a ;
+""")
+
+tester.run_build_system()
+
+tester.expect_addition("bin/$toolset/debug*/test.obj")
+tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
+
+tester.rm("bin")
+tester.rm("a/bin")
+
+
+################################################################################
+#
+# Now, give the project an id in its attributes.
+#
+################################################################################
+
+tester.write("jamroot.jam", """
+lib test : test.cpp ;
+project : id test_project : requirements <library>test ;
+build-project a ;
+""")
+
+tester.run_build_system()
+
+tester.expect_addition("bin/$toolset/debug*/test.obj")
+tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
+
+tester.rm("bin")
+tester.rm("a/bin")
+
+
+################################################################################
+#
+# Give the project an id in both ways at once.
+#
+################################################################################
+
+tester.write("jamroot.jam", """
+lib test : test.cpp ;
+project test_project1 : id test_project : requirements <library>test ;
+build-project a ;
+""")
+
+tester.run_build_system()
+
+tester.expect_addition("bin/$toolset/debug*/test.obj")
+tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
+
+tester.rm("bin")
+tester.rm("a/bin")
+
+
+################################################################################
+#
+# Test an absolute path in native format.
+#
+################################################################################
+
+tester.write("jamroot.jam", """
+import path ;
+path-constant here : . ;
+current-location = [ path.native [ path.root [ path.make $(here) ] [ path.pwd ]
+ ] ] ;
+project test : requirements <source>$(current-location)/a/test1.cpp ;
+exe test : test.cpp ;
+""")
+
+tester.run_build_system()
+tester.expect_addition("bin/$toolset/debug*/test.exe")
+
+tester.rm("bin")
+tester.rm("a/bin")
+
+
+################################################################################
+#
+# Test an absolute path in canonical format.
+#
+################################################################################
+
+tester.write("jamroot.jam", """
+import path ;
+path-constant here : . ;
+current-location = [ path.root [ path.make $(here) ] [ path.pwd ] ] ;
+project test : requirements <source>$(current-location)/a/test1.cpp ;
+exe test : test.cpp ;
+""")
+
+tester.run_build_system()
+tester.expect_addition("bin/$toolset/debug*/test.exe")
+
+tester.rm("bin")
+tester.rm("a/bin")
+
+
+################################################################################
+#
+# Test dependency properties (e.g. <source>) whose targets are specified using a
+# relative path.
+#
+################################################################################
+
+# Use jamroot.jam rather than jamfile.jam to avoid inheriting the <source> from
+# the parent as that would would make test3 a source of itself.
+tester.write("b/jamroot.jam", """
+obj test3 : test3.cpp ;
+""")
+
+tester.write("b/test3.cpp", """
+void bar() {}
+""")
+
+tester.write("jamroot.jam", """
+project test : requirements <source>b//test3 ;
+build-project a ;
+""")
+
+tester.write("a/jamfile.jam", """
+exe test : test1.cpp ;
+""")
+
+tester.write("a/test1.cpp", """
+void bar();
+int main() { bar(); }
+""")
+
+tester.run_build_system()
+tester.expect_addition("b/bin/$toolset/debug*/test3.obj")
+tester.expect_addition("a/bin/$toolset/debug*/test.exe")
+
+tester.rm("bin")
+tester.rm("a")
+tester.rm("jamroot.jam")
+tester.rm("test.cpp")
+
+
+################################################################################
+#
+# Test that source-location is respected.
+#
+################################################################################
+
+tester.write("build/jamroot.jam", """
+project : requirements <source>test.cpp : source-location ../src ;
+""")
+
+tester.write("src/test.cpp", """
+int main() {}
+""")
+
+tester.write("build/a/jamfile.jam", """
+project : source-location ../../a_src ;
+exe test : test1.cpp ;
+""")
+
+tester.write("a_src/test1.cpp", """
+""")
+
+tester.run_build_system(subdir="build/a")
+tester.expect_addition("build/a/bin/$toolset/debug*/test.exe")
+
+tester.cleanup()
diff --git a/src/boost/tools/build/test/inline.py b/src/boost/tools/build/test/inline.py
new file mode 100644
index 000000000..03d91a5d0
--- /dev/null
+++ b/src/boost/tools/build/test/inline.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+
+# 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """\
+project : requirements <link>static ;
+exe a : a.cpp [ lib helper : helper.cpp ] ;
+""")
+
+t.write("a.cpp", """\
+extern void helper();
+int main() {}
+""")
+
+t.write("helper.cpp", "void helper() {}\n")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a__helper.lib")
+t.rm("bin/$toolset/debug*/a__helper.lib")
+
+t.run_build_system(["a__helper"])
+t.expect_addition("bin/$toolset/debug*/a__helper.lib")
+
+t.rm("bin")
+
+
+# Now check that inline targets with the same name but present in different
+# places are not confused between each other, and with top-level targets.
+t.write("jamroot.jam", """\
+project : requirements <link>static ;
+exe a : a.cpp [ lib helper : helper.cpp ] ;
+exe a2 : a.cpp [ lib helper : helper.cpp ] ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
+t.expect_addition("bin/$toolset/debug*/a__helper.lib")
+t.expect_addition("bin/$toolset/debug*/a2__helper.lib")
+
+
+# Check that the 'alias' target does not change the name of inline targets, and
+# that inline targets are explicit.
+t.write("jamroot.jam", """\
+project : requirements <link>static ;
+alias a : [ lib helper : helper.cpp ] ;
+explicit a ;
+""")
+t.rm("bin")
+
+t.run_build_system()
+t.expect_nothing_more()
+
+t.run_build_system(["a"])
+t.expect_addition("bin/$toolset/debug*/helper.lib")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/lib_source_property.py b/src/boost/tools/build/test/lib_source_property.py
new file mode 100644
index 000000000..24a90773c
--- /dev/null
+++ b/src/boost/tools/build/test/lib_source_property.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Regression test: if a library had no explicit sources, but only <source>
+# properties, it was built as if it were a searched library, and the specified
+# sources were not compiled.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+lib a : : <source>a.cpp ;
+""")
+
+t.write("a.cpp", """
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo() {}
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.obj")
+
+t.rm("bin")
+
+
+# Now try with <conditional>.
+t.write("jamroot.jam", """
+rule test ( properties * )
+{
+ return <source>a.cpp ;
+}
+lib a : : <conditional>@test ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.obj")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/lib_zlib.py b/src/boost/tools/build/test/lib_zlib.py
new file mode 100755
index 000000000..04d32ba70
--- /dev/null
+++ b/src/boost/tools/build/test/lib_zlib.py
@@ -0,0 +1,184 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# 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 BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("zlib/zlib.h", 'zlib')
+t.write("zlib/deflate.c", 'deflate')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zlib : : <source>$(here)/zlib ;
+alias zlib : /zlib//zlib : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('deflate.c', 'deflate')
+action('-c -x c -I./zlib -o $deflate.o $deflate.c')
+action('-c -x c -I./zlib -DZLIB_DLL -o $deflate-shared.o $deflate.c')
+action('--dll $deflate-shared.o -o $deflate.so')
+action('--archive $deflate.o -o $deflate.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/zlib/mock/debug/z.dll')
+t.expect_addition('bin/standalone/zlib/mock/debug/link-static/z.lib')
+
+# Build from source specified in the environment
+t.rm('bin')
+t.rm('zlib')
+
+t.write("zlib root/zlib.h", 'zlib')
+t.write("zlib root/deflate.c", 'deflate')
+
+t.write("Jamroot.jam", """
+using zlib ;
+alias zlib : /zlib//zlib : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('deflate.c', 'deflate')
+action(['-c', '-x', 'c', '-I./zlib root', '-o', '$deflate.o', '$deflate.c'])
+action(['-c', '-x', 'c', '-I./zlib root', '-DZLIB_DLL', '-o', '$deflate-shared.o', '$deflate.c'])
+action('--dll $deflate-shared.o -o $deflate.so')
+action('--archive $deflate.o -o $deflate.a')
+''')
+t.run_build_system(['-sZLIB_SOURCE=zlib root'])
+t.expect_addition('bin/standalone/zlib/mock/debug/z.dll')
+t.expect_addition('bin/standalone/zlib/mock/debug/link-static/z.lib')
+
+
+t.rm('zlib root')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('zlib.h.cpp', '#include <zlib.h>\\n')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zlib ;
+exe test : test.cpp /zlib//zlib : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=z -o $config.exe')
+action('-c -x c++ $zlib.h.cpp -o $zlib.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=z -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zlib ;
+exe test : test.cpp /zlib//zlib : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=z -o $config.exe')
+action('-c -x c++ $zlib.h.cpp -o $zlib.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=z -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zlib : : <name>myzlib <include>$(here)/zlib <search>$(here)/zlib ;
+exe test : test.cpp /zlib//zlib : : <link>static <link>shared ;
+""")
+
+t.write('zlib/zlib.h', 'zlib')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./zlib --static-lib=myzlib -o $config.exe')
+action('-c -x c++ $test.cpp -I./zlib -o $test.o')
+action('$test.o -L./zlib --static-lib=myzlib -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zlib : : <name>myzlib <include>$(here)/zlib <search>$(here)/zlib ;
+exe test : test.cpp /zlib//zlib : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./zlib --shared-lib=myzlib -o $config.exe')
+action('-c -x c++ $test.cpp -I./zlib -o $test.o')
+action('$test.o -L./zlib --shared-lib=myzlib -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - both static and shared libraries
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zlib : : <name>myzlib <include>$(here)/zlib <search>$(here)/zlib ;
+exe test : test.cpp /zlib//zlib
+ : <link>shared:<define>SHARED : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./zlib --static-lib=myzlib -o $config.exe')
+action('$main.o -L./zlib --shared-lib=myzlib -o $config.exe')
+action('-c -x c++ $test.cpp -I./zlib -o $test-static.o')
+action('-c -x c++ $test.cpp -I./zlib -DSHARED -o $test-shared.o')
+action('$test-static.o -L./zlib --static-lib=myzlib -o $test')
+action('$test-shared.o -L./zlib --shared-lib=myzlib -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization from the environment
+t.rm('bin')
+t.write('Jamroot.jam', """
+using zlib ;
+exe test : test.cpp /zlib//zlib
+ : : <link>static <link>shared ;
+""")
+t.write('zlib root/zlib.h', 'zlib')
+MockToolset.set_expected(t, common_stuff + '''
+action(['$main.o', '-L./zlib root', '--shared-lib=myzlib', '-o', '$config.exe'])
+action(['-c', '-x', 'c++', '$test.cpp', '-I./zlib root', '-o', '$test.o'])
+action(['$test.o', '-L./zlib root', '--shared-lib=myzlib', '-o', '$test'])
+''')
+t.run_build_system(['-sZLIB_INCLUDE=zlib root',
+ '-sZLIB_LIBRARY_PATH=zlib root',
+ '-sZLIB_NAME=myzlib'])
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/libjpeg.py b/src/boost/tools/build/test/libjpeg.py
new file mode 100755
index 000000000..e6a5c2ba2
--- /dev/null
+++ b/src/boost/tools/build/test/libjpeg.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# 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 BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("libjpeg/jpeglib.h", 'libjpeg')
+t.write("libjpeg/jerror.c", 'jpeg')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg : : <source>$(here)/libjpeg ;
+alias libjpeg : /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('jerror.c', 'jpeg')
+action('-c -x c -I./libjpeg -o $jerror.o $jerror.c')
+action('--dll $jerror.o -o $jpeg.so')
+action('--archive $jerror.o -o $jpeg.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/libjpeg/mock/debug/jpeg.dll')
+t.expect_addition('bin/standalone/libjpeg/mock/debug/link-static/jpeg.lib')
+
+t.rm('libjpeg')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('jpeg.h.cpp', '#include <stdio.h>\\n#include <jpeglib.h>\\n')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=jpeg -o $config.exe')
+action('-c -x c++ $jpeg.h.cpp -o $jpeg.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=jpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=jpeg -o $config.exe')
+action('-c -x c++ $jpeg.h.cpp -o $jpeg.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=jpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg : : <name>mylibjpeg <include>$(here)/libjpeg <search>$(here)/libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+t.write('libjpeg/jpeglib.h', 'libjpeg')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libjpeg --static-lib=mylibjpeg -o $config.exe')
+action('-c -x c++ $test.cpp -I./libjpeg -o $test.o')
+action('$test.o -L./libjpeg --static-lib=mylibjpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libjpeg : : <name>mylibjpeg <include>$(here)/libjpeg <search>$(here)/libjpeg ;
+exe test : test.cpp /libjpeg//libjpeg : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libjpeg --shared-lib=mylibjpeg -o $config.exe')
+action('-c -x c++ $test.cpp -I./libjpeg -o $test.o')
+action('$test.o -L./libjpeg --shared-lib=mylibjpeg -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/liblzma.py b/src/boost/tools/build/test/liblzma.py
new file mode 100755
index 000000000..6bc767fbb
--- /dev/null
+++ b/src/boost/tools/build/test/liblzma.py
@@ -0,0 +1,118 @@
+#!/usr/bin/python
+
+# Copy-paste-modify from zlib.py
+# Copyright (C) 2013 Steven Watanabe
+# 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 BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('lzma.h.cpp', '#include <lzma.h>\\n')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using lzma ;
+exe test : test.cpp /lzma//lzma : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=lzma -o $config.exe')
+action('-c -x c++ $lzma.h.cpp -o $lzma.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=lzma -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using lzma ;
+exe test : test.cpp /lzma//lzma : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=lzma -o $config.exe')
+action('-c -x c++ $lzma.h.cpp -o $lzma.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=lzma -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using lzma : : <name>mylzma <include>$(here)/lzma <search>$(here)/lzma ;
+exe test : test.cpp /lzma//lzma : : <link>static <link>shared ;
+""")
+
+t.write('lzma/lzma.h', 'lzma')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./lzma --static-lib=mylzma -o $config.exe')
+action('-c -x c++ $test.cpp -I./lzma -o $test.o')
+action('$test.o -L./lzma --static-lib=mylzma -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using lzma : : <name>mylzma <include>$(here)/lzma <search>$(here)/lzma ;
+exe test : test.cpp /lzma//lzma : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./lzma --shared-lib=mylzma -o $config.exe')
+action('-c -x c++ $test.cpp -I./lzma -o $test.o')
+action('$test.o -L./lzma --shared-lib=mylzma -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - both static and shared libraries
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using lzma : : <name>mylzma <include>$(here)/lzma <search>$(here)/lzma ;
+exe test : test.cpp /lzma//lzma
+ : <link>shared:<define>SHARED : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./lzma --static-lib=mylzma -o $config.exe')
+action('$main.o -L./lzma --shared-lib=mylzma -o $config.exe')
+action('-c -x c++ $test.cpp -I./lzma -o $test-static.o')
+action('-c -x c++ $test.cpp -I./lzma -DSHARED -o $test-shared.o')
+action('$test-static.o -L./lzma --static-lib=mylzma -o $test')
+action('$test-shared.o -L./lzma --shared-lib=mylzma -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/libpng.py b/src/boost/tools/build/test/libpng.py
new file mode 100755
index 000000000..3e7e5cd2d
--- /dev/null
+++ b/src/boost/tools/build/test/libpng.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# 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 BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("libpng/png.h", 'libpng')
+t.write("libpng/png.c", 'png')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng : : <source>$(here)/libpng ;
+alias libpng : /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('png.c', 'png')
+action('-c -x c -I./libpng -o $png.o $png.c')
+action('--dll $png.o -o $png.so')
+action('--archive $png.o -o $png.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/libpng/mock/debug/png.dll')
+t.expect_addition('bin/standalone/libpng/mock/debug/link-static/png.lib')
+
+t.rm('libpng')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('png.h.cpp', '#include <png.h>')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=png -o $config.exe')
+action('-c -x c++ $png.h.cpp -o $png.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=png -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=png -o $config.exe')
+action('-c -x c++ $png.h.cpp -o $png.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=png -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng : : <name>mylibpng <include>$(here)/libpng <search>$(here)/libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+t.write('libpng/png.h', 'libpng')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libpng --static-lib=mylibpng -o $config.exe')
+action('-c -x c++ $test.cpp -I./libpng -o $test.o')
+action('$test.o -L./libpng --static-lib=mylibpng -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libpng : : <name>mylibpng <include>$(here)/libpng <search>$(here)/libpng ;
+exe test : test.cpp /libpng//libpng : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libpng --shared-lib=mylibpng -o $config.exe')
+action('-c -x c++ $test.cpp -I./libpng -o $test.o')
+action('$test.o -L./libpng --shared-lib=mylibpng -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/library_chain.py b/src/boost/tools/build/test/library_chain.py
new file mode 100644
index 000000000..6a977cda6
--- /dev/null
+++ b/src/boost/tools/build/test/library_chain.py
@@ -0,0 +1,152 @@
+#!/usr/bin/python
+
+# Copyright 2003, 2004, 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)
+
+# Test that a chain of libraries works ok, no matter if we use static or shared
+# linking.
+
+import BoostBuild
+import os
+import string
+import sys
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# Stage the binary, so that it will be relinked without hardcode-dll-paths.
+# That will check that we pass correct -rpath-link, even if not passing -rpath.
+t.write("jamfile.jam", """\
+stage dist : main ;
+exe main : main.cpp b ;
+""")
+
+t.write("main.cpp", """\
+void foo();
+int main() { foo(); }
+""")
+
+t.write("jamroot.jam", "")
+
+t.write("a/a.cpp", """\
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+gee() {}
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+geek() {}
+""")
+
+t.write("a/jamfile.jam", "lib a : a.cpp ;")
+
+t.write("b/b.cpp", """\
+void geek();
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+foo() { geek(); }
+""")
+
+t.write("b/jamfile.jam", "lib b : b.cpp ../a//a ;")
+
+t.run_build_system(["-d2"], stderr=None)
+t.expect_addition("bin/$toolset/debug*/main.exe")
+t.rm(["bin", "a/bin", "b/bin"])
+
+t.run_build_system(["link=static"])
+t.expect_addition("bin/$toolset/debug/link-static*/main.exe")
+t.rm(["bin", "a/bin", "b/bin"])
+
+
+# Check that <library> works for static linking.
+t.write("b/jamfile.jam", "lib b : b.cpp : <library>../a//a ;")
+
+t.run_build_system(["link=static"])
+t.expect_addition("bin/$toolset/debug/link-static*/main.exe")
+
+t.rm(["bin", "a/bin", "b/bin"])
+
+t.write("b/jamfile.jam", "lib b : b.cpp ../a//a/<link>shared : <link>static ;")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/main.exe")
+
+t.rm(["bin", "a/bin", "b/bin"])
+
+
+# Test that putting a library in sources of a searched library works.
+t.write("jamfile.jam", """\
+exe main : main.cpp png ;
+lib png : z : <name>png ;
+lib z : : <name>zzz ;
+""")
+
+t.run_build_system(["-a", "-d+2"], status=None, stderr=None)
+# Try to find the "zzz" string either in response file (for Windows compilers),
+# or in the standard output.
+rsp = t.adjust_names("bin/$toolset/debug*/main.exe.rsp")[0]
+if os.path.exists(rsp) and ( open(rsp).read().find("zzz") != -1 ):
+ pass
+elif t.stdout().find("zzz") != -1:
+ pass
+else:
+ t.fail_test(1)
+
+# Test main -> libb -> liba chain in the case where liba is a file and not a
+# B2 target.
+t.rm(".")
+
+t.write("jamroot.jam", "")
+t.write("a/jamfile.jam", """\
+lib a : a.cpp ;
+install dist : a ;
+""")
+
+t.write("a/a.cpp", """\
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+void a() {}
+""")
+
+t.run_build_system(subdir="a")
+t.expect_addition("a/dist/a.dll")
+
+if sys.platform == 'win32':
+ # This is a Windows import library.
+ file = t.adjust_name("a.implib")
+else:
+ file = t.adjust_name("a.dll")
+
+t.write("b/jamfile.jam", "lib b : b.cpp ../a/dist/%s ;" % file)
+
+t.write("b/b.cpp", """\
+#if defined(_WIN32)
+__declspec(dllimport)
+#endif
+void a();
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+void b() { a(); }
+""")
+
+t.write("jamroot.jam", "exe main : main.cpp b//b ;")
+
+t.write("main.cpp", """\
+#if defined(_WIN32)
+__declspec(dllimport)
+#endif
+void b();
+int main() { b(); }
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/main.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/library_order.py b/src/boost/tools/build/test/library_order.py
new file mode 100644
index 000000000..4b0585e00
--- /dev/null
+++ b/src/boost/tools/build/test/library_order.py
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+
+# Copyright 2004 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)
+
+# Test that on compilers sensitive to library order on linker's command line,
+# we generate the correct order.
+
+import BoostBuild
+
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("main.cpp", """\
+void a();
+int main() { a(); }
+""")
+
+t.write("a.cpp", """\
+void b();
+void a() { b(); }
+""")
+
+t.write("b.cpp", """\
+void c();
+void b() { c(); }
+""")
+
+t.write("c.cpp", """\
+void d();
+void c() { d(); }
+""")
+
+t.write("d.cpp", """\
+void d() {}
+""")
+
+# The order of libraries in 'main' is crafted so that we get an error unless we
+# do something about the order ourselves.
+t.write("jamroot.jam", """\
+exe main : main.cpp libd libc libb liba ;
+lib libd : d.cpp ;
+lib libc : c.cpp : <link>static <use>libd ;
+lib libb : b.cpp : <use>libc ;
+lib liba : a.cpp : <use>libb ;
+""")
+
+t.run_build_system(["-d2"])
+t.expect_addition("bin/$toolset/debug*/main.exe")
+
+
+# Test the order between searched libraries.
+t.write("jamroot.jam", """\
+exe main : main.cpp png z ;
+lib png : z : <name>png ;
+lib z : : <name>zzz ;
+""")
+
+t.run_build_system(["-a", "-n", "-d+2"])
+t.fail_test(t.stdout().find("png") > t.stdout().find("zzz"))
+
+t.write("jamroot.jam", """\
+exe main : main.cpp png z ;
+lib png : : <name>png ;
+lib z : png : <name>zzz ;
+""")
+
+t.run_build_system(["-a", "-n", "-d+2"])
+t.fail_test(t.stdout().find("png") < t.stdout().find("zzz"))
+
+
+# Test the order between prebuilt libraries.
+t.write("first.a", "")
+t.write("second.a", "")
+t.write("jamroot.jam", """\
+exe main : main.cpp first second ;
+lib first : second : <file>first.a ;
+lib second : : <file>second.a ;
+""")
+
+t.run_build_system(["-a", "-n", "-d+2"])
+t.fail_test(t.stdout().find("first") > t.stdout().find("second"))
+
+t.write("jamroot.jam", """
+exe main : main.cpp first second ;
+lib first : : <file>first.a ;
+lib second : first : <file>second.a ;
+""")
+
+t.run_build_system(["-a", "-n", "-d+2"])
+t.fail_test(t.stdout().find("first") < t.stdout().find("second"))
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/library_property.py b/src/boost/tools/build/test/library_property.py
new file mode 100644
index 000000000..6dc571440
--- /dev/null
+++ b/src/boost/tools/build/test/library_property.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+
+# Copyright 2004 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)
+
+# Test that the <library> property has no effect on "obj" targets. Previously,
+# it affected all targets, so
+#
+# project : requirements <library>foo ;
+# exe a : a.cpp helper ;
+# obj helper : helper.cpp : <optimization>off ;
+#
+# caused 'foo' to be built with and without optimization.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+project : requirements <library>lib//x ;
+exe a : a.cpp foo ;
+obj foo : foo.cpp : <variant>release ;
+""")
+
+t.write("a.cpp", """
+void aux();
+int main() { aux(); }
+""")
+
+t.write("foo.cpp", """
+void gee();
+void aux() { gee(); }
+""")
+
+t.write("lib/x.cpp", """
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+gee() {}
+""")
+
+t.write("lib/jamfile.jam", """
+lib x : x.cpp ;
+""")
+
+t.write("lib/jamroot.jam", """
+""")
+
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+t.expect_nothing("lib/bin/$toolset/release/x.obj")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/libtiff.py b/src/boost/tools/build/test/libtiff.py
new file mode 100755
index 000000000..cb0d07b0f
--- /dev/null
+++ b/src/boost/tools/build/test/libtiff.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+# Copyright (C) 2013 Steven Watanabe
+# 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 BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Build from source
+t.write("libtiff/tiff.h", 'libtiff')
+t.write("libtiff/tiff.c", 'tiff')
+
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff : : <source>$(here)/libtiff ;
+alias libtiff : /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, '''
+source_file('tiff.c', 'tiff')
+action('-c -x c -I./libtiff -o $tiff.o $tiff.c')
+action('--dll $tiff.o -o $tiff.so')
+action('--archive $tiff.o -o $tiff.a')
+''')
+
+t.run_build_system()
+t.expect_addition('bin/standalone/libtiff/mock/debug/tiff.dll')
+t.expect_addition('bin/standalone/libtiff/mock/debug/link-static/tiff.lib')
+
+t.rm('libtiff')
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('tiff.h.cpp', '#include <tiff.h>')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=tiff -o $config.exe')
+action('-c -x c++ $tiff.h.cpp -o $tiff.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=tiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=tiff -o $config.exe')
+action('-c -x c++ $tiff.h.cpp -o $tiff.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=tiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff : : <name>mylibtiff <include>$(here)/libtiff <search>$(here)/libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+t.write('libtiff/tiff.h', 'libtiff')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libtiff --static-lib=mylibtiff -o $config.exe')
+action('-c -x c++ $test.cpp -I./libtiff -o $test.o')
+action('$test.o -L./libtiff --static-lib=mylibtiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using libtiff : : <name>mylibtiff <include>$(here)/libtiff <search>$(here)/libtiff ;
+exe test : test.cpp /libtiff//libtiff : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./libtiff --shared-lib=mylibtiff -o $config.exe')
+action('-c -x c++ $test.cpp -I./libtiff -o $test.o')
+action('$test.o -L./libtiff --shared-lib=mylibtiff -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/libzstd.py b/src/boost/tools/build/test/libzstd.py
new file mode 100755
index 000000000..c582c6ad9
--- /dev/null
+++ b/src/boost/tools/build/test/libzstd.py
@@ -0,0 +1,118 @@
+#!/usr/bin/python
+
+# Copy-paste-modify from zlib.py
+# Copyright (C) 2013 Steven Watanabe
+# 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 BoostBuild
+import MockToolset
+
+t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0)
+
+MockToolset.create(t)
+
+# Generic definitions that aren't configuration specific
+common_stuff = '''
+source_file('test.cpp', 'test.cpp')
+source_file('main.cpp', 'int main() {}')
+source_file('zstd.h.cpp', '#include <zstd.h>\\n')
+action('-c -x c++ $main.cpp -o $main.o')
+'''
+t.write('test.cpp', 'test.cpp')
+
+# Default initialization - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zstd ;
+exe test : test.cpp /zstd//zstd : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --static-lib=zstd -o $config.exe')
+action('-c -x c++ $zstd.h.cpp -o $zstd.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --static-lib=zstd -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Default initialization - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zstd ;
+exe test : test.cpp /zstd//zstd : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o --shared-lib=zstd -o $config.exe')
+action('-c -x c++ $zstd.h.cpp -o $zstd.h.o')
+action('-c -x c++ $test.cpp -o $test.o')
+action('$test.o --shared-lib=zstd -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - static library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zstd : : <name>myzstd <include>$(here)/zstd <search>$(here)/zstd ;
+exe test : test.cpp /zstd//zstd : : <link>static <link>shared ;
+""")
+
+t.write('zstd/zstd.h', 'zstd')
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./zstd --static-lib=myzstd -o $config.exe')
+action('-c -x c++ $test.cpp -I./zstd -o $test.o')
+action('$test.o -L./zstd --static-lib=myzstd -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - shared library
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zstd : : <name>myzstd <include>$(here)/zstd <search>$(here)/zstd ;
+exe test : test.cpp /zstd//zstd : : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./zstd --shared-lib=myzstd -o $config.exe')
+action('-c -x c++ $test.cpp -I./zstd -o $test.o')
+action('$test.o -L./zstd --shared-lib=myzstd -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+# Initialization in explicit location - both static and shared libraries
+t.rm('bin')
+t.write("Jamroot.jam", """
+path-constant here : . ;
+using zstd : : <name>myzstd <include>$(here)/zstd <search>$(here)/zstd ;
+exe test : test.cpp /zstd//zstd
+ : <link>shared:<define>SHARED : <link>static <link>shared ;
+""")
+
+MockToolset.set_expected(t, common_stuff + '''
+action('$main.o -L./zstd --static-lib=myzstd -o $config.exe')
+action('$main.o -L./zstd --shared-lib=myzstd -o $config.exe')
+action('-c -x c++ $test.cpp -I./zstd -o $test-static.o')
+action('-c -x c++ $test.cpp -I./zstd -DSHARED -o $test-shared.o')
+action('$test-static.o -L./zstd --static-lib=myzstd -o $test')
+action('$test-shared.o -L./zstd --shared-lib=myzstd -o $test')
+''')
+t.run_build_system()
+t.expect_addition('bin/mock/debug/test.exe')
+t.expect_addition('bin/mock/debug/link-static/test.exe')
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/link.py b/src/boost/tools/build/test/link.py
new file mode 100755
index 000000000..e0524ef0e
--- /dev/null
+++ b/src/boost/tools/build/test/link.py
@@ -0,0 +1,350 @@
+#!/usr/bin/python
+
+# Copyright 2014-2015 Steven Watanabe
+# 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)
+
+# Tests the link-directory rule used to create the
+# common boost/ directory in the new git layout.
+
+import BoostBuild
+
+def ignore_config(t):
+ """These files are created by the configuration logic in link.jam
+ They may or may not exist, depending on the system."""
+ t.ignore("bin/symlink/test-hardlink")
+ t.ignore("bin/test-hardlink-source")
+ t.ignore("bin/test-symlink")
+ t.ignore("bin/test-symlink-source")
+
+def test_basic():
+ """Test creation of a single link"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+
+ t.run_build_system()
+
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ ignore_config(t)
+ t.expect_nothing_more()
+ t.cleanup()
+
+def test_merge_two():
+ """Test merging two directories"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file2.h", "file2")
+
+ t.run_build_system()
+
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ t.expect_addition("include/file2.h")
+ t.expect_content("include/file2.h", "file2")
+ ignore_config(t)
+ t.expect_nothing_more()
+ t.cleanup()
+
+def test_merge_existing(group1, group2):
+ """Test adding a link when a different symlink already exists"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file2.h", "file2")
+
+ t.run_build_system(group1)
+
+ if "dir1-link" in group1:
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ if "dir2-link" in group1:
+ t.expect_addition("include/file2.h")
+ t.expect_content("include/file2.h", "file2")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.run_build_system(group2)
+
+ if "dir1-link" in group2:
+ if "dir1-link" not in group1:
+ t.expect_addition("include/file1.h")
+ else:
+ # When a directory is split the link needs to be recreated.
+ # On Windows, the test system checks the mod time of the
+ # link rather than the link target, so this may be seen as
+ # an update.
+ t.ignore_touch("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ else:
+ t.ignore_removal("include/file1.h")
+
+ if "dir2-link" in group2:
+ if "dir2-link" not in group1:
+ t.expect_addition("include/file2.h")
+ else:
+ t.ignore_touch("include/file2.h")
+ t.expect_content("include/file2.h", "file2")
+ else:
+ t.ignore_removal("include/file2.h")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_merge_existing_all():
+ test_merge_existing(["dir1-link"], ["dir2-link"])
+ test_merge_existing(["dir2-link"], ["dir1-link"])
+ test_merge_existing(["dir1-link"], ["dir1-link", "dir2-link"])
+ test_merge_existing(["dir2-link"], ["dir1-link", "dir2-link"])
+
+def test_merge_recursive():
+ "Test merging several directories including common prefixes"
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ link-directory dir3-link : src/dir3/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file2.h", "file2")
+ t.write("src/dir2/include/nested/file3.h", "file3")
+ t.write("src/dir3/include/nested/file4.h", "file4")
+
+ t.run_build_system()
+
+ t.expect_addition("include/file1.h")
+ t.expect_content("include/file1.h", "file1")
+ t.expect_addition("include/file2.h")
+ t.expect_content("include/file2.h", "file2")
+ t.expect_addition("include/nested/file3.h")
+ t.expect_content("include/nested/file3.h", "file3")
+ t.expect_addition("include/nested/file4.h")
+ t.expect_content("include/nested/file4.h", "file4")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_merge_recursive_existing(group1, group2):
+ "Test merging several directories including common prefixes."
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ link-directory dir3-link : src/dir3/include : <location>. ;
+ link-directory dir4-link : src/dir4/include : <location>. ;
+ link-directory dir5-link : src/dir5/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/nested/file2.h", "file2")
+ t.write("src/dir3/include/nested/file3.h", "file3")
+ t.write("src/dir4/include/nested/xxx/yyy/file4.h", "file4")
+ t.write("src/dir5/include/nested/xxx/yyy/file5.h", "file5")
+
+ t.run_build_system(group1)
+ t.run_build_system(group2 + ["-d+12"])
+
+ def check_file(target, file):
+ if target in group2:
+ if target in group1:
+ t.ignore_touch(file)
+ else:
+ t.expect_addition(file)
+
+ check_file("dir1-link", "include/file1.h")
+ check_file("dir2-link", "include/nested/file2.h")
+ check_file("dir3-link", "include/nested/file3.h")
+ check_file("dir4-link", "include/nested/xxx/yyy/file4.h")
+ check_file("dir5-link", "include/nested/xxx/yyy/file5.h")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_merge_recursive_existing_all():
+ # These should create a link
+ test_merge_recursive_existing(["dir2-link"], ["dir2-link", "dir1-link"])
+ test_merge_recursive_existing(["dir2-link"], ["dir1-link", "dir2-link"])
+ # These should create a directory
+ test_merge_recursive_existing(["dir2-link"], ["dir2-link", "dir3-link"])
+ test_merge_recursive_existing(["dir2-link"], ["dir3-link", "dir2-link"])
+ # It should work even if we have to create many intermediate subdirectories
+ test_merge_recursive_existing(["dir4-link"], ["dir4-link", "dir5-link"])
+ test_merge_recursive_existing(["dir4-link"], ["dir5-link", "dir4-link"])
+
+def test_include_scan():
+ """Make sure that the #include scanner finds the headers"""
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ obj test : test.cpp :
+ <include>include
+ <implicit-dependency>dir1-link
+ <implicit-dependency>dir2-link ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "#include <file2.h>\n")
+ t.write("src/dir2/include/file2.h", "int f();\n")
+ t.write("test.cpp", """\
+ #include <file1.h>
+ int main() { f(); }
+ """);
+
+ t.run_build_system(["test"])
+
+ t.expect_addition("bin/$toolset/debug*/test.obj")
+
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_include_scan_merge_existing():
+ """Make sure that files are replaced if needed when merging in
+ a new directory"""
+ t = BoostBuild.Tester()
+
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ obj test : test.cpp :
+ <include>include
+ <implicit-dependency>dir1-link
+ <implicit-dependency>dir2-link ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "int f();")
+ t.write("src/dir2/include/file2.h", "#include <file1.h>")
+ t.write("test.cpp", """\
+ #include <file2.h>
+ int main() { f(); }
+ """)
+
+ t.run_build_system(["dir2-link"])
+
+ t.run_build_system(["test"])
+ t.expect_addition("include/file1.h")
+ t.expect_addition("bin/$toolset/debug*/test.obj")
+ t.ignore_touch("include/file2.h")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_update_file_link(params1, params2):
+ """Tests the behavior of updates when changing the link mode.
+ The link needs to be updated iff the original was a copy."""
+ t = BoostBuild.Tester()
+
+ t.write("jamroot.jam", """\
+ import link ;
+ import project ;
+ import property-set ;
+ import modules ;
+
+ if --no-symlinks in [ modules.peek : ARGV ]
+ {
+ modules.poke link : .can-symlink : false ;
+ }
+
+ if --no-hardlinks in [ modules.peek : ARGV ]
+ {
+ modules.poke link : .can-hardlink : false ;
+ }
+
+ .project = [ project.current ] ;
+ .has-files = [ glob include/file1.h ] ;
+
+ rule can-link ( properties * ) {
+ if ( ! [ link.can-symlink $(.project) ] ) &&
+ ( ! [ link.can-hardlink $(.project) ] )
+ {
+ ECHO links unsupported ;
+ }
+ }
+
+ # Use two directories so that we link to individual files.
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ alias check-linking : : <conditional>@can-link ;
+ """)
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file2.h", "file2")
+
+ t.run_build_system(params1)
+ ignore_config(t)
+ t.expect_addition("include/file1.h")
+ t.expect_addition("include/file2.h")
+ t.expect_nothing_more()
+
+ using_links = "links unsupported" not in t.stdout()
+
+ t.touch("src/dir1/include/file1.h")
+
+ t.run_build_system(params2)
+ if not using_links: t.expect_touch("include/file1.h")
+ ignore_config(t)
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_update_file_link_all():
+ """Test all nine possible combinations of two runs."""
+ possible_args = [[], ["--no-symlinks"], ["--no-symlinks", "--no-hardlinks"]]
+ for arg1 in possible_args:
+ for arg2 in possible_args:
+ test_update_file_link(arg1, arg2)
+
+def test_error_duplicate():
+ """Test that linking a single file from
+ multiple sources causes a hard error."""
+ t = BoostBuild.Tester()
+
+ t.write("jamroot.jam", """\
+ import link ;
+ link-directory dir1-link : src/dir1/include : <location>. ;
+ link-directory dir2-link : src/dir2/include : <location>. ;
+ """)
+
+ t.write("src/dir1/include/file1.h", "file1")
+ t.write("src/dir2/include/file1.h", "file2")
+
+ t.run_build_system(status=1)
+ t.expect_output_lines(
+ ["error: Cannot create link include/file1.h to src/dir2/include/file1.h.",
+ "error: Link previously defined to another file, src/dir1/include/file1.h."])
+
+ t.cleanup()
+
+test_basic()
+test_merge_two()
+test_merge_existing_all()
+test_merge_recursive()
+test_merge_recursive_existing_all()
+test_include_scan()
+test_include_scan_merge_existing()
+test_update_file_link_all()
+test_error_duplicate()
diff --git a/src/boost/tools/build/test/load_dir.py b/src/boost/tools/build/test/load_dir.py
new file mode 100644
index 000000000..1b082b1c6
--- /dev/null
+++ b/src/boost/tools/build/test/load_dir.py
@@ -0,0 +1,84 @@
+#!/usr/bin/python
+
+"""
+Traverses a directory and output the code that would create the same directory
+structure during testing. Assumes that the instance of Tester is called 't'.
+"""
+
+from __future__ import print_function
+
+import sys
+import os
+import stat
+import string
+
+def usage():
+ print("usage: load_dir.py directory")
+
+
+def remove_first_component(path):
+ result = [path]
+ while 1:
+ s = os.path.split(result[0])
+ if not s[0]:
+ break
+ result[:1] = list(s)
+ return os.path.join(*result[1:])
+
+
+def create_file(arg, dirname, fnames):
+ for n in fnames:
+ path = os.path.join(dirname, n)
+ if not os.path.isdir(path):
+ print("t.write(\"%s\", \"\"\"" % (remove_first_component(path),),)
+ f = open(path, "r")
+ for l in f:
+ print(l)
+ print('\n""")\n')
+
+
+header = """#!/usr/bin/python
+
+# Copyright (C) FILL SOMETHING HERE 2005.
+# 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 BoostBuild
+
+t = BoostBuild.Tester()
+"""
+
+footer = """
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/FILL_SOME_HERE.exe")
+
+t.cleanup()
+"""
+
+
+def main():
+ if len(sys.argv) != 2:
+ usage()
+ else:
+ path = sys.argv[1]
+
+ if not os.access(path, os.F_OK):
+ print("Path '%s' does not exist" % (path,))
+ sys.exit(1)
+
+ if not os.path.isdir(path):
+ print("Path '%s' is not a directory" % (path,))
+
+ print(header)
+
+ for root, _, files in os.walk(path):
+ create_file(None, root, files)
+
+ print(footer)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/src/boost/tools/build/test/load_order.py b/src/boost/tools/build/test/load_order.py
new file mode 100644
index 000000000..6e0055026
--- /dev/null
+++ b/src/boost/tools/build/test/load_order.py
@@ -0,0 +1,71 @@
+#!/usr/bin/python
+
+# Copyright 2004 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)
+
+# Test that we load parent projects before loading children.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """\
+use-project /child : child ;
+ECHO "Setting parent requirements" ;
+project : requirements <define>PASS_THE_TEST ;
+alias x : child//main ;
+""")
+
+t.write("child/jamfile.jam", """\
+ECHO "Setting child requirements" ;
+project /child ;
+exe main : main.cpp ;
+""")
+
+t.write("child/main.cpp", """\
+#if defined(PASS_THE_TEST)
+int main() {}
+#endif
+""")
+
+t.run_build_system()
+
+t.expect_addition("child/bin/$toolset/debug*/main.exe")
+t.fail_test(t.stdout().find("Setting child requirements") < t.stdout().find(
+ "Setting parent requirements"))
+
+
+# Regression test: parent requirements were ignored in some cases.
+t.rm(".")
+t.write("jamroot.jam", "build-project src ;")
+t.write("src/jamfile.jam", "project : requirements <define>EVERYTHING_OK ;")
+t.write("src/app/jamfile.jam", "exe test : test.cpp ;")
+t.write("src/app/test.cpp", """\
+#ifdef EVERYTHING_OK
+int main() {}
+#endif
+""")
+
+t.run_build_system(subdir="src/app")
+t.expect_addition("src/app/bin/$toolset/debug*/test.exe")
+
+
+# child/child2 used to be loaded before child
+t.rm(".")
+t.write("jamroot.jam", """\
+use-project /child/child2 : child/child2 ;
+rule parent-rule ( )
+{
+ ECHO "Running parent-rule" ;
+}
+""")
+t.write("child/jamfile.jam", "")
+t.write("child/child1/jamfile.jam", "")
+t.write("child/child2/jamfile.jam", "parent-rule ;")
+
+t.run_build_system(subdir="child/child1")
+t.expect_output_lines("Running parent-rule")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/loop.py b/src/boost/tools/build/test/loop.py
new file mode 100644
index 000000000..ffb99181d
--- /dev/null
+++ b/src/boost/tools/build/test/loop.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+# 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)
+
+import BoostBuild
+import string
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", """\
+lib main : main.cpp l ;
+lib l : l.cpp main ;
+""")
+
+t.write("main.cpp", "")
+t.write("l.cpp", "")
+
+t.run_build_system(["--no-error-backtrace"], status=1)
+t.fail_test(t.stdout().find(
+ "error: Recursion in main target references") == -1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/make_rule.py b/src/boost/tools/build/test/make_rule.py
new file mode 100644
index 000000000..ad8fd42fd
--- /dev/null
+++ b/src/boost/tools/build/test/make_rule.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# 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)
+
+# Test the 'make' rule.
+
+import BoostBuild
+import string
+
+t = BoostBuild.Tester(pass_toolset=1)
+
+t.write("jamroot.jam", """\
+import feature ;
+feature.feature test_feature : : free ;
+
+import toolset ;
+toolset.flags creator STRING : <test_feature> ;
+
+actions creator
+{
+ echo $(STRING) > $(<)
+}
+
+make foo.bar : : creator : <test_feature>12345678 ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/foo.bar")
+t.fail_test(t.read("bin/foo.bar").find("12345678") == -1)
+
+
+# Regression test. Make sure that if a main target is requested two times, and
+# build requests differ only in incidental properties, the main target is
+# created only once. The bug was discovered by Kirill Lapshin.
+t.write("jamroot.jam", """\
+exe a : dir//hello1.cpp ;
+exe b : dir//hello1.cpp/<hardcode-dll-paths>true ;
+""")
+
+t.write("dir/jamfile.jam", """\
+import common ;
+make hello1.cpp : hello.cpp : common.copy ;
+""")
+
+t.write("dir/hello.cpp", "int main() {}\n")
+
+# Show only action names.
+t.run_build_system(["-d1", "-n"])
+t.fail_test(t.stdout().count("copy") != 1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/message.py b/src/boost/tools/build/test/message.py
new file mode 100755
index 000000000..30edced4d
--- /dev/null
+++ b/src/boost/tools/build/test/message.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Test for the regression testing framework.
+
+import BoostBuild
+
+# Create a temporary working directory.
+t = BoostBuild.Tester(["-d0"], use_test_config=False)
+
+t.write("Jamroot.jam", """
+project
+ :
+ : usage-requirements <define>TEST=1
+ : default-build <link>static
+;
+message hello : "Hello World!" ;
+alias hello : : <link>shared ;
+obj test : test.cpp hello : <link>static ;
+""")
+
+t.write("test.cpp", """
+#ifndef TEST
+#error TEST not defined
+#endif
+""")
+
+t.run_build_system(["test"], stdout="""Hello World!
+""")
+
+t.expect_addition("bin/$toolset/link-static*/test.obj")
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/module_actions.py b/src/boost/tools/build/test/module_actions.py
new file mode 100644
index 000000000..33c563526
--- /dev/null
+++ b/src/boost/tools/build/test/module_actions.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2006 Rene Rivera
+# Copyright 2003 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)
+
+# Demonstration that module variables have the correct effect in actions.
+
+import BoostBuild
+import os
+import re
+
+t = BoostBuild.Tester(["-d+1"], pass_toolset=0)
+
+t.write("boost-build.jam", "boost-build . ;")
+t.write("bootstrap.jam", """\
+# Top-level rule causing a target to be built by invoking the specified action.
+rule make ( target : sources * : act )
+{
+ DEPENDS all : $(target) ;
+ DEPENDS $(target) : $(sources) ;
+ $(act) $(target) : $(sources) ;
+}
+
+X1 = X1-global ;
+X2 = X2-global ;
+X3 = X3-global ;
+
+module A
+{
+ X1 = X1-A ;
+
+ rule act ( target )
+ {
+ NOTFILE $(target) ;
+ ALWAYS $(target) ;
+ }
+
+ actions act { echo A.act $(<): $(X1) $(X2) $(X3) }
+
+ make t1 : : A.act ;
+ make t2 : : A.act ;
+ make t3 : : A.act ;
+}
+
+module B
+{
+ X2 = X2-B ;
+
+ actions act { echo B.act $(<): $(X1) $(X2) $(X3) }
+
+ make t1 : : B.act ;
+ make t2 : : B.act ;
+ make t3 : : B.act ;
+}
+
+actions act { echo act $(<): $(X1) $(X2) $(X3) }
+
+make t1 : : act ;
+make t2 : : act ;
+make t3 : : act ;
+
+X1 on t1 = X1-t1 ;
+X2 on t2 = X2-t2 ;
+X3 on t3 = X3-t3 ;
+
+DEPENDS all : t1 t2 t3 ;
+""")
+
+expected_lines = [
+ "...found 4 targets...",
+ "...updating 3 targets...",
+ "A.act t1",
+ "A.act t1: X1-t1 ",
+ "B.act t1",
+ "B.act t1: X1-t1 X2-B ",
+ "act t1",
+ "act t1: X1-t1 X2-global X3-global ",
+ "A.act t2",
+ "A.act t2: X1-A X2-t2 ",
+ "B.act t2",
+ "B.act t2: X2-t2 ",
+ "act t2",
+ "act t2: X1-global X2-t2 X3-global ",
+ "A.act t3",
+ "A.act t3: X1-A X3-t3 ",
+ "B.act t3",
+ "B.act t3: X2-B X3-t3 ",
+ "act t3",
+ "act t3: X1-global X2-global X3-t3 ",
+ "...updated 3 targets...",
+ ""]
+
+# Accommodate for the fact that on Unixes, a call to 'echo 1 2 3 '
+# produces '1 2 3' (note the spacing).
+if os.name != 'nt':
+ expected_lines = [re.sub(" +", " ", x.rstrip()) for x in expected_lines]
+
+t.run_build_system()
+t.expect_output_lines(expected_lines)
+t.expect_nothing_more()
+t.cleanup()
diff --git a/src/boost/tools/build/test/ndebug.py b/src/boost/tools/build/test/ndebug.py
new file mode 100644
index 000000000..87fbc6c6d
--- /dev/null
+++ b/src/boost/tools/build/test/ndebug.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+# 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)
+
+# Test that building with optimization brings NDEBUG define, and, more
+# importantly, that dependency targets are built with NDEBUG as well, even if
+# they are not directly requested.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "exe hello : hello.cpp lib//lib1 ;")
+t.write("hello.cpp", """\
+#ifdef NDEBUG
+void foo();
+int main() { foo(); }
+#endif
+""")
+t.write("lib/jamfile.jam", "lib lib1 : lib1.cpp ;")
+t.write("lib/lib1.cpp", """\
+#ifdef NDEBUG
+void foo() {}
+#endif
+""")
+
+# 'release' builds should get the NDEBUG define. We use static linking to avoid
+# messing with imports/exports on Windows.
+t.run_build_system(["link=static", "release"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/no_type.py b/src/boost/tools/build/test/no_type.py
new file mode 100644
index 000000000..0384ec604
--- /dev/null
+++ b/src/boost/tools/build/test/no_type.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+# Copyright 2002 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)
+
+# Test that we cannot specify targets of unknown type as sources. This is based
+# on the fact that Unix 'ar' will happily consume just about anything.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", "static-lib a : a.foo ;")
+t.write("a.foo", "")
+
+t.run_build_system(status=1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/notfile.py b/src/boost/tools/build/test/notfile.py
new file mode 100644
index 000000000..eebc457ba
--- /dev/null
+++ b/src/boost/tools/build/test/notfile.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 2005.
+# 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)
+
+# Basic tests for the 'notfile' rule.
+
+import BoostBuild
+import os
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", """\
+import notfile ;
+notfile say : "echo hi" ;
+exe hello : hello.cpp ;
+notfile hello_valgrind : @valgrind : hello ;
+actions valgrind { valgrind $(>[1]) }
+""")
+
+t.write("hello.cpp", """\
+#include <iostream>
+int main() { std::cout << "Hello!\\n"; }
+""")
+
+t.run_build_system(["-n", "-d+2"])
+
+t.fail_test(t.stdout().find("echo hi") == -1)
+
+name = t.adjust_names("bin/$toolset/debug*/hello.exe")[0]
+name = os.path.join(*name.split("/"))
+t.expect_output_lines(" valgrind *%s " % name)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/ordered_include.py b/src/boost/tools/build/test/ordered_include.py
new file mode 100644
index 000000000..ef1d8745d
--- /dev/null
+++ b/src/boost/tools/build/test/ordered_include.py
@@ -0,0 +1,251 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2008 Steven Watanabe
+#
+# 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 BoostBuild
+
+def test_default_order():
+ tester = BoostBuild.Tester(use_test_config=False)
+ tester.write("jamroot.jam", """
+
+ import order ;
+ import "class" : new ;
+
+ obj test : test.cpp : <include>b <include>a ;
+ """)
+
+ tester.write("test.cpp", """
+ #include <test.hpp>
+ int main() { f(); }
+ """)
+
+ tester.write("a/test.hpp", """
+ void f();
+ """)
+
+ tester.write("b/test.hpp", """
+ """)
+
+ tester.run_build_system()
+
+ tester.expect_addition("bin/$toolset/debug*/test.obj")
+
+ # Check that the dependencies are correct
+ tester.touch("a/test.hpp")
+ tester.run_build_system()
+ tester.expect_touch("bin/$toolset/debug*/test.obj")
+ tester.expect_nothing_more()
+
+ tester.touch("b/test.hpp")
+ tester.run_build_system()
+ tester.expect_nothing_more()
+
+ tester.cleanup()
+
+def test_default_order_mixed():
+ tester = BoostBuild.Tester(use_test_config=False)
+ tester.write("jamroot.jam", """
+
+ import order ;
+ import "class" : new ;
+
+ obj test : test.cpp : <include>b <include>a <include>c&&d ;
+ """)
+
+ tester.write("test.cpp", """
+ #include <test.hpp>
+ int main() { f(); }
+ """)
+
+ tester.write("a/test.hpp", """
+ void f();
+ """)
+
+ tester.write("b/test.hpp", """
+ """)
+
+ tester.run_build_system()
+
+ tester.expect_addition("bin/$toolset/debug*/test.obj")
+
+ # Check that the dependencies are correct
+ tester.touch("a/test.hpp")
+ tester.run_build_system()
+ tester.expect_touch("bin/$toolset/debug*/test.obj")
+ tester.expect_nothing_more()
+
+ tester.touch("b/test.hpp")
+ tester.run_build_system()
+ tester.expect_nothing_more()
+
+ tester.cleanup()
+
+def test_basic():
+ tester = BoostBuild.Tester(use_test_config=False)
+ tester.write("jamroot.jam", """
+ obj test : test.cpp : <include>a&&b ;
+ """)
+
+ tester.write("test.cpp", """
+ #include <test1.hpp>
+ #include <test2.hpp>
+ int main() {}
+ """)
+
+ tester.write("a/test1.hpp", """
+ """)
+
+ tester.write("b/test2.hpp", """
+ """)
+
+ tester.run_build_system()
+
+ tester.expect_addition("bin/$toolset/debug*/test.obj")
+
+ # Check that the dependencies are correct
+ tester.touch("a/test1.hpp")
+ tester.run_build_system()
+ tester.expect_touch("bin/$toolset/debug*/test.obj")
+
+ tester.touch("b/test2.hpp")
+ tester.run_build_system()
+ tester.expect_touch("bin/$toolset/debug*/test.obj")
+
+ tester.cleanup()
+
+def test_order1():
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("jamroot.jam", """
+ obj test : test.cpp : <include>a&&b ;
+ """)
+ t.write("test.cpp", """
+ #include <test.h>
+ int main() {}
+ """)
+ t.write("a/test.h", """
+ """)
+ t.write("b/test.h", """
+ #error should find a/test.h
+ """)
+ t.run_build_system()
+
+ t.touch("a/test.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("b/test.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_order2():
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("jamroot.jam", """
+ obj test : test.cpp : <include>b&&a ;
+ """)
+ t.write("test.cpp", """
+ #include <test.h>
+ int main() {}
+ """)
+ t.write("a/test.h", """
+ #error should find b/test.h
+ """)
+ t.write("b/test.h", """
+ """)
+ t.run_build_system()
+
+ t.touch("a/test.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("b/test.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/test.obj")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_order_graph():
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("jamroot.jam", """
+ obj test : test.cpp :
+ <include>b&&a
+ <include>c&&b
+ <include>a
+ <include>c
+ <include>b
+ <include>e&&b&&d
+ ;
+ """)
+ t.write("test.cpp", """
+ #include <test1.h>
+ #include <test2.h>
+ #include <test3.h>
+ #include <test4.h>
+ int main() {}
+ """)
+ t.write("b/test1.h", "")
+ t.write("a/test1.h", "#error should find b/test1.h\n")
+
+ t.write("c/test2.h", "")
+ t.write("b/test2.h", "#error should find c/test2.h\n")
+
+ t.write("e/test3.h", "")
+ t.write("b/test3.h", "#error should find e/test3.h\n")
+
+ t.write("b/test4.h", "")
+ t.write("d/test4.h", "#error should find b/test4.h\n")
+
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug*/test.obj")
+
+ t.touch("b/test1.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("a/test1.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("c/test2.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("b/test2.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("e/test3.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("b/test3.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.touch("b/test4.h")
+ t.run_build_system()
+ t.expect_touch("bin/$toolset/debug*/test.obj")
+ t.expect_nothing_more()
+
+ t.touch("d/test4.h")
+ t.run_build_system()
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+test_default_order()
+test_default_order_mixed()
+test_basic()
+test_order1()
+test_order2()
+test_order_graph()
diff --git a/src/boost/tools/build/test/ordered_properties.py b/src/boost/tools/build/test/ordered_properties.py
new file mode 100644
index 000000000..23068a01c
--- /dev/null
+++ b/src/boost/tools/build/test/ordered_properties.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+# Copyright 2004 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 checks that B2 does not reorder <include> properties
+# lexicographically.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("a.cpp", """
+#include <a.h>
+int main() { foo(); }
+""")
+
+t.write("jamroot.jam", """
+exe a : a.cpp : <include>d2 <include>d1 ;
+""")
+
+t.write("d1/a.h", """
+""")
+
+t.write("d2/a.h", """
+inline void foo() {}
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/out_of_tree.py b/src/boost/tools/build/test/out_of_tree.py
new file mode 100644
index 000000000..400101e93
--- /dev/null
+++ b/src/boost/tools/build/test/out_of_tree.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 2005.
+# 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)
+
+# Tests that we can build a project when the current directory is outside of
+# that project tree, that is 'bjam some_dir' works.
+
+import BoostBuild
+
+# Create a temporary working directory.
+t = BoostBuild.Tester(use_test_config=False)
+
+# Create the needed files.
+t.write("p1/jamroot.jam", "exe hello : hello.cpp ;")
+t.write("p1/hello.cpp", "int main() {}\n")
+t.write("p2/jamroot.jam", """\
+exe hello2 : hello.cpp ;
+exe hello3 : hello.cpp ;
+""")
+t.write("p2/hello.cpp", "int main() {}\n")
+
+t.run_build_system(["p1", "p2//hello3"])
+t.expect_addition("p1/bin/$toolset/debug*/hello.exe")
+t.expect_addition("p2/bin/$toolset/debug*/hello3.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/package.py b/src/boost/tools/build/test/package.py
new file mode 100644
index 000000000..7cc5e33c0
--- /dev/null
+++ b/src/boost/tools/build/test/package.py
@@ -0,0 +1,231 @@
+#!/usr/bin/python
+
+# Copyright 2018 Steven Watanabe
+# 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)
+
+# Test the package module.
+
+import BoostBuild
+import os
+
+def setup():
+ t = BoostBuild.Tester(["p//install", "p//data"],
+ use_test_config=False)
+
+ t.write("p/jamroot.jam", "")
+ t.write("p/jamfile.jam", """\
+ import package ;
+ exe a : a.cpp ;
+ lib b : b.cpp ;
+ package.install install Test :
+ : a
+ : b/<link>static b/<link>shared
+ : a.h ;
+ package.install-data data : Test : a.txt ;
+ """)
+ t.write("p/a.cpp", "int main() {}")
+ t.write("p/b.cpp", """
+ int
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ must_export_something;
+ """)
+ t.write("p/a.h", "")
+ t.write("p/a.txt", "")
+ return t
+
+def test_defaults():
+ t = setup()
+
+ # Since the default install location is outside out test area,
+ # we don't want to actually execute the build.
+ t.run_build_system(["-n", "-d1"])
+
+ installdir = "C:/Test" if os.name == 'nt' else "/usr/local"
+ t.expect_output_lines([
+ x.replace('/', os.sep) for x in
+ ["common.copy %s/bin/%s" % (installdir, t.adjust_name("a.exe")),
+ "common.copy %s/lib/%s" % (installdir, t.adjust_name("b.dll")),
+ "common.copy %s/lib/%s" % (installdir, t.adjust_name("b.lib")),
+ "common.copy %s/include/a.h" % installdir,
+ "common.copy %s/share/Test/a.txt" % installdir]])
+
+ t.cleanup()
+
+def test_prefix():
+ t = setup()
+ # An explicit --prefix on the command should override all of these:
+ t.write("project-config.jam", """
+ option.set prefix : bad ;
+ option.set bindir : bad/bin ;
+ option.set libdir : bad/lib ;
+ option.set includedir : bad/include ;
+ option.set datarootdir : bad/share ;
+ """)
+
+ t.run_build_system(["--prefix=installdir"])
+ t.expect_addition("installdir/bin/a.exe")
+ t.expect_addition("installdir/lib/b.dll")
+ t.expect_addition("installdir/lib/b.lib")
+ t.expect_addition("installdir/include/a.h")
+ t.expect_addition("installdir/share/Test/a.txt")
+
+ t.cleanup()
+
+def test_subdirs():
+ t = setup()
+ # Command line options override config files
+ t.write("project-config.jam", """
+ option.set prefix : bad ;
+ option.set bindir : bad/bin ;
+ option.set libdir : bad/lib ;
+ option.set includedir : bad/include ;
+ option.set datarootdir : bad/share ;
+ """)
+
+ t.run_build_system(["--libdir=installdir/lib64",
+ "--bindir=installdir/binx",
+ "--includedir=installdir/includex",
+ "--datarootdir=installdir/sharex"])
+ t.expect_addition("installdir/binx/a.exe")
+ t.expect_addition("installdir/lib64/b.dll")
+ t.expect_addition("installdir/lib64/b.lib")
+ t.expect_addition("installdir/includex/a.h")
+ t.expect_addition("installdir/sharex/Test/a.txt")
+
+ t.cleanup()
+
+def test_subdirs_with_prefix():
+ t = setup()
+ # Command line options override config files
+ t.write("project-config.jam", """
+ option.set prefix : bad ;
+ option.set bindir : bad/bin ;
+ option.set libdir : bad/lib ;
+ option.set includedir : bad/include ;
+ option.set datarootdir : bad/share ;
+ """)
+
+ t.run_build_system(["--prefix=bad",
+ "--libdir=installdir/lib64",
+ "--bindir=installdir/binx",
+ "--includedir=installdir/includex",
+ "--datarootdir=installdir/sharex"])
+ t.expect_addition("installdir/binx/a.exe")
+ t.expect_addition("installdir/lib64/b.dll")
+ t.expect_addition("installdir/lib64/b.lib")
+ t.expect_addition("installdir/includex/a.h")
+ t.expect_addition("installdir/sharex/Test/a.txt")
+
+ t.cleanup()
+
+def test_prefix_config_file():
+ t = setup()
+ # An explicit --prefix on the command should override all of these:
+ t.write("project-config.jam", """
+ option.set prefix : installdir ;
+ """)
+
+ t.run_build_system()
+ t.expect_addition("installdir/bin/a.exe")
+ t.expect_addition("installdir/lib/b.dll")
+ t.expect_addition("installdir/lib/b.lib")
+ t.expect_addition("installdir/include/a.h")
+ t.expect_addition("installdir/share/Test/a.txt")
+
+ t.cleanup()
+
+def test_subdirs_config_file():
+ t = setup()
+ # An explicit --prefix on the command should override all of these:
+ t.write("project-config.jam", """
+ option.set prefix : installdir ;
+ option.set libdir : installdir/lib64 ;
+ option.set bindir : installdir/binx ;
+ option.set includedir : installdir/includex ;
+ option.set datarootdir : installdir/sharex ;
+ """)
+
+ t.run_build_system()
+ t.expect_addition("installdir/binx/a.exe")
+ t.expect_addition("installdir/lib64/b.dll")
+ t.expect_addition("installdir/lib64/b.lib")
+ t.expect_addition("installdir/includex/a.h")
+ t.expect_addition("installdir/sharex/Test/a.txt")
+
+ t.cleanup()
+
+def test_multiple():
+ '''If no prefix is specified, we might use several default
+ install prefixes.'''
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("p/jamroot.jam", "")
+ t.write("p/jamfile.jam", """\
+ import package ;
+ exe a : a.cpp ;
+ lib b : b.cpp ;
+ package.install installx TestX : <install-default-prefix>xxx
+ : a
+ : b/<link>static b/<link>shared
+ : a.h ;
+ package.install instally TestY : <install-default-prefix>yyy
+ : a
+ : b/<link>static b/<link>shared
+ : a.h ;
+ """)
+ t.write("p/a.cpp", "int main() {}")
+ t.write("p/b.cpp", """
+ int
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ must_export_something;
+ """)
+ t.write("p/a.h", "")
+ t.run_build_system(["p//installx", "p//instally"])
+ t.expect_addition("p/xxx/bin/a.exe")
+ t.expect_addition("p/xxx/lib/b.dll")
+ t.expect_addition("p/xxx/lib/b.lib")
+ t.expect_addition("p/xxx/include/a.h")
+ t.expect_addition("p/yyy/bin/a.exe")
+ t.expect_addition("p/yyy/lib/b.dll")
+ t.expect_addition("p/yyy/lib/b.lib")
+ t.expect_addition("p/yyy/include/a.h")
+
+def test_paths():
+ t = BoostBuild.Tester(pass_toolset=False)
+ t.write("Jamroot.jam", """\
+ import package ;
+ import assert ;
+ import os ;
+ if [ os.name ] = NT
+ {
+ default-prefix = "/C:/Test" ;
+ }
+ else
+ {
+ default-prefix = /usr/local ;
+ }
+ paths = [ package.paths Test ] ;
+ assert.result $(default-prefix) : $(paths).prefix ;
+ assert.result $(default-prefix)/lib : $(paths).libdir ;
+ assert.result $(default-prefix)/bin : $(paths).bindir ;
+ assert.result $(default-prefix)/include : $(paths).includedir ;
+ assert.result $(default-prefix)/share : $(paths).datarootdir ;
+ package.add-path-option bardir : bar : libdir ;
+ assert.result $(default-prefix)/lib/bar : $(paths).get bardir ;
+ """)
+ t.run_build_system()
+ t.cleanup()
+
+test_defaults()
+test_prefix()
+test_subdirs()
+test_subdirs_with_prefix()
+test_prefix_config_file()
+test_subdirs_config_file()
+test_multiple()
+test_paths()
diff --git a/src/boost/tools/build/test/param.py b/src/boost/tools/build/test/param.py
new file mode 100644
index 000000000..14b3d7d94
--- /dev/null
+++ b/src/boost/tools/build/test/param.py
@@ -0,0 +1,61 @@
+#!/usr/bin/python
+
+# Copyright 2018 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("Jamroot.jam", """\
+import param ;
+import assert ;
+import errors : try catch ;
+rule test1 ( )
+{
+ param.handle-named-params ;
+}
+test1 ;
+rule test2 ( sources * )
+{
+ param.handle-named-params sources ;
+ return $(sources) ;
+}
+assert.result : test2 ;
+assert.result test1.cpp test2.cpp : test2 test1.cpp test2.cpp ;
+assert.result test1.cpp test2.cpp : test2 sources test1.cpp test2.cpp ;
+rule test3 ( sources * : requirements * )
+{
+ param.handle-named-params sources requirements ;
+ return $(sources) -- $(requirements) ;
+}
+assert.result -- : test3 ;
+assert.result -- <link>shared : test3 : <link>shared ;
+assert.result test1.cpp -- <link>shared : test3 test1.cpp : <link>shared ;
+assert.result test1.cpp -- <link>shared
+ : test3 test1.cpp : requirements <link>shared ;
+assert.result test1.cpp -- <link>shared
+ : test3 sources test1.cpp : requirements <link>shared ;
+assert.result test1.cpp -- <link>shared
+ : test3 requirements <link>shared : sources test1.cpp ;
+assert.result -- : test3 sources ;
+assert.result -- : test3 requirements ;
+assert.result -- <link>shared : test3 requirements <link>shared ;
+try ;
+{
+ test3 sources test1.cpp : sources test2.cpp ;
+}
+catch Parameter 'sources' passed more than once. ;
+try ;
+{
+ test3 sources test1.cpp : <link>shared ;
+}
+catch "Positional arguments must appear first." ;
+EXIT : 0 ;
+""")
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/path_features.py b/src/boost/tools/build/test/path_features.py
new file mode 100644
index 000000000..5b23150be
--- /dev/null
+++ b/src/boost/tools/build/test/path_features.py
@@ -0,0 +1,163 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004 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)
+
+import BoostBuild
+
+def test_basic():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "lib a : a.cpp : <include>. ;")
+ t.write("a.cpp", """\
+#include <a.h>
+void
+# ifdef _WIN32
+__declspec(dllexport)
+# endif
+foo() {}
+""")
+ t.write("a.h", "//empty file\n")
+ t.write("d/jamfile.jam", "exe b : b.cpp ..//a ;")
+ t.write("d/b.cpp", """\
+void foo();
+int main() { foo(); }
+""")
+ t.run_build_system(subdir="d")
+
+ # Path features with condition.
+ t.write("jamroot.jam", "lib a : a.cpp : <variant>debug:<include>. ;")
+ t.rm("bin")
+ t.run_build_system(subdir="d")
+
+
+ # Path features with condition in usage requirements.
+ t.write("jamroot.jam", """\
+lib a : a.cpp : <include>. : : <variant>debug:<include>. ;
+""")
+ t.write("d/b.cpp", """\
+#include <a.h>
+void foo();
+int main() { foo(); }
+""")
+ t.rm("d/bin")
+ t.run_build_system(subdir="d")
+
+ t.cleanup()
+
+
+def test_absolute_paths():
+ """
+ Test that absolute paths inside requirements are ok. The problems
+ appeared only when building targets in subprojects.
+
+ """
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "build-project x ;")
+ t.write("x/jamfile.jam", """\
+local pwd = [ PWD ] ;
+project : requirements <include>$(pwd)/x/include ;
+exe m : m.cpp : <include>$(pwd)/x/include2 ;
+""")
+ t.write("x/m.cpp", """\
+#include <h1.hpp>
+#include <h2.hpp>
+int main() {}
+""")
+ t.write("x/include/h1.hpp", "\n")
+ t.write("x/include2/h2.hpp", "\n")
+
+ t.run_build_system()
+ t.expect_addition("x/bin/$toolset/debug*/m.exe")
+
+ t.cleanup()
+
+
+def test_ordered_paths():
+ """Test that "&&" in path features is handled correctly."""
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "build-project sub ;")
+ t.write("sub/jamfile.jam", "exe a : a.cpp : <include>../h1&&../h2 ;")
+ t.write("sub/a.cpp", """\
+#include <header.h>
+int main() { return OK; }
+""")
+ t.write("h2/header.h", "int const OK = 0;\n")
+ t.run_build_system()
+ t.expect_addition("sub/bin/$toolset/debug*/a.exe")
+
+ t.cleanup()
+
+
+def test_paths_set_by_indirect_conditionals():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ header = "child_dir/folder_to_include/some_header.h"
+
+ t.write("jamroot.jam", """
+build-project child_dir ;
+rule attach-include-parent ( properties * )
+{
+ return <include>another_folder ;
+}
+# requirements inherited from a parent project will bind paths
+# relative to the project that actually names the rule.
+project : requirements <conditional>@attach-include-parent ;
+""")
+ t.write("child_dir/jamfile.jam", """\
+import remote/remote ;
+
+# If we set the <include>folder_to_include property directly, it will work
+obj x1 : x.cpp : <conditional>@attach-include-local ;
+obj x2 : x.cpp : <conditional>@remote.attach-include-remote ;
+
+rule attach-include-local ( properties * )
+{
+ return <include>folder_to_include ;
+}
+""")
+ t.write("child_dir/remote/remote.jam", """\
+rule attach-include-remote ( properties * )
+{
+ return <include>folder_to_include ;
+}
+""")
+ t.write("child_dir/x.cpp", """\
+#include <some_header.h>
+#include <header2.h>
+int main() {}
+""")
+ t.write(header, "int some_func();\n")
+ t.write("another_folder/header2.h", "int f2();\n")
+ t.write("child_dir/folder_to_include/jamfile.jam", "")
+
+ expected_x1 = "child_dir/bin/$toolset/debug*/x1.obj"
+ expected_x2 = "child_dir/bin/$toolset/debug*/x2.obj"
+
+ t.run_build_system()
+ t.expect_addition(expected_x1)
+ t.expect_addition(expected_x2)
+
+ t.touch(header)
+ t.run_build_system(subdir="child_dir")
+ t.expect_touch(expected_x1)
+ t.expect_touch(expected_x2)
+
+ t.touch(header)
+ t.run_build_system([".."], subdir="child_dir/folder_to_include")
+ t.expect_touch(expected_x1)
+ t.expect_touch(expected_x2)
+
+ t.cleanup()
+
+
+test_basic()
+test_absolute_paths()
+test_ordered_paths()
+test_paths_set_by_indirect_conditionals()
diff --git a/src/boost/tools/build/test/pch.py b/src/boost/tools/build/test/pch.py
new file mode 100644
index 000000000..58cf894a9
--- /dev/null
+++ b/src/boost/tools/build/test/pch.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+
+# 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)
+
+import BoostBuild
+from time import sleep
+
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", """
+import pch ;
+cpp-pch pch : pch.hpp : <toolset>msvc:<source>pch.cpp <include>. ;
+exe hello : hello.cpp pch : <include>. ;
+""")
+
+t.write("pch.hpp.bad", """
+THIS WILL NOT COMPILE
+""")
+
+# Note that pch.hpp is written after pch.hpp.bad, so its timestamp will not be
+# less than timestamp of pch.hpp.bad.
+sleep(1)
+t.write("pch.hpp", """
+class TestClass
+{
+public:
+ TestClass( int, int ) {}
+};
+""")
+
+t.write("pch.cpp", """#include <pch.hpp>
+""")
+
+t.write("hello.cpp", """#include <pch.hpp>
+int main() { TestClass c(1, 2); }
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+
+
+# Now make the header unusable, without changing timestamp. If everything is OK,
+# B2 will not recreate PCH, and compiler will happily use pre-compiled
+# header, not noticing that the real header is bad.
+
+t.copy_preserving_timestamp("pch.hpp.bad", "pch.hpp")
+
+t.rm("bin/$toolset/debug/hello.obj")
+t.rm("bin/$toolset/debug/*/hello.obj")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/hello.obj")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/prebuilt.py b/src/boost/tools/build/test/prebuilt.py
new file mode 100644
index 000000000..e67b726e8
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+
+# Copyright 2002, 2003, 2004 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)
+
+# Test that we can use already built sources
+
+import BoostBuild
+
+t = BoostBuild.Tester(["debug", "release"], use_test_config=False)
+
+t.set_tree('prebuilt')
+
+t.expand_toolset("ext/jamroot.jam")
+t.expand_toolset("jamroot.jam")
+
+# First, build the external project.
+t.run_build_system(subdir="ext")
+
+# Then pretend that we do not have the sources for the external project, and
+# can only use compiled binaries.
+t.copy("ext/jamfile2.jam", "ext/jamfile.jam")
+t.expand_toolset("ext/jamfile.jam")
+
+# Now check that we can build the main project, and that correct prebuilt file
+# is picked, depending of variant. This also checks that correct includes for
+# prebuilt libraries are used.
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+t.expect_addition("bin/$toolset/release*/hello.exe")
+
+t.rm("bin")
+
+
+# Now test that prebuilt file specified by absolute name works too.
+t.copy("ext/jamfile3.jam", "ext/jamfile.jam")
+t.expand_toolset("ext/jamfile.jam")
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+t.expect_addition("bin/$toolset/release*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/prebuilt/ext/a.cpp b/src/boost/tools/build/test/prebuilt/ext/a.cpp
new file mode 100644
index 000000000..c49a04153
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/ext/a.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+#ifdef RELEASE
+void release() {}
+#else
+void debug() {}
+#endif
diff --git a/src/boost/tools/build/test/prebuilt/ext/debug/a.h b/src/boost/tools/build/test/prebuilt/ext/debug/a.h
new file mode 100644
index 000000000..31b318226
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/ext/debug/a.h
@@ -0,0 +1,13 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+void debug();
diff --git a/src/boost/tools/build/test/prebuilt/ext/jamfile.jam b/src/boost/tools/build/test/prebuilt/ext/jamfile.jam
new file mode 100644
index 000000000..e563f0d74
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/ext/jamfile.jam
@@ -0,0 +1,13 @@
+# Copyright 2002 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)
+
+
+project ext
+ : requirements <variant>release:<define>RELEASE
+ ;
+
+lib a : a.cpp ;
+
+install dist : a : <variant>release:<location>release
+ <variant>debug:<location>debug ;
diff --git a/src/boost/tools/build/test/prebuilt/ext/jamfile2.jam b/src/boost/tools/build/test/prebuilt/ext/jamfile2.jam
new file mode 100644
index 000000000..6481808c6
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/ext/jamfile2.jam
@@ -0,0 +1,41 @@
+
+import os ;
+
+local dll-suffix = so ;
+local prefix = "lib" ;
+if [ os.name ] in NT
+{
+ if [ MATCH ^(gcc) : $toolset ]
+ {
+ dll-suffix = dll.a ;
+ prefix = lib ;
+ }
+ else
+ {
+ dll-suffix = lib ;
+ prefix = "" ;
+ }
+}
+else if [ os.name ] in CYGWIN
+{
+ dll-suffix = dll ;
+}
+else if [ os.name ] in MACOSX
+{
+ dll-suffix = dylib ;
+}
+
+project ext ;
+
+lib a :
+ : <file>debug/$(prefix)a.$(dll-suffix) <variant>debug
+ :
+ : <include>debug
+ ;
+
+lib a :
+ : <file>release/$(prefix)a.$(dll-suffix) <variant>release
+ :
+ : <include>release
+ ;
+
diff --git a/src/boost/tools/build/test/prebuilt/ext/jamfile3.jam b/src/boost/tools/build/test/prebuilt/ext/jamfile3.jam
new file mode 100644
index 000000000..be2257fa2
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/ext/jamfile3.jam
@@ -0,0 +1,48 @@
+
+# This Jamfile is the same as Jamfile2, except that
+# it tries to access prebuilt targets using absolute
+# paths. It used to be broken on Windows.
+
+import os ;
+
+local dll-suffix = so ;
+local prefix = "lib" ;
+if [ os.name ] in NT
+{
+ if [ MATCH ^(gcc) : $toolset ]
+ {
+ dll-suffix = dll.a ;
+ prefix = lib ;
+ }
+ else
+ {
+ dll-suffix = lib ;
+ prefix = "" ;
+ }
+}
+else if [ os.name ] in CYGWIN
+{
+ dll-suffix = dll ;
+}
+else if [ os.name ] in MACOSX
+{
+ dll-suffix = dylib ;
+}
+
+project ext ;
+
+# Assumed bjam was invoked from the project root
+local pwd = [ PWD ] ;
+
+lib a :
+ : <file>$(pwd)/ext/debug/$(prefix)a.$(dll-suffix) <variant>debug
+ :
+ : <include>debug
+ ;
+
+lib a :
+ : <file>$(pwd)/ext/release/$(prefix)a.$(dll-suffix) <variant>release
+ :
+ : <include>release
+ ;
+
diff --git a/src/boost/tools/build/test/prebuilt/ext/jamroot.jam b/src/boost/tools/build/test/prebuilt/ext/jamroot.jam
new file mode 100644
index 000000000..c7617d5d3
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/ext/jamroot.jam
@@ -0,0 +1,5 @@
+# Copyright 2002, 2004 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/test/prebuilt/ext/release/a.h b/src/boost/tools/build/test/prebuilt/ext/release/a.h
new file mode 100644
index 000000000..9ab71d88c
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/ext/release/a.h
@@ -0,0 +1,13 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+void release();
diff --git a/src/boost/tools/build/test/prebuilt/hello.cpp b/src/boost/tools/build/test/prebuilt/hello.cpp
new file mode 100644
index 000000000..4c1ab7036
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/hello.cpp
@@ -0,0 +1,20 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+#include <a.h>
+
+int main()
+{
+ #ifdef RELEASE
+ release();
+ #else
+ debug();
+ #endif
+ return 0;
+}
diff --git a/src/boost/tools/build/test/prebuilt/jamfile.jam b/src/boost/tools/build/test/prebuilt/jamfile.jam
new file mode 100644
index 000000000..18b731ae1
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/jamfile.jam
@@ -0,0 +1,13 @@
+# Copyright 2002, 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)
+
+
+project test
+ : requirements <variant>release:<define>RELEASE
+ ;
+
+use-project /ext : ext ;
+
+exe hello : hello.cpp /ext//a ;
+
diff --git a/src/boost/tools/build/test/prebuilt/jamroot.jam b/src/boost/tools/build/test/prebuilt/jamroot.jam
new file mode 100644
index 000000000..f022c0d64
--- /dev/null
+++ b/src/boost/tools/build/test/prebuilt/jamroot.jam
@@ -0,0 +1,4 @@
+# Copyright 2002, 2004 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/test/preprocessor.py b/src/boost/tools/build/test/preprocessor.py
new file mode 100755
index 000000000..715ae3e58
--- /dev/null
+++ b/src/boost/tools/build/test/preprocessor.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+# Copyright 2003 Vladimir Prus
+# Copyright 2011 Steven Watanabe
+# 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)
+
+# Test the C/C++ preprocessor.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", """
+project ;
+preprocessed hello : hello.cpp ;
+preprocessed a : a.c ;
+exe hello.exe : hello a : <define>FAIL ;
+""")
+
+t.write("hello.cpp", """
+#ifndef __cplusplus
+#error "This file must be compiled as C++"
+#endif
+#ifdef FAIL
+#error "Not preprocessed?"
+#endif
+extern "C" int foo();
+int main() { return foo(); }
+""")
+
+t.write("a.c", """
+/* This will not compile unless in C mode. */
+#ifdef __cplusplus
+#error "This file must be compiled as C"
+#endif
+#ifdef FAIL
+#error "Not preprocessed?"
+#endif
+int foo()
+{
+ int new = 0;
+ new = (new+1)*7;
+ return new;
+}
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/hello.ii")
+t.expect_addition("bin/$toolset/debug*/a.i")
+t.expect_addition("bin/$toolset/debug*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/print.py b/src/boost/tools/build/test/print.py
new file mode 100644
index 000000000..6579bce54
--- /dev/null
+++ b/src/boost/tools/build/test/print.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+
+# Copyright 2003 Douglas Gregor
+# 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", "import gcc ;")
+
+t.write("jamfile.jam", """
+import print ;
+print.output foo ;
+print.text \\\"Something\\\" ;
+DEPENDS all : foo ;
+ALWAYS foo ;
+""")
+
+t.run_build_system()
+t.expect_content("foo", """\"Something\"""")
+
+t.write("jamfile.jam", """
+import print ;
+print.output foo ;
+print.text \\\n\\\"Somethingelse\\\" ;
+DEPENDS all : foo ;
+ALWAYS foo ;
+""")
+
+t.run_build_system()
+t.expect_content("foo", """\"Something\"
+\"Somethingelse\"""")
+
+t.write("jamfile.jam", """
+import print ;
+print.output foo ;
+print.text \\\"Different\\\" : true ;
+DEPENDS all : foo ;
+ALWAYS foo ;
+""")
+
+t.run_build_system()
+t.expect_content("foo", """\"Different\"""")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/project-test3/a.cpp b/src/boost/tools/build/test/project-test3/a.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/a.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test3/jamfile.jam b/src/boost/tools/build/test/project-test3/jamfile.jam
new file mode 100644
index 000000000..f07960770
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/jamfile.jam
@@ -0,0 +1,13 @@
+# Copyright 2002, 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)
+
+
+use-project /lib2 : lib2 ;
+use-project /lib3 : lib3 ;
+
+make a.exe : a.obj lib//b.obj /lib2//c.obj lib2//d.obj lib2/helper//e.obj /lib3//f.obj : yfc-link ;
+make a.obj : a.cpp : yfc-compile ;
+
+build-project lib2 ;
+build-project lib ;
diff --git a/src/boost/tools/build/test/project-test3/jamroot.jam b/src/boost/tools/build/test/project-test3/jamroot.jam
new file mode 100644
index 000000000..d7cd490eb
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/jamroot.jam
@@ -0,0 +1,67 @@
+# Copyright 2002-2005 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)
+
+import os ;
+import gcc ;
+import property ;
+import toolset ;
+
+rule properties-as-path ( properties * )
+{
+ local r ;
+ for local p in $(properties)
+ {
+ if $(p:G) != <action>
+ {
+ r += $(p) ;
+ }
+ }
+ return [ property.as-path
+ [ property.remove incidental : $(r) ] ] ;
+}
+
+toolset.flags yfc-compile KNOWN-PROPERTIES : <toolset> <optimization> ;
+toolset.flags yfc-link KNOWN-PROPERTIES : <toolset> <optimization> ;
+
+rule yfc-compile ( target : sources * : property-set * )
+{
+ PROPERTIES on $(target) = [ properties-as-path $(property-set) ] ;
+}
+
+actions yfc-compile
+{
+ echo $(PROPERTIES) > $(<)
+ echo $(>) >> $(<)
+}
+
+rule yfc-link ( target : sources * : property-set * )
+{
+ PROPERTIES on $(target) = [ properties-as-path $(property-set) ] ;
+}
+
+actions yfc-link
+{
+ echo $(PROPERTIES) > $(<)
+ echo $(>) >> $(<)
+}
+
+if [ os.name ] = VMS
+{
+ actions yfc-compile
+ {
+ PIPE WRITE SYS$OUTPUT "$(PROPERTIES)" | TYPE SYS$INPUT /OUT=$(<:W)
+ PIPE WRITE SYS$OUTPUT "$(>:J= ",")" | APPEND /NEW SYS$INPUT $(<:W)
+ }
+
+ actions yfc-link
+ {
+ PIPE WRITE SYS$OUTPUT "$(PROPERTIES)" | TYPE SYS$INPUT /OUT=$(<:W)
+ OPEN /APPEND FOUT $(<:W)
+ WRITE FOUT "$(>:J= ",")"
+ CLOSE FOUT
+ }
+}
+
+IMPORT $(__name__) : yfc-compile yfc-link : : yfc-compile yfc-link ;
diff --git a/src/boost/tools/build/test/project-test3/lib/b.cpp b/src/boost/tools/build/test/project-test3/lib/b.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib/b.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test3/lib/jamfile.jam b/src/boost/tools/build/test/project-test3/lib/jamfile.jam
new file mode 100644
index 000000000..76b0829a9
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib/jamfile.jam
@@ -0,0 +1,9 @@
+# Copyright 2002, 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)
+
+
+use-project /lib2 : ../lib2 ;
+
+make b.obj : b.cpp : yfc-compile ;
+make m.exe : b.obj /lib2//c.obj : yfc-link ;
diff --git a/src/boost/tools/build/test/project-test3/lib2/c.cpp b/src/boost/tools/build/test/project-test3/lib2/c.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib2/c.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test3/lib2/d.cpp b/src/boost/tools/build/test/project-test3/lib2/d.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib2/d.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test3/lib2/helper/e.cpp b/src/boost/tools/build/test/project-test3/lib2/helper/e.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib2/helper/e.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test3/lib2/helper/jamfile.jam b/src/boost/tools/build/test/project-test3/lib2/helper/jamfile.jam
new file mode 100644
index 000000000..0c82f9248
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib2/helper/jamfile.jam
@@ -0,0 +1,9 @@
+# Copyright 2002 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)
+
+
+project lib2/helper ;
+
+make e.obj : e.cpp : yfc-compile ;
+
diff --git a/src/boost/tools/build/test/project-test3/lib2/jamfile.jam b/src/boost/tools/build/test/project-test3/lib2/jamfile.jam
new file mode 100644
index 000000000..b6b0abc44
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib2/jamfile.jam
@@ -0,0 +1,11 @@
+# Copyright 2002, 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)
+
+
+project lib2 ;
+use-project /lib2/helper : helper ;
+
+make c.obj : c.cpp : yfc-compile ;
+make d.obj : d.cpp : yfc-compile ;
+make l.exe : c.obj ..//a.obj : yfc-link ;
diff --git a/src/boost/tools/build/test/project-test3/lib3/f.cpp b/src/boost/tools/build/test/project-test3/lib3/f.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib3/f.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test3/lib3/jamfile.jam b/src/boost/tools/build/test/project-test3/lib3/jamfile.jam
new file mode 100644
index 000000000..261062994
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib3/jamfile.jam
@@ -0,0 +1,47 @@
+# Copyright 2003, 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 project-root.jam also serves the role of Jamfile
+project lib3 ;
+
+use-project /lib2/helper : ../lib2/helper ;
+
+import os ;
+import property ;
+
+rule properties-as-path ( properties * )
+{
+ local r ;
+ for local p in $(properties)
+ {
+ if $(p:G) != <action>
+ {
+ r += $(p) ;
+ }
+ }
+ return [ property.as-path
+ [ property.remove incidental : $(r) ] ] ;
+}
+
+rule mfc-compile ( target : sources * : property-set * )
+{
+ PROPERTIES on $(target) = [ properties-as-path $(property-set) ] ;
+}
+
+actions mfc-compile
+{
+ echo $(PROPERTIES) > $(<)
+ echo $(>) >> $(<)
+}
+
+if [ os.name ] = VMS
+{
+ actions mfc-compile
+ {
+ PIPE WRITE SYS$OUTPUT "$(PROPERTIES)" | TYPE SYS$INPUT /OUT=$(<:W)
+ PIPE WRITE SYS$OUTPUT "$(>:J= ",")" | APPEND /NEW SYS$INPUT $(<:W)
+ }
+}
+
+make f.obj : f.cpp /lib2/helper//e.obj : mfc-compile ;
diff --git a/src/boost/tools/build/test/project-test3/lib3/jamroot.jam b/src/boost/tools/build/test/project-test3/lib3/jamroot.jam
new file mode 100644
index 000000000..971f03096
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/lib3/jamroot.jam
@@ -0,0 +1,5 @@
+# Copyright 2002 Rene Rivera
+# Copyright 2002, 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)
+
diff --git a/src/boost/tools/build/test/project-test3/readme.txt b/src/boost/tools/build/test/project-test3/readme.txt
new file mode 100644
index 000000000..da27e54b2
--- /dev/null
+++ b/src/boost/tools/build/test/project-test3/readme.txt
@@ -0,0 +1,7 @@
+Copyright 2002 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 test checks that we have minimally working 'make' rule and that we can use target from
+different project with different project roots.
diff --git a/src/boost/tools/build/test/project-test4/a.cpp b/src/boost/tools/build/test/project-test4/a.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/a.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test4/a_gcc.cpp b/src/boost/tools/build/test/project-test4/a_gcc.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/a_gcc.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test4/jamfile.jam b/src/boost/tools/build/test/project-test4/jamfile.jam
new file mode 100644
index 000000000..a34d5f2db
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/jamfile.jam
@@ -0,0 +1,11 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 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)
+
+
+project test : requirements <include>everything <threading>single ;
+
+make a.exe : a.obj lib//b.obj/<optimization>speed : yfc-link ;
+make b.exe : a.obj : yfc-link : <define>MACROS ;
+make a.obj : a.cpp : yfc-compile ;
diff --git a/src/boost/tools/build/test/project-test4/jamfile3.jam b/src/boost/tools/build/test/project-test4/jamfile3.jam
new file mode 100644
index 000000000..9770362d7
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/jamfile3.jam
@@ -0,0 +1,5 @@
+
+make a.exe : a.obj lib//b.obj/<optimization>on a_gcc.obj : yfc-link : <toolset>gcc ;
+make a.exe : a.obj lib//b.obj/<optimization>on : yfc-link : <threading>multi ;
+make a.obj : a.cpp : yfc-compile ;
+make a_gcc.obj : a_gcc.cpp : yfc-compile ;
diff --git a/src/boost/tools/build/test/project-test4/jamfile4.jam b/src/boost/tools/build/test/project-test4/jamfile4.jam
new file mode 100644
index 000000000..e3257801a
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/jamfile4.jam
@@ -0,0 +1,4 @@
+
+project test : requirements <include>everything <threading>single ;
+
+build-project lib2 ;
diff --git a/src/boost/tools/build/test/project-test4/jamfile5.jam b/src/boost/tools/build/test/project-test4/jamfile5.jam
new file mode 100644
index 000000000..1010be5e4
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/jamfile5.jam
@@ -0,0 +1,6 @@
+
+project test : requirements <include>everything <threading>single ;
+
+make a.exe : a.obj lib//b.obj/<variant>release : yfc-link ;
+make b.exe : a.obj : yfc-link : <define>MACROS ;
+make a.obj : a.cpp : yfc-compile ;
diff --git a/src/boost/tools/build/test/project-test4/jamroot.jam b/src/boost/tools/build/test/project-test4/jamroot.jam
new file mode 100644
index 000000000..d8cf571ae
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/jamroot.jam
@@ -0,0 +1,68 @@
+# Copyright 2002, 2003, 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)
+
+import os ;
+import gcc ;
+import property ;
+import toolset ;
+
+rule properties-as-path ( properties * )
+{
+ local r ;
+ for local p in $(properties)
+ {
+ if $(p:G) != <action>
+ {
+ r += $(p) ;
+ }
+ }
+ return [ property.as-path
+ [ property.remove incidental : $(r) ] ] ;
+}
+
+
+toolset.flags yfc-compile KNOWN-PROPERTIES : <toolset> <optimization> ;
+toolset.flags yfc-link KNOWN-PROPERTIES : <toolset> <optimization> ;
+
+
+rule yfc-compile ( target : sources * : property-set * )
+{
+ PROPERTIES on $(target) = [ properties-as-path $(property-set) ] ;
+}
+
+actions yfc-compile
+{
+ echo $(PROPERTIES) > $(<)
+ echo $(>) >> $(<)
+}
+
+rule yfc-link ( target : sources * : property-set * )
+{
+ PROPERTIES on $(target) = [ properties-as-path $(property-set) ] ;
+}
+
+actions yfc-link
+{
+ echo $(PROPERTIES) > $(<)
+ echo $(>) >> $(<)
+}
+
+if [ os.name ] = VMS
+{
+ actions yfc-compile
+ {
+ PIPE WRITE SYS$OUTPUT "$(PROPERTIES)" | TYPE SYS$INPUT /OUT=$(<:W)
+ PIPE WRITE SYS$OUTPUT "$(>:J= ",")" | APPEND /NEW SYS$INPUT $(<:W)
+ }
+
+ actions yfc-link
+ {
+ PIPE WRITE SYS$OUTPUT "$(PROPERTIES)" | TYPE SYS$INPUT /OUT=$(<:W)
+ OPEN /APPEND FOUT $(<:W)
+ WRITE FOUT "$(>:J= ",")"
+ CLOSE FOUT
+ }
+}
+
+#IMPORT $(__name__) : yfc-compile yfc-link : : yfc-compile yfc-link ;
diff --git a/src/boost/tools/build/test/project-test4/lib/b.cpp b/src/boost/tools/build/test/project-test4/lib/b.cpp
new file mode 100644
index 000000000..ccecbb414
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/lib/b.cpp
@@ -0,0 +1,8 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
diff --git a/src/boost/tools/build/test/project-test4/lib/jamfile.jam b/src/boost/tools/build/test/project-test4/lib/jamfile.jam
new file mode 100644
index 000000000..1bdb7c122
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/lib/jamfile.jam
@@ -0,0 +1,6 @@
+# Copyright 2002 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)
+
+
+make b.obj : b.cpp : yfc-compile ;
diff --git a/src/boost/tools/build/test/project-test4/lib/jamfile1.jam b/src/boost/tools/build/test/project-test4/lib/jamfile1.jam
new file mode 100644
index 000000000..be2c3649a
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/lib/jamfile1.jam
@@ -0,0 +1,2 @@
+
+make b.obj : b.cpp : yfc-compile ;
diff --git a/src/boost/tools/build/test/project-test4/lib/jamfile2.jam b/src/boost/tools/build/test/project-test4/lib/jamfile2.jam
new file mode 100644
index 000000000..d47274bdf
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/lib/jamfile2.jam
@@ -0,0 +1,4 @@
+
+project lib : requirements <threading>multi ;
+
+make b.obj : b.cpp : yfc-compile ;
diff --git a/src/boost/tools/build/test/project-test4/lib/jamfile3.jam b/src/boost/tools/build/test/project-test4/lib/jamfile3.jam
new file mode 100644
index 000000000..73a78324b
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/lib/jamfile3.jam
@@ -0,0 +1,2 @@
+
+make b.obj : b.cpp : yfc-compile : <rtti>off ;
diff --git a/src/boost/tools/build/test/project-test4/lib2/jamfile.jam b/src/boost/tools/build/test/project-test4/lib2/jamfile.jam
new file mode 100644
index 000000000..389492bf0
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/lib2/jamfile.jam
@@ -0,0 +1,8 @@
+# Copyright 2002 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)
+
+
+project
+ : requirements <rtti>off
+ ;
diff --git a/src/boost/tools/build/test/project-test4/lib2/jamfile2.jam b/src/boost/tools/build/test/project-test4/lib2/jamfile2.jam
new file mode 100644
index 000000000..94b144d06
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/lib2/jamfile2.jam
@@ -0,0 +1,4 @@
+
+project mylib
+ : requirements <rtti>off
+ ;
diff --git a/src/boost/tools/build/test/project-test4/readme.txt b/src/boost/tools/build/test/project-test4/readme.txt
new file mode 100644
index 000000000..0c0ba2ca4
--- /dev/null
+++ b/src/boost/tools/build/test/project-test4/readme.txt
@@ -0,0 +1,6 @@
+Copyright 2002 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 test checks for correct properties of generated and used targets.
diff --git a/src/boost/tools/build/test/project_dependencies.py b/src/boost/tools/build/test/project_dependencies.py
new file mode 100644
index 000000000..600bc0ed5
--- /dev/null
+++ b/src/boost/tools/build/test/project_dependencies.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004 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)
+
+# Test that we can specify a dependency property in project requirements, and
+# that it will not cause every main target in the project to be generated in its
+# own subdirectory.
+
+# The whole test is somewhat moot now.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "build-project src ;")
+
+t.write("lib/jamfile.jam", "lib lib1 : lib1.cpp ;")
+
+t.write("lib/lib1.cpp", """
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo() {}\n
+""")
+
+t.write("src/jamfile.jam", """
+project : requirements <library>../lib//lib1 ;
+exe a : a.cpp ;
+exe b : b.cpp ;
+""")
+
+t.write("src/a.cpp", """
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+void foo();
+int main() { foo(); }
+""")
+
+t.copy("src/a.cpp", "src/b.cpp")
+
+t.run_build_system()
+
+# Test that there is no "main-target-a" part.
+# t.expect_addition("src/bin/$toolset/debug*/a.exe")
+# t.expect_addition("src/bin/$toolset/debug*/b.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/project_glob.py b/src/boost/tools/build/test/project_glob.py
new file mode 100644
index 000000000..362b450d9
--- /dev/null
+++ b/src/boost/tools/build/test/project_glob.py
@@ -0,0 +1,212 @@
+#!/usr/bin/python
+
+# Copyright (C) 2003. 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)
+
+# Test the 'glob' rule in Jamfile context.
+
+import BoostBuild
+
+
+def test_basic():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "")
+ t.write("d1/a.cpp", "int main() {}\n")
+ t.write("d1/jamfile.jam", "exe a : [ glob *.cpp ] ../d2/d//l ;")
+ t.write("d2/d/l.cpp", """\
+#if defined(_WIN32)
+__declspec(dllexport)
+void force_import_lib_creation() {}
+#endif
+""")
+ t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
+ t.write("d3/d/jamfile.jam", "exe a : [ glob ../*.cpp ] ;")
+ t.write("d3/a.cpp", "int main() {}\n")
+
+ t.run_build_system(subdir="d1")
+ t.expect_addition("d1/bin/$toolset/debug*/a.exe")
+
+ t.run_build_system(subdir="d3/d")
+ t.expect_addition("d3/d/bin/$toolset/debug*/a.exe")
+
+ t.rm("d2/d/bin")
+ t.run_build_system(subdir="d2/d")
+ t.expect_addition("d2/d/bin/$toolset/debug*/l.dll")
+
+ t.cleanup()
+
+
+def test_source_location():
+ """
+ Test that when 'source-location' is explicitly-specified glob works
+ relative to the source location.
+
+ """
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "")
+ t.write("d1/a.cpp", "very bad non-compilable file\n")
+ t.write("d1/src/a.cpp", "int main() {}\n")
+ t.write("d1/jamfile.jam", """\
+project : source-location src ;
+exe a : [ glob *.cpp ] ../d2/d//l ;
+""")
+ t.write("d2/d/l.cpp", """\
+#if defined(_WIN32)
+__declspec(dllexport)
+void force_import_lib_creation() {}
+#endif
+""")
+ t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
+
+ t.run_build_system(subdir="d1")
+ t.expect_addition("d1/bin/$toolset/debug*/a.exe")
+
+ t.cleanup()
+
+
+def test_wildcards_and_exclusion_patterns():
+ """
+ Test that wildcards can include directories. Also test exclusion
+ patterns.
+
+ """
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "")
+ t.write("d1/src/foo/a.cpp", "void bar(); int main() { bar(); }\n")
+ t.write("d1/src/bar/b.cpp", "void bar() {}\n")
+ t.write("d1/src/bar/bad.cpp", "very bad non-compilable file\n")
+ t.write("d1/jamfile.jam", """\
+project : source-location src ;
+exe a : [ glob foo/*.cpp bar/*.cpp : bar/bad* ] ../d2/d//l ;
+""")
+ t.write("d2/d/l.cpp", """\
+#if defined(_WIN32)
+__declspec(dllexport)
+void force_import_lib_creation() {}
+#endif
+""")
+ t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
+
+ t.run_build_system(subdir="d1")
+ t.expect_addition("d1/bin/$toolset/debug*/a.exe")
+
+ t.cleanup()
+
+
+def test_glob_tree():
+ """Test that 'glob-tree' works."""
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "")
+ t.write("d1/src/foo/a.cpp", "void bar(); int main() { bar(); }\n")
+ t.write("d1/src/bar/b.cpp", "void bar() {}\n")
+ t.write("d1/src/bar/bad.cpp", "very bad non-compilable file\n")
+ t.write("d1/jamfile.jam", """\
+project : source-location src ;
+exe a : [ glob-tree *.cpp : bad* ] ../d2/d//l ;
+""")
+ t.write("d2/d/l.cpp", """\
+#if defined(_WIN32)
+__declspec(dllexport)
+void force_import_lib_creation() {}
+#endif
+""")
+ t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
+
+ t.run_build_system(subdir="d1")
+ t.expect_addition("d1/bin/$toolset/debug*/a.exe")
+
+ t.cleanup()
+
+
+def test_directory_names_in_glob_tree():
+ """Test that directory names in patterns for 'glob-tree' are rejected."""
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "")
+ t.write("d1/src/a.cpp", "very bad non-compilable file\n")
+ t.write("d1/src/foo/a.cpp", "void bar(); int main() { bar(); }\n")
+ t.write("d1/src/bar/b.cpp", "void bar() {}\n")
+ t.write("d1/src/bar/bad.cpp", "very bad non-compilable file\n")
+ t.write("d1/jamfile.jam", """\
+project : source-location src ;
+exe a : [ glob-tree foo/*.cpp bar/*.cpp : bad* ] ../d2/d//l ;
+""")
+ t.write("d2/d/l.cpp", """\
+#if defined(_WIN32)
+__declspec(dllexport)
+void force_import_lib_creation() {}
+#endif
+""")
+ t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
+
+ t.run_build_system(subdir="d1", status=1)
+ t.expect_output_lines("error: The patterns * may not include directory")
+
+ t.cleanup()
+
+
+def test_glob_with_absolute_names():
+ """Test that 'glob' works with absolute names."""
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "")
+ t.write("d1/src/a.cpp", "very bad non-compilable file\n")
+ t.write("d1/src/foo/a.cpp", "void bar(); int main() { bar(); }\n")
+ t.write("d1/src/bar/b.cpp", "void bar() {}\n")
+ # Note that to get the current dir, we use bjam's PWD, not Python's
+ # os.getcwd(), because the former will always return a long path while the
+ # latter might return a short path, which would confuse path.glob.
+ t.write("d1/jamfile.jam", """\
+project : source-location src ;
+local pwd = [ PWD ] ; # Always absolute.
+exe a : [ glob $(pwd)/src/foo/*.cpp $(pwd)/src/bar/*.cpp ] ../d2/d//l ;
+""")
+ t.write("d2/d/l.cpp", """\
+#if defined(_WIN32)
+__declspec(dllexport)
+void force_import_lib_creation() {}
+#endif
+""")
+ t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
+
+ t.run_build_system(subdir="d1")
+ t.expect_addition("d1/bin/$toolset/debug*/a.exe")
+
+ t.cleanup()
+
+
+def test_glob_excludes_in_subdirectory():
+ """
+ Regression test: glob excludes used to be broken when building from a
+ subdirectory.
+
+ """
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("jamroot.jam", "build-project p ;")
+ t.write("p/p.c", "int main() {}\n")
+ t.write("p/p_x.c", "very bad non-compilable file\n")
+ t.write("p/jamfile.jam", "exe p : [ glob *.c : p_x.c ] ;")
+
+ t.run_build_system(subdir="p")
+ t.expect_addition("p/bin/$toolset/debug*/p.exe")
+
+ t.cleanup()
+
+
+test_basic()
+test_source_location()
+test_wildcards_and_exclusion_patterns()
+test_glob_tree()
+test_directory_names_in_glob_tree()
+test_glob_with_absolute_names()
+test_glob_excludes_in_subdirectory()
diff --git a/src/boost/tools/build/test/project_id.py b/src/boost/tools/build/test/project_id.py
new file mode 100755
index 000000000..6477f5957
--- /dev/null
+++ b/src/boost/tools/build/test/project_id.py
@@ -0,0 +1,414 @@
+#!/usr/bin/python
+
+# Copyright (C) 2012. Jurko Gospodnetic
+# 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)
+
+# Tests Boost Build's project-id handling.
+
+import BoostBuild
+import sys
+
+
+def test_assigning_project_ids():
+ t = BoostBuild.Tester(pass_toolset=False)
+ t.write("jamroot.jam", """\
+import assert ;
+import modules ;
+import notfile ;
+import project ;
+
+rule assert-project-id ( id ? : module-name ? )
+{
+ module-name ?= [ CALLER_MODULE ] ;
+ assert.result $(id) : project.attribute $(module-name) id ;
+}
+
+# Project rule modifies the main project id.
+assert-project-id ; # Initial project id is empty
+project foo ; assert-project-id /foo ;
+project ; assert-project-id /foo ;
+project foo ; assert-project-id /foo ;
+project bar ; assert-project-id /bar ;
+project /foo ; assert-project-id /foo ;
+project "" ; assert-project-id /foo ;
+
+# Calling the use-project rule does not modify the project's main id.
+use-project id1 : a ;
+# We need to load the 'a' Jamfile module manually as the use-project rule will
+# only schedule the load to be done after the current module load finishes.
+a-module = [ project.load a ] ;
+assert-project-id : $(a-module) ;
+use-project id2 : a ;
+assert-project-id : $(a-module) ;
+modules.call-in $(a-module) : project baz ;
+assert-project-id /baz : $(a-module) ;
+use-project id3 : a ;
+assert-project-id /baz : $(a-module) ;
+
+# Make sure the project id still holds after all the scheduled use-project loads
+# complete. We do this by scheduling the assert for the Jam action scheduling
+# phase.
+notfile x : @assert-a-rule ;
+rule assert-a-rule ( target : : properties * )
+{
+ assert-project-id /baz : $(a-module) ;
+}
+""")
+ t.write("a/jamfile.jam", """\
+# Initial project id for this module is empty.
+assert-project-id ;
+""")
+ t.run_build_system()
+ t.cleanup()
+
+
+def test_using_project_ids_in_target_references():
+ t = BoostBuild.Tester()
+ __write_appender(t, "appender.jam")
+ t.write("jamroot.jam", """\
+import type ;
+type.register AAA : _a ;
+type.register BBB : _b ;
+
+import appender ;
+appender.register aaa-to-bbb : AAA : BBB ;
+
+use-project id1 : a ;
+use-project /id2 : a ;
+
+bbb b1 : /id1//target ;
+bbb b2 : /id2//target ;
+bbb b3 : /id3//target ;
+bbb b4 : a//target ;
+bbb b5 : /project-a1//target ;
+bbb b6 : /project-a2//target ;
+bbb b7 : /project-a3//target ;
+
+use-project id3 : a ;
+""")
+ t.write("a/source._a", "")
+ t.write("a/jamfile.jam", """\
+project project-a1 ;
+project /project-a2 ;
+import alias ;
+alias target : source._a ;
+project /project-a3 ;
+""")
+
+ t.run_build_system()
+ t.expect_addition("bin/b%d._b" % x for x in range(1, 8))
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+def test_repeated_ids_for_different_projects():
+ t = BoostBuild.Tester()
+
+ t.write("a/jamfile.jam", "")
+ t.write("jamroot.jam", "project foo ; use-project foo : a ;")
+ t.run_build_system(status=1)
+ t.expect_output_lines("""\
+error: Attempt to redeclare already registered project id '/foo'.
+error: Original project:
+error: Name: Jamfile<*>
+error: Module: Jamfile<*>
+error: Main id: /foo
+error: File: jamroot.jam
+error: Location: .
+error: New project:
+error: Module: Jamfile<*>
+error: File: a*jamfile.jam
+error: Location: a""")
+
+ t.write("jamroot.jam", "use-project foo : a ; project foo ;")
+ t.run_build_system(status=1)
+ t.expect_output_lines("""\
+error: Attempt to redeclare already registered project id '/foo'.
+error: Original project:
+error: Name: Jamfile<*>
+error: Module: Jamfile<*>
+error: Main id: /foo
+error: File: jamroot.jam
+error: Location: .
+error: New project:
+error: Module: Jamfile<*>
+error: File: a*jamfile.jam
+error: Location: a""")
+
+ t.write("jamroot.jam", """\
+import modules ;
+import project ;
+modules.call-in [ project.load a ] : project foo ;
+project foo ;
+""")
+ t.run_build_system(status=1)
+ t.expect_output_lines("""\
+error: at jamroot.jam:4
+error: Attempt to redeclare already registered project id '/foo'.
+error: Original project:
+error: Name: Jamfile<*>
+error: Module: Jamfile<*>
+error: Main id: /foo
+error: File: a*jamfile.jam
+error: Location: a
+error: New project:
+error: Module: Jamfile<*>
+error: File: jamroot.jam
+error: Location: .""")
+
+ t.cleanup()
+
+
+def test_repeated_ids_for_same_project():
+ t = BoostBuild.Tester()
+
+ t.write("jamroot.jam", "project foo ; project foo ;")
+ t.run_build_system()
+
+ t.write("jamroot.jam", "project foo ; use-project foo : . ;")
+ t.run_build_system()
+
+ t.write("jamroot.jam", "project foo ; use-project foo : ./. ;")
+ t.run_build_system()
+
+ t.write("jamroot.jam", """\
+project foo ;
+use-project foo : . ;
+use-project foo : ./aaa/.. ;
+use-project foo : ./. ;
+""")
+ t.run_build_system()
+
+ # On Windows we have a case-insensitive file system and we can use
+ # backslashes as path separators.
+ # FIXME: Make a similar test pass on Cygwin.
+ if sys.platform in ['win32']:
+ t.write("a/fOo bAr/b/jamfile.jam", "")
+ t.write("jamroot.jam", r"""
+use-project bar : "a/foo bar/b" ;
+use-project bar : "a/foO Bar/b" ;
+use-project bar : "a/foo BAR/b/" ;
+use-project bar : "a\\.\\FOO bar\\b\\" ;
+""")
+ t.run_build_system()
+ t.rm("a")
+
+ t.write("bar/jamfile.jam", "")
+ t.write("jamroot.jam", """\
+use-project bar : bar ;
+use-project bar : bar/ ;
+use-project bar : bar// ;
+use-project bar : bar/// ;
+use-project bar : bar//// ;
+use-project bar : bar/. ;
+use-project bar : bar/./ ;
+use-project bar : bar/////./ ;
+use-project bar : bar/../bar/xxx/.. ;
+use-project bar : bar/..///bar/xxx///////.. ;
+use-project bar : bar/./../bar/xxx/.. ;
+use-project bar : bar/.////../bar/xxx/.. ;
+use-project bar : bar/././../bar/xxx/.. ;
+use-project bar : bar/././//////////../bar/xxx/.. ;
+use-project bar : bar/.///.////../bar/xxx/.. ;
+use-project bar : bar/./././xxx/.. ;
+use-project bar : bar/xxx////.. ;
+use-project bar : bar/xxx/.. ;
+use-project bar : bar///////xxx/.. ;
+""")
+ t.run_build_system()
+ t.rm("bar")
+
+ # On Windows we have a case-insensitive file system and we can use
+ # backslashes as path separators.
+ # FIXME: Make a similar test pass on Cygwin.
+ if sys.platform in ['win32']:
+ t.write("baR/jamfile.jam", "")
+ t.write("jamroot.jam", r"""
+use-project bar : bar ;
+use-project bar : BAR ;
+use-project bar : bAr ;
+use-project bar : bAr/ ;
+use-project bar : bAr\\ ;
+use-project bar : bAr\\\\ ;
+use-project bar : bAr\\\\///// ;
+use-project bar : bAr/. ;
+use-project bar : bAr/./././ ;
+use-project bar : bAr\\.\\.\\.\\ ;
+use-project bar : bAr\\./\\/.\\.\\ ;
+use-project bar : bAr/.\\././ ;
+use-project bar : Bar ;
+use-project bar : BaR ;
+use-project bar : BaR/./../bAr/xxx/.. ;
+use-project bar : BaR/./..\\bAr\\xxx/.. ;
+use-project bar : BaR/xxx/.. ;
+use-project bar : BaR///\\\\\\//xxx/.. ;
+use-project bar : Bar\\xxx/.. ;
+use-project bar : BAR/xXx/.. ;
+use-project bar : BAR/xXx\\\\/\\/\\//\\.. ;
+""")
+ t.run_build_system()
+ t.rm("baR")
+
+ t.cleanup()
+
+
+def test_unresolved_project_references():
+ t = BoostBuild.Tester()
+
+ __write_appender(t, "appender.jam")
+ t.write("a/source._a", "")
+ t.write("a/jamfile.jam", "import alias ; alias target : source._a ;")
+ t.write("jamroot.jam", """\
+import type ;
+type.register AAA : _a ;
+type.register BBB : _b ;
+
+import appender ;
+appender.register aaa-to-bbb : AAA : BBB ;
+
+use-project foo : a ;
+
+bbb b1 : a//target ;
+bbb b2 : /foo//target ;
+bbb b-invalid : invalid//target ;
+bbb b-root-invalid : /invalid//target ;
+bbb b-missing-root : foo//target ;
+bbb b-invalid-target : /foo//invalid ;
+""")
+
+ t.run_build_system(["b1", "b2"])
+ t.expect_addition("bin/b%d._b" % x for x in range(1, 3))
+ t.expect_nothing_more()
+
+ t.run_build_system(["b-invalid"], status=1)
+ t.expect_output_lines("""\
+error: Unable to find file or target named
+error: 'invalid//target'
+error: referred to from project at
+error: '.'
+error: could not resolve project reference 'invalid'""")
+
+ t.run_build_system(["b-root-invalid"], status=1)
+ t.expect_output_lines("""\
+error: Unable to find file or target named
+error: '/invalid//target'
+error: referred to from project at
+error: '.'
+error: could not resolve project reference '/invalid'""")
+
+ t.run_build_system(["b-missing-root"], status=1)
+ t.expect_output_lines("""\
+error: Unable to find file or target named
+error: 'foo//target'
+error: referred to from project at
+error: '.'
+error: could not resolve project reference 'foo' - possibly missing a """
+ "leading slash ('/') character.")
+
+ t.run_build_system(["b-invalid-target"], status=1)
+ t.expect_output_lines("""\
+error: Unable to find file or target named
+error: '/foo//invalid'
+error: referred to from project at
+error: '.'""")
+ t.expect_output_lines("*could not resolve project reference*", False)
+
+ t.cleanup()
+
+
+def __write_appender(t, name):
+ t.write(name,
+r"""# Copyright 2012 Jurko Gospodnetic
+# 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)
+
+# Support for registering test generators that construct their targets by
+# simply appending their given input data, e.g. list of sources & targets.
+
+import "class" : new ;
+import generators ;
+import modules ;
+import sequence ;
+
+rule register ( id composing ? : source-types + : target-types + )
+{
+ local caller-module = [ CALLER_MODULE ] ;
+ id = $(caller-module).$(id) ;
+ local g = [ new generator $(id) $(composing) : $(source-types) :
+ $(target-types) ] ;
+ $(g).set-rule-name $(__name__).appender ;
+ generators.register $(g) ;
+ return $(id) ;
+}
+
+if [ modules.peek : NT ]
+{
+ X = ")" ;
+ ECHO_CMD = (echo. ;
+}
+else
+{
+ X = \" ;
+ ECHO_CMD = "echo $(X)" ;
+}
+
+local appender-runs ;
+
+# We set up separate actions for building each target in order to avoid having
+# to iterate over them in action (i.e. shell) code. We have to be extra careful
+# though to achieve the exact same effect as if doing all the work in just one
+# action. Otherwise Boost Jam might, under some circumstances, run only some of
+# our actions. To achieve this we register a series of actions for all the
+# targets (since they all have the same target list - either all or none of them
+# get run independent of which target actually needs to get built), each
+# building only a single target. Since all our actions use the same targets, we
+# can not use 'on-target' parameters to pass data to a specific action so we
+# pass them using the second 'sources' parameter which our actions then know how
+# to interpret correctly. This works well since Boost Jam does not automatically
+# add dependency relations between specified action targets & sources and so the
+# second argument, even though most often used to pass in a list of sources, can
+# actually be used for passing in any type of information.
+rule appender ( targets + : sources + : properties * )
+{
+ appender-runs = [ CALC $(appender-runs:E=0) + 1 ] ;
+ local target-index = 0 ;
+ local target-count = [ sequence.length $(targets) ] ;
+ local original-targets ;
+ for t in $(targets)
+ {
+ target-index = [ CALC $(target-index) + 1 ] ;
+ local appender-run = $(appender-runs) ;
+ if $(targets[2])-defined
+ {
+ appender-run += [$(target-index)/$(target-count)] ;
+ }
+ append $(targets) : $(appender-run:J=" ") $(t) $(sources) ;
+ }
+}
+
+actions append
+{
+ $(ECHO_CMD)-------------------------------------------------$(X)
+ $(ECHO_CMD)Appender run: $(>[1])$(X)
+ $(ECHO_CMD)Appender run: $(>[1])$(X)>> "$(>[2])"
+ $(ECHO_CMD)Target group: $(<:J=' ')$(X)
+ $(ECHO_CMD)Target group: $(<:J=' ')$(X)>> "$(>[2])"
+ $(ECHO_CMD) Target: '$(>[2])'$(X)
+ $(ECHO_CMD) Target: '$(>[2])'$(X)>> "$(>[2])"
+ $(ECHO_CMD) Sources: '$(>[3-]:J=' ')'$(X)
+ $(ECHO_CMD) Sources: '$(>[3-]:J=' ')'$(X)>> "$(>[2])"
+ $(ECHO_CMD)=================================================$(X)
+ $(ECHO_CMD)-------------------------------------------------$(X)>> "$(>[2])"
+}
+""")
+
+
+test_assigning_project_ids()
+test_using_project_ids_in_target_references()
+test_repeated_ids_for_same_project()
+test_repeated_ids_for_different_projects()
+test_unresolved_project_references()
diff --git a/src/boost/tools/build/test/project_root_constants.py b/src/boost/tools/build/test/project_root_constants.py
new file mode 100644
index 000000000..25006a015
--- /dev/null
+++ b/src/boost/tools/build/test/project_root_constants.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+
+# Copyright 2003, 2004, 2005 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)
+
+import BoostBuild
+
+# Create a temporary working directory.
+t = BoostBuild.Tester()
+
+# Create the needed files.
+t.write("jamroot.jam", """\
+constant FOO : foobar gee ;
+ECHO $(FOO) ;
+""")
+
+t.run_build_system()
+t.expect_output_lines("foobar gee")
+
+# Regression test: when absolute paths were passed to path-constant rule,
+# B2 failed to recognize path as absolute and prepended the current
+# dir.
+t.write("jamroot.jam", """\
+import path ;
+local here = [ path.native [ path.pwd ] ] ;
+path-constant HERE : $(here) ;
+if $(HERE) != $(here)
+{
+ ECHO "PWD =" $(here) ;
+ ECHO "path constant =" $(HERE) ;
+ EXIT ;
+}
+""")
+t.write("jamfile.jam", "")
+
+t.run_build_system()
+
+t.write("jamfile.jam", """\
+# This tests that rule 'hello' will be imported to children unlocalized, and
+# will still access variables in this Jamfile.
+x = 10 ;
+constant FOO : foo ;
+rule hello ( ) { ECHO "Hello $(x)" ; }
+""")
+
+t.write("d/jamfile.jam", """\
+ECHO "d: $(FOO)" ;
+constant BAR : bar ;
+""")
+
+t.write("d/d2/jamfile.jam", """\
+ECHO "d2: $(FOO)" ;
+ECHO "d2: $(BAR)" ;
+hello ;
+""")
+
+t.run_build_system(subdir="d/d2")
+t.expect_output_lines("d: foo\nd2: foo\nd2: bar\nHello 10")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/project_root_rule.py b/src/boost/tools/build/test/project_root_rule.py
new file mode 100644
index 000000000..503b3cad2
--- /dev/null
+++ b/src/boost/tools/build/test/project_root_rule.py
@@ -0,0 +1,34 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 2005.
+# 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)
+
+# Tests that we can declare a rule in Jamroot that will be can be called in
+# child Jamfile to declare a target. Specifically test for use of 'glob' in that
+# rule.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+
+t.write("jamroot.jam", """
+project : requirements <link>static ;
+rule my-lib ( name ) { lib $(name) : [ glob *.cpp ] ; }
+""")
+
+t.write("sub/a.cpp", """
+""")
+
+t.write("sub/jamfile.jam", """
+my-lib foo ;
+""")
+
+
+t.run_build_system(subdir="sub")
+
+t.expect_addition("sub/bin/$toolset/debug*/foo.lib")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/project_test3.py b/src/boost/tools/build/test/project_test3.py
new file mode 100644
index 000000000..9203cd885
--- /dev/null
+++ b/src/boost/tools/build/test/project_test3.py
@@ -0,0 +1,135 @@
+#!/usr/bin/python
+
+# Copyright 2002, 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004, 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)
+
+import BoostBuild
+import os
+
+t = BoostBuild.Tester(translate_suffixes=0)
+
+# First check some startup.
+t.set_tree("project-test3")
+os.remove("jamroot.jam")
+t.run_build_system(status=1)
+
+t.expect_output_lines("*.yfc-compile\" unknown in module*")
+
+t.set_tree("project-test3")
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/a.obj")
+t.expect_content("bin/$toolset/debug*/a.obj", """\
+$toolset/debug*
+a.cpp
+""")
+
+t.expect_addition("bin/$toolset/debug*/a.exe")
+t.expect_content("bin/$toolset/debug*/a.exe",
+"$toolset/debug*\n" +
+"bin/$toolset/debug*/a.obj lib/bin/$toolset/debug*/b.obj " +
+"lib2/bin/$toolset/debug*/c.obj lib2/bin/$toolset/debug*/d.obj " +
+"lib2/helper/bin/$toolset/debug*/e.obj " +
+"lib3/bin/$toolset/debug*/f.obj\n"
+)
+
+t.expect_addition("lib/bin/$toolset/debug*/b.obj")
+t.expect_content("lib/bin/$toolset/debug*/b.obj", """\
+$toolset/debug*
+lib/b.cpp
+""")
+
+t.expect_addition("lib/bin/$toolset/debug*/m.exe")
+t.expect_content("lib/bin/$toolset/debug*/m.exe", """\
+$toolset/debug*
+lib/bin/$toolset/debug*/b.obj lib2/bin/$toolset/debug*/c.obj
+""")
+
+t.expect_addition("lib2/bin/$toolset/debug*/c.obj")
+t.expect_content("lib2/bin/$toolset/debug*/c.obj", """\
+$toolset/debug*
+lib2/c.cpp
+""")
+
+t.expect_addition("lib2/bin/$toolset/debug*/d.obj")
+t.expect_content("lib2/bin/$toolset/debug*/d.obj", """\
+$toolset/debug*
+lib2/d.cpp
+""")
+
+t.expect_addition("lib2/bin/$toolset/debug*/l.exe")
+t.expect_content("lib2/bin/$toolset/debug*/l.exe", """\
+$toolset/debug*
+lib2/bin/$toolset/debug*/c.obj bin/$toolset/debug*/a.obj
+""")
+
+t.expect_addition("lib2/helper/bin/$toolset/debug*/e.obj")
+t.expect_content("lib2/helper/bin/$toolset/debug*/e.obj", """\
+$toolset/debug*
+lib2/helper/e.cpp
+""")
+
+t.expect_addition("lib3/bin/$toolset/debug*/f.obj")
+t.expect_content("lib3/bin/$toolset/debug*/f.obj", """\
+$toolset/debug*
+lib3/f.cpp lib2/helper/bin/$toolset/debug*/e.obj
+""")
+
+t.touch("a.cpp")
+t.run_build_system()
+t.expect_touch(["bin/$toolset/debug*/a.obj",
+ "bin/$toolset/debug*/a.exe",
+ "lib2/bin/$toolset/debug*/l.exe"])
+
+t.run_build_system(["release", "optimization=off,speed"])
+t.expect_addition(["bin/$toolset/release/optimization-off*/a.exe",
+ "bin/$toolset/release/optimization-off*/a.obj",
+ "bin/$toolset/release*/a.exe",
+ "bin/$toolset/release*/a.obj"])
+
+t.run_build_system(["--clean-all"])
+t.expect_removal(["bin/$toolset/debug*/a.obj",
+ "bin/$toolset/debug*/a.exe",
+ "lib/bin/$toolset/debug*/b.obj",
+ "lib/bin/$toolset/debug*/m.exe",
+ "lib2/bin/$toolset/debug*/c.obj",
+ "lib2/bin/$toolset/debug*/d.obj",
+ "lib2/bin/$toolset/debug*/l.exe",
+ "lib3/bin/$toolset/debug*/f.obj"])
+
+# Now test target ids in command line.
+t.set_tree("project-test3")
+t.run_build_system(["lib//b.obj"])
+t.expect_addition("lib/bin/$toolset/debug*/b.obj")
+t.expect_nothing_more()
+
+t.run_build_system(["--clean", "lib//b.obj"])
+t.expect_removal("lib/bin/$toolset/debug*/b.obj")
+t.expect_nothing_more()
+
+t.run_build_system(["lib//b.obj"])
+t.expect_addition("lib/bin/$toolset/debug*/b.obj")
+t.expect_nothing_more()
+
+t.run_build_system(["release", "lib2/helper//e.obj", "/lib3//f.obj"])
+t.expect_addition("lib2/helper/bin/$toolset/release*/e.obj")
+t.expect_addition("lib3/bin/$toolset/release*/f.obj")
+t.expect_nothing_more()
+
+# Test project ids in command line work as well.
+t.set_tree("project-test3")
+t.run_build_system(["/lib2"])
+t.expect_addition("lib2/bin/$toolset/debug*/" *
+ BoostBuild.List("c.obj d.obj l.exe"))
+t.expect_addition("bin/$toolset/debug*/a.obj")
+t.expect_nothing_more()
+
+t.run_build_system(["lib"])
+t.expect_addition("lib/bin/$toolset/debug*/" *
+ BoostBuild.List("b.obj m.exe"))
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/project_test4.py b/src/boost/tools/build/test/project_test4.py
new file mode 100644
index 000000000..45faf0dc5
--- /dev/null
+++ b/src/boost/tools/build/test/project_test4.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(translate_suffixes=0)
+
+
+t.set_tree("project-test4")
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/a.obj")
+t.expect_content("bin/$toolset/debug*/a.obj",
+"""$toolset/debug*/include-everything*
+a.cpp
+""")
+
+t.expect_addition("bin/$toolset/debug*/a.exe")
+t.expect_content("bin/$toolset/debug*/a.exe",
+"$toolset/debug*/include-everything*\n" +
+"bin/$toolset/debug*/a.obj lib/bin/$toolset/debug/optimization-speed*/b.obj\n"
+)
+
+t.expect_addition("lib/bin/$toolset/debug/optimization-speed*/b.obj")
+t.expect_content("lib/bin/$toolset/debug/optimization-speed*/b.obj",
+"""$toolset/debug/include-everything/optimization-speed*
+lib/b.cpp
+""")
+
+t.expect_addition("bin/$toolset/debug*/b.exe")
+t.expect_content("bin/$toolset/debug*/b.exe",
+"$toolset/debug/define-MACROS/include-everything*\n" +
+"bin/$toolset/debug*/a.obj\n"
+)
+
+t.copy("lib/jamfile3.jam", "lib/jamfile.jam")
+
+# Link-compatibility check for rtti is disabled...
+#t.run_build_system(status=None)
+#import string
+#t.fail_test(t.stdout().find(
+#"""warning: targets produced from b.obj are link incompatible
+#warning: with main target a.exe""") !=-0)
+
+# Test that if we specified composite property in target reference, everything
+# works OK.
+
+t.copy("lib/jamfile1.jam", "lib/jamfile.jam")
+t.copy("jamfile5.jam", "jamfile.jam")
+
+t.run_build_system()
+
+t.expect_addition("lib/bin/$toolset/release*/b.obj")
+
+t.expect_content("bin/$toolset/debug*/a.exe",
+"$toolset/debug/include-everything*\n" +
+"bin/$toolset/debug*/a.obj lib/bin/$toolset/release*/b.obj\n"
+)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/property_expansion.py b/src/boost/tools/build/test/property_expansion.py
new file mode 100644
index 000000000..53fc13616
--- /dev/null
+++ b/src/boost/tools/build/test/property_expansion.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+# 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)
+
+# Test that free property inside.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """\
+variant debug-AA : debug : <define>AA ;
+alias all : hello ;
+exe hello : hello.cpp ;
+explicit hello ;
+""")
+
+t.write("hello.cpp", """\
+#ifdef AA
+int main() {}
+#endif
+""")
+
+t.run_build_system(["debug-AA"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/qt4.py b/src/boost/tools/build/test/qt4.py
new file mode 100755
index 000000000..170f6079b
--- /dev/null
+++ b/src/boost/tools/build/test/qt4.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+# (c) Copyright Juergen Hunold 2008
+# 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)
+
+import BoostBuild
+import os
+
+# Run test in real directory in order to find Boost.Test via Boost Top-Level
+# Jamroot.
+qt4_dir = os.getcwd() + "/qt4"
+
+t = BoostBuild.Tester(workdir=qt4_dir)
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/qt4/jamroot.jam b/src/boost/tools/build/test/qt4/jamroot.jam
new file mode 100644
index 000000000..3d8e7d73b
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/jamroot.jam
@@ -0,0 +1,82 @@
+# (c) Copyright Juergen Hunold 2008
+# 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)
+
+import qt4 ;
+import testing ;
+import cast ;
+
+
+
+if [ qt4.initialized ]
+{
+ use-project /boost : ../../../.. ;
+
+ project qttest
+ : requirements
+ <library>/boost/test//boost_unit_test_framework
+ ;
+
+ alias qt-tests :
+ # Check for explicit libraries, <use>/qt should not link any lib
+ [ link-fail qtcorefail.cpp : <use>/qt ]
+
+ [ run qtcore.cpp /qt//QtCore ]
+ [ run qtsql.cpp /qt//QtSql ]
+ [ run qtxml.cpp /qt//QtXml ]
+ [ run qtnetwork.cpp /qt//QtNetwork ]
+ [ run qtscript.cpp /qt//QtScript ]
+ [ run qtscripttools.cpp /qt//QtScriptTools ]
+ [ run qtxmlpatterns.cpp /qt//QtXmlPatterns ]
+
+ # ToDo: runable example code
+ [ link qtsvg.cpp /qt//QtSvg ]
+ [ link qtgui.cpp /qt//QtGui ]
+
+ # Multimedia toolkits.
+ [ link qtwebkit.cpp /qt//QtWebKit ]
+ [ link phonon.cpp /qt//phonon ]
+ [ link qtmultimedia.cpp /qt//QtMultimedia ]
+
+ # QML
+ [ link qtdeclarative.cpp /qt//QtDeclarative ]
+
+ # Help systems.
+ [ link qthelp.cpp /qt//QtHelp ]
+ [ link qtassistant.cpp /qt//QtAssistantClient : <conditional>@check_for_assistant ]
+
+ # Check working and disabled Qt3Support
+ [ link qt3support.cpp /qt//Qt3Support : <qt3support>on ]
+ [ compile-fail qt3support.cpp /qt//Qt3Support : <qt3support>off ]
+
+ # Testing using QtTest. Simple sample
+ # ToDo: better support for "automoc" aka '#include "qttest.moc"'
+ [ run qttest.cpp [ cast _ moccable-cpp : qttest.cpp ] /qt//QtTest : : : <define>TEST_MOCK ]
+
+ # Test moc rule
+ [ run mock.cpp mock.h /qt//QtCore : : : <define>TEST_MOCK ]
+
+ # Test resource compiler
+ [ run rcc.cpp rcc.qrc /qt//QtCore : : : <rccflags>"-compress 9 -threshold 10" ]
+
+ : # requirements
+ : # default-build
+ : # usage-requirements
+ ;
+}
+
+# QtAssistant is removed from Qt >= 4.6
+rule check_for_assistant ( properties * )
+{
+ # Extract version number from toolset
+ local version = [ MATCH "<qt>([0-9.]+).*"
+ : $(properties) ] ;
+
+ if $(version) > "4.6.99"
+ {
+ result += <build>no ;
+ }
+}
+
+
diff --git a/src/boost/tools/build/test/qt4/mock.cpp b/src/boost/tools/build/test/qt4/mock.cpp
new file mode 100644
index 000000000..8f7a35c2d
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/mock.cpp
@@ -0,0 +1,26 @@
+// (c) Copyright Juergen Hunold 2011
+// 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)
+
+#define BOOST_TEST_MODULE QtMoc
+
+#include "mock.h"
+
+#include <boost/test/unit_test.hpp>
+
+Mock::Mock()
+{
+}
+
+/*!
+ Check that the compiler get the correct #defines.
+ The logic to test the moc is in the header file "mock.h"
+ */
+BOOST_AUTO_TEST_CASE(construct_mock)
+{
+ delete new Mock();
+
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(TEST_MOCK), true);
+}
diff --git a/src/boost/tools/build/test/qt4/mock.h b/src/boost/tools/build/test/qt4/mock.h
new file mode 100644
index 000000000..1cc95b057
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/mock.h
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2011
+// 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 <QtCore/QObject>
+
+class Mock : public QObject
+{
+ /*!
+ Test that the moc gets the necessary #defines
+ Else the moc will not see the Q_OBJECT macro, issue a warning
+ and linking will fail due to missing vtable symbols.
+ */
+#if defined(TEST_MOCK)
+ Q_OBJECT
+#endif
+ public:
+
+ Mock();
+};
diff --git a/src/boost/tools/build/test/qt4/phonon.cpp b/src/boost/tools/build/test/qt4/phonon.cpp
new file mode 100644
index 000000000..3151f5911
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/phonon.cpp
@@ -0,0 +1,23 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtPhonon
+
+#include <phonon/MediaObject>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_PHONON_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( phonon_object)
+{
+ Phonon::MediaObject player;
+}
diff --git a/src/boost/tools/build/test/qt4/qt3support.cpp b/src/boost/tools/build/test/qt4/qt3support.cpp
new file mode 100644
index 000000000..35d8c73b9
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qt3support.cpp
@@ -0,0 +1,29 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE Qt3Support
+
+#include <Q3Table>
+
+#include <boost/test/unit_test.hpp>
+
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SQL_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_NETWORK_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_QT3SUPPORT_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT3_SUPPORT), true);
+}
+
+BOOST_AUTO_TEST_CASE( q3table )
+{
+ Q3Table q3table;
+
+}
+
diff --git a/src/boost/tools/build/test/qt4/qtassistant.cpp b/src/boost/tools/build/test/qt4/qtassistant.cpp
new file mode 100644
index 000000000..e2a6ed7bd
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtassistant.cpp
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtAssistant
+
+#include <QAssistantClient>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( empty_assistant)
+{
+ QAssistantClient client(QString());
+}
diff --git a/src/boost/tools/build/test/qt4/qtcore.cpp b/src/boost/tools/build/test/qt4/qtcore.cpp
new file mode 100644
index 000000000..f3c09039b
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtcore.cpp
@@ -0,0 +1,22 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtCore
+#include <QtCore>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( qstring_test)
+{
+ QString dummy;
+
+ BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
+}
diff --git a/src/boost/tools/build/test/qt4/qtcorefail.cpp b/src/boost/tools/build/test/qt4/qtcorefail.cpp
new file mode 100644
index 000000000..15fd36aef
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtcorefail.cpp
@@ -0,0 +1,23 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtCoreFail
+
+#include <QtCore>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( qstring_test)
+{
+ QString dummy;
+
+ BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
+}
diff --git a/src/boost/tools/build/test/qt4/qtdeclarative.cpp b/src/boost/tools/build/test/qt4/qtdeclarative.cpp
new file mode 100644
index 000000000..817855bad
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtdeclarative.cpp
@@ -0,0 +1,27 @@
+// (c) Copyright Juergen Hunold 2011
+// 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)
+
+#define BOOST_TEST_MODULE QtMultimedia
+
+#include <QApplication>
+#include <QDeclarativeView>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_DECLARATIVE_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( declarative )
+{
+ QApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+ QDeclarativeView view;
+}
diff --git a/src/boost/tools/build/test/qt4/qtgui.cpp b/src/boost/tools/build/test/qt4/qtgui.cpp
new file mode 100644
index 000000000..75d9dacbe
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtgui.cpp
@@ -0,0 +1,42 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtGui
+
+#include <QApplication>
+
+#include <boost/test/unit_test.hpp>
+
+struct Fixture
+{
+ Fixture()
+ : application(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv,
+ false)
+ {
+ BOOST_TEST_MESSAGE( "setup QApplication fixture" );
+ }
+
+ ~Fixture()
+ {
+ BOOST_TEST_MESSAGE( "teardown QApplication fixture" );
+ }
+
+ QApplication application;
+};
+
+BOOST_GLOBAL_FIXTURE( Fixture );
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( qtgui_test)
+{
+ BOOST_CHECK_EQUAL(true, true);
+}
diff --git a/src/boost/tools/build/test/qt4/qthelp.cpp b/src/boost/tools/build/test/qt4/qthelp.cpp
new file mode 100644
index 000000000..32327de58
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qthelp.cpp
@@ -0,0 +1,22 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtHelp
+
+#include <QtHelp>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( empty_engine)
+{
+ QHelpEngine engine(QString());
+}
diff --git a/src/boost/tools/build/test/qt4/qtmultimedia.cpp b/src/boost/tools/build/test/qt4/qtmultimedia.cpp
new file mode 100644
index 000000000..dc5914aff
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtmultimedia.cpp
@@ -0,0 +1,25 @@
+// (c) Copyright Juergen Hunold 2009
+// 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)
+
+#define BOOST_TEST_MODULE QtMultimedia
+
+#include <QAudioDeviceInfo>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_MULTIMEDIA_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( audiodevices)
+{
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
+ for(int i = 0; i < devices.size(); ++i) {
+ BOOST_TEST_MESSAGE(QAudioDeviceInfo(devices.at(i)).deviceName().constData());
+ }
+}
diff --git a/src/boost/tools/build/test/qt4/qtnetwork.cpp b/src/boost/tools/build/test/qt4/qtnetwork.cpp
new file mode 100644
index 000000000..3f628d880
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtnetwork.cpp
@@ -0,0 +1,33 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtNetwork
+
+#include <QHostInfo>
+
+#include <QTextStream>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_NETWORK_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( hostname )
+{
+ QHostInfo info(QHostInfo::fromName("www.boost.org")); //blocking lookup
+
+ QTextStream stream(stdout, QIODevice::WriteOnly);
+
+ Q_FOREACH(QHostAddress address, info.addresses())
+ {
+ BOOST_CHECK_EQUAL(address.isNull(), false);
+ stream << address.toString() << endl;
+ }
+}
diff --git a/src/boost/tools/build/test/qt4/qtscript.cpp b/src/boost/tools/build/test/qt4/qtscript.cpp
new file mode 100644
index 000000000..65353daec
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtscript.cpp
@@ -0,0 +1,37 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtScript
+
+#include <QScriptEngine>
+
+#include <QCoreApplication>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+std::ostream&
+operator << (std::ostream& stream, QString const& string)
+{
+ stream << qPrintable(string);
+ return stream;
+}
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCRIPT_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( script )
+{
+ QCoreApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+ QScriptEngine myEngine;
+ QScriptValue three = myEngine.evaluate("1 + 2");
+
+ BOOST_CHECK_EQUAL(three.toNumber(), 3);
+ BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
+}
diff --git a/src/boost/tools/build/test/qt4/qtscripttools.cpp b/src/boost/tools/build/test/qt4/qtscripttools.cpp
new file mode 100644
index 000000000..4d0b7f256
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtscripttools.cpp
@@ -0,0 +1,47 @@
+// (c) Copyright Juergen Hunold 2009
+// 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)
+
+#define BOOST_TEST_MODULE QtScriptTools
+
+#include <QScriptEngine>
+
+#include <QScriptEngineDebugger>
+
+#include <QApplication>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+namespace utf = boost::unit_test::framework;
+
+std::ostream&
+operator << (std::ostream& stream, QString const& string)
+{
+ stream << qPrintable(string);
+ return stream;
+}
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCRIPTTOOLS_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( script )
+{
+ QApplication app(utf::master_test_suite().argc,
+ utf::master_test_suite().argv);
+
+ QScriptEngine myEngine;
+ QScriptValue three = myEngine.evaluate("1 + 2");
+
+ QScriptEngineDebugger debugger;
+ debugger.attachTo(&myEngine);
+
+ BOOST_CHECK_EQUAL(three.toNumber(), 3);
+ BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
+
+ debugger.detach();
+}
diff --git a/src/boost/tools/build/test/qt4/qtsql.cpp b/src/boost/tools/build/test/qt4/qtsql.cpp
new file mode 100644
index 000000000..aa506b1c7
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtsql.cpp
@@ -0,0 +1,37 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtSql
+
+#include <QSqlDatabase>
+
+#include <QTextStream>
+#include <QStringList>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SQL_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( drivers )
+{
+ QTextStream stream(stdout, QIODevice::WriteOnly);
+
+ Q_FOREACH(QString it, QSqlDatabase:: drivers())
+ {
+ stream << it << endl;
+ }
+}
+
+BOOST_AUTO_TEST_CASE( construct )
+{
+ QSqlDatabase database;
+ BOOST_CHECK_EQUAL(database.isOpen(), false);
+}
diff --git a/src/boost/tools/build/test/qt4/qtsvg.cpp b/src/boost/tools/build/test/qt4/qtsvg.cpp
new file mode 100644
index 000000000..8a1394380
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtsvg.cpp
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtSvg
+
+#include <QtSvg>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SVG_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( generator_construct)
+{
+ QSvgGenerator generator;
+}
diff --git a/src/boost/tools/build/test/qt4/qttest.cpp b/src/boost/tools/build/test/qt4/qttest.cpp
new file mode 100644
index 000000000..a2744cdc7
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qttest.cpp
@@ -0,0 +1,30 @@
+// (c) Copyright Juergen Hunold 2008-2011
+// 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 <QtTest>
+
+class QtTest: public QObject
+{
+ /*!
+ Test if the moc gets the #define
+ */
+#if defined(TEST_MOCK)
+ Q_OBJECT
+#endif
+
+private Q_SLOTS:
+ void toUpper();
+};
+
+void
+QtTest::toUpper()
+{
+ QString str = "Hello";
+ QCOMPARE(str.toUpper(), QString("HELLO"));
+}
+
+QTEST_MAIN(QtTest)
+#include "qttest.moc"
+
diff --git a/src/boost/tools/build/test/qt4/qtwebkit.cpp b/src/boost/tools/build/test/qt4/qtwebkit.cpp
new file mode 100644
index 000000000..7d85f1473
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtwebkit.cpp
@@ -0,0 +1,24 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtWebKit
+
+#include <QWebPage>
+#include <QApplication>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBKIT_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( webkit )
+{
+ QWebPage page;
+ BOOST_CHECK_EQUAL(page.isModified(), false);
+}
diff --git a/src/boost/tools/build/test/qt4/qtxml.cpp b/src/boost/tools/build/test/qt4/qtxml.cpp
new file mode 100644
index 000000000..8002c2658
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtxml.cpp
@@ -0,0 +1,29 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtXml
+
+#include <QtXml>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( reader_construct)
+{
+ QXmlStreamReader reader;
+ BOOST_CHECK_EQUAL(reader.atEnd(), false);
+}
+
+BOOST_AUTO_TEST_CASE( writer_construct)
+{
+ QXmlStreamWriter writer;
+ BOOST_CHECK_EQUAL(writer.device(), static_cast<QIODevice*>(0));
+}
+
diff --git a/src/boost/tools/build/test/qt4/qtxmlpatterns.cpp b/src/boost/tools/build/test/qt4/qtxmlpatterns.cpp
new file mode 100644
index 000000000..6835fdad8
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/qtxmlpatterns.cpp
@@ -0,0 +1,76 @@
+// (c) Copyright Juergen Hunold 2008
+// 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)
+
+#define BOOST_TEST_MODULE QtXmlPatterns
+
+#include <QXmlQuery>
+#include <QXmlSerializer>
+
+#include <QCoreApplication>
+#include <QString>
+#include <QTextStream>
+#include <QBuffer>
+
+#include <boost/test/unit_test.hpp>
+
+
+struct Fixture
+{
+ Fixture()
+ : application(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv)
+ {
+ BOOST_TEST_MESSAGE( "setup QCoreApplication fixture" );
+ }
+
+ ~Fixture()
+ {
+ BOOST_TEST_MESSAGE( "teardown QCoreApplication fixture" );
+ }
+
+ QCoreApplication application;
+};
+
+BOOST_GLOBAL_FIXTURE( Fixture );
+
+QByteArray doc("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml/\" xml:lang=\"en\" lang=\"en\">"
+" <head>"
+" <title>Global variables report for globals.gccxml</title>"
+" </head>"
+"<body><p>Some Test text</p></body></html>");
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XMLPATTERNS_LIB), true);
+
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), false);
+}
+
+BOOST_AUTO_TEST_CASE( extract )
+{
+
+ QBuffer buffer(&doc); // This is a QIODevice.
+ buffer.open(QIODevice::ReadOnly);
+ QXmlQuery query;
+ query.bindVariable("myDocument", &buffer);
+ query.setQuery("declare variable $myDocument external;"
+ "doc($myDocument)");///p[1]");
+
+ BOOST_CHECK_EQUAL(query.isValid(), true);
+
+ QByteArray result;
+ QBuffer out(&result);
+ out.open(QIODevice::WriteOnly);
+
+ QXmlSerializer serializer(query, &out);
+ BOOST_CHECK_EQUAL(query.evaluateTo(&serializer), true);
+
+ QTextStream stream(stdout);
+ BOOST_CHECK_EQUAL(result.isEmpty(), false);
+ stream << "hallo" << result << endl;
+}
+
diff --git a/src/boost/tools/build/test/qt4/rcc.cpp b/src/boost/tools/build/test/qt4/rcc.cpp
new file mode 100644
index 000000000..cae553bb1
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/rcc.cpp
@@ -0,0 +1,20 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtCore
+#include <QtCore>
+
+#include <boost/test/unit_test.hpp>
+
+std::ostream& operator<<(std::ostream& out, QString const& text)
+{
+ out << text.toUtf8().constData();
+ return out;
+}
+
+BOOST_AUTO_TEST_CASE (check_exists)
+{
+ BOOST_CHECK(QFile::exists(":/test/rcc.cpp"));
+}
diff --git a/src/boost/tools/build/test/qt4/rcc.qrc b/src/boost/tools/build/test/qt4/rcc.qrc
new file mode 100644
index 000000000..13ca38a5d
--- /dev/null
+++ b/src/boost/tools/build/test/qt4/rcc.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/test/">
+ <file>rcc.cpp</file>
+ </qresource>
+</RCC>
diff --git a/src/boost/tools/build/test/qt5.py b/src/boost/tools/build/test/qt5.py
new file mode 100755
index 000000000..d9e1226e8
--- /dev/null
+++ b/src/boost/tools/build/test/qt5.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+# (c) Copyright Juergen Hunold 2012
+# 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)
+
+import BoostBuild
+import os
+
+# Run test in real directory in order to find Boost.Test via Boost Top-Level
+# Jamroot.
+qt5_dir = os.getcwd() + "/qt5"
+
+t = BoostBuild.Tester(workdir=qt5_dir)
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/qt5/jamroot.jam b/src/boost/tools/build/test/qt5/jamroot.jam
new file mode 100644
index 000000000..782922557
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/jamroot.jam
@@ -0,0 +1,104 @@
+# (c) Copyright Juergen Hunold 2008
+# 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)
+
+import qt5 ;
+import testing ;
+import cast ;
+
+path-constant CWD : . ;
+
+
+if [ qt5.initialized ]
+{
+ use-project /boost : ../../../.. ;
+
+ project qttest
+ : requirements
+ <library>/boost/test//boost_unit_test_framework
+ ;
+
+ alias qt-tests :
+ # Check for explicit libraries, <use>/qt should not link any lib
+ [ link-fail qtcorefail.cpp : <use>/qt ]
+
+ [ run qtcore.cpp /qt5//QtCore ]
+ [ run qtsql.cpp /qt5//QtSql ]
+ [ run qtxml.cpp /qt5//QtXml ]
+ [ run qtnetwork.cpp /qt5//QtNetwork ]
+ [ run qtscript.cpp /qt5//QtScript ]
+ [ run qtscripttools.cpp /qt5//QtScriptTools ]
+ [ run qtxmlpatterns.cpp /qt5//QtXmlPatterns ]
+
+ [ run qtpositioning.cpp /qt5//QtPositioning ]
+
+ # ToDo: runable example code
+ [ link qtsvg.cpp /qt5//QtSvg ]
+ [ link qtwidgets.cpp /qt5//QtWidgets ]
+
+ # Multimedia toolkits.
+ [ link qtwebkit.cpp /qt5//QtWebKit ]
+ [ link qtwebkitwidgets.cpp /qt5//QtWebKitWidgets ]
+ [ link qtmultimedia.cpp /qt5//QtMultimedia ]
+
+ # QtQuick version1
+ [ link qtdeclarative.cpp /qt5//QtDeclarative ]
+
+ # QtQuick version2
+ [ run qtquick.cpp /qt5//QtQuick : "--" -platform offscreen : $(CWD)/qtquick.qml ]
+
+ [ run qtwebengine.cpp /qt5//QtWebEngine ]
+ [ run qtwebenginewidgets.cpp /qt5//QtWebEngineWidgets ]
+
+ # QtSerialPort
+ [ run qtserialport.cpp /qt5//QtSerialPort ]
+
+ [ run qtlocation.cpp /qt5//QtLocation ]
+
+ [ run qtwebchannel.cpp /qt5//QtWebChannel ]
+ [ run qtwebsockets.cpp /qt5//QtWebSockets ]
+ [ run qtwebview.cpp /qt5//QtWebView ]
+
+ [ run qtpurchasing.cpp /qt5//QtPurchasing ]
+
+ [ run qtcharts.cpp /qt5//QtCharts ]
+
+ [ run qt3dcore.cpp /qt5//Qt3DCore ]
+ [ run qt3drender.cpp /qt5//Qt3DRender ]
+ [ run qt3dinput.cpp /qt5//Qt3DInput ]
+ [ run qt3dlogic.cpp /qt5//Qt3DLogic ]
+
+ [ run qtdatavisualization.cpp /qt5//QtDataVisualization ]
+
+ # Qt Connectivity
+ [ run qtbluetooth.cpp /qt5//QtBluetooth ]
+ [ run qtnfc.cpp /qt5//QtNfc ]
+
+ [ run qtgamepad.cpp /qt5//QtGamepad ]
+
+ [ run qtscxml.cpp /qt5//QtScxml ]
+
+ [ run qtserialbus.cpp /qt5//QtSerialBus ]
+
+
+ # Help systems.
+ [ link qthelp.cpp /qt5//QtHelp ]
+
+ # Testing using QtTest. Simple sample
+ # ToDo: better support for "automoc" aka '#include "qttest.moc"'
+ [ run qttest.cpp [ cast _ moccable5-cpp : qttest.cpp ] /qt5//QtTest : : : <define>TEST_MOCK ]
+
+ # Test moc rule
+ [ run mock.cpp mock.h /qt5//QtCore : : : <define>TEST_MOCK ]
+
+ # Test resource compiler
+ [ run rcc.cpp rcc.qrc /qt5//QtCore : : : <rccflags>"-compress 9 -threshold 10" ]
+
+ : # requirements
+ : # default-build
+ : # usage-requirements
+ ;
+}
+
+
diff --git a/src/boost/tools/build/test/qt5/mock.cpp b/src/boost/tools/build/test/qt5/mock.cpp
new file mode 100644
index 000000000..82fc608dc
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/mock.cpp
@@ -0,0 +1,26 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtMoc
+
+#include "mock.h"
+
+#include <boost/test/unit_test.hpp>
+
+Mock::Mock()
+{
+}
+
+/*!
+ Check that the compiler get the correct #defines.
+ The logic to test the moc is in the header file "mock.h"
+ */
+BOOST_AUTO_TEST_CASE(construct_mock)
+{
+ delete new Mock();
+
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(TEST_MOCK), true);
+}
diff --git a/src/boost/tools/build/test/qt5/mock.h b/src/boost/tools/build/test/qt5/mock.h
new file mode 100644
index 000000000..eac177d4d
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/mock.h
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2012
+// 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 <QtCore/QObject>
+
+class Mock : public QObject
+{
+ /*!
+ Test that the moc gets the necessary #defines
+ Else the moc will not see the Q_OBJECT macro, issue a warning
+ and linking will fail due to missing vtable symbols.
+ */
+#if defined(TEST_MOCK)
+ Q_OBJECT
+#endif
+ public:
+
+ Mock();
+};
diff --git a/src/boost/tools/build/test/qt5/qt3dcore.cpp b/src/boost/tools/build/test/qt5/qt3dcore.cpp
new file mode 100644
index 000000000..9d1871bdc
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qt3dcore.cpp
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2015
+// 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)
+
+#define BOOST_TEST_MODULE Qt3DCore
+#include <Qt3DCore>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE ( sample_code )
+{
+ Qt3DCore::QTransform torusTransform;
+ torusTransform.setScale3D(QVector3D(1.5, 1, 0.5));
+ torusTransform.setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 45.0f));
+}
diff --git a/src/boost/tools/build/test/qt5/qt3dinput.cpp b/src/boost/tools/build/test/qt5/qt3dinput.cpp
new file mode 100644
index 000000000..46cee14a3
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qt3dinput.cpp
@@ -0,0 +1,24 @@
+// (c) Copyright Juergen Hunold 2015
+// 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)
+
+#define BOOST_TEST_MODULE Qt3DInput
+#include <Qt3DInput>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DINPUT_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DRENDER_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE ( sample_code )
+{
+ Qt3DCore::QEntity rootEntity;
+
+}
+
diff --git a/src/boost/tools/build/test/qt5/qt3dlogic.cpp b/src/boost/tools/build/test/qt5/qt3dlogic.cpp
new file mode 100644
index 000000000..088f42099
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qt3dlogic.cpp
@@ -0,0 +1,20 @@
+// (c) Copyright Juergen Hunold 2015
+// 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)
+
+#define BOOST_TEST_MODULE Qt3DLogic
+#include <Qt3DLogic>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DLOGIC_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE ( sample_code )
+{
+ Qt3DLogic::QLogicAspect logicAspect;
+}
diff --git a/src/boost/tools/build/test/qt5/qt3drender.cpp b/src/boost/tools/build/test/qt5/qt3drender.cpp
new file mode 100644
index 000000000..d4578054d
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qt3drender.cpp
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2015
+// 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)
+
+#define BOOST_TEST_MODULE Qt3DRender
+#include <Qt3DRender>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DRENDER_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE ( sample_code )
+{
+ Qt3DCore::QEntity rootEntity;
+ Qt3DRender::QMaterial material(&rootEntity);
+}
diff --git a/src/boost/tools/build/test/qt5/qtassistant.cpp b/src/boost/tools/build/test/qt5/qtassistant.cpp
new file mode 100644
index 000000000..c15ee4eca
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtassistant.cpp
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtAssistant
+
+#include <QAssistantClient>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( empty_assistant)
+{
+ QAssistantClient client(QString());
+}
diff --git a/src/boost/tools/build/test/qt5/qtbluetooth.cpp b/src/boost/tools/build/test/qt5/qtbluetooth.cpp
new file mode 100644
index 000000000..53beff17b
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtbluetooth.cpp
@@ -0,0 +1,34 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtBluetooth
+
+#include <QtBluetooth>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_BLUETOOTH_LIB), true);
+}
+
+/*!
+ Try to detect a device
+ */
+BOOST_AUTO_TEST_CASE( bluetooth )
+{
+ QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices();
+
+ if (!localAdapters.empty())
+ {
+ QBluetoothLocalDevice adapter(localAdapters.at(0).address());
+ adapter.setHostMode(QBluetoothLocalDevice::HostDiscoverable);
+ }
+ else
+ {
+ BOOST_TEST(localAdapters.size() == 0);
+ }
+}
diff --git a/src/boost/tools/build/test/qt5/qtcharts.cpp b/src/boost/tools/build/test/qt5/qtcharts.cpp
new file mode 100644
index 000000000..d29c4fd03
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtcharts.cpp
@@ -0,0 +1,15 @@
+// (c) Copyright Juergen Hunold 2015
+// 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)
+
+#define BOOST_TEST_MODULE QtCharts
+#include <QtCharts>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WIDGETS_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CHARTS_LIB), true);
+}
diff --git a/src/boost/tools/build/test/qt5/qtcore.cpp b/src/boost/tools/build/test/qt5/qtcore.cpp
new file mode 100644
index 000000000..6a2c62c8d
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtcore.cpp
@@ -0,0 +1,22 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtCore
+#include <QtCore>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( qstring_test)
+{
+ QString dummy;
+
+ BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
+}
diff --git a/src/boost/tools/build/test/qt5/qtcorefail.cpp b/src/boost/tools/build/test/qt5/qtcorefail.cpp
new file mode 100644
index 000000000..8032d47cd
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtcorefail.cpp
@@ -0,0 +1,23 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtCoreFail
+
+#include <QtCore>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( qstring_test)
+{
+ QString dummy;
+
+ BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
+}
diff --git a/src/boost/tools/build/test/qt5/qtdatavisualization.cpp b/src/boost/tools/build/test/qt5/qtdatavisualization.cpp
new file mode 100644
index 000000000..bc35c04c5
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtdatavisualization.cpp
@@ -0,0 +1,31 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtDataVisualization
+
+#include <QtDataVisualization>
+
+#include <QGuiApplication>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_DATAVISUALIZATION_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( datavisualization )
+{
+ QGuiApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+
+ QtDataVisualization::Q3DBars graph;
+
+ graph.setShadowQuality(QtDataVisualization::QAbstract3DGraph::ShadowQualitySoftMedium);
+ graph.activeTheme()->setBackgroundEnabled(false);
+ graph.activeTheme()->setLabelBackgroundEnabled(true);
+}
diff --git a/src/boost/tools/build/test/qt5/qtdeclarative.cpp b/src/boost/tools/build/test/qt5/qtdeclarative.cpp
new file mode 100644
index 000000000..df70f5e46
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtdeclarative.cpp
@@ -0,0 +1,26 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtDeclarative
+
+#include <QCoreApplication>
+#include <QDeclarativeView>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_DECLARATIVE_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( declarative )
+{
+ QCoreApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+ QDeclarativeView view;
+}
diff --git a/src/boost/tools/build/test/qt5/qtgamepad.cpp b/src/boost/tools/build/test/qt5/qtgamepad.cpp
new file mode 100644
index 000000000..c6c6aea50
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtgamepad.cpp
@@ -0,0 +1,29 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtGamepad
+
+#include <QtGamepad>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GAMEPAD_LIB), true);
+}
+
+/*!
+ Try to detect a device
+ */
+BOOST_AUTO_TEST_CASE( gamepad )
+{
+ auto gamepads = QGamepadManager::instance()->connectedGamepads();
+ if (gamepads.isEmpty()) {
+ return;
+ }
+
+ QGamepad gamepad(*gamepads.begin());
+}
diff --git a/src/boost/tools/build/test/qt5/qthelp.cpp b/src/boost/tools/build/test/qt5/qthelp.cpp
new file mode 100644
index 000000000..b0e877a6a
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qthelp.cpp
@@ -0,0 +1,22 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtHelp
+
+#include <QtHelp>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( empty_engine)
+{
+ QHelpEngine engine(QString());
+}
diff --git a/src/boost/tools/build/test/qt5/qtlocation.cpp b/src/boost/tools/build/test/qt5/qtlocation.cpp
new file mode 100644
index 000000000..9806dca93
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtlocation.cpp
@@ -0,0 +1,30 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtPositioning
+
+#include <QGeoAddress>
+#include <QGeoLocation>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_POSITIONING_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_NETWORK_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_LOCATION_LIB), true);
+}
+
+BOOST_TEST_DONT_PRINT_LOG_VALUE(QGeoAddress)
+
+BOOST_AUTO_TEST_CASE( geo_location )
+{
+ QGeoLocation geolocation;
+
+ QGeoAddress address;
+
+ BOOST_CHECK_EQUAL(geolocation.address(), address);
+}
diff --git a/src/boost/tools/build/test/qt5/qtmultimedia.cpp b/src/boost/tools/build/test/qt5/qtmultimedia.cpp
new file mode 100644
index 000000000..dc5914aff
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtmultimedia.cpp
@@ -0,0 +1,25 @@
+// (c) Copyright Juergen Hunold 2009
+// 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)
+
+#define BOOST_TEST_MODULE QtMultimedia
+
+#include <QAudioDeviceInfo>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_MULTIMEDIA_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( audiodevices)
+{
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
+ for(int i = 0; i < devices.size(); ++i) {
+ BOOST_TEST_MESSAGE(QAudioDeviceInfo(devices.at(i)).deviceName().constData());
+ }
+}
diff --git a/src/boost/tools/build/test/qt5/qtnetwork.cpp b/src/boost/tools/build/test/qt5/qtnetwork.cpp
new file mode 100644
index 000000000..d34246689
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtnetwork.cpp
@@ -0,0 +1,33 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtNetwork
+
+#include <QHostInfo>
+
+#include <QTextStream>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_NETWORK_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( hostname )
+{
+ QHostInfo info(QHostInfo::fromName("www.boost.org")); //blocking lookup
+
+ QTextStream stream(stdout, QIODevice::WriteOnly);
+
+ Q_FOREACH(QHostAddress address, info.addresses())
+ {
+ BOOST_CHECK_EQUAL(address.isNull(), false);
+ stream << address.toString() << endl;
+ }
+}
diff --git a/src/boost/tools/build/test/qt5/qtnfc.cpp b/src/boost/tools/build/test/qt5/qtnfc.cpp
new file mode 100644
index 000000000..df3805f67
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtnfc.cpp
@@ -0,0 +1,28 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtNfc
+
+#include <QtNfc>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_NFC_LIB), true);
+}
+
+/*!
+ Try to detect a device
+ */
+BOOST_AUTO_TEST_CASE( nfc )
+{
+ QNearFieldManager manager;
+ if (!manager.isAvailable())
+ {
+ BOOST_TEST_MESSAGE("No Nfc");
+ }
+}
diff --git a/src/boost/tools/build/test/qt5/qtpositioning.cpp b/src/boost/tools/build/test/qt5/qtpositioning.cpp
new file mode 100644
index 000000000..427b41ba9
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtpositioning.cpp
@@ -0,0 +1,23 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtPositioning
+
+#include <QGeoCoordinate>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_POSITIONING_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( geo_coordinate )
+{
+ QGeoCoordinate geocoordinate;
+
+ BOOST_CHECK_EQUAL(geocoordinate.type(), QGeoCoordinate::InvalidCoordinate);
+}
diff --git a/src/boost/tools/build/test/qt5/qtpurchasing.cpp b/src/boost/tools/build/test/qt5/qtpurchasing.cpp
new file mode 100644
index 000000000..9a49ed2cc
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtpurchasing.cpp
@@ -0,0 +1,44 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtPurchasing
+
+#include <QtPurchasing>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_PURCHASING_LIB), true);
+}
+
+class DummyProduct : public QInAppProduct
+{
+public:
+
+ DummyProduct() : QInAppProduct{QStringLiteral("One"),
+ QString{},
+ QString{},
+ Consumable,
+ QStringLiteral("DummyProduct"),
+ nullptr} {};
+ void purchase() override {};
+};
+
+std::ostream&
+operator << (std::ostream& stream, QString const& string)
+{
+ stream << qPrintable(string);
+ return stream;
+}
+
+BOOST_AUTO_TEST_CASE (purchase)
+{
+ DummyProduct product;
+
+ BOOST_TEST(product.price() == QLatin1String("One"));
+ BOOST_TEST(product.identifier() == QLatin1String("DummyProduct"));
+}
diff --git a/src/boost/tools/build/test/qt5/qtquick.cpp b/src/boost/tools/build/test/qt5/qtquick.cpp
new file mode 100644
index 000000000..bec0d809c
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtquick.cpp
@@ -0,0 +1,43 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtQuick
+#include <QDir>
+#include <QTimer>
+#include <QGuiApplication>
+#include <QQmlEngine>
+#include <QQuickView>
+#include <QDebug>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_QML_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_QUICK_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE (simple_test)
+{
+ QGuiApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+ QQuickView view;
+
+ QString fileName(boost::unit_test::framework::master_test_suite().argv[1]);
+
+ view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));
+ view.setSource(QUrl::fromLocalFile(fileName)); \
+
+ QTimer::singleShot(2000, &app, SLOT(quit())); // Auto-close window
+
+ if (QGuiApplication::platformName() == QLatin1String("qnx") ||
+ QGuiApplication::platformName() == QLatin1String("eglfs")) {
+ view.setResizeMode(QQuickView::SizeRootObjectToView);
+ view.showFullScreen();
+ } else {
+ view.show();
+ }
+ BOOST_CHECK_EQUAL(app.exec(), 0);
+}
diff --git a/src/boost/tools/build/test/qt5/qtquick.qml b/src/boost/tools/build/test/qt5/qtquick.qml
new file mode 100644
index 000000000..26b23eb2a
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtquick.qml
@@ -0,0 +1,20 @@
+// (c) Copyright Juergen Hunold 2012
+// 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 QtQuick 2.0
+
+Rectangle {
+ id: page
+ width: 400; height: 200
+ color: "#d6d6d6"
+ Text {
+ id: helloText
+ text: "B2 built!"
+ color: "darkgray"
+ anchors.horizontalCenter: page.horizontalCenter
+ anchors.verticalCenter: page.verticalCenter
+ font.pointSize: 30; font.italic: true ; font.bold: true
+ }
+}
diff --git a/src/boost/tools/build/test/qt5/qtscript.cpp b/src/boost/tools/build/test/qt5/qtscript.cpp
new file mode 100644
index 000000000..d48c073eb
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtscript.cpp
@@ -0,0 +1,37 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtScript
+
+#include <QScriptEngine>
+
+#include <QCoreApplication>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+std::ostream&
+operator << (std::ostream& stream, QString const& string)
+{
+ stream << qPrintable(string);
+ return stream;
+}
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCRIPT_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( script )
+{
+ QCoreApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+ QScriptEngine myEngine;
+ QScriptValue three = myEngine.evaluate("1 + 2");
+
+ BOOST_CHECK_EQUAL(three.toNumber(), 3);
+ BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
+}
diff --git a/src/boost/tools/build/test/qt5/qtscripttools.cpp b/src/boost/tools/build/test/qt5/qtscripttools.cpp
new file mode 100644
index 000000000..002056a0f
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtscripttools.cpp
@@ -0,0 +1,47 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtScriptTools
+
+#include <QScriptEngine>
+
+#include <QScriptEngineDebugger>
+
+#include <QCoreApplication>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+namespace utf = boost::unit_test::framework;
+
+std::ostream&
+operator << (std::ostream& stream, QString const& string)
+{
+ stream << qPrintable(string);
+ return stream;
+}
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCRIPTTOOLS_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( script )
+{
+ QCoreApplication app(utf::master_test_suite().argc,
+ utf::master_test_suite().argv);
+
+ QScriptEngine myEngine;
+ QScriptValue three = myEngine.evaluate("1 + 2");
+
+ QScriptEngineDebugger debugger;
+ debugger.attachTo(&myEngine);
+
+ BOOST_CHECK_EQUAL(three.toNumber(), 3);
+ BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
+
+ debugger.detach();
+}
diff --git a/src/boost/tools/build/test/qt5/qtscxml.cpp b/src/boost/tools/build/test/qt5/qtscxml.cpp
new file mode 100644
index 000000000..9e423a18a
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtscxml.cpp
@@ -0,0 +1,33 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtScxml
+
+#include <QtScxml>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCXML_LIB), true);
+}
+
+std::ostream&
+operator << (std::ostream& stream, QString const& string)
+{
+ stream << qPrintable(string);
+ return stream;
+}
+
+/*!
+ */
+BOOST_AUTO_TEST_CASE( scxml )
+{
+ QString sessionId = QScxmlStateMachine::generateSessionId(QStringLiteral("dummy"));
+
+ BOOST_TEST(sessionId.isEmpty() == false);
+ BOOST_TEST(sessionId == QString{"dummy1"});
+}
diff --git a/src/boost/tools/build/test/qt5/qtserialbus.cpp b/src/boost/tools/build/test/qt5/qtserialbus.cpp
new file mode 100644
index 000000000..5849351d8
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtserialbus.cpp
@@ -0,0 +1,25 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtSerialBus
+
+#include <QtSerialBus>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SERIALBUS_LIB), true);
+}
+
+/*!
+ create a canbus instance
+ */
+BOOST_AUTO_TEST_CASE( serialBus )
+{
+ auto canbus = QCanBus::instance();
+ Q_UNUSED(canbus);
+}
diff --git a/src/boost/tools/build/test/qt5/qtserialport.cpp b/src/boost/tools/build/test/qt5/qtserialport.cpp
new file mode 100644
index 000000000..fd24ed92b
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtserialport.cpp
@@ -0,0 +1,22 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtSerialPort
+
+#include <QtSerialPort>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SERIALPORT_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( serialport )
+{
+ QSerialPort serialPort;
+ serialPort.setPortName(QStringLiteral("test serialport"));
+}
diff --git a/src/boost/tools/build/test/qt5/qtsql.cpp b/src/boost/tools/build/test/qt5/qtsql.cpp
new file mode 100644
index 000000000..127c5a3f4
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtsql.cpp
@@ -0,0 +1,37 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtSql
+
+#include <QSqlDatabase>
+
+#include <QTextStream>
+#include <QStringList>
+
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SQL_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( drivers )
+{
+ QTextStream stream(stdout, QIODevice::WriteOnly);
+
+ Q_FOREACH(QString it, QSqlDatabase:: drivers())
+ {
+ stream << it << endl;
+ }
+}
+
+BOOST_AUTO_TEST_CASE( construct )
+{
+ QSqlDatabase database;
+ BOOST_CHECK_EQUAL(database.isOpen(), false);
+}
diff --git a/src/boost/tools/build/test/qt5/qtsvg.cpp b/src/boost/tools/build/test/qt5/qtsvg.cpp
new file mode 100644
index 000000000..ccfd6b4d1
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtsvg.cpp
@@ -0,0 +1,21 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtSvg
+
+#include <QtSvg>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SVG_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( generator_construct)
+{
+ QSvgGenerator generator;
+}
diff --git a/src/boost/tools/build/test/qt5/qttest.cpp b/src/boost/tools/build/test/qt5/qttest.cpp
new file mode 100644
index 000000000..ddc8f686a
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qttest.cpp
@@ -0,0 +1,30 @@
+// (c) Copyright Juergen Hunold 2012
+// 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 <QtTest>
+
+class QtTest: public QObject
+{
+ /*!
+ Test if the moc gets the #define
+ */
+#if defined(TEST_MOCK)
+ Q_OBJECT
+#endif
+
+private Q_SLOTS:
+ void toUpper();
+};
+
+void
+QtTest::toUpper()
+{
+ QString str = "Hello";
+ QCOMPARE(str.toUpper(), QString("HELLO"));
+}
+
+QTEST_MAIN(QtTest)
+#include "qttest.moc"
+
diff --git a/src/boost/tools/build/test/qt5/qtwebchannel.cpp b/src/boost/tools/build/test/qt5/qtwebchannel.cpp
new file mode 100644
index 000000000..e4f05b7f2
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebchannel.cpp
@@ -0,0 +1,29 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtWebChannel
+
+#include <QtWebChannel>
+
+#include <QGuiApplication>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBCHANNEL_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( webchannel )
+{
+ QGuiApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+
+ QWebChannel channel;
+ QObject dummy;
+ channel.registerObject(QStringLiteral("dummy"), &dummy);
+}
diff --git a/src/boost/tools/build/test/qt5/qtwebengine.cpp b/src/boost/tools/build/test/qt5/qtwebengine.cpp
new file mode 100644
index 000000000..d4c1b0726
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebengine.cpp
@@ -0,0 +1,30 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtWebEngine
+
+#include <QtWebEngine>
+#include <QGuiApplication>
+
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINE_LIB), true);
+}
+
+/*!
+ Just call the global initialization function
+ */
+BOOST_AUTO_TEST_CASE( webengine )
+{
+ QGuiApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+
+ QtWebEngine::initialize();
+}
diff --git a/src/boost/tools/build/test/qt5/qtwebenginewidgets.cpp b/src/boost/tools/build/test/qt5/qtwebenginewidgets.cpp
new file mode 100644
index 000000000..f0c3c2d8b
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebenginewidgets.cpp
@@ -0,0 +1,40 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtWebEngineWidgets
+
+#include <QtWebEngineWidgets>
+
+#include <QWebEngineProfile>
+#include <QWebEngineSettings>
+#include <QWebEngineScript>
+
+#include <QApplication>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WIDGETS_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINECORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINEWIDGETS_LIB), true);
+}
+
+/*!
+ Also tests the core library
+ */
+BOOST_AUTO_TEST_CASE( webengine_widgets )
+{
+ QApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+
+ QWebEngineSettings *defaultSettings = QWebEngineSettings::globalSettings();
+ QWebEngineProfile *defaultProfile = QWebEngineProfile::defaultProfile();
+
+ defaultSettings->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true);
+ defaultProfile->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies);
+}
diff --git a/src/boost/tools/build/test/qt5/qtwebkit.cpp b/src/boost/tools/build/test/qt5/qtwebkit.cpp
new file mode 100644
index 000000000..aa6fdc92f
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebkit.cpp
@@ -0,0 +1,22 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtWebKit
+
+#include <QWebSettings>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBKIT_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( webkit )
+{
+ BOOST_CHECK(QWebSettings::globalSettings());
+}
diff --git a/src/boost/tools/build/test/qt5/qtwebkitwidgets.cpp b/src/boost/tools/build/test/qt5/qtwebkitwidgets.cpp
new file mode 100644
index 000000000..52c05c9a9
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebkitwidgets.cpp
@@ -0,0 +1,23 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtWebKitWidgets
+
+#include <QWebPage>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBKITWIDGETS_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( webkit )
+{
+ QWebPage page;
+ BOOST_CHECK_EQUAL(page.isModified(), false);
+}
diff --git a/src/boost/tools/build/test/qt5/qtwebsocket.cpp b/src/boost/tools/build/test/qt5/qtwebsocket.cpp
new file mode 100644
index 000000000..f46aa58b3
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebsocket.cpp
@@ -0,0 +1,26 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtWebSockets
+
+#include <QtWebSockets>
+
+#include <QCoreApplication>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBSOCKETS_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( websocket )
+{
+ QCoreApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+
+ QWebSocket socket;
+}
diff --git a/src/boost/tools/build/test/qt5/qtwebsockets.cpp b/src/boost/tools/build/test/qt5/qtwebsockets.cpp
new file mode 100644
index 000000000..9829ce916
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebsockets.cpp
@@ -0,0 +1,24 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtWebSockets
+
+#include <QtWebSockets>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE (defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBSOCKETS_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( websocket )
+{
+ QWebSocket socket;
+ socket.setPauseMode(QAbstractSocket::PauseNever);
+
+ BOOST_TEST(socket.isValid() == false);
+}
diff --git a/src/boost/tools/build/test/qt5/qtwebview.cpp b/src/boost/tools/build/test/qt5/qtwebview.cpp
new file mode 100644
index 000000000..dfd130f37
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwebview.cpp
@@ -0,0 +1,31 @@
+// (c) Copyright Juergen Hunold 2016
+// 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)
+
+#define BOOST_TEST_MODULE QtWebView
+
+#include <QtWebView>
+
+#include <QGuiApplication>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINECORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBVIEW_LIB), true);
+}
+
+/*!
+ Just call the global initialization function
+ */
+BOOST_AUTO_TEST_CASE( webview )
+{
+ QGuiApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+
+ QtWebView::initialize();
+}
diff --git a/src/boost/tools/build/test/qt5/qtwidgets.cpp b/src/boost/tools/build/test/qt5/qtwidgets.cpp
new file mode 100644
index 000000000..b868240a5
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtwidgets.cpp
@@ -0,0 +1,43 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtGui
+
+#include <QtWidgets/QApplication>
+
+#include <boost/test/unit_test.hpp>
+
+struct Fixture
+{
+ Fixture()
+ : application(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv,
+ false)
+ {
+ BOOST_TEST_MESSAGE( "setup QApplication fixture" );
+ }
+
+ ~Fixture()
+ {
+ BOOST_TEST_MESSAGE( "teardown QApplication fixture" );
+ }
+
+ QApplication application;
+};
+
+BOOST_GLOBAL_FIXTURE( Fixture );
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WIDGETS_LIB), true);
+}
+
+
+BOOST_AUTO_TEST_CASE( qtgui_test)
+{
+ BOOST_CHECK_EQUAL(true, true);
+}
diff --git a/src/boost/tools/build/test/qt5/qtxml.cpp b/src/boost/tools/build/test/qt5/qtxml.cpp
new file mode 100644
index 000000000..3df6dd2c1
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtxml.cpp
@@ -0,0 +1,29 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtXml
+
+#include <QtXml>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
+}
+
+BOOST_AUTO_TEST_CASE( reader_construct)
+{
+ QXmlStreamReader reader;
+ BOOST_CHECK_EQUAL(reader.atEnd(), false);
+}
+
+BOOST_AUTO_TEST_CASE( writer_construct)
+{
+ QXmlStreamWriter writer;
+ BOOST_CHECK_EQUAL(writer.device(), static_cast<QIODevice*>(0));
+}
+
diff --git a/src/boost/tools/build/test/qt5/qtxmlpatterns.cpp b/src/boost/tools/build/test/qt5/qtxmlpatterns.cpp
new file mode 100644
index 000000000..d87e3d3fe
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/qtxmlpatterns.cpp
@@ -0,0 +1,76 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtXmlPatterns
+
+#include <QXmlQuery>
+#include <QXmlSerializer>
+
+#include <QCoreApplication>
+#include <QString>
+#include <QTextStream>
+#include <QBuffer>
+
+#include <boost/test/unit_test.hpp>
+
+
+struct Fixture
+{
+ Fixture()
+ : application(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv)
+ {
+ BOOST_TEST_MESSAGE( "setup QCoreApplication fixture" );
+ }
+
+ ~Fixture()
+ {
+ BOOST_TEST_MESSAGE( "teardown QCoreApplication fixture" );
+ }
+
+ QCoreApplication application;
+};
+
+BOOST_GLOBAL_FIXTURE( Fixture );
+
+QByteArray doc("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml/\" xml:lang=\"en\" lang=\"en\">"
+" <head>"
+" <title>Global variables report for globals.gccxml</title>"
+" </head>"
+"<body><p>Some Test text</p></body></html>");
+
+BOOST_AUTO_TEST_CASE( defines)
+{
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XMLPATTERNS_LIB), true);
+
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), false);
+}
+
+BOOST_AUTO_TEST_CASE( extract )
+{
+
+ QBuffer buffer(&doc); // This is a QIODevice.
+ buffer.open(QIODevice::ReadOnly);
+ QXmlQuery query;
+ query.bindVariable("myDocument", &buffer);
+ query.setQuery("declare variable $myDocument external;"
+ "doc($myDocument)");///p[1]");
+
+ BOOST_CHECK_EQUAL(query.isValid(), true);
+
+ QByteArray result;
+ QBuffer out(&result);
+ out.open(QIODevice::WriteOnly);
+
+ QXmlSerializer serializer(query, &out);
+ BOOST_CHECK_EQUAL(query.evaluateTo(&serializer), true);
+
+ QTextStream stream(stdout);
+ BOOST_CHECK_EQUAL(result.isEmpty(), false);
+ stream << "hallo" << result << endl;
+}
+
diff --git a/src/boost/tools/build/test/qt5/rcc.cpp b/src/boost/tools/build/test/qt5/rcc.cpp
new file mode 100644
index 000000000..cae553bb1
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/rcc.cpp
@@ -0,0 +1,20 @@
+// (c) Copyright Juergen Hunold 2012
+// 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)
+
+#define BOOST_TEST_MODULE QtCore
+#include <QtCore>
+
+#include <boost/test/unit_test.hpp>
+
+std::ostream& operator<<(std::ostream& out, QString const& text)
+{
+ out << text.toUtf8().constData();
+ return out;
+}
+
+BOOST_AUTO_TEST_CASE (check_exists)
+{
+ BOOST_CHECK(QFile::exists(":/test/rcc.cpp"));
+}
diff --git a/src/boost/tools/build/test/qt5/rcc.qrc b/src/boost/tools/build/test/qt5/rcc.qrc
new file mode 100644
index 000000000..13ca38a5d
--- /dev/null
+++ b/src/boost/tools/build/test/qt5/rcc.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/test/">
+ <file>rcc.cpp</file>
+ </qresource>
+</RCC>
diff --git a/src/boost/tools/build/test/railsys.py b/src/boost/tools/build/test/railsys.py
new file mode 100644
index 000000000..7b7f8bd0b
--- /dev/null
+++ b/src/boost/tools/build/test/railsys.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+# 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.set_tree("railsys")
+t.run_build_system("--v2", subdir="program")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/railsys/libx/include/test_libx.h b/src/boost/tools/build/test/railsys/libx/include/test_libx.h
new file mode 100644
index 000000000..fe573fc16
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/libx/include/test_libx.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2003 Institute of Transport,
+// Railway Construction and Operation,
+// University of Hanover, Germany
+//
+// 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)
+
+#ifdef _WIN32
+#ifdef LIBX_SOURCE
+__declspec(dllexport)
+#else
+__declspec(dllimport)
+#endif
+#endif
+class TestLibX
+{
+public:
+
+ TestLibX();
+
+ // Needed to suppress 'unused variable' warning
+ // in some cases.
+ void do_something() {}
+};
diff --git a/src/boost/tools/build/test/railsys/libx/jamroot.jam b/src/boost/tools/build/test/railsys/libx/jamroot.jam
new file mode 100644
index 000000000..d09982dd1
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/libx/jamroot.jam
@@ -0,0 +1,13 @@
+# Copyright (c) 2002 Institute of Transport,
+# Railway Construction and Operation,
+# University of Hanover, Germany
+# Copyright (c) 2006 Jrgen Hunold
+#
+# 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)
+
+# Tell that Qt3 should be used. QTDIR will give installation prefix.
+using qt3 ;
+
+
diff --git a/src/boost/tools/build/test/railsys/libx/src/jamfile.jam b/src/boost/tools/build/test/railsys/libx/src/jamfile.jam
new file mode 100644
index 000000000..639e0cc90
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/libx/src/jamfile.jam
@@ -0,0 +1,19 @@
+# Copyright (c) 2003 Institute of Transport,
+# Railway Construction and Operation,
+# University of Hanover, Germany
+#
+# Copyright (c) 2006 Jrgen Hunold
+#
+# 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 libx
+ : requirements
+ <include>../include
+ : usage-requirements
+ <include>../include
+ ;
+
+
+lib libx : test_libx.cpp ;
diff --git a/src/boost/tools/build/test/railsys/libx/src/test_libx.cpp b/src/boost/tools/build/test/railsys/libx/src/test_libx.cpp
new file mode 100644
index 000000000..be1fbc27f
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/libx/src/test_libx.cpp
@@ -0,0 +1,15 @@
+// Copyright (c) 2003 Institute of Transport,
+// Railway Construction and Operation,
+// University of Hanover, Germany
+//
+// 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)
+
+
+#define LIBX_SOURCE
+#include <test_libx.h>
+
+TestLibX::TestLibX()
+{
+}
diff --git a/src/boost/tools/build/test/railsys/program/include/test_a.h b/src/boost/tools/build/test/railsys/program/include/test_a.h
new file mode 100644
index 000000000..8002859e1
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/program/include/test_a.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2003 Institute of Transport,
+// Railway Construction and Operation,
+// University of Hanover, Germany
+//
+// 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 <qobject.h>
+
+class TestA : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ TestA();
+
+ // Needed to suppress 'unused variable' varning.
+ void do_something() { }
+};
diff --git a/src/boost/tools/build/test/railsys/program/jamfile.jam b/src/boost/tools/build/test/railsys/program/jamfile.jam
new file mode 100644
index 000000000..9e36f408f
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/program/jamfile.jam
@@ -0,0 +1,45 @@
+# ================================================================
+#
+# Railsys
+# --------------
+#
+# Copyright (c) 2002 Institute of Transport,
+# Railway Construction and Operation,
+# University of Hanover, Germany
+# Copyright (c) 2006 Jrgen Hunold
+#
+# 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)
+#
+# 02/21/02! Jrgen Hunold
+#
+# $Id$
+#
+# ================================================================
+
+local BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
+
+use-project /libx : ../libx/src ;
+
+project program
+ : requirements
+ <include>$(BOOST_ROOT)
+ <threading>multi
+ <library>/qt3//qt
+ <hardcode-dll-paths>true
+ <stdlib>stlport
+ <use>/libx
+ <library>/libx//libx
+
+ : usage-requirements
+ <include>$(BOOST_ROOT)
+ :
+ default-build release
+ <threading>multi
+ <library>/qt3//qt
+ <hardcode-dll-paths>true
+ ;
+
+build-project main ;
+
diff --git a/src/boost/tools/build/test/railsys/program/jamroot.jam b/src/boost/tools/build/test/railsys/program/jamroot.jam
new file mode 100644
index 000000000..23d42195f
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/program/jamroot.jam
@@ -0,0 +1,14 @@
+# Copyright (c) 2002 Institute of Transport,
+# Railway Construction and Operation,
+# University of Hanover, Germany
+# Copyright (c) 2006 Jrgen Hunold
+#
+# 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)
+
+# Tell that Qt3 should be used. QTDIR will give installation prefix.
+using qt3 ;
+
+# Not that good, but sufficient for testing
+using stlport : : /path/to/stlport ;
diff --git a/src/boost/tools/build/test/railsys/program/liba/jamfile.jam b/src/boost/tools/build/test/railsys/program/liba/jamfile.jam
new file mode 100644
index 000000000..f74311d0d
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/program/liba/jamfile.jam
@@ -0,0 +1,14 @@
+# Copyright (c) 2003 Institute of Transport,
+# Railway Construction and Operation,
+# University of Hanover, Germany
+# Copyright (c) 2006 Jrgen Hunold
+#
+# 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 liba ;
+
+lib liba : test ../include/test_a.h ;
+
+obj test : test_a.cpp : <optimization>off ;
diff --git a/src/boost/tools/build/test/railsys/program/liba/test_a.cpp b/src/boost/tools/build/test/railsys/program/liba/test_a.cpp
new file mode 100644
index 000000000..f9e538857
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/program/liba/test_a.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2003 Institute of Transport,
+// Railway Construction and Operation,
+// University of Hanover, Germany
+//
+// 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/test_a.h"
+
+#include <test_libx.h>
+
+TestA::TestA()
+{
+ TestLibX aTestLibX;
+ aTestLibX.do_something();
+}
diff --git a/src/boost/tools/build/test/railsys/program/main/jamfile.jam b/src/boost/tools/build/test/railsys/program/main/jamfile.jam
new file mode 100644
index 000000000..095978eaf
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/program/main/jamfile.jam
@@ -0,0 +1,12 @@
+# Copyright (c) 2002 Institute of Transport,
+# Railway Construction and Operation,
+# University of Hanover, Germany
+# Copyright (c) 2006 Jrgen Hunold
+#
+# 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 main ;
+
+exe test_a : main.cpp ../liba//liba /libx ;
diff --git a/src/boost/tools/build/test/railsys/program/main/main.cpp b/src/boost/tools/build/test/railsys/program/main/main.cpp
new file mode 100644
index 000000000..3f13f4bfc
--- /dev/null
+++ b/src/boost/tools/build/test/railsys/program/main/main.cpp
@@ -0,0 +1,19 @@
+// Copyright (c) 2002 Institute of Transport,
+// Railway Construction and Operation,
+// University of Hanover, Germany
+//
+// 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/test_a.h"
+
+#include <test_libx.h>
+
+int main()
+{
+ TestLibX stTestLibX;
+ TestA stTestA;
+
+ stTestLibX.do_something();
+};
diff --git a/src/boost/tools/build/test/readme.txt b/src/boost/tools/build/test/readme.txt
new file mode 100644
index 000000000..48459f805
--- /dev/null
+++ b/src/boost/tools/build/test/readme.txt
@@ -0,0 +1,6 @@
+# Copyright 2002 Dave 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)
+
+ See test_system.html for detailed information on using the Boost Build test
+system.
diff --git a/src/boost/tools/build/test/rebuilds.py b/src/boost/tools/build/test/rebuilds.py
new file mode 100644
index 000000000..8242e3ec0
--- /dev/null
+++ b/src/boost/tools/build/test/rebuilds.py
@@ -0,0 +1,68 @@
+#!/usr/bin/python
+
+# Copyright 2005 Dave Abrahams
+# 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 BoostBuild
+
+
+def wait_for_bar(t):
+ """
+ Wait to make the test system correctly recognize the 'bar' file as
+ touched after the next build run. Without the wait, the next build run may
+ rebuild the 'bar' file with the new and the old file modification timestamp
+ too close to each other - which could, depending on the currently supported
+ file modification timestamp resolution, be detected as 'no change' by the
+ testing system.
+
+ """
+ t.wait_for_time_change("bar", touch=False)
+
+
+t = BoostBuild.Tester(["-ffile.jam", "-d+3", "-d+12", "-d+13"],
+ pass_toolset=0)
+
+t.write("file.jam", """\
+rule make
+{
+ DEPENDS $(<) : $(>) ;
+ DEPENDS all : $(<) ;
+}
+actions make
+{
+ echo "******" making $(<) from $(>) "******"
+ echo made from $(>) > $(<)
+}
+
+make aux1 : bar ;
+make foo : bar ;
+REBUILDS foo : bar ;
+make bar : baz ;
+make aux2 : bar ;
+""")
+
+t.write("baz", "nothing")
+
+t.run_build_system(["bar"])
+t.expect_addition("bar")
+t.expect_nothing_more()
+
+wait_for_bar(t)
+t.run_build_system(["foo"])
+t.expect_touch("bar")
+t.expect_addition("foo")
+t.expect_nothing_more()
+
+t.run_build_system()
+t.expect_addition(["aux1", "aux2"])
+t.expect_nothing_more()
+
+t.touch("bar")
+wait_for_bar(t)
+t.run_build_system()
+t.expect_touch(["foo", "bar", "aux1", "aux2"])
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/relative_sources.py b/src/boost/tools/build/test/relative_sources.py
new file mode 100644
index 000000000..29f590fed
--- /dev/null
+++ b/src/boost/tools/build/test/relative_sources.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 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)
+
+# Test that we can specify sources using relative names.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# Test that relative path to source, 'src', is preserved.
+t.write("jamroot.jam", "exe a : src/a.cpp ;")
+t.write("src/a.cpp", "int main() {}\n")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/src/a.obj")
+
+# Test that the relative path to source is preserved
+# when using 'glob'.
+t.rm("bin")
+t.write("jamroot.jam", "exe a : [ glob src/*.cpp ] ;")
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/src/a.obj")
+
+
+# Test that relative path with ".." is *not* added to
+# target path.
+t.rm(".")
+t.write("jamroot.jam", "")
+t.write("a.cpp", "int main() { return 0; }\n")
+t.write("build/Jamfile", "exe a : ../a.cpp ; ")
+t.run_build_system(subdir="build")
+t.expect_addition("build/bin/$toolset/debug*/a.obj")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/remove_requirement.py b/src/boost/tools/build/test/remove_requirement.py
new file mode 100644
index 000000000..9655ad3ae
--- /dev/null
+++ b/src/boost/tools/build/test/remove_requirement.py
@@ -0,0 +1,91 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+
+t.write("jamroot.jam", """
+project : requirements <threading>multi <variant>debug:<link>static ;
+# Force link to be relevant
+project : requirements <link>shared:<define>TEST_DLL ;
+
+build-project sub ;
+build-project sub2 ;
+build-project sub3 ;
+build-project sub4 ;
+""")
+
+t.write("sub/jamfile.jam", """
+exe hello : hello.cpp : -<threading>multi ;
+""")
+
+t.write("sub/hello.cpp", """
+int main() {}
+""")
+
+t.write("sub2/jamfile.jam", """
+project : requirements -<threading>multi ;
+exe hello : hello.cpp ;
+""")
+
+t.write("sub2/hello.cpp", """
+int main() {}
+""")
+
+t.write("sub3/hello.cpp", """
+int main() {}
+""")
+
+t.write("sub3/jamfile.jam", """
+exe hello : hello.cpp : "-<variant>debug:<link>static" ;
+""")
+
+t.write("sub4/hello.cpp", """
+int main() {}
+""")
+
+t.write("sub4/jamfile.jam", """
+project : requirements "-<variant>debug:<link>static" ;
+exe hello : hello.cpp ;
+""")
+
+t.run_build_system()
+
+t.expect_addition("sub/bin/$toolset/debug*/link-static*/hello.exe")
+t.expect_addition("sub2/bin/$toolset/debug*/link-static*/hello.exe")
+t.expect_addition("sub3/bin/$toolset/debug*/threading-multi*/hello.exe")
+t.expect_addition("sub4/bin/$toolset/debug*/threading-multi*/hello.exe")
+
+t.rm(".")
+
+# Now test that path requirements can be removed as well.
+t.write("jamroot.jam", """
+build-project sub ;
+""")
+
+t.write("sub/jamfile.jam", """
+project : requirements <include>broken ;
+exe hello : hello.cpp : -<include>broken ;
+""")
+
+t.write("sub/hello.cpp", """
+#include "math.h"
+int main() {}
+""")
+
+t.write("sub/broken/math.h", """
+Broken
+""")
+
+
+t.run_build_system()
+
+t.expect_addition("sub/bin/$toolset/debug*/hello.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/rescan_header.py b/src/boost/tools/build/test/rescan_header.py
new file mode 100755
index 000000000..1257a223c
--- /dev/null
+++ b/src/boost/tools/build/test/rescan_header.py
@@ -0,0 +1,265 @@
+#!/usr/bin/python
+
+# Copyright 2012 Steven Watanabe
+# 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 BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# Test a header loop that depends on (but does not contain) a generated header.
+t.write("test.cpp", '#include "header1.h"\n')
+
+t.write("header1.h", """\
+#ifndef HEADER1_H
+#define HEADER1_H
+#include "header2.h"
+#endif
+""")
+
+t.write("header2.h", """\
+#ifndef HEADER2_H
+#define HEADER2_H
+#include "header1.h"
+#include "header3.h"
+#endif
+""")
+
+t.write("header3.in", "/* empty file */\n")
+
+t.write("jamroot.jam", """\
+import common ;
+make header3.h : header3.in : @common.copy ;
+obj test : test.cpp : <implicit-dependency>header3.h ;
+""")
+
+t.run_build_system(["-j2"])
+t.expect_addition("bin/header3.h")
+t.expect_addition("bin/$toolset/debug*/test.obj")
+t.expect_nothing_more()
+
+t.rm(".")
+
+# Test a linear sequence of generated headers.
+t.write("test.cpp", '#include "header1.h"\n')
+
+t.write("header1.in", """\
+#ifndef HEADER1_H
+#define HEADER1_H
+#include "header2.h"
+#endif
+""")
+
+t.write("header2.in", """\
+#ifndef HEADER2_H
+#define HEADER2_H
+#include "header3.h"
+#endif
+""")
+
+t.write("header3.in", "/* empty file */\n")
+
+t.write("jamroot.jam", """\
+import common ;
+make header1.h : header1.in : @common.copy ;
+make header2.h : header2.in : @common.copy ;
+make header3.h : header3.in : @common.copy ;
+obj test : test.cpp :
+ <implicit-dependency>header1.h
+ <implicit-dependency>header2.h
+ <implicit-dependency>header3.h ;
+""")
+
+t.run_build_system(["-j2", "test"])
+t.expect_addition("bin/header1.h")
+t.expect_addition("bin/header2.h")
+t.expect_addition("bin/header3.h")
+t.expect_addition("bin/$toolset/debug*/test.obj")
+t.expect_nothing_more()
+
+t.rm(".")
+
+# Test a loop in generated headers.
+t.write("test.cpp", '#include "header1.h"\n')
+
+t.write("header1.in", """\
+#ifndef HEADER1_H
+#define HEADER1_H
+#include "header2.h"
+#endif
+""")
+
+t.write("header2.in", """\
+#ifndef HEADER2_H
+#define HEADER2_H
+#include "header3.h"
+#endif
+""")
+
+t.write("header3.in", """\
+#ifndef HEADER2_H
+#define HEADER2_H
+#include "header1.h"
+#endif
+""")
+
+t.write("jamroot.jam", """\
+import common ;
+
+actions copy {
+ sleep 1
+ cp $(>) $(<)
+}
+
+make header1.h : header1.in : @common.copy ;
+make header2.h : header2.in : @common.copy ;
+make header3.h : header3.in : @common.copy ;
+obj test : test.cpp :
+ <implicit-dependency>header1.h
+ <implicit-dependency>header2.h
+ <implicit-dependency>header3.h ;
+""")
+
+t.run_build_system(["-j2", "test"])
+t.expect_addition("bin/header1.h")
+t.expect_addition("bin/header2.h")
+t.expect_addition("bin/header3.h")
+t.expect_addition("bin/$toolset/debug*/test.obj")
+t.expect_nothing_more()
+
+t.rm(".")
+
+# Test that all the dependencies of a loop are updated before any of the
+# dependents.
+t.write("test1.cpp", '#include "header1.h"\n')
+
+t.write("test2.cpp", """\
+#include "header2.h"
+int main() {}
+""")
+
+t.write("header1.h", """\
+#ifndef HEADER1_H
+#define HEADER1_H
+#include "header2.h"
+#endif
+""")
+
+t.write("header2.h", """\
+#ifndef HEADER2_H
+#define HEADER2_H
+#include "header1.h"
+#include "header3.h"
+#endif
+""")
+
+t.write("header3.in", "\n")
+
+t.write("sleep.bat", """\
+::@timeout /T %1 /NOBREAK >nul
+@ping 127.0.0.1 -n 2 -w 1000 >nul
+@ping 127.0.0.1 -n %1 -w 1000 >nul
+@exit /B 0
+""")
+
+t.write("jamroot.jam", """\
+import common ;
+import os ;
+
+if [ os.name ] = NT
+{
+ SLEEP = call sleep.bat ;
+}
+else
+{
+ SLEEP = sleep ;
+}
+
+rule copy { common.copy $(<) : $(>) ; }
+actions copy { $(SLEEP) 1 }
+
+make header3.h : header3.in : @copy ;
+exe test : test2.cpp test1.cpp : <implicit-dependency>header3.h ;
+""")
+
+t.run_build_system(["-j2", "test"])
+t.expect_addition("bin/header3.h")
+t.expect_addition("bin/$toolset/debug*/test1.obj")
+t.expect_addition("bin/$toolset/debug*/test2.obj")
+t.expect_addition("bin/$toolset/debug*/test.exe")
+t.expect_nothing_more()
+
+t.touch("header3.in")
+t.run_build_system(["-j2", "test"])
+t.expect_touch("bin/header3.h")
+t.expect_touch("bin/$toolset/debug*/test1.obj")
+t.expect_touch("bin/$toolset/debug*/test2.obj")
+t.expect_touch("bin/$toolset/debug*/test.exe")
+t.expect_nothing_more()
+
+t.rm(".")
+
+# Test a loop that includes a generated header
+t.write("test1.cpp", '#include "header1.h"\n')
+t.write("test2.cpp", """\
+#include "header2.h"
+int main() {}
+""")
+
+t.write("header1.h", """\
+#ifndef HEADER1_H
+#define HEADER1_H
+#include "header2.h"
+#endif
+""")
+
+t.write("header2.in", """\
+#ifndef HEADER2_H
+#define HEADER2_H
+#include "header3.h"
+#endif
+""")
+
+t.write("header3.h", """\
+#ifndef HEADER3_H
+#define HEADER3_H
+#include "header1.h"
+#endif
+""")
+
+t.write("sleep.bat", """\
+::@timeout /T %1 /NOBREAK >nul
+@ping 127.0.0.1 -n 2 -w 1000 >nul
+@ping 127.0.0.1 -n %1 -w 1000 >nul
+@exit /B 0
+""")
+
+t.write("jamroot.jam", """\
+import common ;
+import os ;
+
+if [ os.name ] = NT
+{
+ SLEEP = call sleep.bat ;
+}
+else
+{
+ SLEEP = sleep ;
+}
+
+rule copy { common.copy $(<) : $(>) ; }
+actions copy { $(SLEEP) 1 }
+
+make header2.h : header2.in : @copy ;
+exe test : test2.cpp test1.cpp : <implicit-dependency>header2.h <include>. ;
+""")
+
+t.run_build_system(["-j2", "test"])
+t.expect_addition("bin/header2.h")
+t.expect_addition("bin/$toolset/debug*/test1.obj")
+t.expect_addition("bin/$toolset/debug*/test2.obj")
+t.expect_addition("bin/$toolset/debug*/test.exe")
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/resolution.py b/src/boost/tools/build/test/resolution.py
new file mode 100644
index 000000000..9cde218fa
--- /dev/null
+++ b/src/boost/tools/build/test/resolution.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 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)
+
+# Tests for the target id resolution process.
+
+import BoostBuild
+
+# Create a temporary working directory.
+t = BoostBuild.Tester(use_test_config=False)
+
+# Create the needed files
+t.write("jamroot.jam", """\
+exe hello : hello.cpp ;
+# This should use the 'hello' target, even if there is a 'hello' file in the
+# current dir.
+install s : hello : <location>. ;
+""")
+
+t.write("hello.cpp", "int main() {}\n")
+
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug*/hello.obj")
+
+t.touch("hello.cpp")
+t.run_build_system(["s"])
+# If 'hello' in the 's' target resolved to file in the current dir, nothing
+# will be rebuilt.
+t.expect_touch("bin/$toolset/debug*/hello.obj")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/results-python.txt b/src/boost/tools/build/test/results-python.txt
new file mode 100644
index 000000000..83b351b2c
--- /dev/null
+++ b/src/boost/tools/build/test/results-python.txt
@@ -0,0 +1,132 @@
+Note: skipping extra tests
+unit_tests : FAILED
+module_actions : PASSED
+startup_v2 : PASSED
+core_d12 : PASSED
+core_typecheck : PASSED
+core_delete_module : PASSED
+core_language : PASSED
+core_arguments : PASSED
+core_varnames : PASSED
+core_import_module : PASSED
+absolute_sources : PASSED
+alias : PASSED
+alternatives : PASSED
+bad_dirname : PASSED
+build_dir : PASSED
+build_file : PASSED
+build_no : PASSED
+builtin_echo : PASSED
+builtin_exit : PASSED
+builtin_split_by_characters : FAILED
+c_file : PASSED
+chain : PASSED
+clean : PASSED
+composite : PASSED
+conditionals : PASSED
+conditionals2 : PASSED
+conditionals3 : PASSED
+conditionals_multiple : PASSED
+configuration : FAILED
+copy_time : PASSED
+core_action_output : PASSED
+core_action_status : PASSED
+core_actions_quietly : PASSED
+core_at_file : PASSED
+core_bindrule : PASSED
+core_multifile_actions : PASSED
+core_nt_cmd_line : PASSED
+core_option_d2 : PASSED
+core_option_l : PASSED
+core_option_n : PASSED
+core_parallel_actions : PASSED
+core_parallel_multifile_actions_1 : PASSED
+core_parallel_multifile_actions_2 : PASSED
+core_source_line_tracking : PASSED
+core_update_now : PASSED
+core_variables_in_actions : PASSED
+custom_generator : PASSED
+default_build : PASSED
+default_features : PASSED
+dependency_property : PASSED
+dependency_test : FAILED
+direct_request_test : PASSED
+disambiguation : PASSED
+dll_path : PASSED
+double_loading : PASSED
+duplicate : PASSED
+example_libraries : PASSED
+example_make : PASSED
+exit_status : PASSED
+expansion : PASSED
+explicit : PASSED
+free_features_request : PASSED
+generator_selection : FAILED
+generators_test : FAILED
+implicit_dependency : PASSED
+indirect_conditional : FAILED
+inherit_toolset : FAILED
+inherited_dependency : PASSED
+inline : PASSED
+lib_source_property : PASSED
+library_chain : PASSED
+library_property : PASSED
+link : FAILED
+load_order : FAILED
+loop : PASSED
+make_rule : PASSED
+message : FAILED
+ndebug : PASSED
+no_type : PASSED
+notfile : PASSED
+ordered_include : PASSED
+out_of_tree : PASSED
+path_features : FAILED
+prebuilt : PASSED
+print : FAILED
+project_dependencies : PASSED
+project_glob : PASSED
+project_id : FAILED
+project_root_constants : PASSED
+project_root_rule : PASSED
+project_test3 : FAILED
+project_test4 : FAILED
+property_expansion : PASSED
+rebuilds : PASSED
+regression : PASSED
+relative_sources : PASSED
+remove_requirement : PASSED
+rescan_header : PASSED
+resolution : PASSED
+scanner_causing_rebuilds : FAILED
+searched_lib : PASSED
+skipping : PASSED
+sort_rule : PASSED
+source_locations : PASSED
+source_order : FAILED
+space_in_path : PASSED
+stage : PASSED
+standalone : PASSED
+static_and_shared_library : PASSED
+suffix : PASSED
+tag : PASSED
+test_result_dumping : PASSED
+test_rc : FAILED
+testing_support : PASSED
+timedata : FAILED
+unit_test : PASSED
+unused : FAILED
+use_requirements : PASSED
+using : PASSED
+wrapper : PASSED
+wrong_project : PASSED
+zlib : PASSED
+symlink : PASSED
+library_order : FAILED
+gcc_runtime : FAILED
+pch : PASSED
+
+ === Test summary ===
+ PASS: 103
+ FAIL: 23
+
diff --git a/src/boost/tools/build/test/rootless.py b/src/boost/tools/build/test/rootless.py
new file mode 100644
index 000000000..3dc2de5bc
--- /dev/null
+++ b/src/boost/tools/build/test/rootless.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# Copyright 2018 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)
+
+import BoostBuild
+import os
+
+t = BoostBuild.Tester(translate_suffixes=0)
+
+t.set_tree("rootless/test1")
+t.run_build_system(status=1)
+t.expect_output_lines("error: no Jamfile in current directory*")
+
+t.set_tree("rootless/test1")
+t.run_build_system(subdir="sub_root")
+t.expect_addition("sub_root/bin/a.txt")
+
+t.set_tree("rootless/test1")
+t.run_build_system(subdir="sub_root", extra_args=["--build-dir=../bin"])
+t.expect_output_lines("warning: the --build-dir option will be ignored")
+
+t.set_tree("rootless/test2")
+t.run_build_system(subdir="sub_root", extra_args=["--build-dir=../bin"])
+t.expect_addition("bin/foo/a.txt")
+
+t.set_tree("rootless/test3")
+t.run_build_system()
+
+t.set_tree("rootless/test3")
+t.run_build_system(subdir="sub/inner")
+t.expect_addition("bins/sub/inner/a.txt")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/rootless/test1/sub_root/a.cpp b/src/boost/tools/build/test/rootless/test1/sub_root/a.cpp
new file mode 100644
index 000000000..412a2bb4f
--- /dev/null
+++ b/src/boost/tools/build/test/rootless/test1/sub_root/a.cpp
@@ -0,0 +1,6 @@
+// Copyright 2018 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)
+
+int main() {}
diff --git a/src/boost/tools/build/test/rootless/test1/sub_root/jamfile.jam b/src/boost/tools/build/test/rootless/test1/sub_root/jamfile.jam
new file mode 100644
index 000000000..0a17bc400
--- /dev/null
+++ b/src/boost/tools/build/test/rootless/test1/sub_root/jamfile.jam
@@ -0,0 +1,10 @@
+# Copyright 2018 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)
+
+actions foo
+{
+ echo "$(>)" > "$(<)"
+}
+make a.txt : a.cpp : @foo ;
diff --git a/src/boost/tools/build/test/rootless/test2/sub_root/a.cpp b/src/boost/tools/build/test/rootless/test2/sub_root/a.cpp
new file mode 100644
index 000000000..412a2bb4f
--- /dev/null
+++ b/src/boost/tools/build/test/rootless/test2/sub_root/a.cpp
@@ -0,0 +1,6 @@
+// Copyright 2018 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)
+
+int main() {}
diff --git a/src/boost/tools/build/test/rootless/test2/sub_root/jamfile.jam b/src/boost/tools/build/test/rootless/test2/sub_root/jamfile.jam
new file mode 100644
index 000000000..62416c0b7
--- /dev/null
+++ b/src/boost/tools/build/test/rootless/test2/sub_root/jamfile.jam
@@ -0,0 +1,13 @@
+# Copyright 2018 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)
+
+project foo ;
+
+actions foo
+{
+ echo "$(>)" > "$(<)"
+}
+
+make a.txt : a.cpp : @foo ;
diff --git a/src/boost/tools/build/test/rootless/test3/jamfile.jam b/src/boost/tools/build/test/rootless/test3/jamfile.jam
new file mode 100644
index 000000000..ab8da6a06
--- /dev/null
+++ b/src/boost/tools/build/test/rootless/test3/jamfile.jam
@@ -0,0 +1,6 @@
+# Copyright 2018 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)
+
+project root-foo : build-dir bins ;
diff --git a/src/boost/tools/build/test/rootless/test3/sub/inner/a.cpp b/src/boost/tools/build/test/rootless/test3/sub/inner/a.cpp
new file mode 100644
index 000000000..412a2bb4f
--- /dev/null
+++ b/src/boost/tools/build/test/rootless/test3/sub/inner/a.cpp
@@ -0,0 +1,6 @@
+// Copyright 2018 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)
+
+int main() {}
diff --git a/src/boost/tools/build/test/rootless/test3/sub/inner/jamfile.jam b/src/boost/tools/build/test/rootless/test3/sub/inner/jamfile.jam
new file mode 100644
index 000000000..6aeddab3b
--- /dev/null
+++ b/src/boost/tools/build/test/rootless/test3/sub/inner/jamfile.jam
@@ -0,0 +1,11 @@
+# Copyright 2018 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)
+
+actions foo
+{
+ echo "$(>)" > "$(<)"
+}
+
+make a.txt : a.cpp : @foo ;
diff --git a/src/boost/tools/build/test/scanner_causing_rebuilds.py b/src/boost/tools/build/test/scanner_causing_rebuilds.py
new file mode 100755
index 000000000..d1ff66bfd
--- /dev/null
+++ b/src/boost/tools/build/test/scanner_causing_rebuilds.py
@@ -0,0 +1,132 @@
+#!/usr/bin/python
+
+# Copyright 2012 Jurko Gospodnetic
+# 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)
+
+# Tests for a bug causing Boost Build's scanner targets to be rebuilt.
+# unnecessarily in the following scenario:
+# * We want to build target X requiring target A.
+# * We have a multi-file action generating targets A & B.
+# * Out action generates target B with a more recent timestamp than target A.
+# * Target A includes target B.
+# * Target A has a registered include scanner.
+# Now even if our targets A & B have already been built and are up-to-date
+# (e.g. in a state left by a previous successful build run), our scanner target
+# tasked with scanning target A will be marked for updating, thus causing any
+# targets depending on it to be updated/rebuilt as well.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("foo.jam", r"""
+import common ;
+import generators ;
+import modules ;
+import type ;
+import types/cpp ;
+
+type.register FOO : foo ;
+type.register BAR : bar ;
+generators.register-standard foo.foo : FOO : CPP BAR ;
+
+local rule sleep-cmd ( delay )
+{
+ if [ modules.peek : NT ]
+ {
+ return ping 127.0.0.1 -n $(delay) -w 1000 >NUL ;
+ }
+ else
+ {
+ return sleep $(delay) ;
+ }
+}
+
+.touch = [ common.file-creation-command ] ;
+.sleep = [ sleep-cmd 2 ] ;
+
+rule foo ( cpp bar : foo : properties * )
+{
+ # We add the INCLUDE relationship between our generated CPP & BAR targets
+ # explicitly instead of relying on Boost Jam's internal implementation
+ # detail - automatically adding such relationships between all files
+ # generated by the same action. This way our test will continue to function
+ # correctly even if the related Boost Jam implementation detail changes.
+ # Note that adding this relationship by adding an #include directive in our
+ # generated CPP file is not good enough as such a relationship would get
+ # added only after the scanner target's relationships have already been
+ # established and they (as affected by our initial INCLUDE relationship) are
+ # the original reason for this test failing.
+ INCLUDES $(cpp) : $(bar) ;
+}
+
+actions foo
+{
+ $(.touch) "$(<[1])"
+ $(.sleep)
+ $(.touch) "$(<[2])"
+}
+""")
+
+t.write(
+ 'foo.py',
+"""
+import os
+
+from b2.build import type as type_, generators
+from b2.tools import common
+from b2.manager import get_manager
+
+MANAGER = get_manager()
+ENGINE = MANAGER.engine()
+
+type_.register('FOO', ['foo'])
+type_.register('BAR', ['bar'])
+generators.register_standard('foo.foo', ['FOO'], ['CPP', 'BAR'])
+
+def sleep_cmd(delay):
+ if os.name == 'nt':
+ return 'ping 127.0.0.1 -n {} -w 1000 >NUL'.format(delay)
+ return 'sleep {}'.format(delay)
+
+def foo(targets, sources, properties):
+ cpp, bar = targets
+ foo = sources[0]
+ # We add the INCLUDE relationship between our generated CPP & BAR targets
+ # explicitly instead of relying on Boost Jam's internal implementation
+ # detail - automatically adding such relationships between all files
+ # generated by the same action. This way our test will continue to function
+ # correctly even if the related Boost Jam implementation detail changes.
+ # Note that adding this relationship by adding an #include directive in our
+ # generated CPP file is not good enough as such a relationship would get
+ # added only after the scanner target's relationships have already been
+ # established and they (as affected by our initial INCLUDE relationship) are
+ # the original reason for this test failing.
+ bjam.call('INCLUDES', cpp, bar)
+
+ENGINE.register_action(
+ 'foo.foo',
+ '''
+ {touch} "$(<[1])"
+ {sleep}
+ {touch} "$(<[2])"
+ '''.format(touch=common.file_creation_command(), sleep=sleep_cmd(2))
+)
+"""
+)
+
+t.write("x.foo", "")
+t.write("jamroot.jam", """\
+import foo ;
+lib x : x.foo : <link>static ;
+""")
+
+
+# Get everything built once.
+t.run_build_system()
+
+# Simply rerunning the build without touching any of its source target files
+# should not cause any files to be affected.
+t.run_build_system()
+t.expect_nothing_more()
diff --git a/src/boost/tools/build/test/searched_lib.py b/src/boost/tools/build/test/searched_lib.py
new file mode 100644
index 000000000..2081230a1
--- /dev/null
+++ b/src/boost/tools/build/test/searched_lib.py
@@ -0,0 +1,186 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2003, 2004, 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)
+
+# Test usage of searched-libs: one which are found via -l
+# switch to the linker/compiler.
+
+import BoostBuild
+import os
+import string
+
+t = BoostBuild.Tester(use_test_config=False)
+
+
+# To start with, we have to prepare a library to link with.
+t.write("lib/jamroot.jam", "")
+t.write("lib/jamfile.jam", "lib test_lib : test_lib.cpp ;")
+t.write("lib/test_lib.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo() {}
+""");
+
+t.run_build_system(subdir="lib")
+t.expect_addition("lib/bin/$toolset/debug*/test_lib.dll")
+
+
+# Auto adjusting of suffixes does not work, since we need to
+# change dll to lib.
+if ( ( os.name == "nt" ) or os.uname()[0].lower().startswith("cygwin") ) and \
+ ( BoostBuild.get_toolset() != "gcc" ):
+ t.copy("lib/bin/$toolset/debug*/test_lib.implib", "lib/test_lib.implib")
+ t.copy("lib/bin/$toolset/debug*/test_lib.dll", "lib/test_lib.dll")
+else:
+ t.copy("lib/bin/$toolset/debug*/test_lib.dll", "lib/test_lib.dll")
+
+
+# Test that the simplest usage of searched library works.
+t.write("jamroot.jam", "")
+
+t.write("jamfile.jam", """\
+import path ;
+import project ;
+exe main : main.cpp helper ;
+lib helper : helper.cpp test_lib ;
+lib test_lib : : <name>test_lib <search>lib ;
+""")
+
+t.write("main.cpp", """\
+void helper();
+int main() { helper(); }
+""")
+
+t.write("helper.cpp", """\
+void foo();
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+helper() { foo(); }
+""")
+
+t.run_build_system(["-d2"])
+t.expect_addition("bin/$toolset/debug*/main.exe")
+t.rm("bin/$toolset/debug/main.exe")
+t.rm("bin/$toolset/debug/*/main.exe")
+
+
+# Test that 'unit-test' will correctly add runtime paths to searched libraries.
+t.write("jamfile.jam", """\
+import path ;
+import project ;
+import testing ;
+
+project : requirements <hardcode-dll-paths>false ;
+
+unit-test main : main.cpp helper ;
+lib helper : helper.cpp test_lib ;
+lib test_lib : : <name>test_lib <search>lib ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/main.passed")
+t.rm("bin/$toolset/debug/main.exe")
+t.rm("bin/$toolset/debug/*/main.exe")
+
+
+# Now try using searched lib from static lib. Request shared version of searched
+# lib, since we do not have a static one handy.
+t.write("jamfile.jam", """\
+exe main : main.cpp helper ;
+lib helper : helper.cpp test_lib/<link>shared : <link>static ;
+lib test_lib : : <name>test_lib <search>lib ;
+""")
+
+t.run_build_system(stderr=None)
+t.expect_addition("bin/$toolset/debug*/main.exe")
+t.expect_addition("bin/$toolset/debug/link-static*/helper.lib")
+t.rm("bin/$toolset/debug/main.exe")
+t.rm("bin/$toolset/debug/*/main.exe")
+
+# A regression test: <library>property referring to searched-lib was being
+# mishandled. As the result, we were putting target name to the command line!
+# Note that
+# g++ ...... <.>z
+# works nicely in some cases, sending output from compiler to file 'z'. This
+# problem shows up when searched libs are in usage requirements.
+t.write("jamfile.jam", "exe main : main.cpp d/d2//a ;")
+t.write("main.cpp", """\
+void foo();
+int main() { foo(); }
+""")
+
+t.write("d/d2/jamfile.jam", """\
+lib test_lib : : <name>test_lib <search>../../lib ;
+lib a : a.cpp : : : <library>test_lib ;
+""")
+
+t.write("d/d2/a.cpp", """\
+#ifdef _WIN32
+__declspec(dllexport) int force_library_creation_for_a;
+#endif
+""")
+
+t.run_build_system()
+
+
+# A regression test. Searched targets were not associated with any properties.
+# For that reason, if the same searched lib is generated with two different
+# properties, we had an error saying they are actualized to the same Jam target
+# name.
+t.write("jamroot.jam", "")
+
+t.write("a.cpp", "")
+
+# The 'l' library will be built in two variants: 'debug' (directly requested)
+# and 'release' (requested from 'a').
+t.write("jamfile.jam", """\
+exe a : a.cpp l/<variant>release ;
+lib l : : <name>l_d <variant>debug ;
+lib l : : <name>l_r <variant>release ;
+""")
+
+t.run_build_system(["-n"])
+
+
+# A regression test. Two virtual target with the same properties were created
+# for 'l' target, which caused and error to be reported when actualizing
+# targets. The final error is correct, but we should not create two duplicated
+# targets. Thanks to Andre Hentz for finding this bug.
+t.write("jamroot.jam", "")
+t.write("a.cpp", "")
+t.write("jamfile.jam", """\
+project a : requirements <runtime-link>static ;
+static-lib a : a.cpp l ;
+lib l : : <name>l_f ;
+""")
+
+t.run_build_system(["-n"])
+
+
+# Make sure plain "lib foobar ; " works.
+t.write("jamfile.jam", """\
+exe a : a.cpp foobar ;
+lib foobar ;
+""")
+
+t.run_build_system(["-n", "-d2"])
+t.fail_test(t.stdout().find("foobar") == -1)
+
+
+# Make sure plain "lib foo bar ; " works.
+t.write("jamfile.jam", """\
+exe a : a.cpp foo bar ;
+lib foo bar ;
+""")
+
+t.run_build_system(["-n", "-d2"])
+t.fail_test(t.stdout().find("foo") == -1)
+t.fail_test(t.stdout().find("bar") == -1)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/skipping.py b/src/boost/tools/build/test/skipping.py
new file mode 100644
index 000000000..a187a4bed
--- /dev/null
+++ b/src/boost/tools/build/test/skipping.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+# 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)
+
+# Test that V2 does not fail gracelessy when any target is skipped.
+
+import BoostBuild
+
+# Create a temporary working directory.
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("a.cpp", "int main() {}\n")
+t.write("b.cpp", "int main() {}\n")
+t.write("c.cpp", "int main() {}\n")
+t.write("jamroot.jam", """\
+import feature ;
+feature.feature foo : 1 2 : link-incompatible ;
+exe a : a.cpp : <foo>1 ;
+exe b : b.cpp : <foo>2 ;
+exe c : c.cpp ;
+""")
+
+t.run_build_system(["foo=1"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/sort_rule.py b/src/boost/tools/build/test/sort_rule.py
new file mode 100755
index 000000000..395373263
--- /dev/null
+++ b/src/boost/tools/build/test/sort_rule.py
@@ -0,0 +1,98 @@
+#!/usr/bin/python
+
+# Copyright (C) 2008. Jurko Gospodnetic
+# 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)
+
+# Tests for the Boost Jam builtin SORT rule.
+
+from __future__ import print_function
+
+import BoostBuild
+
+
+###############################################################################
+#
+# testSORTCorrectness()
+# ---------------------
+#
+###############################################################################
+
+def testSORTCorrectness():
+ """Testing that Boost Jam's SORT builtin rule actually sorts correctly."""
+ t = BoostBuild.Tester(["-ftest.jam", "-d1"], pass_toolset=False,
+ use_test_config=False)
+
+ t.write("test.jam", """\
+NOCARE all ;
+source-data = 1 8 9 2 7 3 4 7 1 27 27 9 98 98 1 1 4 5 6 2 3 4 8 1 -2 -2 0 0 0 ;
+target-data = -2 -2 0 0 0 1 1 1 1 1 2 2 27 27 3 3 4 4 4 5 6 7 7 8 8 9 9 98 98 ;
+ECHO "starting up" ;
+sorted-data = [ SORT $(source-data) ] ;
+ECHO "done" ;
+if $(sorted-data) != $(target-data)
+{
+ ECHO "Source :" $(source-data) ;
+ ECHO "Expected :" $(target-data) ;
+ ECHO "SORT returned:" $(sorted-data) ;
+ EXIT "SORT error" : -2 ;
+}
+""")
+
+ t.run_build_system()
+ t.expect_output_lines("starting up")
+ t.expect_output_lines("done")
+ t.expect_output_lines("SORT error", False)
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# testSORTDuration()
+# ------------------
+#
+###############################################################################
+
+def testSORTDuration():
+ """
+ Regression test making sure Boost Jam's SORT builtin rule does not get
+ quadratic behaviour again in this use case.
+
+ """
+ t = BoostBuild.Tester(["-ftest.jam", "-d1"], pass_toolset=False,
+ use_test_config=False)
+
+ f = open(t.workpath("test.jam"), "w")
+ print("data = ", file=f)
+ for i in range(0, 20000):
+ if i % 2:
+ print('"aaa"', file=f)
+ else:
+ print('"bbb"', file=f)
+ print(""";
+
+ECHO "starting up" ;
+sorted = [ SORT $(data) ] ;
+ECHO "done" ;
+NOCARE all ;
+""", file=f)
+ f.close()
+
+ t.run_build_system(expected_duration=1)
+ t.expect_output_lines("starting up")
+ t.expect_output_lines("done")
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+testSORTCorrectness()
+testSORTDuration()
diff --git a/src/boost/tools/build/test/source_locations.py b/src/boost/tools/build/test/source_locations.py
new file mode 100644
index 000000000..8123a1864
--- /dev/null
+++ b/src/boost/tools/build/test/source_locations.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+# Copyright (C) Craig Rodrigues 2005.
+# 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)
+
+# Test that projects with multiple source-location directories are handled OK.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", """
+path-constant SRC1 : "./src1" ;
+path-constant SRC2 : "./src2" ;
+path-constant SRC3 : "./src3" ;
+path-constant BUILD : "build" ;
+
+project : requirements <include>$(SRC1)/include <threading>multi
+ : build-dir $(BUILD) ;
+
+build-project project1 ;
+""")
+
+t.write("project1/jamfile.jam", """
+project project1 : source-location $(SRC1) $(SRC2) $(SRC3) ;
+SRCS = s1.cpp s2.cpp testfoo.cpp ;
+exe test : $(SRCS) ;
+""")
+
+t.write("src1/s1.cpp", "int main() {}\n")
+t.write("src2/s2.cpp", "void hello() {}\n")
+t.write("src3/testfoo.cpp", "void testfoo() {}\n")
+
+# This file should not be picked up, because "src2" is before "src3" in the list
+# of source directories.
+t.write("src3/s2.cpp", "void hello() {}\n")
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/source_order.py b/src/boost/tools/build/test/source_order.py
new file mode 100755
index 000000000..f21710a8c
--- /dev/null
+++ b/src/boost/tools/build/test/source_order.py
@@ -0,0 +1,84 @@
+#!/usr/bin/python
+
+# Copyright 2013 Steven Watanabe
+# 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)
+
+# Tests that action sources are not reordered
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("check-order.jam", """\
+import type ;
+import generators ;
+
+type.register ORDER_TEST : order-test ;
+
+SPACE = " " ;
+nl = "\n" ;
+actions check-order
+{
+ echo$(SPACE)$(>[1])>$(<[1])
+ echo$(SPACE)$(>[2-])>>$(<[1])$(nl)
+}
+
+generators.register-composing check-order.check-order : C : ORDER_TEST ;
+""")
+
+t.write(
+ 'check-order.py',
+"""
+import bjam
+
+from b2.build import type as type_, generators
+from b2.tools import common
+from b2.manager import get_manager
+
+MANAGER = get_manager()
+ENGINE = MANAGER.engine()
+
+type_.register('ORDER_TEST', ['order-test'])
+
+generators.register_composing('check-order.check-order', ['C'], ['ORDER_TEST'])
+
+def check_order(targets, sources, properties):
+ ENGINE.set_target_variable(targets, 'SPACE', ' ')
+ ENGINE.set_target_variable(targets, 'nl', '\\n')
+
+ENGINE.register_action(
+ 'check-order.check-order',
+ function=check_order,
+ command='''
+ echo$(SPACE)$(>[1])>$(<[1])
+ echo$(SPACE)$(>[2-])>>$(<[1])$(nl)
+ '''
+)
+"""
+)
+
+# The aliases are necessary for this test, since
+# the targets were sorted by virtual target
+# id, not by file name.
+t.write("jamroot.jam", """\
+import check-order ;
+alias file1 : file1.c ;
+alias file2 : file2.c ;
+alias file3 : file3.c ;
+order-test check : file2 file1 file3 ;
+""")
+
+t.write("file1.c", "")
+t.write("file2.c", "")
+t.write("file3.c", "")
+
+t.run_build_system()
+t.expect_addition("bin/check.order-test")
+t.expect_content("bin/check.order-test", """\
+file2.c
+file1.c
+file3.c
+""", True)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/space_in_path.py b/src/boost/tools/build/test/space_in_path.py
new file mode 100755
index 000000000..7f0c041a3
--- /dev/null
+++ b/src/boost/tools/build/test/space_in_path.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+# Copyright 2012 Steven Watanabe
+# 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)
+
+# Test that paths containing spaces are handled correctly by actions.
+
+import BoostBuild
+import os
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("has space/jamroot.jam", """\
+import testing ;
+unit-test test : test.cpp ;
+actions write-file
+{
+ @(STDOUT:E=okay) >"$(<)"
+}
+make test.txt : : @write-file ;
+""")
+t.write("has space/test.cpp", "int main() {}\n")
+
+tmpdir = t.workpath("has space")
+try:
+ oldtmp = os.environ["TMP"]
+except:
+ oldtmp = None
+try:
+ oldtmpdir = os.environ["TMPDIR"]
+except:
+ oldtmpdir = None
+os.environ["TMP"] = tmpdir; # Windows
+os.environ["TMPDIR"] = tmpdir; # *nix
+
+try:
+ t.run_build_system(["has space"])
+ t.expect_addition("has space/bin/test.txt")
+ t.expect_addition("has space/bin/$toolset/debug*/test.passed")
+finally:
+ if oldtmp is not None:
+ os.environ["TMP"] = oldtmp
+ else:
+ del os.environ["TMP"]
+ if oldtmpdir is not None:
+ os.environ["TMPDIR"] = oldtmpdir
+ else:
+ del os.environ["TMPDIR"]
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/stage.py b/src/boost/tools/build/test/stage.py
new file mode 100644
index 000000000..4dd4e2f94
--- /dev/null
+++ b/src/boost/tools/build/test/stage.py
@@ -0,0 +1,207 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004, 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)
+
+# Test staging.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "")
+t.write("jamfile.jam", """\
+lib a : a.cpp ;
+stage dist : a a.h auxilliary/1 ;
+""")
+t.write("a.cpp", """\
+int
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+must_export_something;
+""")
+t.write("a.h", "")
+t.write("auxilliary/1", "")
+
+t.run_build_system()
+t.expect_addition(["dist/a.dll", "dist/a.h", "dist/1"])
+
+
+# Regression test: the following was causing a "duplicate target name" error.
+t.write("jamfile.jam", """\
+project : requirements <hardcode-dll-paths>true ;
+lib a : a.cpp ;
+stage dist : a a.h auxilliary/1 ;
+alias dist-alias : dist ;
+""")
+
+t.run_build_system()
+
+
+# Test the <location> property.
+t.write("jamfile.jam", """\
+lib a : a.cpp ;
+stage dist : a : <variant>debug:<location>ds <variant>release:<location>rs ;
+""")
+
+t.run_build_system()
+t.expect_addition("ds/a.dll")
+
+t.run_build_system(["release"])
+t.expect_addition("rs/a.dll")
+
+
+# Test the <location> property in subprojects. Thanks to Kirill Lapshin for the
+# bug report.
+
+t.write("jamroot.jam", "path-constant DIST : dist ;")
+t.write("jamfile.jam", "build-project d ;")
+t.write("d/jamfile.jam", """\
+exe a : a.cpp ;
+stage dist : a : <location>$(DIST) ;
+""")
+t.write("d/a.cpp", "int main() {}\n")
+
+t.run_build_system()
+t.expect_addition("dist/a.exe")
+
+t.rm("dist")
+
+# Workaround a BIG BUG: the response file is not deleted, even if application
+# *is* deleted. We will try to use the same response file when building from
+# subdir, with very bad results.
+t.rm("d/bin")
+t.run_build_system(subdir="d")
+t.expect_addition("dist/a.exe")
+
+
+# Check that 'stage' does not incorrectly reset target suffixes.
+t.write("a.cpp", "int main() {}\n")
+t.write("jamroot.jam", """\
+import type ;
+type.register MYEXE : : EXE ;
+type.set-generated-target-suffix MYEXE : <optimization>off : myexe ;
+""")
+
+# Since <optimization>off is in properties when 'a' is built and staged, its
+# suffix should be "myexe".
+t.write("jamfile.jam", """\
+stage dist : a ;
+myexe a : a.cpp ;
+""")
+
+t.run_build_system()
+t.expect_addition("dist/a.myexe")
+
+# Test 'stage's ability to traverse dependencies.
+t.write("a.cpp", "int main() {}\n")
+t.write("l.cpp", """\
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+t.write("jamfile.jam", """\
+lib l : l.cpp ;
+exe a : a.cpp l ;
+stage dist : a : <install-dependencies>on <install-type>EXE <install-type>LIB ;
+""")
+t.write("jamroot.jam", "")
+t.rm("dist")
+
+t.run_build_system()
+t.expect_addition("dist/a.exe")
+t.expect_addition("dist/l.dll")
+
+# Check that <use> properties are ignored the traversing target for staging.
+t.copy("l.cpp", "l2.cpp")
+t.copy("l.cpp", "l3.cpp")
+t.write("jamfile.jam", """\
+lib l2 : l2.cpp ;
+lib l3 : l3.cpp ;
+lib l : l.cpp : <use>l2 <dependency>l3 ;
+exe a : a.cpp l ;
+stage dist : a : <install-dependencies>on <install-type>EXE <install-type>LIB ;
+""")
+t.rm("dist")
+
+t.run_build_system()
+t.expect_addition("dist/l3.dll")
+t.expect_nothing("dist/l2.dll")
+
+# Check if <dependency> on 'stage' works.
+t.rm(".")
+t.write("jamroot.jam", """\
+stage a1 : a1.txt : <location>dist ;
+stage a2 : a2.txt : <location>dist <dependency>a1 ;
+""")
+t.write("a1.txt", "")
+t.write("a2.txt", "")
+t.run_build_system(["a2"])
+t.expect_addition(["dist/a1.txt", "dist/a2.txt"])
+
+# Regression test: check that <location>. works.
+t.rm(".")
+t.write("jamroot.jam", "stage a1 : d/a1.txt : <location>. ;")
+t.write("d/a1.txt", "")
+
+t.run_build_system()
+t.expect_addition("a1.txt")
+
+# Test that relative paths of sources can be preserved.
+t.rm(".")
+t.write("jamroot.jam", "install dist : a/b/c.h : <install-source-root>. ;")
+t.write("a/b/c.h", "")
+
+t.run_build_system()
+t.expect_addition("dist/a/b/c.h")
+
+t.write("jamroot.jam", "install dist : a/b/c.h : <install-source-root>a ;")
+t.write("a/b/c.h", "")
+
+t.run_build_system()
+t.expect_addition("dist/b/c.h")
+
+t.rm(".")
+t.write("build/jamroot.jam", """\
+install dist : ../a/b/c.h : <location>../dist <install-source-root>../a ;
+""")
+t.write("a/b/c.h", "")
+
+t.run_build_system(subdir="build")
+t.expect_addition("dist/b/c.h")
+
+t.write("jamroot.jam", "install dist2 : a/b/c.h : <install-source-root>a ;")
+t.write("a/b/c.h", "")
+t.write("sub/jamfile.jam", "alias h : ..//dist2 ;")
+
+t.run_build_system(subdir="sub")
+t.expect_addition("dist2/b/c.h")
+
+# Test that when installing .cpp files, we do not scan include dependencies.
+t.rm(".")
+t.write("jamroot.jam", "install dist : a.cpp ;")
+t.write("a.cpp", '#include "a.h"')
+t.write("a.h", "")
+
+t.run_build_system()
+t.expect_addition("dist/a.cpp")
+
+t.touch("a.h")
+
+t.run_build_system()
+t.expect_nothing("dist/a.cpp")
+
+# Test that <name> property works, when there is just one file in sources.
+t.rm(".")
+t.write("jamroot.jam", "install dist : a.cpp : <name>b.cpp ;")
+t.write("a.cpp", "test file")
+
+t.run_build_system()
+t.expect_addition("dist/b.cpp")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/standalone.py b/src/boost/tools/build/test/standalone.py
new file mode 100644
index 000000000..6d9e9e862
--- /dev/null
+++ b/src/boost/tools/build/test/standalone.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+# Copyright 2003 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+
+# Regression tests: standalone project were not able to refer to targets
+# declared in themselves.
+
+t.write("a.cpp", "int main() {}\n")
+t.write("jamroot.jam", "import standalone ;")
+t.write("standalone.jam", """\
+import alias ;
+import project ;
+
+project.initialize $(__name__) ;
+project standalone ;
+
+local pwd = [ PWD ] ;
+
+alias x : $(pwd)/../a.cpp ;
+alias runtime : x ;
+""")
+
+t.write("standalone.py", """\
+from b2.manager import get_manager
+
+# FIXME: this is ugly as death
+get_manager().projects().initialize(__name__)
+
+import os ;
+
+# This use of list as parameter is also ugly.
+project(['standalone'])
+
+pwd = os.getcwd()
+alias('x', [os.path.join(pwd, '../a.cpp')])
+alias('runtime', ['x'])
+""")
+
+
+t.write("sub/jamfile.jam", "stage bin : /standalone//runtime ;")
+
+t.run_build_system(subdir="sub")
+t.expect_addition("sub/bin/a.cpp")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/startup/boost-root/boost-build.jam b/src/boost/tools/build/test/startup/boost-root/boost-build.jam
new file mode 100644
index 000000000..098889f7b
--- /dev/null
+++ b/src/boost/tools/build/test/startup/boost-root/boost-build.jam
@@ -0,0 +1,7 @@
+# Copyright 2002 Dave Abrahams
+# Copyright 2004 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)
+
+# Emulate v1 behavior; with the boost-build file in the boost root directory.
+boost-build build ;
diff --git a/src/boost/tools/build/test/startup/boost-root/build/boost-build.jam b/src/boost/tools/build/test/startup/boost-root/build/boost-build.jam
new file mode 100644
index 000000000..610ec79ee
--- /dev/null
+++ b/src/boost/tools/build/test/startup/boost-root/build/boost-build.jam
@@ -0,0 +1,6 @@
+# Copyright 2004 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)
+
+# The presence of this file emulates the Boost 1.27.0 release
+include $(BOOST_ROOT)/tools/build/bootstrap.jam ;
diff --git a/src/boost/tools/build/test/startup/boost-root/build/bootstrap.jam b/src/boost/tools/build/test/startup/boost-root/build/bootstrap.jam
new file mode 100644
index 000000000..2ee3507c3
--- /dev/null
+++ b/src/boost/tools/build/test/startup/boost-root/build/bootstrap.jam
@@ -0,0 +1,7 @@
+# Copyright 2004 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)
+
+ECHO build system bootstrapped ;
+DEPENDS all : nothing ;
+NOTFILE nothing ;
diff --git a/src/boost/tools/build/test/startup/bootstrap-env/boost-build.jam b/src/boost/tools/build/test/startup/bootstrap-env/boost-build.jam
new file mode 100644
index 000000000..67a285e7c
--- /dev/null
+++ b/src/boost/tools/build/test/startup/bootstrap-env/boost-build.jam
@@ -0,0 +1,5 @@
+# Copyright 2002 Dave 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)
+
+boost-build ;
diff --git a/src/boost/tools/build/test/startup/bootstrap-explicit/boost-build.jam b/src/boost/tools/build/test/startup/bootstrap-explicit/boost-build.jam
new file mode 100644
index 000000000..27d9108b7
--- /dev/null
+++ b/src/boost/tools/build/test/startup/bootstrap-explicit/boost-build.jam
@@ -0,0 +1,6 @@
+# Copyright 2002 Dave Abrahams
+# Copyright 2004 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)
+
+boost-build ../boost-root/build ;
diff --git a/src/boost/tools/build/test/startup/bootstrap-implicit/readme.txt b/src/boost/tools/build/test/startup/bootstrap-implicit/readme.txt
new file mode 100644
index 000000000..0278716e5
--- /dev/null
+++ b/src/boost/tools/build/test/startup/bootstrap-implicit/readme.txt
@@ -0,0 +1,5 @@
+Copyright 2002 Dave 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)
+
+This file is only here so that cvs update -P won't fail to create a directory
diff --git a/src/boost/tools/build/test/startup/no-bootstrap1/boost-build.jam b/src/boost/tools/build/test/startup/no-bootstrap1/boost-build.jam
new file mode 100644
index 000000000..b1b4dc696
--- /dev/null
+++ b/src/boost/tools/build/test/startup/no-bootstrap1/boost-build.jam
@@ -0,0 +1,6 @@
+# Copyright 2002 Dave 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)
+
+# Bootstrap file not found via implicit lookup in BOOST_BUILD_PATH
+boost-build ;
diff --git a/src/boost/tools/build/test/startup/no-bootstrap1/subdir/readme.txt b/src/boost/tools/build/test/startup/no-bootstrap1/subdir/readme.txt
new file mode 100644
index 000000000..00f428d44
--- /dev/null
+++ b/src/boost/tools/build/test/startup/no-bootstrap1/subdir/readme.txt
@@ -0,0 +1,5 @@
+Copyright 2002 Dave 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)
+
+This file is only here so cvs update -P will create the directory.
diff --git a/src/boost/tools/build/test/startup/no-bootstrap2/boost-build.jam b/src/boost/tools/build/test/startup/no-bootstrap2/boost-build.jam
new file mode 100644
index 000000000..505dcd775
--- /dev/null
+++ b/src/boost/tools/build/test/startup/no-bootstrap2/boost-build.jam
@@ -0,0 +1,6 @@
+# Copyright 2002 Dave 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)
+
+# Bootstrap file not found via explicit lookup in .
+boost-build . ;
diff --git a/src/boost/tools/build/test/startup/no-bootstrap3/boost-build.jam b/src/boost/tools/build/test/startup/no-bootstrap3/boost-build.jam
new file mode 100644
index 000000000..252a3993c
--- /dev/null
+++ b/src/boost/tools/build/test/startup/no-bootstrap3/boost-build.jam
@@ -0,0 +1,5 @@
+# Copyright 2002 Dave 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)
+
+# Call to boost-build is intentionally missing
diff --git a/src/boost/tools/build/test/startup_v2.py b/src/boost/tools/build/test/startup_v2.py
new file mode 100644
index 000000000..ae7d0da40
--- /dev/null
+++ b/src/boost/tools/build/test/startup_v2.py
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+
+# Copyright 2002 Dave Abrahams
+# Copyright 2003, 2004 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)
+
+import BoostBuild
+import os.path
+import re
+
+
+def check_for_existing_boost_build_jam(t):
+ """
+ This test depends on no boost-build.jam file existing in any of the
+ folders along the current folder's path. If it does exist, not only would
+ this test fail but it could point to a completely wrong Boost Build
+ installation, thus causing headaches when attempting to diagnose the
+ problem. That is why we explicitly check for this scenario.
+
+ """
+ problem = find_up_to_root(t.workdir, "boost-build.jam")
+ if problem:
+ BoostBuild.annotation("misconfiguration", """\
+This test expects to be run from a folder with no 'boost-build.jam' file in any
+of the folders along its path.
+
+Working folder:
+ '%s'
+
+Problematic boost-build.jam found at:
+ '%s'
+
+Please remove this file or change the test's working folder and rerun the test.
+""" % (t.workdir, problem))
+ t.fail_test(1, dump_stdio=False, dump_stack=False)
+
+
+def find_up_to_root(folder, name):
+ last = ""
+ while last != folder:
+ candidate = os.path.join(folder, name)
+ if os.path.exists(candidate):
+ return candidate
+ last = folder
+ folder = os.path.dirname(folder)
+
+
+def match_re(actual, expected):
+ return re.match(expected, actual, re.DOTALL) != None
+
+
+t = BoostBuild.Tester(match=match_re, boost_build_path="", pass_toolset=0)
+t.set_tree("startup")
+check_for_existing_boost_build_jam(t)
+
+t.run_build_system(status=1, stdout=
+r"""Unable to load B2: could not find "boost-build\.jam"
+.*Attempted search from .* up to the root""")
+
+t.run_build_system(status=1, subdir="no-bootstrap1",
+ stdout=r"Unable to load B2: could not find build system\."
+ r".*attempted to load the build system by invoking"
+ r".*'boost-build ;'"
+ r'.*but we were unable to find "bootstrap\.jam"')
+
+# Descend to a subdirectory which /does not/ contain a boost-build.jam file,
+# and try again to test the crawl-up behavior.
+t.run_build_system(status=1, subdir=os.path.join("no-bootstrap1", "subdir"),
+ stdout=r"Unable to load B2: could not find build system\."
+ r".*attempted to load the build system by invoking"
+ r".*'boost-build ;'"
+ r'.*but we were unable to find "bootstrap\.jam"')
+
+t.run_build_system(status=1, subdir="no-bootstrap2",
+ stdout=r"Unable to load B2: could not find build system\."
+ r".*attempted to load the build system by invoking"
+ r".*'boost-build \. ;'"
+ r'.*but we were unable to find "bootstrap\.jam"')
+
+t.run_build_system(status=1, subdir='no-bootstrap3', stdout=
+r"""Unable to load B2
+.*boost-build\.jam" was found.*
+However, it failed to call the "boost-build" rule""")
+
+# Test bootstrapping based on BOOST_BUILD_PATH.
+t.run_build_system(["-sBOOST_BUILD_PATH=../boost-root/build"],
+ subdir="bootstrap-env", stdout="build system bootstrapped")
+
+# Test bootstrapping based on an explicit path in boost-build.jam.
+t.run_build_system(subdir="bootstrap-explicit",
+ stdout="build system bootstrapped")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/static_and_shared_library.py b/src/boost/tools/build/test/static_and_shared_library.py
new file mode 100755
index 000000000..c3443e927
--- /dev/null
+++ b/src/boost/tools/build/test/static_and_shared_library.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# Copyright 2002, 2003 Dave Abrahams
+# Copyright 2002, 2003, 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+t.write("jamroot.jam", "")
+t.write("lib/c.cpp", "int bar() { return 0; }\n")
+t.write("lib/jamfile.jam", """\
+static-lib auxilliary1 : c.cpp ;
+lib auxilliary2 : c.cpp ;
+""")
+
+def reset():
+ t.rm("lib/bin")
+
+t.run_build_system(subdir='lib')
+t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List("c.obj "
+ "auxilliary1.lib auxilliary2.dll"))
+
+reset()
+t.run_build_system(["link=shared"], subdir="lib")
+t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List("c.obj "
+ "auxilliary1.lib auxilliary2.dll"))
+
+reset()
+t.run_build_system(["link=static"], subdir="lib")
+t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List(
+ "c.obj auxilliary1.lib auxilliary2.lib"))
+t.expect_nothing_more()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/suffix.py b/src/boost/tools/build/test/suffix.py
new file mode 100644
index 000000000..b31dd1730
--- /dev/null
+++ b/src/boost/tools/build/test/suffix.py
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+
+# Copyright 2003, 2004 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+# Regression test: when staging V2 used to change suffixes on targets
+# corresponding to real files.
+t.write("jamfile.jam", """
+import type : register ;
+register A : a1 a2 a3 ;
+stage a : a.a3 ;
+""")
+
+t.write("jamroot.jam", "")
+t.write("a.a3", "")
+
+t.run_build_system()
+t.expect_addition("a/a.a3");
+
+# Regression test: we should be able to specify empty suffix for derived target
+# type, even if base type has non-empty suffix.
+t.write("a.cpp", "")
+
+t.write("suffixes.jam", """
+import type ;
+import generators ;
+import common ;
+
+type.register First : first : ;
+type.register Second : "" : First ;
+
+generators.register-standard $(__name__).second : CPP : Second ;
+
+rule second
+{
+ TOUCH on $(<) = [ common.file-creation-command ] ;
+}
+
+actions second
+{
+ $(TOUCH) $(<)
+}
+""")
+
+t.write("suffixes.py", """
+import b2.build.type as type
+import b2.build.generators as generators
+import b2.tools.common as common
+
+from b2.manager import get_manager
+
+type.register("First", ["first"])
+type.register("Second", [""], "First")
+
+generators.register_standard("suffixes.second", ["CPP"], ["Second"])
+
+get_manager().engine().register_action("suffixes.second",
+ "%s $(<)" % common.file_creation_command())
+
+""")
+
+t.write("jamroot.jam", """
+import suffixes ;
+""")
+
+t.write("jamfile.jam", """
+second a : a.cpp ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/a")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/symlink.py b/src/boost/tools/build/test/symlink.py
new file mode 100644
index 000000000..ab02db2f5
--- /dev/null
+++ b/src/boost/tools/build/test/symlink.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# 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)
+
+# Test the 'symlink' rule.
+
+from __future__ import print_function
+
+import os
+import BoostBuild
+
+
+if os.name != 'posix':
+ print("The symlink tests can be run on posix only.")
+ import sys
+ sys.exit(1)
+
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "import gcc ;")
+
+t.write("jamfile.jam", """
+exe hello : hello.cpp ;
+symlink hello_release : hello/<variant>release ;
+symlink hello_debug : hello/<variant>debug ;
+symlink links/hello_release : hello/<variant>release ;
+""")
+
+t.write("hello.cpp", """
+int main() {}
+""")
+
+t.run_build_system()
+t.expect_addition([
+ 'hello_debug.exe',
+ 'hello_release.exe',
+ 'links/hello_release.exe'])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/tag.py b/src/boost/tools/build/test/tag.py
new file mode 100644
index 000000000..adf2fce6f
--- /dev/null
+++ b/src/boost/tools/build/test/tag.py
@@ -0,0 +1,122 @@
+#!/usr/bin/python
+
+# Copyright (C) 2003. Pedro Ferreira
+# 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 BoostBuild
+
+
+###############################################################################
+#
+# test_folder_with_dot_in_name()
+# ------------------------------
+#
+###############################################################################
+
+def test_folder_with_dot_in_name(t):
+ """
+ Regression test: the 'tag' feature did not work in directories that had a
+ dot in their name.
+
+ """
+ t.write("version-1.32.0/jamroot.jam", """\
+project test : requirements <tag>@$(__name__).tag ;
+
+rule tag ( name : type ? : property-set )
+{
+ # Do nothing, just make sure the rule is invoked OK.
+ ECHO The tag rule has been invoked. ;
+}
+exe a : a.cpp ;
+""")
+ t.write("version-1.32.0/a.cpp", "int main() {}\n")
+
+ t.run_build_system(subdir="version-1.32.0")
+ t.expect_addition("version-1.32.0/bin/$toolset/debug*/a.exe")
+ t.expect_output_lines("The tag rule has been invoked.")
+
+
+###############################################################################
+#
+# test_tag_property()
+# -------------------
+#
+###############################################################################
+
+def test_tag_property(t):
+ """Basic tag property test."""
+
+ t.write("jamroot.jam", """\
+import virtual-target ;
+
+rule tag ( name : type ? : property-set )
+{
+ local tags ;
+ switch [ $(property-set).get <variant> ]
+ {
+ case debug : tags += d ;
+ case release : tags += r ;
+ }
+ switch [ $(property-set).get <link> ]
+ {
+ case shared : tags += s ;
+ case static : tags += t ;
+ }
+ if $(tags)
+ {
+ return [ virtual-target.add-prefix-and-suffix $(name)_$(tags:J="")
+ : $(type) : $(property-set) ] ;
+ }
+}
+
+# Test both fully-qualified and local name of the rule
+exe a : a.cpp : <tag>@$(__name__).tag ;
+lib b : a.cpp : <tag>@tag ;
+stage c : a ;
+""")
+
+ t.write("a.cpp", """\
+int main() {}
+#ifdef _MSC_VER
+__declspec (dllexport) void x () {}
+#endif
+""")
+
+ file_list = (
+ BoostBuild.List("bin/$toolset/debug*/a_ds.exe") +
+ BoostBuild.List("bin/$toolset/debug*/b_ds.dll") +
+ BoostBuild.List("c/a_ds.exe") +
+ BoostBuild.List("bin/$toolset/release*/a_rs.exe") +
+ BoostBuild.List("bin/$toolset/release*/b_rs.dll") +
+ BoostBuild.List("c/a_rs.exe") +
+ BoostBuild.List("bin/$toolset/debug*/a_dt.exe") +
+ BoostBuild.List("bin/$toolset/debug*/b_dt.lib") +
+ BoostBuild.List("c/a_dt.exe") +
+ BoostBuild.List("bin/$toolset/release*/a_rt.exe") +
+ BoostBuild.List("bin/$toolset/release*/b_rt.lib") +
+ BoostBuild.List("c/a_rt.exe"))
+
+ variants = ["debug", "release", "link=static,shared"]
+
+ t.run_build_system(variants)
+ t.expect_addition(file_list)
+
+ t.run_build_system(variants + ["clean"])
+ t.expect_removal(file_list)
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+t = BoostBuild.Tester(use_test_config=False)
+
+test_tag_property(t)
+test_folder_with_dot_in_name(t)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/template.py b/src/boost/tools/build/test/template.py
new file mode 100644
index 000000000..c5917c2fa
--- /dev/null
+++ b/src/boost/tools/build/test/template.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+# Copyright (C) FILL SOMETHING HERE 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)
+
+# This file is template for B2 tests. It creates a simple project that
+# builds one exe from one source, and checks that the exe is really created.
+
+import BoostBuild
+
+
+# Create a temporary working directory.
+t = BoostBuild.Tester()
+
+# Create the needed files.
+t.write("jamroot.jam", """
+exe hello : hello.cpp ;
+""")
+
+t.write("hello.cpp", """
+int main() {}
+"""
+
+# Run the build.
+t.run_build_system()
+
+# First, create a list of three pathnames.
+file_list = BoostBuild.List("bin/$toolset/debug*/") * \
+ BoostBuild.List("hello.exe hello.obj")
+# Second, assert that those files were added as result of the last build system
+# invocation.
+t.expect_addition(file_list)
+
+# Invoke the build system once again.
+t.run_build_system("clean")
+# Check if the files added previously were removed.
+t.expect_removal(file_list)
+
+# Remove temporary directories.
+t.cleanup()
diff --git a/src/boost/tools/build/test/test-config-example.jam b/src/boost/tools/build/test/test-config-example.jam
new file mode 100644
index 000000000..6cb813fa0
--- /dev/null
+++ b/src/boost/tools/build/test/test-config-example.jam
@@ -0,0 +1,19 @@
+# Copyright 2004, 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)
+
+
+# Skeleton for test configuration. If your local configuration
+# interferes with testing, rename this files to 'test-system.jam'
+# and tweak it. When tests are run, only this file will be loaded,
+# while site-config.jam and user-config.jam will be ignored.
+
+using gcc ;
+
+using boostbook
+ : /home/ghost/Store/docbook/xsl
+ : /home/ghost/Store/docbook/dtd
+ : /home/ghost/Work/Boost/boost-svn/tools/boostbook
+ ;
+using doxygen ;
+using qt4 : /usr/share/qt4 ;
diff --git a/src/boost/tools/build/test/test.jam b/src/boost/tools/build/test/test.jam
new file mode 100644
index 000000000..1ae1a2059
--- /dev/null
+++ b/src/boost/tools/build/test/test.jam
@@ -0,0 +1,39 @@
+# Copyright 2001, 2002, 2003 Dave Abrahams
+# Copyright 2002 Rene Rivera
+# Copyright 2002, 2003, 2004 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)
+
+# util
+import assert ;
+import container ;
+import indirect ;
+import numbers ;
+import order ;
+import os ;
+import path ;
+import print ;
+import regex ;
+import sequence ;
+import set ;
+import string ;
+import utility ;
+
+# kernel
+import "class" ;
+import errors ;
+import modules ;
+
+# build
+import build-request ;
+import feature ;
+import property ;
+import toolset ;
+import type ;
+import version ;
+
+# tools
+import common ;
+
+actions nothing { }
+nothing all ;
diff --git a/src/boost/tools/build/test/test1.py b/src/boost/tools/build/test/test1.py
new file mode 100644
index 000000000..79d142221
--- /dev/null
+++ b/src/boost/tools/build/test/test1.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+
+# Copyright 2002 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+
+t.write("test.jam", """
+actions unbuilt { }
+unbuilt all ;
+ECHO "Hi" ;
+""")
+
+t.run_build_system("-ftest.jam", stdout="Hi\n")
+t.cleanup()
diff --git a/src/boost/tools/build/test/test2.py b/src/boost/tools/build/test/test2.py
new file mode 100644
index 000000000..b7c99be12
--- /dev/null
+++ b/src/boost/tools/build/test/test2.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+# Copyright 2002, 2003 Dave Abrahams
+# Copyright 2002, 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.set_tree("test2")
+
+file_list = 'bin/$toolset/debug*/' * \
+ BoostBuild.List("foo foo.o")
+
+t.run_build_system("-sBOOST_BUILD_PATH=" + t.original_workdir + "/..")
+t.expect_addition(file_list)
+
+
+t.write("foo.cpp", "int main() {}\n")
+t.run_build_system("-d2 -sBOOST_BUILD_PATH=" + t.original_workdir + "/..")
+t.expect_touch(file_list)
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/test2/foo.cpp b/src/boost/tools/build/test/test2/foo.cpp
new file mode 100644
index 000000000..135fa90f6
--- /dev/null
+++ b/src/boost/tools/build/test/test2/foo.cpp
@@ -0,0 +1,10 @@
+// Copyright (c) 2003 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)
+//
+// http://www.boost.org
+//
+
+int main() { return 0; }
diff --git a/src/boost/tools/build/test/test2/jamroot.jam b/src/boost/tools/build/test/test2/jamroot.jam
new file mode 100644
index 000000000..4fb3f2886
--- /dev/null
+++ b/src/boost/tools/build/test/test2/jamroot.jam
@@ -0,0 +1,5 @@
+# Copyright 2002 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)
+
+exe foo : foo.cpp ;
diff --git a/src/boost/tools/build/test/test_all.py b/src/boost/tools/build/test/test_all.py
new file mode 100644
index 000000000..ebb6a8cf9
--- /dev/null
+++ b/src/boost/tools/build/test/test_all.py
@@ -0,0 +1,347 @@
+#!/usr/bin/python
+
+# Copyright 2002-2005 Dave Abrahams.
+# Copyright 2002-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)
+
+from __future__ import print_function
+
+import BoostBuild
+
+import os
+import os.path
+import sys
+
+xml = "--xml" in sys.argv
+toolset = BoostBuild.get_toolset()
+
+
+# Clear environment for testing.
+#
+for s in ("BOOST_ROOT", "BOOST_BUILD_PATH", "JAM_TOOLSET", "BCCROOT",
+ "MSVCDir", "MSVC", "MSVCNT", "MINGW", "watcom"):
+ try:
+ del os.environ[s]
+ except:
+ pass
+
+BoostBuild.set_defer_annotations(1)
+
+
+def run_tests(critical_tests, other_tests):
+ """
+ Runs first the critical_tests and then the other_tests.
+
+ Writes the name of the first failed test to test_results.txt. Critical
+ tests are run in the specified order, other tests are run starting with the
+ one that failed first on the last test run.
+
+ """
+ last_failed = last_failed_test()
+ other_tests = reorder_tests(other_tests, last_failed)
+ all_tests = critical_tests + other_tests
+
+ invocation_dir = os.getcwd()
+ max_test_name_len = 10
+ for x in all_tests:
+ if len(x) > max_test_name_len:
+ max_test_name_len = len(x)
+
+ pass_count = 0
+ failures_count = 0
+
+ for test in all_tests:
+ if not xml:
+ s = "%%-%ds :" % max_test_name_len % test
+ print(s, end='')
+
+ passed = 0
+ try:
+ __import__(test)
+ passed = 1
+ except KeyboardInterrupt:
+ """This allows us to abort the testing manually using Ctrl-C."""
+ raise
+ except SystemExit:
+ """This is the regular way our test scripts are supposed to report
+ test failures."""
+ except:
+ exc_type, exc_value, exc_tb = sys.exc_info()
+ try:
+ BoostBuild.annotation("failure - unhandled exception", "%s - "
+ "%s" % (exc_type.__name__, exc_value))
+ BoostBuild.annotate_stack_trace(exc_tb)
+ finally:
+ # Explicitly clear a hard-to-garbage-collect traceback
+ # related reference cycle as per documented sys.exc_info()
+ # usage suggestion.
+ del exc_tb
+
+ if passed:
+ pass_count += 1
+ else:
+ failures_count += 1
+ if failures_count == 1:
+ f = open(os.path.join(invocation_dir, "test_results.txt"), "w")
+ try:
+ f.write(test)
+ finally:
+ f.close()
+
+ # Restore the current directory, which might have been changed by the
+ # test.
+ os.chdir(invocation_dir)
+
+ if not xml:
+ if passed:
+ print("PASSED")
+ else:
+ print("FAILED")
+ BoostBuild.flush_annotations()
+ else:
+ rs = "succeed"
+ if not passed:
+ rs = "fail"
+ print('''
+<test-log library="build" test-name="%s" test-type="run" toolset="%s" test-program="%s" target-directory="%s">
+<run result="%s">''' % (test, toolset, "tools/build/v2/test/" + test + ".py",
+ "boost/bin.v2/boost.build.tests/" + toolset + "/" + test, rs))
+ if not passed:
+ BoostBuild.flush_annotations(1)
+ print('''
+</run>
+</test-log>
+''')
+ sys.stdout.flush() # Makes testing under emacs more entertaining.
+ BoostBuild.clear_annotations()
+
+ # Erase the file on success.
+ if failures_count == 0:
+ open("test_results.txt", "w").close()
+
+ if not xml:
+ print('''
+ === Test summary ===
+ PASS: %d
+ FAIL: %d
+ ''' % (pass_count, failures_count))
+
+ # exit with failure with failures
+ if failures_count > 0:
+ sys.exit(1)
+
+def last_failed_test():
+ "Returns the name of the last failed test or None."
+ try:
+ f = open("test_results.txt")
+ try:
+ return f.read().strip()
+ finally:
+ f.close()
+ except Exception:
+ return None
+
+
+def reorder_tests(tests, first_test):
+ try:
+ n = tests.index(first_test)
+ return [first_test] + tests[:n] + tests[n + 1:]
+ except ValueError:
+ return tests
+
+
+critical_tests = ["unit_tests", "module_actions", "startup_v2", "core_d12",
+ "core_typecheck", "core_delete_module", "core_language", "core_arguments",
+ "core_varnames", "core_import_module"]
+
+# We want to collect debug information about the test site before running any
+# of the tests, but only when not running the tests interactively. Then the
+# user can easily run this always-failing test directly to see what it would
+# have returned and there is no need to have it spoil a possible 'all tests
+# passed' result.
+if xml:
+ critical_tests.insert(0, "collect_debug_info")
+
+tests = ["absolute_sources",
+ "alias",
+ "alternatives",
+ "always",
+ "bad_dirname",
+ "build_dir",
+ "build_file",
+ "build_hooks",
+ "build_no",
+ "builtin_echo",
+ "builtin_exit",
+ "builtin_glob",
+ "builtin_split_by_characters",
+ "bzip2",
+ "c_file",
+ "chain",
+ "clean",
+ "command_line_properties",
+ "composite",
+ "conditionals",
+ "conditionals2",
+ "conditionals3",
+ "conditionals_multiple",
+ "configuration",
+ "configure",
+ "copy_time",
+ "core_action_output",
+ "core_action_status",
+ "core_actions_quietly",
+ "core_at_file",
+ "core_bindrule",
+ "core_syntax_error_exit_status",
+ "core_fail_expected",
+ "core_jamshell",
+ "core_multifile_actions",
+ "core_nt_cmd_line",
+ "core_option_d2",
+ "core_option_l",
+ "core_option_n",
+ "core_parallel_actions",
+ "core_parallel_multifile_actions_1",
+ "core_parallel_multifile_actions_2",
+ "core_scanner",
+ "core_source_line_tracking",
+ "core_update_now",
+ "core_variables_in_actions",
+ "custom_generator",
+ "debugger",
+ "debugger-mi",
+ "default_build",
+ "default_features",
+# This test is known to be broken itself.
+# "default_toolset",
+ "dependency_property",
+ "dependency_test",
+ "disambiguation",
+ "dll_path",
+ "double_loading",
+ "duplicate",
+ "example_libraries",
+ "example_make",
+ "exit_status",
+ "expansion",
+ "explicit",
+ "feature_cxxflags",
+ "feature_implicit_dependency",
+ "feature_relevant",
+ "feature_suppress_import_lib",
+ "file_types",
+ "flags",
+ "generator_selection",
+ "generators_test",
+ "implicit_dependency",
+ "indirect_conditional",
+ "inherit_toolset",
+ "inherited_dependency",
+ "inline",
+ "libjpeg",
+ "liblzma",
+ "libzstd",
+ "lib_source_property",
+ "lib_zlib",
+ "library_chain",
+ "library_property",
+ "link",
+ "load_order",
+ "loop",
+ "make_rule",
+ "message",
+ "ndebug",
+ "no_type",
+ "notfile",
+ "ordered_include",
+ "out_of_tree",
+ "package",
+ "param",
+ "path_features",
+ "prebuilt",
+ "print",
+ "project_dependencies",
+ "project_glob",
+ "project_id",
+ "project_root_constants",
+ "project_root_rule",
+ "project_test3",
+ "project_test4",
+ "property_expansion",
+ "rebuilds",
+ "relative_sources",
+ "remove_requirement",
+ "rescan_header",
+ "resolution",
+ "rootless",
+ "scanner_causing_rebuilds",
+ "searched_lib",
+ "skipping",
+ "sort_rule",
+ "source_locations",
+ "source_order",
+ "space_in_path",
+ "stage",
+ "standalone",
+ "static_and_shared_library",
+ "suffix",
+ "tag",
+ "test_rc",
+ "testing",
+ "timedata",
+ "toolset_clang_darwin",
+ "toolset_clang_linux",
+ "toolset_clang_vxworks",
+ "toolset_darwin",
+ "toolset_defaults",
+ "toolset_gcc",
+ "toolset_intel_darwin",
+ "toolset_requirements",
+ "unit_test",
+ "unused",
+ "use_requirements",
+ "using",
+ "wrapper",
+ "wrong_project",
+ ]
+
+if os.name == "posix":
+ tests.append("symlink")
+ # On Windows, library order is not important, so skip this test. Besides,
+ # it fails ;-). Further, the test relies on the fact that on Linux, one can
+ # build a shared library with unresolved symbols. This is not true on
+ # Windows, even with cygwin gcc.
+
+# Disable this test until we figure how to address failures due to --as-needed being default now.
+# if "CYGWIN" not in os.uname()[0]:
+# tests.append("library_order")
+
+if toolset.startswith("gcc") and os.name != "nt":
+ # On Windows it's allowed to have a static runtime with gcc. But this test
+ # assumes otherwise. Hence enable it only when not on Windows.
+ tests.append("gcc_runtime")
+
+# PCH test seems broken in strange ways. Disable it.
+# if toolset.startswith("gcc") or toolset.startswith("msvc"):
+# tests.append("pch")
+
+# Disable on OSX as it doesn't seem to work for unknown reasons.
+if sys.platform != 'darwin':
+ tests.append("builtin_glob_archive")
+
+if "--extras" in sys.argv:
+ tests.append("boostbook")
+ tests.append("qt4")
+ tests.append("qt5")
+ tests.append("example_qt4")
+ # Requires ./whatever.py to work, so is not guaranteed to work everywhere.
+ tests.append("example_customization")
+ # Requires gettext tools.
+ tests.append("example_gettext")
+elif not xml:
+ print("Note: skipping extra tests")
+
+run_tests(critical_tests, tests)
diff --git a/src/boost/tools/build/test/test_rc.py b/src/boost/tools/build/test/test_rc.py
new file mode 100755
index 000000000..56c02b7ef
--- /dev/null
+++ b/src/boost/tools/build/test/test_rc.py
@@ -0,0 +1,148 @@
+#!/usr/bin/python
+
+# Copyright 2012 Jurko Gospodnetic
+# 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)
+
+# Tests rc toolset behaviour.
+
+import BoostBuild
+
+
+def included_resource_newer_than_rc_script():
+ """
+ When a .rc script file includes another resource file - the resource file
+ being newer than the .rc script file should not cause the .rc script file
+ to be considered old and force all of its dependents to rebuild.
+
+ """
+ toolsetName = "__myDummyResourceCompilerToolset__"
+
+ # Used options rationale:
+ #
+ # -d4 & --debug-configuration
+ # Display additional information in case of test failure. In the past
+ # we have had testing system issues causing this test to fail
+ # sporadically for which -d+3 output had been instrumental in getting to
+ # the root cause (a touched file's timestamp was not as new as it should
+ # have been).
+ #
+ # --ignore-site-config --user-config=
+ # Disable reading any external Boost Build configuration. This test is
+ # self sufficient so these options protect it from being adversly
+ # affected by any local (mis)configuration..
+ t = BoostBuild.Tester(["-d4", "--debug-configuration",
+ "--ignore-site-config", "--user-config=", "toolset=%s" % toolsetName],
+ pass_toolset=False, use_test_config=False,
+ translate_suffixes=False)
+
+ # Prepare a dummy toolset so we do not get errors in case the default one
+ # is not found and that we can test rc.jam functionality without having to
+ # depend on the externally specified toolset actually supporting it exactly
+ # the way it is required for this test, e.g. gcc toolset, under some
+ # circumstances, uses a quiet action for generating its null RC targets.
+ t.write(toolsetName + ".jam", """\
+import feature ;
+import rc ;
+import type ;
+local toolset-name = "%s" ;
+feature.extend toolset : $(toolset-name) ;
+rule init ( ) { }
+rc.configure dummy-rc-command : <toolset>$(toolset-name) : <rc-type>dummy ;
+module rc
+{
+ rule compile.resource.dummy ( targets * : sources * : properties * )
+ {
+ import common ;
+ .TOUCH on $(targets) = [ common.file-touch-command ] ;
+ }
+ actions compile.resource.dummy { $(.TOUCH) "$(<)" }
+}
+# Make OBJ files generated by our toolset use the "obj" suffix on all
+# platforms. We need to do this explicitly for <target-os> windows & cygwin to
+# override the default OBJ type configuration (otherwise we would get
+# 'ambiguous key' errors on those platforms).
+local rule set-generated-obj-suffix ( target-os ? )
+{
+ type.set-generated-target-suffix OBJ : <toolset>$(toolset-name)
+ <target-os>$(target-os) : obj ;
+}
+set-generated-obj-suffix ;
+set-generated-obj-suffix windows ;
+set-generated-obj-suffix cygwin ;
+""" % toolsetName)
+
+ t.write(
+ toolsetName + '.py',
+"""
+from b2.build import feature, type as type_
+from b2.manager import get_manager
+from b2.tools import rc, common
+
+MANAGER = get_manager()
+ENGINE = MANAGER.engine()
+
+toolset_name = "{0}"
+
+feature.extend('toolset', [toolset_name])
+
+def init(*args):
+ pass
+
+rc.configure(['dummy-rc-command'], ['<toolset>' + toolset_name], ['<rc-type>dummy'])
+
+ENGINE.register_action(
+ 'rc.compile.resource.dummy',
+ '''
+ %s "$(<)"
+ ''' % common.file_creation_command()
+)
+
+def set_generated_obj_suffix(target_os=''):
+ requirements = ['<toolset>' + toolset_name]
+ if target_os:
+ requirements.append('<target-os>' + target_os)
+ type_.set_generated_target_suffix('OBJ', requirements, 'obj')
+
+set_generated_obj_suffix()
+set_generated_obj_suffix('windows')
+set_generated_obj_suffix('cygwin')
+""".format(toolsetName)
+ )
+
+ # Prepare project source files.
+ t.write("jamroot.jam", """\
+ECHO "{{{" [ modules.peek : XXX ] [ modules.peek : NOEXEC ] "}}}" ;
+obj xxx : xxx.rc ;
+""")
+ t.write("xxx.rc", '1 MESSAGETABLE "xxx.bin"\n')
+ t.write("xxx.bin", "foo")
+
+ def test1(n, expect, noexec=False):
+ params = ["-sXXX=%d" % n]
+ if noexec:
+ params.append("-n")
+ params.append("-sNOEXEC=NOEXEC")
+ t.run_build_system(params)
+ t.expect_output_lines("*NOEXEC*", noexec)
+ obj_file = "xxx_res.obj"
+ t.expect_output_lines("compile.resource.dummy *%s" % obj_file, expect)
+ if expect and not noexec:
+ expect("bin/%s/debug/%s" % (toolsetName, obj_file))
+ t.expect_nothing_more()
+
+ def test(n, expect):
+ test1(n, expect, noexec=True)
+ test1(n, expect)
+
+ test(1, t.expect_addition)
+ test(2, None)
+ t.touch("xxx.bin")
+ test(3, t.expect_touch)
+ test(4, None)
+
+ t.cleanup()
+
+
+included_resource_newer_than_rc_script()
diff --git a/src/boost/tools/build/test/test_system.html b/src/boost/tools/build/test/test_system.html
new file mode 100644
index 000000000..be870eaa7
--- /dev/null
+++ b/src/boost/tools/build/test/test_system.html
@@ -0,0 +1,623 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/html4/strict.dtd">
+
+<html>
+ <head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st March 2002), see www.w3.org">
+ <!--tidy options: -i -wrap 78 -->
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+ <title>A testing system for B2</title>
+<style type="text/css">
+ hr { color: black }
+ p.revision { text-align: right; font-style: italic }
+ pre.code { margin-left: 2em }
+ pre.example { margin-left: 2em; border: solid black thin }
+ pre.output { margin-left: 2em }
+ img.banner { border: 0; float: left }
+ h1 { text-align: right }
+ br.clear { clear: left }
+ div.attention { color: red }
+
+</style>
+ </head>
+
+ <body>
+ <p><a href="../../../../index.htm"><img class="banner" height="86" width=
+ "277" alt="C++ Boost" src="../../../../boost.png"></a></p>
+
+ <h1>A testing system for B2<br class="clear">
+ </h1>
+ <hr>
+
+ <dl class="page-index">
+ <dt><a href="#sec-intro">Introduction for users</a></dt>
+
+ <dd>
+ <dl class="page-index">
+ <dt><a href="#sec-command-line-options">Command line options</a></dt>
+ </dl>
+ </dd>
+
+ <dt><a href="#sec-developers">Introduction for developers</a></dt>
+
+ <dd>
+ <dl class="page-index">
+ <dt><a href="#sec-intro-changing">Changing the working
+ directory</a></dt>
+
+ <dt><a href="#sec-intro-examining">Examining the working directory and
+ changing it</a></dt>
+
+ <dt><a href="#sec-intro-results">Test result</a></dt>
+ </dl>
+ </dd>
+
+ <dt><a href="#sec-reference">Reference documentation</a></dt>
+
+ <dd>
+ <dl class="page-index">
+ <dt><a href="#method-__init__">Method __init__</a></dt>
+
+ <dt><a href="#method-set_tree">Method <tt>set_tree</tt></a></dt>
+
+ <dt><a href="#method-write">Method <tt>write</tt></a></dt>
+
+ <dt><a href="#method-copy">Method <tt>copy</tt></a></dt>
+
+ <dt><a href="#method-touch">Method <tt>touch</tt></a></dt>
+
+ <dt><a href="#method-run_build_system">Method
+ <tt>run_build_system</tt></a></dt>
+
+ <dt><a href="#method-read">Method <tt>read</tt></a></dt>
+
+ <dt><a href="#method-read_and_strip">Method
+ <tt>read_and_strip</tt></a></dt>
+
+ <dt><a href="#methods-expectations">Methods for declaring
+ expectations</a></dt>
+
+ <dt><a href="#methods-ignoring">Methods for ignoring
+ changes</a></dt>
+
+ <dt><a href="#methods-result">Methods for explicitly specifying
+ results</a></dt>
+
+ <dt><a href="#class-list">Helper class <tt>List</tt></a></dt>
+ </dl>
+ </dd>
+ </dl>
+ <hr>
+
+ <h2><a name="sec-intro">Introduction for users</a></h2>
+
+ <p>The testing system for B2 is a small set of Python modules and
+ scripts for automatically testing user-obversable behaviour. It uses
+ components from testing systems of <a href="http://www.scons.org">Scons</a>
+ and <a href="http://subversion.tigris.org">Subversion</a>, together with
+ some additional functionality.</p>
+
+ <p>To run the tests you need to:</p>
+
+ <ol>
+ <li>Get the source tree of B2 (located at <tt>tools/build</tt>
+ in Boost)</li>
+
+ <li>Have <a href="http://www.python.org">Python</a> installed. Version
+ 2.1 is known to work.</li>
+
+ <li>Build Boost.Jam. See <a href=
+ "../engine/index.html">$boost_build_root/engine/index.html</a> for
+ instructions.</li>
+
+ <li>Configure at least one toolset. You can edit <tt>site-config.jam</tt>
+ or <tt>user-config.jam</tt> to add new toolsets. Or you can create file
+ <tt>test-config.jam</tt> in <tt>$boost_build_root/test</tt> directory. In
+ this case, <tt>site-config.jam</tt> and <tt>user-config.jam</tt> will be
+ ignored for testing.</li>
+
+ <li>Make sure that in the configuration jam file(s) that you use you generate
+ no console output, ie. with the Boost Build 'ECHO' rule. Such console output
+ in the configuration jam file(s) will cause a number of tests to automatically
+ fail which would otherwise succeed.</li>
+ </ol>
+
+ <p>When all is set, you can run all the tests using the <tt>test_all.py</tt>
+ script or you can run a specific test by starting its Python script
+ directly.</p>
+
+ <p>Examples:</p>
+
+<pre class="code">
+python test_all.py
+python generators_test.py
+</pre>
+
+ <p>If everything is OK, you will see a list of passed tests. Otherwise, a
+ failure will be reported.</p>
+
+ <h3><a name="sec-command-line-options">Command line options</a></h3>
+
+ <p>Test scripts will use the toolset you configured to be the default or
+ you can specify a specific one on the command line:</p>
+
+<pre class="code">
+python test_all.py borland
+python generators_test.py msvc-7.1
+</pre>
+
+ <p>Other test script flags you can specify on the command line are:</p>
+
+ <ul>
+ <li><tt>--default-bjam</tt> -- By default the test system will use the
+ Boost Jam executable found built in its default development build
+ location. This option makes it use the default one available on your
+ system, i.e. the one found in the system path.</li>
+
+ <li><tt>--preserve</tt> -- In case of a failed test its working
+ directory will be copied to the "failed_test" directory under the
+ current directory.</li>
+
+ <li><tt>--verbose</tt> -- Makes the test system and the run build system
+ display additional output. Note though that this may cause tests that
+ check the build system output to fail.</li>
+ </ul>
+
+ <h2><a name="sec-developers">Introduction for developers</a></h2>
+
+ <p>It is suggested that every new functionality come together with tests,
+ and that bugfixes are accompanied by tests. There's no need to say that
+ tests are good, but two points are extremely important:</p>
+
+ <ul>
+ <li>For an interpreted language like Jam, without any static checks,
+ testing is simply the only sefeguard we can have.</li>
+
+ <li>Good tests allow us to change internal design much more safely, and we
+ have not gotten everything nailed down yet.</li>
+ </ul>
+
+ <p>Adding a new test is simple:</p>
+
+ <ol>
+ <li>Go to <tt>$boost_build_root/test/test_all.py</tt> and add new test
+ name to the list at the end of the file. Suppose the test name is "hello".
+ </li>
+
+ <li>Add a new python module, in this example "hello.py", to do the actual
+ testing.</li>
+ </ol>
+
+ <p>The module, in general will perform these basic actions:</p>
+
+ <ol>
+ <li>Set up the initial working directory state</li>
+
+ <li>
+ Run the build system and check the results:
+
+ <ol>
+ <li>generated output,</li>
+
+ <li>changes made to the working directory,</li>
+
+ <li>new content of the working directory.</li>
+ </ol>
+ </li>
+
+ <li>Add, remove or touch files or change their content and then repeat
+ the previous step until satisfied.</li>
+
+ <li>Clean up</li>
+ </ol>
+
+ <p>The "hello.py" module might contain:</p>
+<pre class="example">
+from BoostBuild import List
+
+# Create a temporary working directory
+t = BoostBuild.Tester()
+
+# Create the needed files
+t.write("jamroot.jam", "")
+t.write("jamfile.jam", """
+exe hello : hello.cpp ;
+""")
+t.write("hello.cpp", """
+int main()
+{
+ return 0;
+}
+
+""")
+
+t.run_build_system()
+
+# First, create a list of three pathnames.
+file_list = List("bin/$toolset/debug/") * List("hello.exe hello.obj")
+# Second, assert that those files were added as result of the last build system invocation.
+t.expect_addition(file_list)
+
+# Invoke the build system once again.
+t.run_build_system("clean")
+# Check if the files added previously were removed.
+t.expect_removal(file_list)
+
+# Remove temporary directories
+t.cleanup()
+</pre>
+
+ <p>The <tt>test</tt> directory contains a file "template.py" which can be
+ used as a start for your own tests.</p>
+
+ <p>Overview of the most important methods of class <tt>Tester</tt> follows.
+ </p>
+
+ <h3><a name="sec-intro-changing">Changing the working directory</a></h3>
+
+ <p>The class <tt>Tester</tt> creates a temporary directory in its
+ constructor and changes to that directory. It can be modified by calling
+ these methods:</p>
+
+ <ul>
+ <li><tt>set_tree</tt> -- sets the content of the working directory to be
+ equal to the content of the specified directory. This method is
+ preferable when directory tree for testing is large.</li>
+
+ <li><tt>write</tt> -- sets the content of file in a working directory.
+ This is optimal if you want to create a directory tree with 3-4 small
+ files.</li>
+
+ <li><tt>touch</tt> -- changes the modification times of a file</li>
+ </ul>
+
+ <h3><a name="sec-intro-examining">Examining the working directory and
+ changing it</a></h3>
+
+ <p>The method <tt>read</tt>, inherited from the <tt>TestCmd</tt> class, can
+ be used to read any file in the working directory and check its content.
+ <tt>Tester</tt> adds another method for tracking changes. Whenever the build
+ system is run (using <a href="#method-run_build_system"><tt>run_build_system
+ </tt></a>), the working dir state before and after running is recorded. In
+ addition, difference between the two states -- i.e. lists of files that were
+ added, removed, modified or touched -- are stored in two member variables -
+ <tt>tree_difference</tt> and <tt>unexpected_difference</tt>.</p>
+
+ <p>After than, the test author may specify that some change is expected, for
+ example, by calling <tt>expect_addition("foo")</tt>. This call will check if
+ the file was indeed added, and if so, will remove its name from the list of
+ added files in <tt>unexpected_difference</tt>. Likewise, it is possible to
+ specify that some changes are not interesting, for example a call to
+ <tt>ignore("*.obj")</tt> will just remove every file with the ".obj"
+ extension from <tt>unexpected_difference</tt>.</p>
+
+ <p>When test has finished with expectations and ignoring, the member
+ <tt>unexpected_difference</tt> will contain the list of all changes not yet
+ accounted for. It is possible to assure that this list is empty by calling
+ the <tt>expect_nothing_more</tt> member function.</p>
+
+ <h3><a name="sec-intro-results">Test result</a></h3>
+
+ <p>Any of the <tt>expect*</tt> methods below will fail the test if the
+ expectation is not met. It is also possible to perform manually arbitrary
+ test and explicitly cause the test to either pass or fail. Ordinary
+ filesystem functions can be used to work with the directory tree. Methods
+ <tt>pass_test</tt> and <tt>fail_test</tt> are used to explicitly give the
+ test outcome.</p>
+
+ <p>Typically, after test termination, the working directory is erased. See
+ the <a href="#sec-command-line-options">"--preserve" command line option</a>
+ for information on how to preserve the working directory content for failed
+ tests for debugging purposes.</p>
+
+ <h2 id="sec-reference">Reference documentation</h2>
+
+ <p>The test system is composed of class <tt>Tester</tt>, derived form
+ <tt>TestCmd.TestCmd</tt>, and helper class <tt>List</tt>. <tt>Tester</tt>
+ and <tt>List</tt> methods are described below.</p>
+
+ <p>The documentation frequently refers to <tt>filename</tt>. In all cases,
+ files are specified in unix style: a sequence of components, separated by
+ "/". This is true on all platforms. In some contexts a list of files is
+ allowed. In those cases any object with a sequence interface is allowed.</p>
+
+ <h3><a name="method-__init__">Method <tt>__init__(self, arguments="",
+ executable="bjam", match=TestCmd.match_exact, boost_build_path=None,
+ translate_suffixes=True, pass_toolset=True, use_test_config=True,
+ ignore_toolset_requirements=True, workdir="", **keywords)</tt></a></h3>
+
+ <p><b>Optional arguments:</b></p>
+
+ <ul>
+ <li><tt>arguments</tt>
+ -- Arguments passed to the run executable.</li>
+ <li><tt>executable</tt>
+ -- Name of the executable to invoke.</li>
+ <li><tt>match</tt>
+ -- Function to use for compating actual and expected file contents.
+ </li>
+ <li><tt>boost_build_path</tt>
+ -- Boost build path to be passed to the run executable.</li>
+ <li><tt>translate_suffixes</tt>
+ -- Whether to update suffixes on the the file names passed from the
+ test script so they match those actually created by the current
+ toolset. For example, static library files are specified by using
+ the .lib suffix but when the 'gcc' toolset is used it actually
+ creates them using the .a suffix.</li>
+ <li><tt>pass_toolset</tt>
+ -- Whether the test system should pass the specified toolset to the
+ run executable.</li>
+ <li><tt>use_test_config</tt>
+ -- Whether the test system should tell the run executable to read in
+ the test_config.jam configuration file.</li>
+ <li><tt>ignore_toolset_requirements</tt>
+ -- Whether the test system should tell the run executable to ignore
+ toolset requirements.</li>
+ <li><tt>workdir</tt>
+ -- Indicates an absolute directory where the test will be run from.
+ </li>
+ </ul>
+
+ <p><b>Optional arguments inherited from the base class:</b></p>
+
+ <ul>
+ <li><tt>description</tt>
+ -- Test description string displayed in case of a failed test.</li>
+ <li><tt>subdir</tt>
+ -- List of subdirectories to automatically create under the working
+ directory. Each subdirectory needs to be specified separately
+ parent coming before its child.</li>
+ <li><tt>verbose</tt>
+ -- Flag that may be used to enable more verbose test system output.
+ Note that it does not also enable more verbose build system output
+ like the <a href="#sec-command-line-options">"--verbose" command
+ line option</a> does.</li>
+ </ul>
+
+ <p><b>Effects:</b></p>
+
+ <ol>
+ <li>Remembers the current working directory in member
+ <tt>original_workdir</tt>.</li>
+
+ <li>Determines the location of the executable (<code>bjam</code> by
+ default) and build system files, assuming that the current directory is
+ <tt>tools/build/test</tt>. Formulates jam invocation command, which
+ will include explicit setting for the <tt>BOOST_BUILD_PATH</tt> variable
+ and arguments passed to this methods, if any. This command will be used
+ by subsequent invocation of <a href="#method-run_build_system"><tt>
+ run_build_system</tt></a>. Finally, initializes the base class.</li>
+
+ <li>Changes the current working directory to the temporary working
+ directory created by the base constructor.</li>
+
+ <li>If you want to run a test in an existing directory, pass it as
+ <tt>workdir</tt>.</li>
+
+ <li> Most parameters passed to this constructor function may be overruled
+ for each specific test system run using <a href=
+ "#method-run_build_system"><tt>run_build_system</tt></a> parameters.
+ </ol>
+
+ <h3><a name="method-set_tree">Method <tt>set_tree(self,
+ tree_location)</tt></a></h3>
+
+ <p><b>Effects:</b></p>
+
+ <p>Replaces the content of the current working directory with the content
+ of directory at <tt>tree_location</tt>. If <tt>tree_location</tt> is not
+ absolute pathname, it will be treated as relative to
+ <tt>self.original_workdir</tt>. This methods also explicitly makes the
+ copied files writeable.</p>
+
+ <h3><a name="method-write">Method <tt>write(self, name,
+ content)</tt></a></h3>
+
+ <p><b>Effects:</b></p>
+
+ <p>Writes the specified content to the file given by <tt>name</tt> under
+ the temporary working directory. If the file already exists, it is
+ overwritten. Any required directories are automatically created.</p>
+
+ <h3><a name="method-copy">Method <tt>copy(self, src, dst)</tt></a></h3>
+
+ <p><b>Effects:</b></p>
+
+ <p>Equvivalent to <tt>self.write(self.read(src), dst)</tt>.</p>
+
+ <h3><a name="method-touch">Method <tt>touch(self, names)</tt></a></h3>
+
+ <p><b>Effects:</b></p>
+
+ <p>Sets the access and modification times for all files in <tt>names</tt> to
+ the current time. All the elements in <tt>names</tt> should be relative
+ paths.</p>
+
+ <h3><a name="method-run_build_system">Method <tt>run_build_system(self,
+ extra_args="", subdir="", stdout=None, stderr="", status=0, match=None,
+ pass_toolset=None, use_test_config=None, ignore_toolset_requirements=None,
+ expected_duration=None, **kw)</tt></a></h3>
+
+ <p><b>Effects:</b></p>
+
+ <ol>
+ <li>Stores the state of the working directory in
+ <tt>self.previous_tree</tt>.</li>
+
+ <li>Changes to <tt>subdir</tt>, if it is specified. It is relative to
+ the <tt>original_workdir</tt> or the workdir specified in
+ <tt>__init</tt>.</li>
+
+ <li>Invokes the <tt>bjam</tt> executable, passing <tt>extra_args</tt>
+ to it. The binary should be located under
+ <tt>&lt;test_invocation_dir&gt;/../jam/src/bin.&lt;platform&gt;</tt>.
+ This is to make sure tests use the version of jam build from CVS.</li>
+
+ <li>Compares the stdout, stderr and exit status of build system
+ invocation with values to appropriate parameters, if they are not
+ <tt>None</tt>. If any difference is found, the test fails.</li>
+
+ <li>If the <tt>expected_duration</tt> parameter is specified then it
+ represents the maximal allowed time in seconds for the test to run. The
+ test will be marked as failed if its duration is greater than the given
+ <tt>expected_duration</tt> parameter value.</li>
+
+ <li>Stores the new state of the working directory in <tt>self.tree</tt>.
+ Computes the difference between previous and current trees and stores them
+ in variables <tt>self.tree_difference</tt> and
+ <tt>self.unexpected_difference</tt>. Both variables are instances of class
+ <tt>tree.Trees_different</tt>, which have four attributes:
+ <tt>added_files</tt>, <tt>removed_files</tt>, <tt>modified_files</tt> and
+ <tt>touched_files</tt>. Each is a list of strings.</p></li>
+ </ol>
+
+ <h3><a name="method-read">Method <tt>read(self, name)</tt></a></h3>
+
+ <p><b>Effects:</b></p>
+
+ <p>Read the specified file and returns it content. Raises an exception is
+ the file is absent.</p>
+
+ <h3><a name="method-read_and_strip">Method <tt>read_and_strip(self, name)
+ </tt></a></h3>
+
+ <p><b>Effects:</b></p>
+
+ <p>Read the specified file and returns it content, after removing trailing
+ whitespace from every line. Raises an exception is the file is absent.</p>
+
+ <p><b>Rationale:</b></p>
+
+ <p>Although this method is questionable, there are a lot of cases when jam
+ or shells it uses insert spaces. It seems that introducing this method is
+ much simpler than dealing with all those cases.</p>
+
+ <h3><a name="methods-expectations">Methods for declaring expectations</a>
+ </h3>
+
+ <p>Accordingly to the number of changes kinds that are detected, there are
+ four methods that specify that test author expects a specific change to
+ occur. They check <tt>self.unexpected_difference</tt>, and if the change is
+ present there, it is removed. Otherwise, test fails.</p>
+
+ <p>Each method accepts a list of names. Those names use <tt>/</tt> path
+ separator on all systems. Additionally, the test system translates suffixes
+ appropriately. For the test to be portable, suffixes should use Windows
+ convention: <tt>exe</tt> for executables, <tt>dll</tt> for dynamic libraries
+ and <tt>lib</tt> for static libraries. Lastly, the string "$toolset" in file
+ names is replaced by the name of tested toolset.</p>
+
+ <p><b>Note:</b> The <tt>List</tt> helper class might be useful to create
+ lists of names.</p>
+
+ <p><b>Note:</b> The file content can be examined using the
+ <tt>TestCmd.read</tt> function.</p>
+
+ <p>The members are:</p>
+
+ <ul>
+ <li>expect_addition</li>
+ <li>expect_removal</li>
+ <li>expect_modification</li>
+ <li>expect_nothing</li>
+ </ul>
+
+ <p>Note that <tt>expect_modification</tt> is used to check that a either
+ file content or timestamp has changed. The rationale is that some compilers
+ change content even if sources does not change, and it's easier to have a
+ method which checks for both content and time changes.</p>
+
+ <p>There's also a member <tt>expect_nothing_more</tt>, which checks that all
+ the changes are either expected or ignored, in other words that
+ <tt>unexpected_difference</tt> is empty by now.</p>
+
+ <p>Lastly, there's a method to compare file content with expected content:
+ </p>
+ <tt>expect_content(self, name, content, exact=0)</tt>
+
+ <p>The method fails the test if the content of file identified by 'name' is
+ different from 'content'. If 'exact' is true, the file content is used
+ as-is, otherwise, two transformations are applied:</p>
+
+ <ul>
+ <li>The <tt>read_and_strip</tt> method is used to read the file, which
+ removes trailing whitespace</li>
+
+ <li>Each backslash in the file content is converted to forward slash.</li>
+ </ul>
+
+ <h3><a name="methods-ignoring">Methods for ignoring changes</a></h3>
+
+ <p>There are five methods which ignore changes made to the working tree.
+ They silently remove elements from <tt>self.unexpected_difference</tt>, and
+ don't generate error if element is not found. They accept shell style
+ wildcard.</p>
+
+ <p>The following methods correspond to four kinds of changes:</p>
+
+ <ul>
+ <li>ignore_addition(self, wildcard)</li>
+ <li>ignore_removal(self, wildcard)</li>
+ <li>ignore_modification(self, wildcard)</li>
+ <li>ignore_touch(self, wildcard)</li>
+ </ul>
+
+ <p>The method <tt>ignore(self, wildcard)</tt> ignores all the changes made
+ to files that match a wildcard.</p>
+
+ <h3><a name="methods-result">Methods for explicitly specifying results</a>
+ </h3>
+
+ <h4>Method <tt>pass_test(self, condition=1)</tt></h4>
+
+ <div class="attention">
+ At this moment, the method should not be used.
+ </div>
+
+ <h4>Method <tt>fail_test(self, condition=1)</tt></h4>
+
+ <p><b>Effects:</b> Cause the test to fail if <tt>condition</tt> is true.</p>
+
+ <h3><a name="class-list">Helper class <tt>List</tt></a></h3>
+ The class has sequence interface and two additional methods.
+
+ <h4>Method <tt>__init__(self, string)</tt></h4>
+
+ <p><b>Effects:</b> Splits the string on unescaped spaces and tabs. The split
+ components can further be retrieved using standard sequence access.</p>
+
+ <h4>Method <tt>__mul__(self, other)</tt></h4>
+
+ <p><b>Effects:</b> Returns an <tt>List</tt> instance, which elements are all
+ possible concatenations of two string, first of which is from <tt>self</tt>,
+ and second of which is from <tt>other</tt>.</p>
+
+ <p>The class also defines <tt>__str__</tt> and <tt>__repr__</tt> methods.
+ Finally, there's <tt>__coerce__</tt> method which allows to convert strings
+ to instances of <tt>List</tt>.</p>
+
+ <p><b>Example:</b></p>
+<pre>
+ l = "a b" * List("c d")
+ for e in l:
+ print e
+</pre>
+
+ <p>will output:</p>
+<pre>
+ ac
+ ad
+ bc
+ bd
+
+</pre>
+ <hr>
+ <p class="revision">Last modified: May 02, 2008</p>
+ <p>&copy; Copyright Vladimir Prus 2002, 2003, 2004, 2005.<br>
+ &copy; Copyright Jurko Gospodnetic 2008.<br>
+ 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)</p>
+ </body>
+</html>
diff --git a/src/boost/tools/build/test/testing.py b/src/boost/tools/build/test/testing.py
new file mode 100755
index 000000000..b196b9db7
--- /dev/null
+++ b/src/boost/tools/build/test/testing.py
@@ -0,0 +1,535 @@
+#!/usr/bin/python
+
+# Copyright 2008 Jurko Gospodnetic
+# Copyright 2017 Steven Watanabe
+# 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)
+
+# Tests different aspects of Boost Builds automated testing support.
+
+import BoostBuild
+import TestCmd
+
+def test_run():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+run pass.cpp ;
+run fail-compile.cpp ;
+run fail-link.cpp ;
+run fail-run.cpp ;
+""")
+
+ t.run_build_system(status=1)
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.exe")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.output")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.run")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.test")
+
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.obj")
+
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.obj")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.exe")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.output")
+
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_run_fail():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+run-fail pass.cpp ;
+run-fail fail-compile.cpp ;
+run-fail fail-link.cpp ;
+run-fail fail-run.cpp ;
+""")
+
+ t.run_build_system(status=1)
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.exe")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.output")
+
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.obj")
+
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.obj")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.exe")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.output")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.run")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.test")
+
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_run_change():
+ """Tests that the test file is removed when a test fails after it
+ previously passed."""
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int main() { return 1; }\n")
+ t.write("fail-compile.cpp", "int main() {}\n")
+ t.write("fail-link.cpp", "int main() {}\n")
+ t.write("fail-run.cpp", "int main() {}\n")
+
+ t.write("Jamroot.jam", """import testing ;
+run-fail pass.cpp ;
+run fail-compile.cpp ;
+run fail-link.cpp ;
+run fail-run.cpp ;
+""")
+ t.run_build_system()
+ # Sanity check
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.test")
+ t.expect_addition("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.test")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.test")
+ t.expect_output_lines("...failed*", False)
+
+ # Now make them fail
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+ t.run_build_system(status=1)
+
+ t.expect_removal("bin/pass.test/$toolset/debug*/pass.test")
+ t.expect_removal("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+ t.expect_removal("bin/fail-link.test/$toolset/debug*/fail-link.test")
+ t.expect_removal("bin/fail-run.test/$toolset/debug*/fail-run.test")
+
+ t.cleanup()
+
+def test_run_path():
+ """Tests that run can find shared libraries even without
+ hardcode-dll-paths. Important: The library is in neither the
+ current working directory, nor any system path, nor the same
+ directory as the executable, so it should never be found without
+ help from B2."""
+ t = BoostBuild.Tester(["hardcode-dll-paths=false"], use_test_config=False)
+
+ t.write("l.cpp", """
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+f() {}
+""")
+ t.write("pass.cpp", "void f(); int main() { f(); }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+lib l : l.cpp : <link>shared ;
+run pass.cpp l ;
+""")
+
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug*/l.obj")
+ t.expect_addition("bin/$toolset/debug*/l.dll")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.exe")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.output")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.run")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.test")
+
+ t.cleanup()
+
+def test_run_args():
+ """Tests the handling of args and input-files"""
+ t = BoostBuild.Tester(use_test_config=False)
+ t.write("test.cpp", """
+#include <iostream>
+#include <fstream>
+int main(int argc, const char ** argv)
+{
+ for(int i = 1; i < argc; ++i)
+ {
+ if(argv[i][0] == '-')
+ {
+ std::cout << argv[i] << std::endl;
+ }
+ else
+ {
+ std::ifstream ifs(argv[i]);
+ std::cout << ifs.rdbuf();
+ }
+ }
+}
+""")
+ t.write("input1.in", "first input\n")
+ t.write("input2.in", "second input\n")
+ t.write("Jamroot.jam", """import testing ;
+import common ;
+# FIXME: The order actually depends on the lexigraphical
+# ordering of the virtual target objects, which is just
+# crazy. Switch the order of input1.txt and input2.txt
+# to make this fail. Joining the arguments with && might
+# work, but might get a bit complicated to implement as
+# dependency properties do not currently support &&.
+make input1.txt : input1.in : @common.copy ;
+make input2.txt : input2.in : @common.copy ;
+run test.cpp : -y -a : input1.txt input2.txt ;
+""")
+ t.run_build_system()
+ t.expect_content("bin/test.test/$toolset/debug*/test.output", """\
+-y
+-a
+first input
+second input
+
+EXIT STATUS: 0
+""")
+ t.cleanup()
+
+def test_link():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+link pass.cpp ;
+link fail-compile.cpp ;
+link fail-link.cpp ;
+link fail-run.cpp ;
+""")
+
+ t.run_build_system(status=1)
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.exe")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.test")
+
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.obj")
+
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.obj")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.exe")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.test")
+
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_link_fail():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+link-fail pass.cpp ;
+link-fail fail-compile.cpp ;
+link-fail fail-link.cpp ;
+link-fail fail-run.cpp ;
+""")
+
+ t.run_build_system(status=1)
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.obj")
+
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.obj")
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.exe")
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.test")
+
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.obj")
+
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_link_change():
+ """Tests that the test file is removed when a test fails after it
+ previously passed."""
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-compile.cpp", "int main() {}\n")
+ t.write("fail-link.cpp", "int main() {}\n")
+
+ t.write("Jamroot.jam", """import testing ;
+link-fail pass.cpp ;
+link fail-compile.cpp ;
+link fail-link.cpp ;
+""")
+ t.run_build_system()
+ # Sanity check
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.test")
+ t.expect_addition("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.test")
+ t.expect_output_lines("...failed*", False)
+
+ # Now make them fail
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.run_build_system(status=1)
+
+ t.expect_removal("bin/pass.test/$toolset/debug*/pass.test")
+ t.expect_removal("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+ t.expect_removal("bin/fail-link.test/$toolset/debug*/fail-link.test")
+
+ t.cleanup()
+
+def test_compile():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+compile pass.cpp ;
+compile fail-compile.cpp ;
+compile fail-link.cpp ;
+compile fail-run.cpp ;
+""")
+
+ t.run_build_system(status=1)
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.obj")
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.test")
+
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.obj")
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.test")
+
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.obj")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.test")
+
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_compile_fail():
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+compile-fail pass.cpp ;
+compile-fail fail-compile.cpp ;
+compile-fail fail-link.cpp ;
+compile-fail fail-run.cpp ;
+""")
+
+ t.run_build_system(status=1)
+ t.expect_addition("bin/fail-compile.test/$toolset/debug*/fail-compile.obj")
+ t.expect_addition("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_compile_change():
+ """Tests that the test file is removed when a test fails after it
+ previously passed."""
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass.cpp", "#error expected to fail\n")
+ t.write("fail-compile.cpp", "int main() {}\n")
+
+ t.write("Jamroot.jam", """import testing ;
+compile-fail pass.cpp ;
+compile fail-compile.cpp ;
+""")
+ t.run_build_system()
+ # Sanity check
+ t.expect_addition("bin/pass.test/$toolset/debug*/pass.test")
+ t.expect_addition("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+ t.expect_output_lines("...failed*", False)
+
+ # Now make them fail
+ t.write("pass.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.run_build_system(status=1)
+
+ t.expect_removal("bin/pass.test/$toolset/debug*/pass.test")
+ t.expect_removal("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+
+ t.cleanup()
+
+def test_remove_test_targets(option):
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass-compile.cpp", "int main() {}\n")
+ t.write("pass-link.cpp", "int main() {}\n")
+ t.write("pass-run.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+ t.write("source.cpp", "int f();\n")
+
+ t.write("Jamroot.jam", """import testing ;
+obj source.o : source.cpp ;
+compile pass-compile.cpp ;
+link pass-link.cpp source.o ;
+run pass-run.cpp source.o ;
+compile-fail fail-compile.cpp ;
+link-fail fail-link.cpp ;
+run-fail fail-run.cpp ;
+""")
+
+ t.run_build_system([option])
+
+ t.expect_addition("bin/$toolset/debug*/source.obj")
+
+ t.expect_addition("bin/pass-compile.test/$toolset/debug*/pass-compile.test")
+
+ t.expect_addition("bin/pass-link.test/$toolset/debug*/pass-link.test")
+
+ t.expect_addition("bin/pass-run.test/$toolset/debug*/pass-run.output")
+ t.expect_addition("bin/pass-run.test/$toolset/debug*/pass-run.run")
+ t.expect_addition("bin/pass-run.test/$toolset/debug*/pass-run.test")
+
+ t.expect_addition("bin/fail-compile.test/$toolset/debug*/fail-compile.test")
+
+ t.expect_addition("bin/fail-link.test/$toolset/debug*/fail-link.test")
+
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.output")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.run")
+ t.expect_addition("bin/fail-run.test/$toolset/debug*/fail-run.test")
+
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+def test_dump_tests():
+ """Tests the output of the --dump-tests option"""
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("pass-compile.cpp", "int main() {}\n")
+ t.write("pass-link.cpp", "int main() {}\n")
+ t.write("pass-run.cpp", "int main() {}\n")
+ t.write("fail-compile.cpp", "#error expected to fail\n")
+ t.write("fail-link.cpp", "int f();\nint main() { return f(); }\n")
+ t.write("fail-run.cpp", "int main() { return 1; }\n")
+
+ t.write("Jamroot.jam", """import testing ;
+run pass-run.cpp ;
+run-fail fail-run.cpp ;
+link pass-link.cpp ;
+link-fail fail-link.cpp ;
+compile pass-compile.cpp ;
+compile-fail fail-compile.cpp ;
+build-project libs/any/test ;
+build-project libs/any/example ;
+build-project libs/any ;
+build-project tools/bcp/test ;
+build-project tools/bcp/example ;
+build-project subdir/test ;
+build-project status ;
+build-project outside/project ;
+""")
+ def write_subdir(dir):
+ t.write(dir + "/test.cpp", "int main() {}\n")
+ t.write(dir + "/Jamfile", "run test.cpp ;")
+ write_subdir("libs/any/test")
+ write_subdir("libs/any/example")
+ write_subdir("libs/any")
+ write_subdir("tools/bcp/test")
+ write_subdir("tools/bcp/example")
+ write_subdir("status")
+ write_subdir("subdir/test")
+ t.write("outside/other/test.cpp", "int main() {}\n")
+ t.write("outside/project/Jamroot", "run ../other/test.cpp ;")
+ t.run_build_system(["--dump-tests", "-n", "-d0"],
+ match=TestCmd.match_re, stdout=
+"""boost-test\(RUN\) ".*/pass-run" : "pass-run\.cpp"
+boost-test\(RUN_FAIL\) ".*/fail-run" : "fail-run\.cpp"
+boost-test\(LINK\) ".*/pass-link" : "pass-link\.cpp"
+boost-test\(LINK_FAIL\) ".*/fail-link" : "fail-link\.cpp"
+boost-test\(COMPILE\) ".*/pass-compile" : "pass-compile\.cpp"
+boost-test\(COMPILE_FAIL\) ".*/fail-compile" : "fail-compile\.cpp"
+boost-test\(RUN\) "any/test" : "libs/any/test\.cpp"
+boost-test\(RUN\) "any/test" : "libs/any/test/test\.cpp"
+boost-test\(RUN\) "any/test" : "libs/any/example/test\.cpp"
+boost-test\(RUN\) "bcp/test" : "tools/bcp/test/test\.cpp"
+boost-test\(RUN\) "bcp/test" : "tools/bcp/example/test\.cpp"
+boost-test\(RUN\) ".*/subdir/test/test" : "subdir/test/test\.cpp"
+boost-test\(RUN\) "test" : "status/test\.cpp"
+boost-test\(RUN\) ".*/outside/project/test" : "../other/test.cpp"
+""")
+ t.cleanup()
+
+################################################################################
+#
+# test_files_with_spaces_in_their_name()
+# --------------------------------------
+#
+################################################################################
+
+def test_files_with_spaces_in_their_name():
+ """Regression test making sure test result files get created correctly when
+ testing files with spaces in their name.
+ """
+
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("valid source.cpp", "int main() {}\n");
+
+ t.write("invalid source.cpp", "this is not valid source code");
+
+ t.write("jamroot.jam", """
+import testing ;
+testing.compile "valid source.cpp" ;
+testing.compile-fail "invalid source.cpp" ;
+""")
+
+ t.run_build_system(status=0)
+ t.expect_addition("bin/invalid source.test/$toolset/debug*/invalid source.obj")
+ t.expect_addition("bin/invalid source.test/$toolset/debug*/invalid source.test")
+ t.expect_addition("bin/valid source.test/$toolset/debug*/valid source.obj")
+ t.expect_addition("bin/valid source.test/$toolset/debug*/valid source.test")
+
+ t.expect_content("bin/valid source.test/$toolset/debug*/valid source.test", \
+ "passed" )
+ t.expect_content( \
+ "bin/invalid source.test/$toolset/debug*/invalid source.test", \
+ "passed" )
+ t.expect_content( \
+ "bin/invalid source.test/$toolset/debug*/invalid source.obj", \
+ "failed as expected" )
+
+ t.cleanup()
+
+
+################################################################################
+#
+# main()
+# ------
+#
+################################################################################
+
+test_run()
+test_run_fail()
+test_run_change()
+test_run_path()
+test_run_args()
+test_link()
+test_link_fail()
+test_link_change()
+test_compile()
+test_compile_fail()
+test_compile_change()
+test_remove_test_targets("--remove-test-targets")
+test_remove_test_targets("preserve-test-targets=off")
+test_dump_tests()
+test_files_with_spaces_in_their_name()
diff --git a/src/boost/tools/build/test/timedata.py b/src/boost/tools/build/test/timedata.py
new file mode 100644
index 000000000..32cec265a
--- /dev/null
+++ b/src/boost/tools/build/test/timedata.py
@@ -0,0 +1,178 @@
+#!/usr/bin/python
+
+# Copyright 2005 David Abrahams
+# Copyright 2008, 2012 Jurko Gospodnetic
+# 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)
+
+# Tests the build step timing facilities.
+
+# TODO: Missing tests:
+# 1. 'time' target with a source target representing more than one virtual
+# target. This happens in practice, e.g. when using the time rule on a msvc
+# exe target whose generator actually constructs an EXE and a PDB target.
+# When this is done - only the main virtual target's constructing action
+# should be timed.
+# 2. 'time' target with a source target representing a virtual target that
+# actually gets built by multiple actions run in sequence. In that case a
+# separate timing result should be reported for each of those actions. This
+# happens in practice, e.g. when using the time rule on a msvc exe target
+# which first gets created as a result of some link action and then its
+# manifest gets embedded inside it as a resource using a separate action
+# (assuming an appropriate property has been set for this target - see the
+# msvc module for details).
+
+import BoostBuild
+import re
+
+
+###############################################################################
+#
+# basic_jam_action_test()
+# -----------------------
+#
+###############################################################################
+
+def basic_jam_action_test():
+ """Tests basic Jam action timing support."""
+
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """\
+rule time
+{
+ DEPENDS $(<) : $(>) ;
+ __TIMING_RULE__ on $(>) = record_time $(<) ;
+ DEPENDS all : $(<) ;
+}
+
+actions time
+{
+ echo $(>) user: $(__USER_TIME__) system: $(__SYSTEM_TIME__) clock: $(__CLOCK_TIME__)
+ echo timed from $(>) >> $(<)
+}
+
+rule record_time ( target : source : start end user system clock )
+{
+ __USER_TIME__ on $(target) = $(user) ;
+ __SYSTEM_TIME__ on $(target) = $(system) ;
+ __CLOCK_TIME__ on $(target) = $(clock) ;
+}
+
+rule make
+{
+ DEPENDS $(<) : $(>) ;
+}
+
+actions make
+{
+ echo made from $(>) >> $(<)
+}
+
+time foo : bar ;
+make bar : baz ;
+""")
+
+ t.write("baz", "nothing")
+
+ expected_output = """\
+\.\.\.found 4 targets\.\.\.
+\.\.\.updating 2 targets\.\.\.
+make bar
+time foo
+bar +user: [0-9\.]+ +system: +[0-9\.]+ +clock: +[0-9\.]+ *
+\.\.\.updated 2 targets\.\.\.$
+"""
+
+ t.run_build_system(["-ffile.jam", "-d+1"], stdout=expected_output,
+ match=lambda actual, expected: re.search(expected, actual, re.DOTALL))
+ t.expect_addition("foo")
+ t.expect_addition("bar")
+ t.expect_nothing_more()
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# boost_build_testing_support_timing_rule():
+# ------------------------------------------
+#
+###############################################################################
+
+def boost_build_testing_support_timing_rule():
+ """
+ Tests the target build timing rule provided by the Boost Build testing
+ support system.
+
+ """
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("aaa.cpp", "int main() {}\n")
+
+ t.write("jamroot.jam", """\
+import testing ;
+exe my-exe : aaa.cpp ;
+time my-time : my-exe ;
+""")
+
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug*/aaa.obj")
+ t.expect_addition("bin/$toolset/debug*/my-exe.exe")
+ t.expect_addition("bin/$toolset/debug*/my-time.time")
+
+ t.expect_content_lines("bin/$toolset/debug*/my-time.time",
+ "user: *[0-9] seconds")
+ t.expect_content_lines("bin/$toolset/debug*/my-time.time",
+ "system: *[0-9] seconds")
+ t.expect_content_lines("bin/$toolset/debug*/my-time.time",
+ "clock: *[0-9] seconds")
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# boost_build_testing_support_timing_rule_with_spaces_in_names()
+# --------------------------------------------------------------
+#
+###############################################################################
+
+def boost_build_testing_support_timing_rule_with_spaces_in_names():
+ """
+ Tests the target build timing rule provided by the Boost Build testing
+ support system when used with targets contining spaces in their names.
+
+ """
+ t = BoostBuild.Tester(use_test_config=False)
+
+ t.write("aaa bbb.cpp", "int main() {}\n")
+
+ t.write("jamroot.jam", """\
+import testing ;
+exe "my exe" : "aaa bbb.cpp" ;
+time "my time" : "my exe" ;
+""")
+
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug*/aaa bbb.obj")
+ t.expect_addition("bin/$toolset/debug*/my exe.exe")
+ t.expect_addition("bin/$toolset/debug*/my time.time")
+
+ t.expect_content_lines("bin/$toolset/debug*/my time.time", "user: *")
+ t.expect_content_lines("bin/$toolset/debug*/my time.time", "system: *")
+
+ t.cleanup()
+
+
+###############################################################################
+#
+# main()
+# ------
+#
+###############################################################################
+
+basic_jam_action_test()
+boost_build_testing_support_timing_rule()
+boost_build_testing_support_timing_rule_with_spaces_in_names() \ No newline at end of file
diff --git a/src/boost/tools/build/test/toolset-mock/Jamroot.jam b/src/boost/tools/build/test/toolset-mock/Jamroot.jam
new file mode 100644
index 000000000..fd5f7907b
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/Jamroot.jam
@@ -0,0 +1,8 @@
+# Copyright 2017 Steven Watanabe
+#
+# 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)
+
+lib l1 : lib.cpp ;
+exe test : main.cpp l1 ;
diff --git a/src/boost/tools/build/test/toolset-mock/lib.cpp b/src/boost/tools/build/test/toolset-mock/lib.cpp
new file mode 100644
index 000000000..1ba30e32d
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/lib.cpp
@@ -0,0 +1,7 @@
+// Copyright (c) 2017 Steven Watanabe
+//
+// 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)
+
+int f() {}
diff --git a/src/boost/tools/build/test/toolset-mock/main.cpp b/src/boost/tools/build/test/toolset-mock/main.cpp
new file mode 100644
index 000000000..0fc8b9a75
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/main.cpp
@@ -0,0 +1,7 @@
+// Copyright (c) 2017 Steven Watanabe
+//
+// 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)
+
+int main() {}
diff --git a/src/boost/tools/build/test/toolset-mock/project-config.jam b/src/boost/tools/build/test/toolset-mock/project-config.jam
new file mode 100644
index 000000000..30a9e9415
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/project-config.jam
@@ -0,0 +1,43 @@
+# Copyright 2017 Steven Watanabe
+#
+# 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 modules ;
+import os ;
+
+path-constant here : . ;
+
+local PYTHON = [ os.environ PYTHON_CMD ] ;
+
+using gcc : 4.8.3 : $(PYTHON) $(here)/src/gcc-4.8.3-linux.py : : <target-os>linux ;
+using gcc : 4.2.1 : $(PYTHON) $(here)/src/gcc-4.2.1-darwin.py : : <target-os>darwin ;
+
+# hard-code this to make the test work on other platforms
+modules.poke darwin : .host-osx-version : 10.11.0 ;
+using darwin : 4.2.1 : $(PYTHON) $(here)/src/darwin-4.2.1.py
+ : <archiver>$(here)/src/bin/libtool
+ <striper>$(here)/src/bin/strip
+ : <target-os>darwin
+ ;
+
+using clang-darwin : 3.9.0 : $(PYTHON) $(here)/src/clang-3.9.0-darwin.py
+ : <archiver>$(here)/src/bin/ar
+ <ranlib>$(here)/src/bin/ranlib
+ ;
+
+using clang-linux : 3.9.0 : $(PYTHON) $(here)/src/clang-linux-3.9.0.py
+ : <archiver>$(here)/src/bin/ar
+ <ranlib>$(here)/src/bin/ranlib
+ ;
+
+using clang-vxworks : 4.0.1 : $(PYTHON) $(here)/src/clang-vxworks-4.0.1.py
+ : <linker>$(here)/src/bin/ld
+ <archiver>$(here)/src/bin/ar
+ ;
+
+using intel-darwin : 10.2 : $(PYTHON) $(here)/src/intel-darwin-10.2.py
+ : <archiver>$(here)/src/bin/ar
+ <ranlib>$(here)/src/bin/ranlib
+ ;
diff --git a/src/boost/tools/build/test/toolset-mock/src/Jamroot.jam b/src/boost/tools/build/test/toolset-mock/src/Jamroot.jam
new file mode 100644
index 000000000..c8fc0078b
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/Jamroot.jam
@@ -0,0 +1,61 @@
+# Copyright 2017 Steven Watanabe
+#
+# 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 os ;
+import print ;
+import regex ;
+import feature ;
+
+.PYTHON = [ os.environ PYTHON_CMD ] ;
+path-constant .AR : ar.py ;
+path-constant .RANLIB : ranlib.py ;
+path-constant .LIBTOOL : libtool.py ;
+path-constant .STRIP : strip.py ;
+path-constant .LD : ld.py ;
+
+rule c-escape ( str )
+{
+ return [ regex.replace $(str) \\\\ \\\\ ] ;
+}
+
+rule cfg-header ( target : : properties * )
+{
+ local PYTHON = [ c-escape $(.PYTHON) ] ;
+ local AR = [ c-escape $(.AR) ] ;
+ local RANLIB = [ c-escape $(.RANLIB) ] ;
+ local LIBTOOL = [ c-escape $(.LIBTOOL) ] ;
+ local STRIP = [ c-escape $(.STRIP) ] ;
+ local LD = [ c-escape $(.LD) ] ;
+ print.output $(target) ;
+ print.text "#define PYTHON_CMD "\"$(PYTHON)\" : true ;
+ print.text "#define AR_CMD "\"$(AR)\" : true ;
+ print.text "#define RANLIB_CMD "\"$(RANLIB)\" : true ;
+ print.text "#define LIBTOOL_CMD "\"$(LIBTOOL)\" : true ;
+ print.text "#define STRIP_CMD "\"$(STRIP)\" : true ;
+ print.text "#define LD_CMD "\"$(LD)\" : true ;
+}
+
+# We can only build one variant at a time and we need to have a fixed path
+project : requirements <location>bin ;
+
+make config.h : : @cfg-header ;
+
+project : requirements <implicit-dependency>config.h ;
+
+rule write-target-os ( target : : properties * )
+{
+ local target-os = [ feature.defaults <target-os> ] ;
+ print.output $(target) ;
+ print.text $(target-os:G=) : true ;
+}
+
+make target-os.txt : : @write-target-os ;
+
+exe ar : [ obj ar.obj : mock-program.cpp : <define>PY_SCRIPT=AR_CMD ] ;
+exe ranlib : [ obj ranlib.obj : mock-program.cpp : <define>PY_SCRIPT=RANLIB_CMD ] ;
+exe libtool : [ obj libtool.obj : mock-program.cpp : <define>PY_SCRIPT=LIBTOOL_CMD ] ;
+exe strip : [ obj strip.obj : mock-program.cpp : <define>PY_SCRIPT=STRIP_CMD ] ;
+exe ld : [ obj ld.obj : mock-program.cpp : <define>PY_SCRIPT=LD_CMD ] ;
diff --git a/src/boost/tools/build/test/toolset-mock/src/MockProgram.py b/src/boost/tools/build/test/toolset-mock/src/MockProgram.py
new file mode 100644
index 000000000..1ada7e2ad
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/MockProgram.py
@@ -0,0 +1,262 @@
+# Copyright 2017 Steven Watanabe
+#
+# 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 sys
+import os
+import re
+
+# Represents a sequence of arguments that must appear
+# in a fixed order.
+class ordered:
+ def __init__(self, *args):
+ self.args = args
+ def match(self, command_line, pos, outputs):
+ for p in self.args:
+ res = try_match(command_line, pos, p, outputs)
+ if res is None:
+ return
+ pos = res
+ return pos
+
+# Represents a sequence of arguments that can appear
+# in any order.
+class unordered:
+ def __init__(self, *args):
+ self.args = list(args)
+ def match(self, command_line, pos, outputs):
+ unmatched = self.args[:]
+ while len(unmatched) > 0:
+ res = try_match_one(command_line, pos, unmatched, outputs)
+ if res is None:
+ return
+ pos = res
+ return pos
+
+# Represents a single input file.
+# If id is set, then the file must have been created
+# by a prior use of output_file.
+# If source is set, then the file must be that source file.
+class input_file:
+ def __init__(self, id=None, source=None):
+ assert((id is None) ^ (source is None))
+ self.id = id
+ self.source = source
+ def check(self, path):
+ if path.startswith("-"):
+ return
+ if self.id is not None:
+ try:
+ with open(path, "r") as f:
+ data = f.read()
+ if data == make_file_contents(self.id):
+ return True
+ else:
+ return
+ except:
+ return
+ elif self.source is not None:
+ if self.source == path:
+ return True
+ else:
+ return
+ assert(False)
+ def match(self, command_line, pos, outputs):
+ if self.check(command_line[pos]):
+ return pos + 1
+
+# Matches an output file.
+# If the full pattern is matched, The
+# file will be created.
+class output_file:
+ def __init__(self, id):
+ self.id = id
+ def match(self, command_line, pos, outputs):
+ if command_line[pos].startswith("-"):
+ return
+ outputs.append((command_line[pos], self.id))
+ return pos + 1
+
+# Matches the directory containing an input_file
+class target_path(object):
+ def __init__(self, id):
+ self.tester = input_file(id=id)
+ def match(self, command_line, pos, outputs):
+ arg = command_line[pos]
+ if arg.startswith("-"):
+ return
+ try:
+ for path in os.listdir(arg):
+ if self.tester.check(os.path.join(arg, path)):
+ return pos + 1
+ except:
+ return
+
+# Matches a single argument, which is composed of a prefix and a path
+# for example arguments of the form -ofilename.
+class arg(object):
+ def __init__(self, prefix, a):
+ # The prefix should be a string, a should be target_path or input_file.
+ self.prefix = prefix
+ self.a = a
+ def match(self, command_line, pos, outputs):
+ s = command_line[pos]
+ if s.startswith(self.prefix) and try_match([s[len(self.prefix):]], 0, self.a, outputs) == 1:
+ return pos + 1
+
+# Given a file id, returns a string that will be
+# written to the file to allow it to be recognized.
+def make_file_contents(id):
+ return id
+
+# Matches a single pattern from a list.
+# If it succeeds, the matching pattern
+# is removed from the list.
+# Returns the index after the end of the match
+def try_match_one(command_line, pos, patterns, outputs):
+ for p in patterns:
+ tmp = outputs[:]
+ res = try_match(command_line, pos, p, tmp)
+ if res is not None:
+ outputs[:] = tmp
+ patterns.remove(p)
+ return res
+
+# returns the end of the match if any
+def try_match(command_line, pos, pattern, outputs):
+ if pos == len(command_line):
+ return
+ elif type(pattern) is str:
+ if pattern == command_line[pos]:
+ return pos + 1
+ else:
+ return pattern.match(command_line, pos, outputs)
+
+known_patterns = []
+program_name = None
+
+# Registers a command
+# The arguments should be a sequence of:
+# str, ordered, unordered, arg, input_file, output_file, target_path
+# kwarg: stdout is text that will be printed on success.
+def command(*args, **kwargs):
+ global known_patterns
+ global program_name
+ stdout = kwargs.get("stdout", None)
+ pattern = ordered(*args)
+ known_patterns += [(pattern, stdout)]
+ if program_name is None:
+ program_name = args[0]
+ else:
+ assert(program_name == args[0])
+
+# Use this to filter the recognized commands, based on the properties
+# passed to b2.
+def allow_properties(*args):
+ try:
+ return all(a in os.environ["B2_PROPERTIES"].split(" ") for a in args)
+ except KeyError:
+ return True
+
+# Use this in the stdout argument of command to print the command
+# for running another script.
+def script(name):
+ return os.path.join(os.path.dirname(__file__), "bin", re.sub('\.py$', '', name))
+
+def match(command_line):
+ for (p, stdout) in known_patterns:
+ outputs = []
+ if try_match(command_line, 0, p, outputs) == len(command_line):
+ return (stdout, outputs)
+
+# Every mock program should call this after setting up all the commands.
+def main():
+ command_line = [program_name] + sys.argv[1:]
+ result = match(command_line)
+ if result is not None:
+ (stdout, outputs) = result
+ if stdout is not None:
+ print(stdout)
+ for (file,id) in outputs:
+ with open(file, "w") as f:
+ f.write(make_file_contents(id))
+ exit(0)
+ else:
+ print(command_line)
+ exit(1)
+
+# file should be the name of a file in the same directory
+# as this. Must be called after verify_setup
+def verify_file(filename):
+ global known_files
+ if filename not in known_files:
+ known_files.add(filename)
+ srcdir = os.path.dirname(__file__)
+ execfile(os.path.join(srcdir, filename), {})
+
+def verify_setup():
+ """Override the behavior of most module components
+ in order to detect whether they are being used correctly."""
+ global main
+ global allow_properties
+ global output_file
+ global input_file
+ global target_path
+ global script
+ global command
+ global verify_errors
+ global output_ids
+ global input_ids
+ global known_files
+ def allow_properties(*args):
+ return True
+ def main():
+ pass
+ def output_file(id):
+ global output_ids
+ global verify_error
+ if id in output_ids:
+ verify_error("duplicate output_file: %s" % id)
+ output_ids.add(id)
+ def input_file(id=None, source=None):
+ if id is not None:
+ input_ids.add(id)
+ def target_path(id):
+ input_ids.add(id)
+ def script(filename):
+ verify_file(filename)
+ def command(*args, **kwargs):
+ pass
+ verify_errors = []
+ output_ids = set()
+ input_ids = set()
+ known_files = set()
+
+def verify_error(message):
+ global verify_errors
+ verify_errors += [message]
+
+def verify_finalize():
+ for id in input_ids:
+ if not id in output_ids:
+ verify_error("Input file does not exist: %s" % id)
+ for error in verify_errors:
+ print("error: %s" % error)
+ if len(verify_errors) != 0:
+ return 1
+ else:
+ return 0
+
+def verify():
+ srcdir = os.path.dirname(__file__)
+ if srcdir == '':
+ srcdir = '.'
+ verify_setup()
+ for f in os.listdir(srcdir):
+ if re.match(r"(gcc|clang|darwin|intel)-.*\.py", f):
+ verify_file(f)
+ exit(verify_finalize())
diff --git a/src/boost/tools/build/test/toolset-mock/src/ar.py b/src/boost/tools/build/test/toolset-mock/src/ar.py
new file mode 100644
index 000000000..853fe1dd8
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/ar.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+#
+# Copyright 2017-2018 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('ar', 'rc', output_file('bin/gcc-gnu-4.8.3/debug/link-static/libl1.a'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/lib.o'))
+command('ar', 'rc', output_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/lib.o'))
+command('ar', 'rc', output_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/lib.o'))
+command('ar', 'rc', output_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
+command('ar', 'rc', output_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/lib.o'))
+command('ar', 'rc', output_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
+command('ar', 'rc', output_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/lib.o'))
+command('ar', 'rc', output_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
+command('ar', 'rc', output_file('bin/clang-linux-3.9.0/debug/link-static/libl1.a'), input_file('bin/clang-linux-3.9.0/debug/link-static/lib.o'))
+command('ar', 'rc', output_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/lib.o'))
+command('ar', 'rcu', output_file('bin/clang-vxworks-4.0.1/debug/link-static/libl1.a'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/lib.o'))
+command('ar', 'rcu', output_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/lib.o'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/clang-3.9.0-darwin.py b/src/boost/tools/build/test/toolset-mock/src/clang-3.9.0-darwin.py
new file mode 100644
index 000000000..d8c2163ab
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/clang-3.9.0-darwin.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('clang++', '-print-prog-name=ar', stdout=script('ar.py'))
+command('clang++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))
+
+# all builds are multi-threaded for darwin
+if allow_properties("variant=debug", "link=shared", "runtime-link=shared"):
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-fPIC'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/libl1.dylib'), '-single_module', '-dynamiclib', '-install_name', '@rpath/libl1.dylib', input_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/lib.o'), unordered('-g', '-fPIC'))
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-fPIC'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/test'), input_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/main.o'), input_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/libl1.dylib'), unordered('-g', '-fPIC'))
+
+if allow_properties("variant=release", "link=shared", "runtime-link=shared"):
+ command('clang++', '-x', 'c++', unordered('-O3', '-Wno-inline', '-Wall', '-fPIC'), '-DNDEBUG', '-c', '-o', output_file('bin/clang-darwin-3.9.0/release/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-v', '-o', output_file('bin/clang-darwin-3.9.0/release/target-os-darwin/libl1.dylib'), '-single_module', '-dynamiclib', '-install_name', '@rpath/libl1.dylib', input_file('bin/clang-darwin-3.9.0/release/target-os-darwin/lib.o'), '-fPIC')
+ command('clang++', '-x', 'c++', unordered('-O3', '-Wno-inline', '-Wall', '-fPIC'), '-DNDEBUG', '-c', '-o', output_file('bin/clang-darwin-3.9.0/release/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-v', '-o', output_file('bin/clang-darwin-3.9.0/release/target-os-darwin/test'), input_file('bin/clang-darwin-3.9.0/release/target-os-darwin/main.o'), input_file('bin/clang-darwin-3.9.0/release/target-os-darwin/libl1.dylib'), '-fPIC')
+
+if allow_properties("variant=debug", "link=static", "runtime-link=shared"):
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/test'), input_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/main.o'), input_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/libl1.a'), '-g')
+
+if allow_properties("variant=debug", "link=static", "runtime-link=static"):
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/test'), input_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), unordered('-g', '-static'))
+
+if allow_properties("variant=debug", "link=shared", "runtime-link=shared", "architecture=x86", "address-model=32"):
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-march=i686', '-fPIC', '-m32'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/x86/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/x86/target-os-darwin/libl1.dylib'), '-single_module', '-dynamiclib', '-install_name', '@rpath/libl1.dylib', input_file('bin/clang-darwin-3.9.0/debug/x86/target-os-darwin/lib.o'), unordered('-g', '-march=i686', '-fPIC', '-m32'))
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-march=i686', '-fPIC', '-m32'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/x86/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/x86/target-os-darwin/test'), input_file('bin/clang-darwin-3.9.0/debug/x86/target-os-darwin/main.o'), input_file('bin/clang-darwin-3.9.0/debug/x86/target-os-darwin/libl1.dylib'), unordered('-g', '-march=i686', '-fPIC', '-m32'))
+
+if allow_properties("variant=debug", "link=shared", "runtime-link=shared", "cxxstd=latest"):
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-std=c++1z'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/libl1.dylib'), '-single_module', '-dynamiclib', '-install_name', '@rpath/libl1.dylib', input_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/lib.o'), unordered('-g', '-fPIC', '-std=c++1z'))
+ command('clang++', '-x', 'c++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-std=c++1z'), '-c', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-o', output_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/test'), input_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/main.o'), input_file('bin/clang-darwin-3.9.0/debug/target-os-darwin/libl1.dylib'), unordered('-g', '-fPIC', '-std=c++1z'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/clang-linux-3.9.0.py b/src/boost/tools/build/test/toolset-mock/src/clang-linux-3.9.0.py
new file mode 100644
index 000000000..242d25624
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/clang-linux-3.9.0.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('clang++', '-print-prog-name=ar', stdout=script('ar.py'))
+command('clang++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-o', output_file('bin/clang-linux-3.9.0/debug/libl1.so'), '-Wl,-soname', '-Wl,libl1.so', '-shared', '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/lib.o'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', unordered('-g', '-fPIC'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-Wl,-R', arg('-Wl,', target_path('bin/clang-linux-3.9.0/debug/libl1.so')), '-Wl,-rpath-link', arg('-Wl,', target_path('bin/clang-linux-3.9.0/debug/libl1.so')), '-o', output_file('bin/clang-linux-3.9.0/debug/test'), '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/main.o'), input_file('bin/clang-linux-3.9.0/debug/libl1.so'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', unordered('-g', '-fPIC'))
+
+if allow_properties('variant=release', 'link=shared', 'threading=single', 'runtime-link=shared', 'strip=on'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O3', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG', '-c'), '-o', output_file('bin/clang-linux-3.9.0/release/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-o', output_file('bin/clang-linux-3.9.0/release/libl1.so'), '-Wl,-soname', '-Wl,libl1.so', '-shared', '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/release/lib.o'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', unordered('-fPIC', '-Wl,--strip-all'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O3', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG', '-c'), '-o', output_file('bin/clang-linux-3.9.0/release/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-Wl,-R', arg('-Wl,', target_path('bin/clang-linux-3.9.0/release/libl1.so')), '-Wl,-rpath-link', arg('-Wl,', target_path('bin/clang-linux-3.9.0/release/libl1.so')), '-o', output_file('bin/clang-linux-3.9.0/release/test'), '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/release/main.o'), input_file('bin/clang-linux-3.9.0/release/libl1.so'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', unordered('-fPIC', '-Wl,--strip-all'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=multi', 'runtime-link=shared'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-pthread', '-fPIC', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/threading-multi/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-o', output_file('bin/clang-linux-3.9.0/debug/threading-multi/libl1.so'), '-Wl,-soname', '-Wl,libl1.so', '-shared', '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/threading-multi/lib.o'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lrt', '-Wl,--end-group', unordered('-g', '-pthread', '-fPIC'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-pthread', '-fPIC', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/threading-multi/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-Wl,-R', arg('-Wl,', target_path('bin/clang-linux-3.9.0/debug/threading-multi/libl1.so')), '-Wl,-rpath-link', arg('-Wl,', target_path('bin/clang-linux-3.9.0/debug/threading-multi/libl1.so')), '-o', output_file('bin/clang-linux-3.9.0/debug/threading-multi/test'), '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/threading-multi/main.o'), input_file('bin/clang-linux-3.9.0/debug/threading-multi/libl1.so'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lrt', '-Wl,--end-group', unordered('-g', '-pthread', '-fPIC'))
+
+if allow_properties('variant=debug', 'link=static', 'threading=single', 'runtime-link=shared'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/link-static/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/link-static/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-o', output_file('bin/clang-linux-3.9.0/debug/link-static/test'), '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/link-static/main.o'), input_file('bin/clang-linux-3.9.0/debug/link-static/libl1.a'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', '-g')
+
+if allow_properties('variant=debug', 'link=static', 'threading=single', 'runtime-link=static'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-o', output_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/test'), '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/main.o'), input_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/libl1.a'), '-Wl,--end-group', unordered('-g', '-static'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared', 'architecture=x86', 'address-model=32'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-march=i686', '-m32', '-fPIC', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', '-o', output_file('bin/clang-linux-3.9.0/debug/libl1.so'), '-Wl,-soname', '-Wl,libl1.so', '-shared', '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/lib.o'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', unordered('-g', '-march=i686', '-fPIC', '-m32'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-march=i686', '-m32', '-fPIC', '-c'), '-o', output_file('bin/clang-linux-3.9.0/debug/main.o'), input_file(source='main.cpp'))
+ command('clang++', '-Wl,-R', arg('-Wl,', target_path('bin/clang-linux-3.9.0/debug/libl1.so')), '-Wl,-rpath-link', arg('-Wl,', target_path('bin/clang-linux-3.9.0/debug/libl1.so')), '-o', output_file('bin/clang-linux-3.9.0/debug/test'), '-Wl,--start-group', input_file('bin/clang-linux-3.9.0/debug/main.o'), input_file('bin/clang-linux-3.9.0/debug/libl1.so'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', unordered('-g', '-march=i686', '-fPIC', '-m32'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/clang-vxworks-4.0.1.py b/src/boost/tools/build/test/toolset-mock/src/clang-vxworks-4.0.1.py
new file mode 100644
index 000000000..a1fbedb11
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/clang-vxworks-4.0.1.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+#
+# Copyright 2018 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('clang++', '-print-prog-name=ar', stdout=script('ar.py'))
+command('clang++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/main.o'), input_file(source='main.cpp'))
+
+if allow_properties('variant=release', 'link=shared', 'threading=single', 'runtime-link=shared', 'strip=on'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O3', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/release/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O3', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/release/main.o'), input_file(source='main.cpp'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=multi', 'runtime-link=shared'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/threading-multi/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/threading-multi/main.o'), input_file(source='main.cpp'))
+
+if allow_properties('variant=debug', 'link=static', 'threading=single', 'runtime-link=shared'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/link-static/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/link-static/main.o'), input_file(source='main.cpp'))
+
+if allow_properties('variant=debug', 'link=static', 'threading=single', 'runtime-link=static'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/main.o'), input_file(source='main.cpp'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared', 'architecture=x86', 'address-model=32'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-march=i686', '-m32', '-fPIC', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-march=i686', '-m32', '-fPIC', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/main.o'), input_file(source='main.cpp'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared', 'rtti=off', 'exception-handling=off'):
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-fno-rtti', '-fno-exceptions', '-Wall', '-g', '-fPIC', '-D_NO_RTTI', '-D_NO_EX=1', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/lib.o'), input_file(source='lib.cpp'))
+ command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-fno-rtti', '-fno-exceptions', '-Wall', '-g', '-fPIC', '-D_NO_RTTI', '-D_NO_EX=1', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/main.o'), input_file(source='main.cpp'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/darwin-4.2.1.py b/src/boost/tools/build/test/toolset-mock/src/darwin-4.2.1.py
new file mode 100644
index 000000000..d81359ca5
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/darwin-4.2.1.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+script("libtool.py")
+
+command('g++', '-dumpversion', stdout='4.2.1')
+
+# all builds are multi-threaded for darwin
+if allow_properties("variant=debug", "link=shared", "runtime-link=shared"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-dynamic', '-gdwarf-2', '-fexceptions', '-fPIC'), '-c', '-o', output_file('bin/darwin-4.2.1/debug/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', '-dynamiclib', '-Wl,-single_module', '-install_name', 'libl1.dylib', '-o', output_file('bin/darwin-4.2.1/debug/target-os-darwin/libl1.dylib'), input_file('bin/darwin-4.2.1/debug/target-os-darwin/lib.o'), '-headerpad_max_install_names', unordered('-g', '-fPIC'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-dynamic', '-gdwarf-2', '-fexceptions', '-fPIC'), '-c', '-o', output_file('bin/darwin-4.2.1/debug/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/darwin-4.2.1/debug/target-os-darwin/test'), input_file('bin/darwin-4.2.1/debug/target-os-darwin/main.o'), input_file('bin/darwin-4.2.1/debug/target-os-darwin/libl1.dylib'), unordered('-g', '-fPIC'))
+
+if allow_properties("variant=release", "link=shared", "runtime-link=shared"):
+ command('g++', unordered('-O3', '-Wno-inline', '-Wall', '-dynamic', '-gdwarf-2', '-fexceptions', '-fPIC'), '-DNDEBUG', '-c', '-o', output_file('bin/darwin-4.2.1/release/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', '-dynamiclib', '-Wl,-single_module', '-install_name', 'libl1.dylib', '-o', output_file('bin/darwin-4.2.1/release/target-os-darwin/libl1.dylib'), input_file('bin/darwin-4.2.1/release/target-os-darwin/lib.o'), '-headerpad_max_install_names', unordered(ordered('-Wl,-dead_strip', '-no_dead_strip_inits_and_terms'), '-fPIC'))
+ command('g++', unordered('-O3', '-Wno-inline', '-Wall', '-dynamic', '-gdwarf-2', '-fexceptions', '-fPIC'), '-DNDEBUG', '-c', '-o', output_file('bin/darwin-4.2.1/release/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/darwin-4.2.1/release/target-os-darwin/test'), input_file('bin/darwin-4.2.1/release/target-os-darwin/main.o'), input_file('bin/darwin-4.2.1/release/target-os-darwin/libl1.dylib'), unordered(ordered('-Wl,-dead_strip', '-no_dead_strip_inits_and_terms'), '-fPIC'))
+
+if allow_properties("variant=debug", "link=static", "runtime-link=shared"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-gdwarf-2', '-fexceptions'), '-c', '-o', output_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-gdwarf-2', '-fexceptions'), '-c', '-o', output_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/test'), input_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/main.o'), input_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'), '-g')
+
+if allow_properties("variant=debug", "link=static", "runtime-link=static"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-gdwarf-2', '-fexceptions'), '-c', '-o', output_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-gdwarf-2', '-fexceptions'), '-c', '-o', output_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/test'), input_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), unordered('-g', ordered('-nodefaultlibs', '-shared-libgcc', '-lstdc++-static', '-lgcc_eh', '-lgcc', '-lSystem'), '-static'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/gcc-4.2.1-darwin.py b/src/boost/tools/build/test/toolset-mock/src/gcc-4.2.1-darwin.py
new file mode 100644
index 000000000..76058c320
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/gcc-4.2.1-darwin.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('g++', '-print-prog-name=ar', stdout=script('ar.py'))
+command('g++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))
+
+# all builds are multi-threaded for darwin
+if allow_properties("variant=debug", "link=shared", "runtime-link=shared"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-fPIC'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/debug/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', '-o', output_file('bin/gcc-darwin-4.2.1/debug/target-os-darwin/libl1.dylib'), '-shared', input_file('bin/gcc-darwin-4.2.1/debug/target-os-darwin/lib.o'), unordered('-g', '-fPIC'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-fPIC'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/debug/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-Wl,-rpath', arg('-Wl,', target_path('bin/gcc-darwin-4.2.1/debug/target-os-darwin/libl1.dylib')), '-o', output_file('bin/gcc-darwin-4.2.1/debug/target-os-darwin/test'), input_file('bin/gcc-darwin-4.2.1/debug/target-os-darwin/main.o'), input_file('bin/gcc-darwin-4.2.1/debug/target-os-darwin/libl1.dylib'), unordered('-g', '-fPIC'))
+
+if allow_properties("variant=release", "link=shared", "runtime-link=shared"):
+ command('g++', unordered('-O3', '-finline-functions', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/release/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', '-o', output_file('bin/gcc-darwin-4.2.1/release/target-os-darwin/libl1.dylib'), '-shared', input_file('bin/gcc-darwin-4.2.1/release/target-os-darwin/lib.o'), '-fPIC')
+ command('g++', unordered('-O3', '-finline-functions', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/release/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-Wl,-rpath', arg('-Wl,', target_path('bin/gcc-darwin-4.2.1/release/target-os-darwin/libl1.dylib')), '-o', output_file('bin/gcc-darwin-4.2.1/release/target-os-darwin/test'), input_file('bin/gcc-darwin-4.2.1/release/target-os-darwin/main.o'), input_file('bin/gcc-darwin-4.2.1/release/target-os-darwin/libl1.dylib'), '-fPIC')
+
+if allow_properties("variant=debug", "link=static", "runtime-link=shared"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/test'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/main.o'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'), '-g')
+
+if allow_properties("variant=debug", "link=static", "runtime-link=static"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/test'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), unordered('-g', '-static'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/gcc-4.8.3-linux.py b/src/boost/tools/build/test/toolset-mock/src/gcc-4.8.3-linux.py
new file mode 100644
index 000000000..5604ee5d1
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/gcc-4.8.3-linux.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('g++', '-print-prog-name=ar', stdout=script('ar.py'))
+command('g++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))
+
+if allow_properties("variant=debug", "link=shared", "threading=single", "runtime-link=shared"):
+ command("g++", unordered("-O0", "-fno-inline", "-Wall", "-g", "-fPIC"), "-c", "-o", output_file("bin/gcc-gnu-4.8.3/debug/lib.o"), input_file(source="lib.cpp"))
+ command("g++", "-o", output_file("bin/gcc-gnu-4.8.3/debug/libl1.so"), "-Wl,-h", "-Wl,libl1.so", "-shared", "-Wl,--start-group", input_file("bin/gcc-gnu-4.8.3/debug/lib.o"), "-Wl,-Bstatic", "-Wl,-Bdynamic", "-Wl,--end-group", unordered("-g", "-fPIC"))
+ command("g++", unordered("-O0", "-fno-inline", "-Wall", "-g", "-fPIC"), "-c", "-o", output_file("bin/gcc-gnu-4.8.3/debug/main.o"), input_file(source="main.cpp"))
+ command("g++", "-Wl,-rpath", arg("-Wl,", target_path("bin/gcc-gnu-4.8.3/debug/libl1.so")), "-Wl,-rpath-link", arg("-Wl,", target_path("bin/gcc-gnu-4.8.3/debug/libl1.so")), "-o", output_file("bin/gcc-gnu-4.8.3/debug/test"), "-Wl,--start-group", input_file("bin/gcc-gnu-4.8.3/debug/main.o"), input_file("bin/gcc-gnu-4.8.3/debug/libl1.so"), "-Wl,-Bstatic", "-Wl,-Bdynamic", "-Wl,--end-group", unordered("-g", "-fPIC"))
+
+if allow_properties("variant=release", "link=shared", "threading=single", "runtime-link=shared"):
+ command('g++', unordered('-O3', '-finline-functions', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG'), '-c', '-o', output_file('bin/gcc-gnu-4.8.3/release/lib.o'), input_file(source='lib.cpp'))
+ command('g++', '-o', output_file('bin/gcc-gnu-4.8.3/release/libl1.so'), '-Wl,-h', '-Wl,libl1.so', '-shared', '-Wl,--start-group', input_file('bin/gcc-gnu-4.8.3/release/lib.o'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', '-fPIC')
+ command('g++', unordered('-O3', '-finline-functions', '-Wno-inline', '-Wall', '-fPIC', '-DNDEBUG'), '-c', '-o', output_file('bin/gcc-gnu-4.8.3/release/main.o'), input_file(source='main.cpp'))
+ command('g++', '-Wl,-rpath', arg('-Wl,', target_path('bin/gcc-gnu-4.8.3/release/libl1.so')), '-Wl,-rpath-link', arg('-Wl,', target_path('bin/gcc-gnu-4.8.3/release/libl1.so')), '-o', output_file('bin/gcc-gnu-4.8.3/release/test'), '-Wl,--start-group', input_file('bin/gcc-gnu-4.8.3/release/main.o'), input_file('bin/gcc-gnu-4.8.3/release/libl1.so'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', '-fPIC')
+
+if allow_properties("variant=debug", "link=shared", "threading=multi", "runtime-link=shared"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-pthread', '-fPIC'), '-c', '-o', output_file('bin/gcc-gnu-4.8.3/debug/threading-multi/lib.o'), input_file(source='lib.cpp'))
+ command('g++', '-o', output_file('bin/gcc-gnu-4.8.3/debug/threading-multi/libl1.so'), '-Wl,-h', '-Wl,libl1.so', '-shared', '-Wl,--start-group', input_file('bin/gcc-gnu-4.8.3/debug/threading-multi/lib.o'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lrt', '-Wl,--end-group', unordered('-g', '-pthread', '-fPIC'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-pthread', '-fPIC'), '-c', '-o', output_file('bin/gcc-gnu-4.8.3/debug/threading-multi/main.o'), input_file(source='main.cpp'))
+ command('g++', '-Wl,-rpath', arg('-Wl,', target_path('bin/gcc-gnu-4.8.3/debug/threading-multi/libl1.so')), '-Wl,-rpath-link', arg('-Wl,', target_path('bin/gcc-gnu-4.8.3/debug/threading-multi/libl1.so')), '-o', output_file('bin/gcc-gnu-4.8.3/debug/threading-multi/test'), '-Wl,--start-group', input_file('bin/gcc-gnu-4.8.3/debug/threading-multi/main.o'), input_file('bin/gcc-gnu-4.8.3/debug/threading-multi/libl1.so'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lrt', '-Wl,--end-group', unordered('-g', '-pthread', '-fPIC'))
+
+if allow_properties("variant=debug", "link=static", "threading=single", "runtime-link=shared"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/gcc-gnu-4.8.3/debug/link-static/lib.o'), input_file(source='lib.cpp'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g'), '-c', '-o', output_file('bin/gcc-gnu-4.8.3/debug/link-static/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/gcc-gnu-4.8.3/debug/link-static/test'), '-Wl,--start-group', input_file('bin/gcc-gnu-4.8.3/debug/link-static/main.o'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/libl1.a'), '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', '-g')
+
+if allow_properties("variant=debug", "link=static", "threading=single", "runtime-link=static"):
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/lib.o'), input_file(source='lib.cpp'))
+ command('g++', unordered('-O0', '-fno-inline', '-Wall', '-g', '-c'), '-o', output_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/main.o'), input_file(source='main.cpp'))
+ command('g++', '-o', output_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/test'), '-Wl,--start-group', input_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/main.o'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/libl1.a'), '-Wl,--end-group', unordered('-g', '-static'))
+
+
+if allow_properties("variant=debug", "link=shared", "threading=single", "runtime-link=shared"):
+ command("g++", unordered("-O0", "-fno-inline", "-Wall", "-g", "-fPIC", "-std=c++1y"), "-c", "-o", output_file("bin/gcc-gnu-4.8.3/debug/lib.o"), input_file(source="lib.cpp"))
+ command("g++", "-o", output_file("bin/gcc-gnu-4.8.3/debug/libl1.so"), "-Wl,-h", "-Wl,libl1.so", "-shared", "-Wl,--start-group", input_file("bin/gcc-gnu-4.8.3/debug/lib.o"), "-Wl,-Bstatic", "-Wl,-Bdynamic", "-Wl,--end-group", unordered("-g", "-fPIC", "-std=c++1y"))
+ command("g++", unordered("-O0", "-fno-inline", "-Wall", "-g", "-fPIC", "-std=c++1y"), "-c", "-o", output_file("bin/gcc-gnu-4.8.3/debug/main.o"), input_file(source="main.cpp"))
+ command("g++", "-Wl,-rpath", arg("-Wl,", target_path("bin/gcc-gnu-4.8.3/debug/libl1.so")), "-Wl,-rpath-link", arg("-Wl,", target_path("bin/gcc-gnu-4.8.3/debug/libl1.so")), "-o", output_file("bin/gcc-gnu-4.8.3/debug/test"), "-Wl,--start-group", input_file("bin/gcc-gnu-4.8.3/debug/main.o"), input_file("bin/gcc-gnu-4.8.3/debug/libl1.so"), "-Wl,-Bstatic", "-Wl,-Bdynamic", "-Wl,--end-group", unordered("-g", "-fPIC", "-std=c++1y"))
+
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/intel-darwin-10.2.py b/src/boost/tools/build/test/toolset-mock/src/intel-darwin-10.2.py
new file mode 100644
index 000000000..314d6c458
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/intel-darwin-10.2.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('icc', '-print-prog-name=ar', stdout=script('ar.py'))
+command('icc', '-print-prog-name=ranlib', stdout=script('ranlib.py'))
+
+# all builds are multi-threaded for darwin
+if allow_properties("variant=debug", "link=shared", "runtime-link=shared"):
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0', '-fPIC'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/debug/target-os-darwin/libl1.dylib'), '-single_module', '-dynamiclib', '-install_name', 'libl1.dylib', input_file('bin/intel-darwin-10.2/debug/target-os-darwin/lib.o'), unordered('-g', ordered('-shared-intel', '-lstdc++', '-lpthread'), '-fPIC'))
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0', '-fPIC'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/debug/target-os-darwin/test'), input_file('bin/intel-darwin-10.2/debug/target-os-darwin/main.o'), input_file('bin/intel-darwin-10.2/debug/target-os-darwin/libl1.dylib'), unordered('-g', ordered('-shared-intel', '-lstdc++', '-lpthread'), '-fPIC'))
+
+if allow_properties("variant=release", "link=shared", "runtime-link=shared"):
+ command('icc', '-xc++', unordered('-O3', '-inline-level=2', '-w1', '-vec-report0', '-fPIC'), '-DNDEBUG', '-c', '-o', output_file('bin/intel-darwin-10.2/release/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/release/target-os-darwin/libl1.dylib'), '-single_module', '-dynamiclib', '-install_name', 'libl1.dylib', input_file('bin/intel-darwin-10.2/release/target-os-darwin/lib.o'), unordered(ordered('-shared-intel', '-lstdc++', '-lpthread'), '-fPIC'))
+ command('icc', '-xc++', unordered('-O3', '-inline-level=2', '-w1', '-vec-report0', '-fPIC'), '-DNDEBUG', '-c', '-o', output_file('bin/intel-darwin-10.2/release/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/release/target-os-darwin/test'), input_file('bin/intel-darwin-10.2/release/target-os-darwin/main.o'), input_file('bin/intel-darwin-10.2/release/target-os-darwin/libl1.dylib'), unordered(ordered('-shared-intel', '-lstdc++', '-lpthread'), '-fPIC'))
+
+if allow_properties("variant=debug", "link=static", "runtime-link=shared"):
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/test'), input_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/main.o'), input_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/libl1.a'), '-g', ordered('-shared-intel', '-lstdc++', '-lpthread'))
+
+if allow_properties("variant=debug", "link=static", "runtime-link=static"):
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/test'), input_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/main.o'), input_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), unordered('-g', ordered('-static', '-static-intel', '-lstdc++', '-lpthread'), '-static'))
+
+if allow_properties("variant=debug", "link=shared", "runtime-link=shared", "architecture=x86", "address-model=32"):
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0', '-march=i686', '-fPIC', '-m32'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/x86/target-os-darwin/lib.o'), input_file(source='lib.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/debug/x86/target-os-darwin/libl1.dylib'), '-single_module', '-dynamiclib', '-install_name', 'libl1.dylib', input_file('bin/intel-darwin-10.2/debug/x86/target-os-darwin/lib.o'), unordered('-g', ordered('-shared-intel', '-lstdc++', '-lpthread'), '-march=i686', '-fPIC', '-m32'))
+ command('icc', '-xc++', unordered('-O0', '-inline-level=0', '-w1', '-g', '-vec-report0', '-march=i686', '-fPIC', '-m32'), '-c', '-o', output_file('bin/intel-darwin-10.2/debug/x86/target-os-darwin/main.o'), input_file(source='main.cpp'))
+ command('icc', '-o', output_file('bin/intel-darwin-10.2/debug/x86/target-os-darwin/test'), input_file('bin/intel-darwin-10.2/debug/x86/target-os-darwin/main.o'), input_file('bin/intel-darwin-10.2/debug/x86/target-os-darwin/libl1.dylib'), unordered('-g', ordered('-shared-intel', '-lstdc++', '-lpthread'), '-march=i686', '-fPIC', '-m32'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/ld.py b/src/boost/tools/build/test/toolset-mock/src/ld.py
new file mode 100644
index 000000000..2b644e501
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/ld.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+#
+# Copyright 2018 Steven Watanabe
+#
+# 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 MockProgram import *
+
+if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared'):
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/libl1.so'), input_file('bin/clang-vxworks-4.0.1/debug/lib.o'), unordered('-g', '-fPIC'), '-fpic', '-shared', '-non-static')
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/test'), input_file('bin/clang-vxworks-4.0.1/debug/main.o'), input_file('bin/clang-vxworks-4.0.1/debug/libl1.so'), unordered('-g', '-fPIC'))
+
+if allow_properties('variant=release', 'link=shared', 'threading=single', 'runtime-link=shared', 'strip=on'):
+ command('ld', '-t', '-o', output_file('bin/clang-vxworks-4.0.1/release/libl1.so'), input_file('bin/clang-vxworks-4.0.1/release/lib.o'), unordered('-fPIC', '-Wl,--strip-all'), '-fpic', '-shared', '-non-static')
+ command('ld', '-t', '-o', output_file('bin/clang-vxworks-4.0.1/release/test'), input_file('bin/clang-vxworks-4.0.1/release/main.o'), input_file('bin/clang-vxworks-4.0.1/release/libl1.so'), unordered('-fPIC', '-Wl,--strip-all'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=multi', 'runtime-link=shared'):
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/threading-multi/libl1.so'), input_file('bin/clang-vxworks-4.0.1/debug/threading-multi/lib.o'), unordered('-g', '-fPIC'), '-fpic', '-shared', '-non-static')
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/threading-multi/test'), input_file('bin/clang-vxworks-4.0.1/debug/threading-multi/main.o'), input_file('bin/clang-vxworks-4.0.1/debug/threading-multi/libl1.so'), unordered('-g', '-fPIC'))
+
+if allow_properties('variant=debug', 'link=static', 'threading=single', 'runtime-link=shared'):
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/link-static/test'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/main.o'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/libl1.a'), '-g')
+
+if allow_properties('variant=debug', 'link=static', 'threading=single', 'runtime-link=static'):
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/test'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/main.o'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/libl1.a'), unordered('-g'))
+
+if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared', 'architecture=x86', 'address-model=32'):
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/libl1.so'), input_file('bin/clang-vxworks-4.0.1/debug/lib.o'), unordered('-g', '-march=i686', '-fPIC', '-m32'), '-fpic', '-shared', '-non-static')
+ command('ld', '-o', output_file('bin/clang-vxworks-4.0.1/debug/test'), input_file('bin/clang-vxworks-4.0.1/debug/main.o'), input_file('bin/clang-vxworks-4.0.1/debug/libl1.so'), unordered('-g', '-march=i686', '-fPIC', '-m32'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/libtool.py b/src/boost/tools/build/test/toolset-mock/src/libtool.py
new file mode 100644
index 000000000..9f58dc96d
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/libtool.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('libtool', '-static', '-o', output_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/lib.o'))
+command('libtool', '-static', '-o', output_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/mock-program.cpp b/src/boost/tools/build/test/toolset-mock/src/mock-program.cpp
new file mode 100644
index 000000000..62dd4b8a4
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/mock-program.cpp
@@ -0,0 +1,42 @@
+// mock-program.cpp
+//
+// Copyright (c) 2017 Steven Watanabe
+//
+// 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 program does nothing except to exec a python script
+
+#include <vector>
+#include <iostream>
+#include <stdio.h>
+#include "config.h"
+
+#if defined(_WIN32)
+ #include <process.h>
+ #define execv _execv
+#else
+ #include <unistd.h>
+#endif
+
+#ifndef PY_SCRIPT
+#error PY_SCRIPT must be defined to the absolute path to the script to run
+#endif
+
+#ifndef PYTHON_CMD
+#error PYTHON_CMD must be defined to the absolute path to the python interpreter
+#endif
+
+int main(int argc, char ** argv)
+{
+ std::vector<char *> args;
+ char python_cmd[] = PYTHON_CMD;
+ char script[] = PY_SCRIPT;
+ args.push_back(python_cmd);
+ args.push_back(script);
+ args.insert(args.end(), argv + 1, argv + argc);
+ args.push_back(NULL);
+ execv(python_cmd, &args[0]);
+ perror("exec");
+}
diff --git a/src/boost/tools/build/test/toolset-mock/src/project-config.jam b/src/boost/tools/build/test/toolset-mock/src/project-config.jam
new file mode 100644
index 000000000..73dcf42df
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/project-config.jam
@@ -0,0 +1,5 @@
+# Copyright 2017 Steven Watanabe
+#
+# 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)
diff --git a/src/boost/tools/build/test/toolset-mock/src/ranlib.py b/src/boost/tools/build/test/toolset-mock/src/ranlib.py
new file mode 100644
index 000000000..4abe21ed0
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/ranlib.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('ranlib', input_file('bin/gcc-gnu-4.8.3/debug/link-static/libl1.a'))
+command('ranlib', input_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/libl1.a'))
+command('ranlib', input_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'))
+command('ranlib', input_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'))
+command('ranlib', input_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/libl1.a'))
+command('ranlib', input_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'))
+command('ranlib', '-cs', input_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/libl1.a'))
+command('ranlib', '-cs', input_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'))
+command('ranlib', input_file('bin/clang-linux-3.9.0/debug/link-static/libl1.a'))
+command('ranlib', input_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/libl1.a'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/strip.py b/src/boost/tools/build/test/toolset-mock/src/strip.py
new file mode 100644
index 000000000..6245588bf
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/strip.py
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+command('strip', '-S', '-x', input_file('bin/darwin-4.2.1/release/target-os-darwin/test'))
+
+main()
diff --git a/src/boost/tools/build/test/toolset-mock/src/verify.py b/src/boost/tools/build/test/toolset-mock/src/verify.py
new file mode 100644
index 000000000..6e5e0ea7b
--- /dev/null
+++ b/src/boost/tools/build/test/toolset-mock/src/verify.py
@@ -0,0 +1,9 @@
+# Copyright 2017 Steven Watanabe
+#
+# 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 MockProgram import *
+
+verify()
diff --git a/src/boost/tools/build/test/toolset_clang_darwin.py b/src/boost/tools/build/test/toolset_clang_darwin.py
new file mode 100644
index 000000000..53c7c07cb
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_clang_darwin.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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)
+
+# validates the clang-darwin toolset using a mock of clang
+
+from TestToolset import test_toolset
+
+test_toolset("clang-darwin", "3.9.0", [
+ ["target-os=darwin"],
+ ["target-os=darwin", "release", "strip=on", "linkflags=-v"],
+ ["target-os=darwin", "threading=multi"],
+ ["target-os=darwin", "link=static"],
+ ["target-os=darwin", "link=static", "runtime-link=static"],
+ ["target-os=darwin", "architecture=x86", "address-model=32"],
+ ["target-os=darwin", "cxxstd=latest"]])
diff --git a/src/boost/tools/build/test/toolset_clang_linux.py b/src/boost/tools/build/test/toolset_clang_linux.py
new file mode 100644
index 000000000..2fbf84b6d
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_clang_linux.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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)
+
+# validates the clang_linux toolset using a mock of clang
+
+from TestToolset import test_toolset
+
+test_toolset("clang-linux", "3.9.0", [
+ ["target-os=linux"],
+ ["target-os=linux", "release", "strip=on"],
+ ["target-os=linux", "threading=multi"],
+ ["target-os=linux", "link=static"],
+ ["target-os=linux", "link=static", "runtime-link=static"],
+ ["target-os=linux", "architecture=x86", "address-model=32"]])
diff --git a/src/boost/tools/build/test/toolset_clang_vxworks.py b/src/boost/tools/build/test/toolset_clang_vxworks.py
new file mode 100644
index 000000000..efdc12759
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_clang_vxworks.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+#
+# Copyright 2018 Steven Watanabe
+#
+# 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)
+
+# validates the clang_vxworks toolset using a mock of clang
+
+from TestToolset import test_toolset
+
+test_toolset("clang-vxworks", "4.0.1", [
+ ["target-os=vxworks"],
+ ["target-os=vxworks", "release", "strip=on", "linkflags=-t"],
+ ["target-os=vxworks", "threading=multi"],
+ ["target-os=vxworks", "link=static"],
+ ["target-os=vxworks", "link=static", "runtime-link=static"],
+ ["target-os=vxworks", "architecture=x86", "address-model=32"],
+ ["target-os=vxworks", "rtti=off", "exception-handling=off"]])
diff --git a/src/boost/tools/build/test/toolset_darwin.py b/src/boost/tools/build/test/toolset_darwin.py
new file mode 100644
index 000000000..58ecc8d2b
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_darwin.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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)
+
+# validates the darwin toolset using a mock of gcc
+
+from TestToolset import test_toolset
+
+test_toolset("darwin", "4.2.1", [
+ ["target-os=darwin"],
+ ["target-os=darwin", "release", "strip=on"],
+ ["target-os=darwin", "threading=multi"],
+ ["target-os=darwin", "link=static"],
+ ["target-os=darwin", "link=static", "runtime-link=static"],
+# Address-model handling is quite broken
+# ["target-os=darwin", "architecture=x86", "address-model=32"]
+])
diff --git a/src/boost/tools/build/test/toolset_defaults.py b/src/boost/tools/build/test/toolset_defaults.py
new file mode 100644
index 000000000..6d76c10fd
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_defaults.py
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+
+# Copyright 2018 Steven Watanabe
+# 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)
+
+# Test the handling of toolset.add-defaults
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0, ignore_toolset_requirements=False)
+
+t.write('jamroot.jam', '''
+import toolset ;
+import errors ;
+import feature : feature ;
+import set ;
+
+feature f1 : a b ;
+feature f2 : c d ;
+feature f3 : e f ;
+feature f4 : g h ;
+feature f5 : i j ;
+feature f6 : k l m ;
+
+rule test-rule ( properties * )
+{
+ if <f1>a in $(properties)
+ {
+ return <f2>d ;
+ }
+}
+
+toolset.add-defaults
+ <conditional>@test-rule
+ <f3>e:<f4>h
+ <f5>i:<f6>l
+;
+
+rule check-requirements ( target : sources * : properties * )
+{
+ local expected = <f2>d <f4>h <f6>m ;
+ local unexpected = <f2>c <f4>g <f6>k <f6>l ;
+ local missing = [ set.difference $(expected) : $(properties) ] ;
+ if $(missing)
+ {
+ errors.error $(missing) not present ;
+ }
+ local extra = [ set.intersection $(unexpected) : $(properties) ] ;
+ if $(extra)
+ {
+ errors.error $(extra) present ;
+ }
+}
+make test : : @check-requirements : <f6>m ;
+''')
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/toolset_gcc.py b/src/boost/tools/build/test/toolset_gcc.py
new file mode 100644
index 000000000..d3d65fcf9
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_gcc.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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)
+
+# validates the gcc toolset using a mock of gcc
+
+from TestToolset import test_toolset
+
+test_toolset("gcc", "4.8.3", [
+ ["target-os=linux"],
+ ["target-os=linux", "release"],
+ ["target-os=linux", "threading=multi"],
+ ["target-os=linux", "link=static"],
+ ["target-os=linux", "link=static", "runtime-link=static"],
+ ["target-os=linux", "cxxstd=latest"]])
+
+test_toolset("gcc", "4.2.1", [
+ ["target-os=darwin"],
+ ["target-os=darwin", "release"],
+ ["target-os=darwin", "threading=multi"],
+ ["target-os=darwin", "link=static"],
+ ["target-os=darwin", "link=static", "runtime-link=static"]])
diff --git a/src/boost/tools/build/test/toolset_intel_darwin.py b/src/boost/tools/build/test/toolset_intel_darwin.py
new file mode 100644
index 000000000..db0444900
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_intel_darwin.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Steven Watanabe
+#
+# 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)
+
+# validates the intel-darwin toolset using a mock of icc
+
+from TestToolset import test_toolset
+
+test_toolset("intel-darwin", "10.2", [
+ ["target-os=darwin"],
+ ["target-os=darwin", "release", "strip=on"],
+ ["target-os=darwin", "threading=multi"],
+ ["target-os=darwin", "link=static"],
+ ["target-os=darwin", "link=static", "runtime-link=static"],
+ ["target-os=darwin", "architecture=x86", "address-model=32"]])
diff --git a/src/boost/tools/build/test/toolset_requirements.py b/src/boost/tools/build/test/toolset_requirements.py
new file mode 100644
index 000000000..c9a8fa8ee
--- /dev/null
+++ b/src/boost/tools/build/test/toolset_requirements.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python
+
+# Copyright 2014 Steven Watanabe
+# 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)
+
+# Test the handling of toolset.add-requirements
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0, ignore_toolset_requirements=False)
+
+t.write('jamroot.jam', '''
+import toolset ;
+import errors ;
+
+rule test-rule ( properties * )
+{
+ return <define>TEST_INDIRECT_CONDITIONAL ;
+}
+
+toolset.add-requirements
+ <define>TEST_MACRO
+ <conditional>@test-rule
+ <link>shared:<define>TEST_CONDITIONAL
+;
+
+rule check-requirements ( target : sources * : properties * )
+{
+ local macros = TEST_MACRO TEST_CONDITIONAL TEST_INDIRECT_CONDITIONAL ;
+ for local m in $(macros)
+ {
+ if ! <define>$(m) in $(properties)
+ {
+ errors.error $(m) not defined ;
+ }
+ }
+}
+make test : : @check-requirements ;
+''')
+
+t.run_build_system()
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/tree.py b/src/boost/tools/build/test/tree.py
new file mode 100644
index 000000000..11899dd70
--- /dev/null
+++ b/src/boost/tools/build/test/tree.py
@@ -0,0 +1,245 @@
+# Copyright 2003 Dave Abrahams
+# Copyright 2001, 2002 Vladimir Prus
+# Copyright 2012 Jurko Gospodnetic
+# 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)
+
+###############################################################################
+#
+# Based in part on an old Subversion tree.py source file (tools for comparing
+# directory trees). See http://subversion.tigris.org for more information.
+#
+# Copyright (c) 2001 Sam Tobin-Hochstadt. All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which you should
+# have received as part of this distribution. The terms are also available at
+# http://subversion.tigris.org/license-1.html. If newer versions of this
+# license are posted there, you may use a newer version instead, at your
+# option.
+#
+###############################################################################
+
+from __future__ import print_function
+
+import os
+import os.path
+import stat
+import sys
+
+
+class TreeNode:
+ """
+ Fundamental data type used to build file system tree structures.
+
+ If CHILDREN is None, then the node represents a file. Otherwise, CHILDREN
+ is a list of the nodes representing that directory's children.
+
+ NAME is simply the name of the file or directory. CONTENTS is a string
+ holding the file's contents (if a file).
+
+ """
+
+ def __init__(self, name, children=None, contents=None):
+ assert children is None or contents is None
+ self.name = name
+ self.mtime = 0
+ self.children = children
+ self.contents = contents
+ self.path = name
+
+ def add_child(self, newchild):
+ assert not self.is_file()
+ for a in self.children:
+ if a.name == newchild.name:
+ if newchild.is_file():
+ a.contents = newchild.contents
+ a.path = os.path.join(self.path, newchild.name)
+ else:
+ for i in newchild.children:
+ a.add_child(i)
+ break
+ else:
+ self.children.append(newchild)
+ newchild.path = os.path.join(self.path, newchild.name)
+
+ def get_child(self, name):
+ """
+ If the given TreeNode directory NODE contains a child named NAME,
+ return the child; else, return None.
+
+ """
+ for n in self.children:
+ if n.name == name:
+ return n
+
+ def is_file(self):
+ return self.children is None
+
+ def pprint(self):
+ print(" * Node name: %s" % self.name)
+ print(" Path: %s" % self.path)
+ print(" Contents: %s" % self.contents)
+ if self.is_file():
+ print(" Children: is a file.")
+ else:
+ print(" Children: %d" % len(self.children))
+
+
+class TreeDifference:
+ def __init__(self):
+ self.added_files = []
+ self.removed_files = []
+ self.modified_files = []
+ self.touched_files = []
+
+ def append(self, other):
+ self.added_files.extend(other.added_files)
+ self.removed_files.extend(other.removed_files)
+ self.modified_files.extend(other.modified_files)
+ self.touched_files.extend(other.touched_files)
+
+ def ignore_directories(self):
+ """Removes directories from our lists of found differences."""
+ not_dir = lambda x : x[-1] != "/"
+ self.added_files = list(filter(not_dir, self.added_files))
+ self.removed_files = list(filter(not_dir, self.removed_files))
+ self.modified_files = list(filter(not_dir, self.modified_files))
+ self.touched_files = list(filter(not_dir, self.touched_files))
+
+ def pprint(self, file=sys.stdout):
+ file.write("Added files : %s\n" % self.added_files)
+ file.write("Removed files : %s\n" % self.removed_files)
+ file.write("Modified files: %s\n" % self.modified_files)
+ file.write("Touched files : %s\n" % self.touched_files)
+
+ def empty(self):
+ return not (self.added_files or self.removed_files or
+ self.modified_files or self.touched_files)
+
+
+def build_tree(path):
+ """
+ Takes PATH as the folder path, walks the file system below that path, and
+ creates a tree structure based on any files and folders found there.
+ Returns the prepared tree structure plus the maximum file modification
+ timestamp under the given folder.
+
+ """
+ return _handle_dir(os.path.normpath(path))
+
+
+def tree_difference(a, b):
+ """Compare TreeNodes A and B, and create a TreeDifference instance."""
+ return _do_tree_difference(a, b, "", True)
+
+
+def _do_tree_difference(a, b, parent_path, root=False):
+ """Internal recursive worker function for tree_difference()."""
+
+ # We do not want to list root node names.
+ if root:
+ assert not parent_path
+ assert not a.is_file()
+ assert not b.is_file()
+ full_path = ""
+ else:
+ assert a.name == b.name
+ full_path = parent_path + a.name
+ result = TreeDifference()
+
+ # A and B are both files.
+ if a.is_file() and b.is_file():
+ if a.contents != b.contents:
+ result.modified_files.append(full_path)
+ elif a.mtime != b.mtime:
+ result.touched_files.append(full_path)
+ return result
+
+ # Directory converted to file.
+ if not a.is_file() and b.is_file():
+ result.removed_files.extend(_traverse_tree(a, parent_path))
+ result.added_files.append(full_path)
+
+ # File converted to directory.
+ elif a.is_file() and not b.is_file():
+ result.removed_files.append(full_path)
+ result.added_files.extend(_traverse_tree(b, parent_path))
+
+ # A and B are both directories.
+ else:
+ if full_path:
+ full_path += "/"
+ accounted_for = [] # Children present in both trees.
+ for a_child in a.children:
+ b_child = b.get_child(a_child.name)
+ if b_child:
+ accounted_for.append(b_child)
+ result.append(_do_tree_difference(a_child, b_child, full_path))
+ else:
+ result.removed_files.append(full_path + a_child.name)
+ for b_child in b.children:
+ if b_child not in accounted_for:
+ result.added_files.extend(_traverse_tree(b_child, full_path))
+
+ return result
+
+
+def _traverse_tree(t, parent_path):
+ """Returns a list of all names in a tree."""
+ assert not parent_path or parent_path[-1] == "/"
+ full_node_name = parent_path + t.name
+ if t.is_file():
+ result = [full_node_name]
+ else:
+ name_prefix = full_node_name + "/"
+ result = [name_prefix]
+ for i in t.children:
+ result.extend(_traverse_tree(i, name_prefix))
+ return result
+
+
+def _get_text(path):
+ """Return a string with the textual contents of a file at PATH."""
+ fp = open(path, 'rb')
+ try:
+ return fp.read()
+ finally:
+ fp.close()
+
+
+def _handle_dir(path):
+ """
+ Main recursive worker function for build_tree(). Returns a newly created
+ tree node representing the given normalized folder path as well as the
+ maximum file/folder modification time detected under the same path.
+
+ """
+ files = []
+ dirs = []
+ node = TreeNode(os.path.basename(path), children=[])
+ max_mtime = node.mtime = os.stat(path).st_mtime
+
+ # List files & folders.
+ for f in os.listdir(path):
+ f = os.path.join(path, f)
+ if os.path.isdir(f):
+ dirs.append(f)
+ elif os.path.isfile(f):
+ files.append(f)
+
+ # Add a child node for each file.
+ for f in files:
+ fcontents = _get_text(f)
+ new_file_node = TreeNode(os.path.basename(f), contents=fcontents)
+ new_file_node.mtime = os.stat(f).st_mtime
+ max_mtime = max(max_mtime, new_file_node.mtime)
+ node.add_child(new_file_node)
+
+ # For each subdir, create a node, walk its tree, add it as a child.
+ for d in dirs:
+ new_dir_node, new_max_mtime = _handle_dir(d)
+ max_mtime = max(max_mtime, new_max_mtime)
+ node.add_child(new_dir_node)
+
+ return node, max_mtime
diff --git a/src/boost/tools/build/test/unit_test.py b/src/boost/tools/build/test/unit_test.py
new file mode 100644
index 000000000..da28503bc
--- /dev/null
+++ b/src/boost/tools/build/test/unit_test.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# Copyright 2003, 2004 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)
+
+# Test the unit_test rule.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+# Create the needed files.
+t.write("jamroot.jam", """
+using testing ;
+lib helper : helper.cpp ;
+unit-test test : test.cpp : <library>helper ;
+""")
+
+t.write("test.cpp", """
+void helper();
+int main() { helper(); }
+""")
+
+t.write("helper.cpp", """
+void
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+helper() {}
+""")
+
+t.run_build_system(["link=static"])
+t.expect_addition("bin/$toolset/debug/link-static*/test.passed")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/unit_tests.py b/src/boost/tools/build/test/unit_tests.py
new file mode 100644
index 000000000..705764b6b
--- /dev/null
+++ b/src/boost/tools/build/test/unit_tests.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+
+# Copyright 2002, 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(pass_toolset=0)
+t.run_build_system(["--debug", "--build-system=test/test"])
+t.cleanup()
diff --git a/src/boost/tools/build/test/unused.py b/src/boost/tools/build/test/unused.py
new file mode 100644
index 000000000..2b185d0de
--- /dev/null
+++ b/src/boost/tools/build/test/unused.py
@@ -0,0 +1,81 @@
+#!/usr/bin/python
+
+# Copyright 2003 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)
+
+# Test that unused sources are at least reported.
+
+import BoostBuild
+
+t = BoostBuild.Tester(["-d+2"], use_test_config=False)
+
+t.write("a.cpp", "int main() {}\n")
+t.write("b.cpp", "\n")
+t.write("b.xyz", "")
+t.write("jamroot.jam", """\
+import "class" : new ;
+import modules ;
+import project ;
+import targets ;
+import type ;
+import virtual-target ;
+
+type.register X : xyz ;
+
+class test-target-class : basic-target
+{
+ rule construct ( name : source-targets * : property-set )
+ {
+ local result = [ property-set.empty ] ;
+ if ! [ modules.peek : GENERATE_NOTHING ]
+ {
+ result += [ virtual-target.from-file b.xyz : . : $(self.project) ] ;
+ if ! [ modules.peek : GENERATE_ONLY_UNUSABLE ]
+ {
+ result += [ virtual-target.from-file b.cpp : . : $(self.project)
+ ] ;
+ }
+ }
+ return $(result) ;
+ }
+
+ rule compute-usage-requirements ( rproperties : targets * )
+ {
+ return [ property-set.create <define>FOO ] ;
+ }
+}
+
+rule make-b-main-target
+{
+ local project = [ project.current ] ;
+ targets.main-target-alternative [ new test-target-class b : $(project) ] ;
+}
+
+exe a : a.cpp b c ;
+make-b-main-target ;
+alias c ; # Expands to nothing, intentionally.
+""")
+
+t.run_build_system()
+
+# The second invocation should do nothing, and produce no warning. The previous
+# invocation might have printed executed actions and other things, so it is not
+# easy to check if a warning was issued or not.
+t.run_build_system(stdout="")
+
+t.run_build_system(["-sGENERATE_ONLY_UNUSABLE=1"], stdout="")
+
+# Check that even if main target generates nothing, its usage requirements are
+# still propagated to dependants.
+t.write("a.cpp", """\
+#ifndef FOO
+ #error We refuse to compile without FOO being defined!
+ We_refuse_to_compile_without_FOO_being_defined
+#endif
+int main() {}
+""")
+t.run_build_system(["-sGENERATE_NOTHING=1"])
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/use_requirements.py b/src/boost/tools/build/test/use_requirements.py
new file mode 100644
index 000000000..366281509
--- /dev/null
+++ b/src/boost/tools/build/test/use_requirements.py
@@ -0,0 +1,283 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2002, 2003, 2004, 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)
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+
+# Test that usage requirements on main targets work (and are propagated all the
+# way up, and not only to direct dependants).
+t.write("jamroot.jam", "")
+
+# Note: 'lib cc ..', not 'lib c'. If using 'lib c: ...' the HP-CXX linker will
+# confuse it with the system C runtime.
+t.write("jamfile.jam", """\
+lib b : b.cpp : <link>shared:<define>SHARED_B : :
+ <define>FOO <link>shared:<define>SHARED_B ;
+lib cc : c.cpp b ;
+exe a : a.cpp cc ;
+""")
+
+t.write("b.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+t.write("c.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+#endif
+create_lib_please() {}
+""")
+
+t.write("a.cpp", """\
+#ifdef FOO
+void
+# if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+# endif
+foo() {}
+#endif
+int main() { foo(); }
+""")
+
+t.run_build_system()
+t.run_build_system(["--clean"])
+
+
+# Test that use requirements on main target work, when they are referred using
+# 'dependency' features.
+
+t.write("jamfile.jam", """\
+lib b : b.cpp : <link>shared:<define>SHARED_B : : <define>FOO
+ <link>shared:<define>SHARED_B ;
+exe a : a.cpp : <use>b ;
+""")
+
+t.write("b.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+t.write("a.cpp", """\
+#ifdef FOO
+int main() {}
+#endif
+""")
+
+t.run_build_system()
+t.run_build_system(["--clean"])
+
+
+# Test that usage requirements on a project work.
+t.write("jamfile.jam", "exe a : a.cpp lib//b ;")
+
+t.write("lib/jamfile.jam", """\
+project
+ : requirements <link>shared:<define>SHARED_B
+ : usage-requirements <define>FOO <link>shared:<define>SHARED_B ;
+lib b : b.cpp ;
+""")
+
+t.write("lib/b.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+t.run_build_system()
+
+
+# Test that use requirements are inherited correctly.
+t.write("jamfile.jam", "exe a : a.cpp lib/1//b ;")
+
+t.write("a.cpp", """\
+#if defined(FOO) && defined(ZOO)
+void foo() {}
+#endif
+int main() { foo(); }
+""")
+
+t.write("lib/jamfile.jam", """\
+project : requirements : usage-requirements <define>FOO ;
+""")
+
+t.write("lib/1/jamfile.jam", """\
+project
+ : requirements <link>shared:<define>SHARED_B
+ : usage-requirements <define>ZOO <link>shared:<define>SHARED_B ;
+lib b : b.cpp ;
+""")
+
+t.write("lib/1/b.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+t.run_build_system()
+t.run_build_system(["--clean"])
+
+
+# Test that we correctly handle dependency features in usage requirements on
+# target.
+t.write("jamfile.jam", """\
+lib b : b.cpp : <link>shared:<define>SHARED_B : : <define>FOO
+ <link>shared:<define>SHARED_B ;
+
+# Here's the test: we should correctly handle dependency feature and get usage
+# requirements from 'b'.
+lib cc : c.cpp : <link>shared:<define>SHARED_C : : <library>b ;
+
+# This will build only if <define>FOO was propagated from 'c'.
+exe a : a.cpp cc ;
+""")
+
+t.write("a.cpp", """\
+#ifdef FOO
+void
+# if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+# endif
+foo();
+#endif
+
+int main() { foo(); }
+""")
+
+t.write("c.cpp", """\
+int
+#if defined(_WIN32) && defined(SHARED_C)
+__declspec(dllexport)
+#endif
+must_export_something;
+""")
+
+t.run_build_system()
+t.run_build_system(["--clean"])
+
+
+# Test correct handling of dependency features in project requirements.
+t.write("jamfile.jam", "exe a : a.cpp lib1//cc ;")
+
+t.write("lib1/jamfile.jam", """\
+project
+ : requirements <link>shared:<define>SHARED_C
+ : usage-requirements <library>../lib2//b <link>shared:<define>SHARED_C ;
+lib cc : c.cpp ;
+""")
+
+t.write("lib1/c.cpp", """\
+int
+#if defined(_WIN32) && defined(SHARED_C)
+__declspec(dllexport)
+#endif
+must_export_something;
+""")
+
+t.write("lib2/jamfile.jam", """\
+lib b : b.cpp : <link>shared:<define>SHARED_B : : <define>FOO
+ <link>shared:<define>SHARED_B ;
+""")
+
+t.copy("b.cpp", "lib2/b.cpp")
+
+t.run_build_system()
+
+
+# Test that targets listed in dependency features in usage requirements are
+# built with the correct properties.
+t.rm(".")
+
+t.write("jamroot.jam", "")
+t.write("jamfile.jam", """\
+lib main : main.cpp : <use>libs//lib1 : : <library>libs//lib1 ;
+exe hello : hello.cpp main : ;
+""")
+
+t.write("main.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_LIB1)
+__declspec(dllimport)
+#endif
+foo();
+
+int main() { foo(); }
+""")
+
+t.write("hello.cpp", "\n")
+t.write("libs/a.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_LIB1)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+
+# This library should be built with the same properties as 'main'. This is a
+# regression test for a bug when they were generated with empty properties, and
+# there were ambiguities between variants.
+t.write("libs/jamfile.jam", """\
+lib lib1 : a_d.cpp : <variant>debug <link>shared:<define>SHARED_LIB1 : :
+ <link>shared:<define>SHARED_LIB1 ;
+lib lib1 : a.cpp : <variant>release <link>shared:<define>SHARED_LIB1 : :
+ <link>shared:<define>SHARED_LIB1 ;
+""")
+
+t.write("libs/a_d.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_LIB1)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+t.run_build_system(["link=static"])
+t.expect_addition("libs/bin/$toolset/debug/link-static*/a_d.obj")
+
+
+# Test that indirect conditionals are respected in usage requirements.
+t.rm(".")
+
+t.write("jamroot.jam", """\
+rule has-foo ( properties * ) { return <define>HAS_FOO ; }
+exe a : a.cpp b ;
+lib b : b.cpp : <link>static : : <conditional>@has-foo ;
+""")
+
+t.write("a.cpp", """\
+#ifdef HAS_FOO
+void foo();
+int main() { foo(); }
+#endif
+""")
+
+t.write("b.cpp", """\
+void
+#if defined(_WIN32) && defined(SHARED_B)
+__declspec(dllexport)
+#endif
+foo() {}
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/using.py b/src/boost/tools/build/test/using.py
new file mode 100644
index 000000000..495f412b1
--- /dev/null
+++ b/src/boost/tools/build/test/using.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+
+# Copyright (C) Vladimir Prus 2005.
+# 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 BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamroot.jam", "using some_tool ;")
+t.write("some_tool.jam", """\
+import project ;
+project.initialize $(__name__) ;
+rule init ( ) { }
+""")
+
+t.write("some_tool.py", """\
+from b2.manager import get_manager
+get_manager().projects().initialize(__name__)
+def init():
+ pass
+""")
+
+t.write("sub/a.cpp", "int main() {}\n")
+t.write("sub/jamfile.jam", "exe a : a.cpp ;")
+
+t.run_build_system(subdir="sub")
+t.expect_addition("sub/bin/$toolset/debug*/a.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/wrapper.py b/src/boost/tools/build/test/wrapper.py
new file mode 100644
index 000000000..1adeb2c90
--- /dev/null
+++ b/src/boost/tools/build/test/wrapper.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+
+# Copyright 2004 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)
+
+# Test that the user can define his own rule that will call built-in main target
+# rule and that this will work.
+
+import BoostBuild
+
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("jamfile.jam", """
+my-test : test.cpp ;
+""")
+
+t.write("test.cpp", """
+int main() {}
+""")
+
+t.write("jamroot.jam", """
+using testing ;
+
+rule my-test ( name ? : sources + )
+{
+ name ?= test ;
+ unit-test $(name) : $(sources) ; # /site-config//cppunit /util//testMain ;
+}
+
+IMPORT $(__name__) : my-test : : my-test ;
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/test.passed")
+
+t.cleanup()
diff --git a/src/boost/tools/build/test/wrong_project.py b/src/boost/tools/build/test/wrong_project.py
new file mode 100644
index 000000000..7183a6062
--- /dev/null
+++ b/src/boost/tools/build/test/wrong_project.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+
+# Copyright Vladimir Prus 2005.
+# 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)
+
+# Regression test. When Jamfile contained "using whatever ; " and the 'whatever'
+# module declared a project, then all targets in Jamfile were considered to be
+# declared in the project associated with 'whatever', not with the Jamfile.
+
+import BoostBuild
+
+t = BoostBuild.Tester(use_test_config=False)
+
+t.write("a.cpp", "int main() {}\n")
+
+t.write("jamroot.jam", """\
+using some_tool ;
+exe a : a.cpp ;
+""")
+
+t.write("some_tool.jam", """\
+import project ;
+project.initialize $(__name__) ;
+rule init ( ) { }
+""")
+
+t.write("some_tool.py", """\
+from b2.manager import get_manager
+get_manager().projects().initialize(__name__)
+def init():
+ pass
+""")
+
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug*/a.exe")
+
+t.cleanup()
diff --git a/src/boost/tools/check_build/README.md b/src/boost/tools/check_build/README.md
new file mode 100644
index 000000000..bb5f25575
--- /dev/null
+++ b/src/boost/tools/check_build/README.md
@@ -0,0 +1,3 @@
+# check_build
+
+A utility submodule that, for each buildable Boost library, creates a test that builds the library.
diff --git a/src/boost/tools/check_build/test/Jamfile b/src/boost/tools/check_build/test/Jamfile
new file mode 100644
index 000000000..6424a4089
--- /dev/null
+++ b/src/boost/tools/check_build/test/Jamfile
@@ -0,0 +1,91 @@
+# 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 modules ;
+import sequence ;
+import set ;
+import project ;
+import virtual-target ;
+import testing ;
+import ac ;
+
+project : requirements -<link>static ; # from tools/Jamfile
+
+if "--debug-check-build" in [ modules.peek : ARGV ]
+{
+ .info-enabled = 1 ;
+}
+
+local rule .info ( messages * )
+{
+ if $(.info-enabled)
+ {
+ ECHO "info:" $(messages) ;
+ }
+}
+
+local all-libraries = [ MATCH .*libs/(.*)/build/.* :
+ [ glob ../../../libs/*/build/Jamfile.v2 ]
+ [ glob ../../../libs/*/build/Jamfile ] ] ;
+
+all-libraries = [ sequence.unique $(all-libraries) ] ;
+
+# The function_types library has a Jamfile, but it's used for maintenance
+# purposes, there's no library to build and install.
+
+all-libraries = [ set.difference $(all-libraries) : function_types ] ;
+
+#ECHO all-libraries: $(all-libraries) ;
+
+rule alias-sources-impl ( project name : property-set : sources * )
+{
+ local target-graph ;
+
+ for local s in $(sources)
+ {
+ target-graph += [ virtual-target.traverse $(s) : include-sources : include-roots ] ;
+ }
+
+ # Remove targets created by the main target
+
+ local result ;
+
+ for local t in $(target-graph)
+ {
+ if [ $(t).root ] && ! ( $(t) in $(sources) ) && ( [ $(t).type ] = STATIC_LIB || [ $(t).type ] = SHARED_LIB )
+ {
+ result += $(t) ;
+ }
+ }
+
+ .info "$(name):" ;
+
+ for local t in $(result)
+ {
+ .info " " [ $(t).name ] ;
+ }
+
+ return $(result) ;
+}
+
+path-constant ROOT : ../../.. ;
+
+for local lib in $(all-libraries)
+{
+ local path = [ NORMALIZE_PATH /$(ROOT)/libs/$(lib)/build ] ;
+ generate library-$(lib) : $(path)//stage : <generating-rule>@alias-sources-impl ;
+}
+
+for local lib in $(all-libraries)
+{
+ local python-dep ;
+
+ if $(lib) in python mpi graph_parallel
+ {
+ python-dep = /python//python ;
+ }
+
+ run main.cpp : : : [ ac.check-library library-$(lib) : <library>library-$(lib) <library>$(python-dep) : <build>no ] : $(lib) ;
+}
diff --git a/src/boost/tools/check_build/test/main.cpp b/src/boost/tools/check_build/test/main.cpp
new file mode 100644
index 000000000..5047a34e3
--- /dev/null
+++ b/src/boost/tools/check_build/test/main.cpp
@@ -0,0 +1,3 @@
+int main()
+{
+}
diff --git a/src/boost/tools/cmake/README.md b/src/boost/tools/cmake/README.md
new file mode 100644
index 000000000..dbc34d36c
--- /dev/null
+++ b/src/boost/tools/cmake/README.md
@@ -0,0 +1,5 @@
+# tools/cmake
+
+This repository hosts the `tools/cmake` Boost submodule, containing experimental CMake support infrastructure for Boost.
+
+Note that building Boost with CMake _does not work yet and is not supported_. The supported way to build Boost is [with `b2`](https://www.boost.org/more/getting_started/index.html).
diff --git a/src/boost/tools/cmake/include/BoostFetch.cmake b/src/boost/tools/cmake/include/BoostFetch.cmake
new file mode 100644
index 000000000..327976632
--- /dev/null
+++ b/src/boost/tools/cmake/include/BoostFetch.cmake
@@ -0,0 +1,97 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+if(NOT CMAKE_VERSION VERSION_LESS 3.10)
+ include_guard()
+endif()
+
+if(NOT COMMAND FetchContent_Populate)
+
+ if(CMAKE_VERSION VERSION_LESS 3.11)
+
+ message(STATUS "Fetching FetchContent.cmake")
+
+ file(DOWNLOAD
+ "https://gitlab.kitware.com/cmake/cmake/raw/v3.11.3/Modules/FetchContent.cmake"
+ "${CMAKE_BINARY_DIR}/Modules/FetchContent.cmake"
+ )
+
+ file(DOWNLOAD
+ "https://gitlab.kitware.com/cmake/cmake/raw/v3.11.3/Modules/FetchContent/CMakeLists.cmake.in"
+ "${CMAKE_BINARY_DIR}/Modules/FetchContent/CMakeLists.cmake.in"
+ )
+
+ include(${CMAKE_BINARY_DIR}/Modules/FetchContent.cmake)
+
+ else()
+
+ include(FetchContent)
+
+ endif()
+
+endif()
+
+function(boost_fetch)
+
+ cmake_parse_arguments(_ "EXCLUDE_FROM_ALL;NO_ADD_SUBDIR" "TAG" "" ${ARGN})
+
+ if(NOT __UNPARSED_ARGUMENTS)
+
+ message(FATAL_ERROR "boost_fetch: missing required argument, repository name")
+ return()
+
+ endif()
+
+ list(GET __UNPARSED_ARGUMENTS 0 REPO)
+ list(REMOVE_AT __UNPARSED_ARGUMENTS 0)
+
+ if(__UNPARSED_ARGUMENTS)
+
+ message(AUTHOR_WARNING "boost_fetch: extra arguments ignored: ${__UNPARSED_ARGUMENTS}")
+
+ endif()
+
+ if(NOT __TAG)
+
+ set(__TAG master)
+
+ endif()
+
+ string(MAKE_C_IDENTIFIER ${REPO} NAME)
+
+ if(CMAKE_VERSION VERSION_LESS 3.6)
+
+ FetchContent_Declare(${NAME} QUIET GIT_REPOSITORY "https://github.com/${REPO}" GIT_TAG ${__TAG})
+
+ else()
+
+ FetchContent_Declare(${NAME} QUIET GIT_REPOSITORY "https://github.com/${REPO}" GIT_TAG ${__TAG} GIT_SHALLOW 1)
+
+ endif()
+
+ FetchContent_GetProperties(${NAME})
+
+ if(NOT ${NAME}_POPULATED)
+
+ message(STATUS "Fetching ${REPO}:${__TAG}")
+
+ FetchContent_Populate(${NAME})
+
+ if(__NO_ADD_SUBDIR)
+
+ # Skip add_subdirectory
+
+ elseif(__EXCLUDE_FROM_ALL)
+
+ add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR} EXCLUDE_FROM_ALL)
+
+ else()
+
+ add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
+
+ endif()
+
+ endif()
+
+endfunction(boost_fetch)
diff --git a/src/boost/tools/cmake/include/BoostInstall.cmake b/src/boost/tools/cmake/include/BoostInstall.cmake
new file mode 100644
index 000000000..7289bff2a
--- /dev/null
+++ b/src/boost/tools/cmake/include/BoostInstall.cmake
@@ -0,0 +1,345 @@
+# Copyright 2019, 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
+
+if(NOT CMAKE_VERSION VERSION_LESS 3.10)
+ include_guard()
+endif()
+
+include(BoostMessage)
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
+# Variables
+
+if(WIN32)
+ set(__boost_default_layout "versioned")
+else()
+ set(__boost_default_layout "system")
+endif()
+
+set(BOOST_INSTALL_LAYOUT ${__boost_default_layout} CACHE STRING "Installation layout (versioned, tagged, or system)")
+set_property(CACHE BOOST_INSTALL_LAYOUT PROPERTY STRINGS versioned tagged system)
+
+set(BOOST_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Installation directory for library files")
+set(BOOST_INSTALL_CMAKEDIR "${BOOST_INSTALL_LIBDIR}/cmake" CACHE STRING "Installation directory for CMake configuration files")
+set(BOOST_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "Installation directory for header files")
+
+if(BOOST_INSTALL_LAYOUT STREQUAL "versioned")
+ set(BOOST_INSTALL_INCLUDEDIR "$CACHE{BOOST_INSTALL_INCLUDEDIR}/boost-${PROJECT_VERSION_MAJOR}_${PROJECT_VERSION_MINOR}")
+endif()
+
+#
+
+function(__boost_install_set_output_name LIB TYPE VERSION)
+
+ set(name_debug ${LIB})
+ set(name_release ${LIB})
+
+ # prefix
+ if(WIN32 AND TYPE STREQUAL "STATIC_LIBRARY")
+ set_target_properties(${LIB} PROPERTIES PREFIX "lib")
+ endif()
+
+ # toolset
+ if(BOOST_INSTALL_LAYOUT STREQUAL versioned)
+
+ string(TOLOWER ${CMAKE_CXX_COMPILER_ID} toolset)
+
+ if(toolset STREQUAL "msvc")
+
+ set(toolset "vc")
+
+ if(CMAKE_CXX_COMPILER_VERSION MATCHES "^([0-9]+)[.]([0-9]+)")
+
+ if(CMAKE_MATCH_1 GREATER 18)
+ math(EXPR major ${CMAKE_MATCH_1}-5)
+ else()
+ math(EXPR major ${CMAKE_MATCH_1}-6)
+ endif()
+
+ math(EXPR minor ${CMAKE_MATCH_2}/10)
+
+ string(APPEND toolset ${major}${minor})
+
+ endif()
+
+ else()
+
+ if(toolset STREQUAL "gnu")
+
+ set(toolset "gcc")
+
+ elseif(toolset STREQUAL "clang")
+
+ if(MSVC)
+ set(toolset "clangw")
+ endif()
+
+ endif()
+
+ if(CMAKE_CXX_COMPILER_VERSION MATCHES "^([0-9]+)[.]")
+ string(APPEND toolset ${CMAKE_MATCH_1})
+ endif()
+
+ endif()
+
+ string(APPEND name_debug "-${toolset}")
+ string(APPEND name_release "-${toolset}")
+
+ endif()
+
+ if(BOOST_INSTALL_LAYOUT STREQUAL versioned OR BOOST_INSTALL_LAYOUT STREQUAL tagged)
+
+ # threading
+ string(APPEND name_debug "-mt")
+ string(APPEND name_release "-mt")
+
+ # ABI tag
+
+ if(MSVC)
+
+ get_target_property(MSVC_RUNTIME_LIBRARY ${LIB} MSVC_RUNTIME_LIBRARY)
+
+ if(MSVC_RUNTIME_LIBRARY STREQUAL "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+
+ string(APPEND name_debug "-sgd")
+ string(APPEND name_release "-s")
+
+ else()
+
+ string(APPEND name_debug "-gd")
+
+ endif()
+
+ else()
+
+ string(APPEND name_debug "-d")
+
+ endif()
+
+ # Arch and model
+ math(EXPR bits ${CMAKE_SIZEOF_VOID_P}*8)
+
+ string(APPEND name_debug "-x${bits}") # x86 only for now
+ string(APPEND name_release "-x${bits}")
+
+ endif()
+
+ if(BOOST_INSTALL_LAYOUT STREQUAL versioned)
+
+ string(REGEX REPLACE "^([0-9]+)[.]([0-9]+).*" "\\1_\\2" __ver ${VERSION})
+
+ string(APPEND name_debug "-${__ver}")
+ string(APPEND name_release "-${__ver}")
+
+ endif()
+
+ set_target_properties(${LIB} PROPERTIES OUTPUT_NAME_DEBUG ${name_debug})
+ set_target_properties(${LIB} PROPERTIES OUTPUT_NAME ${name_release})
+
+ if(TYPE STREQUAL "STATIC_LIBRARY")
+
+ set_target_properties(${LIB} PROPERTIES COMPILE_PDB_NAME_DEBUG "${name_debug}")
+ set_target_properties(${LIB} PROPERTIES COMPILE_PDB_NAME "${name_release}")
+
+ endif()
+
+endfunction()
+
+function(__boost_install_update_include_directory lib incdir prop)
+
+ get_target_property(value ${lib} ${prop})
+
+ if(value STREQUAL incdir)
+
+ set_target_properties(${lib} PROPERTIES ${prop} "$<BUILD_INTERFACE:${incdir}>;$<INSTALL_INTERFACE:${BOOST_INSTALL_INCLUDEDIR}>")
+
+ endif()
+
+endfunction()
+
+# Installs a single target
+# boost_install_target(TARGET target VERSION version [HEADER_DIRECTORY directory])
+
+function(boost_install_target)
+
+ cmake_parse_arguments(_ "" "TARGET;VERSION;HEADER_DIRECTORY" "" ${ARGN})
+
+ if(NOT __TARGET)
+
+ message(SEND_ERROR "boost_install_target: TARGET not given.")
+ return()
+
+ endif()
+
+ if(NOT __VERSION)
+
+ message(SEND_ERROR "boost_install_target: VERSION not given, but is required for installation.")
+ return()
+
+ endif()
+
+ set(LIB ${__TARGET})
+
+ if(NOT __HEADER_DIRECTORY)
+
+ set(__HEADER_DIRECTORY "${PROJECT_SOURCE_DIR}/include")
+
+ endif()
+
+ get_target_property(TYPE ${LIB} TYPE)
+
+ __boost_install_update_include_directory(${LIB} "${__HEADER_DIRECTORY}" INTERFACE_INCLUDE_DIRECTORIES)
+
+ if(TYPE STREQUAL "STATIC_LIBRARY" OR TYPE STREQUAL "SHARED_LIBRARY")
+
+ __boost_install_update_include_directory(${LIB} "${__HEADER_DIRECTORY}" INCLUDE_DIRECTORIES)
+
+ get_target_property(OUTPUT_NAME ${LIB} OUTPUT_NAME)
+
+ if(NOT OUTPUT_NAME)
+ __boost_install_set_output_name(${LIB} ${TYPE} ${__VERSION})
+ endif()
+
+ endif()
+
+ if(TYPE STREQUAL "SHARED_LIBRARY" OR TYPE STREQUAL "EXECUTABLE")
+
+ get_target_property(VERSION ${LIB} VERSION)
+
+ if(NOT VERSION)
+ set_target_properties(${LIB} PROPERTIES VERSION ${__VERSION})
+ endif()
+
+ endif()
+
+ if(LIB MATCHES "^boost_(.*)$")
+ set_target_properties(${LIB} PROPERTIES EXPORT_NAME ${CMAKE_MATCH_1})
+ endif()
+
+ set(CONFIG_INSTALL_DIR "${BOOST_INSTALL_CMAKEDIR}/${LIB}-${__VERSION}")
+
+ install(TARGETS ${LIB} EXPORT ${LIB}-targets DESTINATION ${BOOST_INSTALL_LIBDIR})
+
+ if(WIN32 AND TYPE STREQUAL "SHARED_LIBRARY")
+
+ install(FILES $<TARGET_PDB_FILE:${LIB}> DESTINATION ${BOOST_INSTALL_LIBDIR} OPTIONAL)
+
+ endif()
+
+ if(WIN32 AND TYPE STREQUAL "STATIC_LIBRARY" AND NOT CMAKE_VERSION VERSION_LESS 3.15)
+
+ install(FILES "$<TARGET_FILE_DIR:${LIB}>/$<TARGET_FILE_PREFIX:${LIB}>$<TARGET_FILE_BASE_NAME:${LIB}>.pdb" DESTINATION ${BOOST_INSTALL_LIBDIR} OPTIONAL)
+
+ endif()
+
+ install(EXPORT ${LIB}-targets DESTINATION "${CONFIG_INSTALL_DIR}" NAMESPACE Boost:: FILE ${LIB}-targets.cmake)
+
+ set(CONFIG_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/tmpinst/${LIB}-config.cmake")
+ set(CONFIG_FILE_CONTENTS "# Generated by BoostInstall.cmake for ${LIB}-${__VERSION}\n\n")
+
+ get_target_property(INTERFACE_LINK_LIBRARIES ${LIB} INTERFACE_LINK_LIBRARIES)
+
+ set(LINK_LIBRARIES "")
+
+ if(TYPE STREQUAL "STATIC_LIBRARY" OR TYPE STREQUAL "SHARED_LIBRARY")
+ get_target_property(LINK_LIBRARIES ${LIB} LINK_LIBRARIES)
+ endif()
+
+ if(INTERFACE_LINK_LIBRARIES OR LINK_LIBRARIES)
+
+ string(APPEND CONFIG_FILE_CONTENTS "include(CMakeFindDependencyMacro)\n\n")
+
+ foreach(dep IN LISTS INTERFACE_LINK_LIBRARIES LINK_LIBRARIES)
+
+ if(${dep} MATCHES "^Boost::(.*)$")
+
+ string(APPEND CONFIG_FILE_CONTENTS "find_dependency(boost_${CMAKE_MATCH_1} ${__VERSION} EXACT)\n")
+
+ endif()
+
+ endforeach()
+
+ string(APPEND CONFIG_FILE_CONTENTS "\n")
+
+ endif()
+
+ string(APPEND CONFIG_FILE_CONTENTS "include(\"\${CMAKE_CURRENT_LIST_DIR}/${LIB}-targets.cmake\")\n")
+
+ file(WRITE "${CONFIG_FILE_NAME}" "${CONFIG_FILE_CONTENTS}")
+ install(FILES "${CONFIG_FILE_NAME}" DESTINATION "${CONFIG_INSTALL_DIR}")
+
+ set(CONFIG_VERSION_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/tmpinst/${LIB}-config-version.cmake")
+
+ if(TYPE STREQUAL "INTERFACE_LIBRARY")
+
+ # Header-only libraries are architecture-independent
+
+ if(NOT CMAKE_VERSION VERSION_LESS 3.14)
+
+ write_basic_package_version_file("${CONFIG_VERSION_FILE_NAME}" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
+
+ else()
+
+ set(OLD_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
+ set(CMAKE_SIZEOF_VOID_P "")
+
+ write_basic_package_version_file("${CONFIG_VERSION_FILE_NAME}" COMPATIBILITY AnyNewerVersion)
+
+ set(CMAKE_SIZEOF_VOID_P ${OLD_CMAKE_SIZEOF_VOID_P})
+
+ endif()
+
+ else()
+
+ write_basic_package_version_file("${CONFIG_VERSION_FILE_NAME}" COMPATIBILITY AnyNewerVersion)
+
+ endif()
+
+ install(FILES "${CONFIG_VERSION_FILE_NAME}" DESTINATION "${CONFIG_INSTALL_DIR}")
+
+endfunction()
+
+# boost_install([VERSION version] [TARGETS targets...] [HEADER_DIRECTORY directory])
+
+function(boost_install)
+
+ cmake_parse_arguments(_ "" "VERSION;HEADER_DIRECTORY" "TARGETS" ${ARGN})
+
+ if(NOT __VERSION)
+
+ if(NOT PROJECT_VERSION)
+
+ message(AUTHOR_WARNING "boost_install: VERSION not given, PROJECT_VERSION not set, but a version is required for installation.")
+ return()
+
+ else()
+
+ boost_message(DEBUG "boost_install: VERSION not given, assuming PROJECT_VERSION ('${PROJECT_VERSION}')")
+ set(__VERSION ${PROJECT_VERSION})
+
+ endif()
+
+ endif()
+
+ if(__UNPARSED_ARGUMENTS)
+
+ message(AUTHOR_WARNING "boost_install: extra arguments ignored: ${__UNPARSED_ARGUMENTS}")
+
+ endif()
+
+ if(__HEADER_DIRECTORY)
+
+ get_filename_component(__HEADER_DIRECTORY "${__HEADER_DIRECTORY}" ABSOLUTE)
+ install(DIRECTORY "${__HEADER_DIRECTORY}/" DESTINATION "${BOOST_INSTALL_INCLUDEDIR}")
+
+ endif()
+
+ foreach(target IN LISTS __TARGETS)
+
+ boost_install_target(TARGET ${target} VERSION ${__VERSION} HEADER_DIRECTORY ${__HEADER_DIRECTORY})
+
+ endforeach()
+
+endfunction()
diff --git a/src/boost/tools/cmake/include/BoostMessage.cmake b/src/boost/tools/cmake/include/BoostMessage.cmake
new file mode 100644
index 000000000..f827f82b6
--- /dev/null
+++ b/src/boost/tools/cmake/include/BoostMessage.cmake
@@ -0,0 +1,45 @@
+# 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
+
+if(NOT CMAKE_VERSION VERSION_LESS 3.10)
+ include_guard()
+endif()
+
+# boost_message(
+# [FATAL_ERROR|SEND_ERROR|WARNING|AUTHOR_WARNING|DEPRECATION|NOTICE|STATUS
+# |VERBOSE|DEBUG]
+# messages...)
+
+function(boost_message type)
+
+ if(type STREQUAL "VERBOSE")
+ if(Boost_VERBOSE OR Boost_DEBUG)
+ set(type STATUS)
+ elseif(CMAKE_VERSION VERSION_LESS 3.15)
+ return()
+ endif()
+ endif()
+
+ if(type STREQUAL "DEBUG")
+ if(Boost_DEBUG)
+ set(type STATUS)
+ elseif(CMAKE_VERSION VERSION_LESS 3.15)
+ return()
+ endif()
+ endif()
+
+ if(type STREQUAL "NOTICE" AND CMAKE_VERSION VERSION_LESS 3.15)
+ set(type "")
+ endif()
+
+ set(m "")
+ math(EXPR last "${ARGC}-1")
+
+ foreach(i RANGE 1 ${last})
+ string(APPEND m "${ARGV${i}}")
+ endforeach()
+
+ message(${type} "${m}")
+
+endfunction()
diff --git a/src/boost/tools/cmake/include/BoostRoot.cmake b/src/boost/tools/cmake/include/BoostRoot.cmake
new file mode 100644
index 000000000..7b2ef9a57
--- /dev/null
+++ b/src/boost/tools/cmake/include/BoostRoot.cmake
@@ -0,0 +1,220 @@
+# Copyright 2019, 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
+
+if(CMAKE_SOURCE_DIR STREQUAL Boost_SOURCE_DIR AND WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+
+ set(CMAKE_INSTALL_PREFIX "C:/Boost" CACHE PATH "Installation path prefix, prepended to installation directories" FORCE)
+
+endif()
+
+if(NOT BOOST_ENABLE_CMAKE)
+
+ message(FATAL_ERROR
+ "CMake support in Boost is experimental and part of an ongoing "
+ "development effort. It's not ready for use yet. Please use b2 "
+ "(Boost.Build) to build and install Boost.")
+
+endif()
+
+include(BoostMessage)
+include(BoostInstall)
+
+# --with-<library>
+set(BOOST_INCLUDE_LIBRARIES "" CACHE STRING "List of libraries to build (default: all but excluded and incompatible)")
+
+# --without-<library>
+set(BOOST_EXCLUDE_LIBRARIES "" CACHE STRING "List of libraries to exclude from build")
+
+set(BOOST_INCOMPATIBLE_LIBRARIES beast;callable_traits;compute;gil;hana;hof;safe_numerics;serialization;static_string;yap CACHE STRING "List of libraries with incompatible CMakeLists.txt files")
+
+# --layout, --libdir, --cmakedir, --includedir in BoostInstall
+
+# runtime-link=static|shared
+
+set(BOOST_RUNTIME_LINK shared CACHE STRING "Runtime library selection for the MS ABI (shared or static)")
+set_property(CACHE BOOST_RUNTIME_LINK PROPERTY STRINGS shared static)
+
+if(NOT CMAKE_MSVC_RUNTIME_LIBRARY)
+
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+
+ if(NOT BOOST_RUNTIME_LINK STREQUAL "static")
+ string(APPEND CMAKE_MSVC_RUNTIME_LIBRARY "DLL")
+ endif()
+
+endif()
+
+# Functions
+
+function(__boost_auto_install __boost_lib)
+ if(NOT CMAKE_VERSION VERSION_LESS 3.13)
+
+ string(MAKE_C_IDENTIFIER "${__boost_lib}" __boost_lib_target)
+
+ if(TARGET "Boost::${__boost_lib_target}" AND TARGET "boost_${__boost_lib_target}")
+
+ get_target_property(__boost_lib_incdir "boost_${__boost_lib_target}" INTERFACE_INCLUDE_DIRECTORIES)
+
+ if(__boost_lib_incdir STREQUAL "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/${__boost_lib}/include")
+
+ boost_message(DEBUG "Enabling installation for '${__boost_lib}'")
+ boost_install(TARGETS "boost_${__boost_lib_target}" VERSION "${BOOST_SUPERPROJECT_VERSION}" HEADER_DIRECTORY "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/${__boost_lib}/include")
+
+ else()
+ boost_message(DEBUG "Not enabling installation for '${__boost_lib}'; interface include directory '${__boost_lib_incdir}' does not equal '${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/${__boost_lib}/include'")
+ endif()
+
+ else()
+ boost_message(DEBUG "Not enabling installation for '${__boost_lib}'; targets 'Boost::${__boost_lib_target}' and 'boost_${__boost_lib_target}' weren't found")
+ endif()
+
+ endif()
+endfunction()
+
+function(__boost_scan_dependencies lib var)
+
+ file(STRINGS "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/${lib}/CMakeLists.txt" data)
+
+ set(result "")
+
+ foreach(line IN LISTS data)
+
+ if(line MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$")
+
+ string(REGEX REPLACE "^numeric_" "numeric/" dep ${CMAKE_MATCH_1})
+ list(APPEND result ${dep})
+
+ endif()
+
+ endforeach()
+
+ set(${var} ${result} PARENT_SCOPE)
+
+endfunction()
+
+#
+
+if(CMAKE_SOURCE_DIR STREQUAL Boost_SOURCE_DIR)
+
+ include(CTest)
+ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
+
+ # link=static|shared
+ option(BUILD_SHARED_LIBS "Build shared libraries")
+
+ # --stagedir
+ set(BOOST_STAGEDIR "${CMAKE_CURRENT_BINARY_DIR}/stage" CACHE STRING "Build output directory")
+
+ if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BOOST_STAGEDIR}/bin")
+ endif()
+
+ if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BOOST_STAGEDIR}/lib")
+ endif()
+
+ if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BOOST_STAGEDIR}/lib")
+ endif()
+
+endif()
+
+file(GLOB __boost_libraries RELATIVE "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs" "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/*/CMakeLists.txt" "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/numeric/*/CMakeLists.txt")
+
+# Check for mistakes in BOOST_INCLUDE_LIBRARIES
+
+foreach(__boost_included_lib IN LISTS BOOST_INCLUDE_LIBRARIES)
+
+ if(NOT "${__boost_included_lib}/CMakeLists.txt" IN_LIST __boost_libraries)
+
+ message(WARNING "Library '${__boost_included_lib}' given in BOOST_INCLUDE_LIBRARIES has not been found.")
+
+ endif()
+
+endforeach()
+
+# Scan for dependencies
+
+set(__boost_include_libraries ${BOOST_INCLUDE_LIBRARIES})
+
+if(__boost_include_libraries)
+ list(REMOVE_DUPLICATES __boost_include_libraries)
+endif()
+
+set(__boost_libs_to_scan ${__boost_include_libraries})
+
+while(__boost_libs_to_scan)
+
+ boost_message(DEBUG "Scanning dependencies: ${__boost_libs_to_scan}")
+
+ set(__boost_dependencies "")
+
+ foreach(__boost_lib IN LISTS __boost_libs_to_scan)
+
+ __boost_scan_dependencies(${__boost_lib} __boost_deps)
+ list(APPEND __boost_dependencies ${__boost_deps})
+
+ endforeach()
+
+ list(REMOVE_DUPLICATES __boost_dependencies)
+
+ set(__boost_libs_to_scan ${__boost_dependencies})
+
+ if(__boost_libs_to_scan)
+ list(REMOVE_ITEM __boost_libs_to_scan ${__boost_include_libraries})
+ endif()
+
+ list(APPEND __boost_include_libraries ${__boost_libs_to_scan})
+
+endwhile()
+
+# Installing targets created in other directories requires CMake 3.13
+if(CMAKE_VERSION VERSION_LESS 3.13)
+
+ boost_message(VERBOSE "Boost installation support is limited on CMake ${CMAKE_VERSION} (need 3.13)")
+
+endif()
+
+foreach(__boost_lib_cml IN LISTS __boost_libraries)
+
+ get_filename_component(__boost_lib "${__boost_lib_cml}" DIRECTORY)
+
+ if(__boost_lib IN_LIST BOOST_INCOMPATIBLE_LIBRARIES)
+
+ boost_message(DEBUG "Skipping incompatible Boost library ${__boost_lib}")
+
+ elseif(__boost_lib IN_LIST BOOST_EXCLUDE_LIBRARIES)
+
+ boost_message(DEBUG "Skipping excluded Boost library ${__boost_lib}")
+
+ elseif(NOT BOOST_INCLUDE_LIBRARIES OR __boost_lib IN_LIST BOOST_INCLUDE_LIBRARIES)
+
+ boost_message(VERBOSE "Adding Boost library ${__boost_lib}")
+ add_subdirectory(libs/${__boost_lib})
+
+ __boost_auto_install(${__boost_lib})
+
+ elseif(__boost_lib IN_LIST __boost_include_libraries)
+
+ set(BUILD_TESTING OFF) # hide cache variable
+
+ boost_message(VERBOSE "Adding dependent Boost library ${__boost_lib}")
+ add_subdirectory(libs/${__boost_lib})
+
+ __boost_auto_install(${__boost_lib})
+
+ unset(BUILD_TESTING)
+
+ else()
+
+ set(BUILD_TESTING OFF) # hide cache variable
+
+ boost_message(DEBUG "Adding Boost library ${__boost_lib} with EXCLUDE_FROM_ALL")
+ add_subdirectory(libs/${__boost_lib} EXCLUDE_FROM_ALL)
+
+ unset(BUILD_TESTING)
+
+ endif()
+
+endforeach()
diff --git a/src/boost/tools/cmake/include/BoostTest.cmake b/src/boost/tools/cmake/include/BoostTest.cmake
new file mode 100644
index 000000000..6b56cc9e2
--- /dev/null
+++ b/src/boost/tools/cmake/include/BoostTest.cmake
@@ -0,0 +1,206 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+# Clear global variables on each `include(BoostTest)`
+
+set(BOOST_TEST_LINK_LIBRARIES "")
+set(BOOST_TEST_COMPILE_DEFINITIONS "")
+set(BOOST_TEST_COMPILE_OPTIONS "")
+set(BOOST_TEST_COMPILE_FEATURES "")
+
+# Include guard
+
+if(NOT CMAKE_VERSION VERSION_LESS 3.10)
+ include_guard()
+endif()
+
+include(BoostMessage)
+
+# Private helper functions
+
+function(__boost_test_list_replace list what with)
+
+ set(result "")
+
+ foreach(x IN LISTS ${list})
+
+ if(x STREQUAL what)
+ set(x ${with})
+ endif()
+
+ list(APPEND result ${x})
+
+ endforeach()
+
+ set(${list} ${result} PARENT_SCOPE)
+
+endfunction()
+
+# boost_test( [TYPE type] [PREFIX prefix] [NAME name] [IGNORE_TEST_GLOBALS]
+# SOURCES sources...
+# ARGUMENTS args...
+# LINK_LIBRARIES libs...
+# COMPILE_DEFINITIONS defs...
+# COMPILE_OPTIONS opts...
+# COMPILE_FEATURES features...
+# )
+
+function(boost_test)
+
+ cmake_parse_arguments(_ "IGNORE_TEST_GLOBALS" "TYPE;PREFIX;NAME" "SOURCES;ARGUMENTS;LIBRARIES;LINK_LIBRARIES;COMPILE_DEFINITIONS;COMPILE_OPTIONS;COMPILE_FEATURES" ${ARGN})
+
+ if(NOT __TYPE)
+ set(__TYPE run)
+ endif()
+
+ if(NOT __PREFIX)
+ set(__PREFIX ${PROJECT_NAME})
+ endif()
+
+ if(NOT __NAME)
+ list(GET __SOURCES 0 __NAME)
+ string(MAKE_C_IDENTIFIER ${__NAME} __NAME)
+ endif()
+
+ set(__NAME ${__PREFIX}-${__NAME})
+
+ if(__UNPARSED_ARGUMENTS)
+ message(AUTHOR_WARNING "Extra arguments for test '${__NAME}' ignored: ${__UNPARSED_ARGUMENTS}")
+ endif()
+
+ if(__LIBRARIES)
+ boost_message(VERBOSE "Test '${__NAME}' uses deprecated parameter LIBRARIES; use LINK_LIBRARIES")
+ endif()
+
+ if(DEFINED BUILD_TESTING AND NOT BUILD_TESTING)
+ return()
+ endif()
+
+ if(__IGNORE_TEST_GLOBALS)
+
+ set(BOOST_TEST_LINK_LIBRARIES "")
+ set(BOOST_TEST_COMPILE_DEFINITIONS "")
+ set(BOOST_TEST_COMPILE_OPTIONS "")
+ set(BOOST_TEST_COMPILE_FEATURES "")
+
+ endif()
+
+ list(APPEND BOOST_TEST_LINK_LIBRARIES ${__LIBRARIES} ${__LINK_LIBRARIES})
+ list(APPEND BOOST_TEST_COMPILE_DEFINITIONS ${__COMPILE_DEFINITIONS})
+ list(APPEND BOOST_TEST_COMPILE_OPTIONS ${__COMPILE_OPTIONS})
+ list(APPEND BOOST_TEST_COMPILE_FEATURES ${__COMPILE_FEATURES})
+
+ if(MSVC)
+
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-fexceptions" "/GX")
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-fno-exceptions" "/GX-")
+
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-frtti" "/GR")
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-fno-rtti" "/GR-")
+
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-w" "/W0")
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-Wall" "/W4")
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-Wextra" "")
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-pedantic" "")
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-Wpedantic" "")
+
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-Werror" "/WX")
+ __boost_test_list_replace(BOOST_TEST_COMPILE_OPTIONS "-Wno-error" "/WX-")
+
+ endif()
+
+ foreach(feature IN LISTS BOOST_TEST_COMPILE_FEATURES)
+ if(NOT feature IN_LIST CMAKE_CXX_COMPILE_FEATURES)
+
+ boost_message(VERBOSE "Test '${__NAME}' skipped, '${feature}' is not supported")
+ return()
+
+ endif()
+ endforeach()
+
+ foreach(library IN LISTS BOOST_TEST_LINK_LIBRARIES)
+
+ if(TARGET ${library})
+ get_target_property(features ${library} INTERFACE_COMPILE_FEATURES)
+
+ if(features) # need to check because features-NOTFOUND is a valid list
+ foreach(feature IN LISTS features)
+ if(NOT feature IN_LIST CMAKE_CXX_COMPILE_FEATURES)
+
+ boost_message(VERBOSE "Test '${__NAME}' skipped, '${feature}' required by '${library}' is not supported")
+ return()
+
+ endif()
+ endforeach()
+ endif()
+ endif()
+ endforeach()
+
+ if(__TYPE STREQUAL "compile" OR __TYPE STREQUAL "compile-fail")
+
+ add_library(${__NAME} STATIC EXCLUDE_FROM_ALL ${__SOURCES})
+ target_link_libraries(${__NAME} ${BOOST_TEST_LINK_LIBRARIES})
+ target_compile_definitions(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_DEFINITIONS})
+ target_compile_options(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_OPTIONS})
+ target_compile_features(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_FEATURES})
+
+ add_test(NAME compile-${__NAME} COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${__NAME} --config $<CONFIG>)
+
+ if(__TYPE STREQUAL "compile-fail")
+ set_tests_properties(compile-${__NAME} PROPERTIES WILL_FAIL TRUE)
+ endif()
+
+ elseif(__TYPE STREQUAL "link")
+
+ add_executable(${__NAME} EXCLUDE_FROM_ALL ${__SOURCES})
+ target_link_libraries(${__NAME} ${BOOST_TEST_LINK_LIBRARIES})
+ target_compile_definitions(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_DEFINITIONS})
+ target_compile_options(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_OPTIONS})
+ target_compile_features(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_FEATURES})
+
+ add_test(NAME link-${__NAME} COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${__NAME} --config $<CONFIG>)
+
+ elseif(__TYPE STREQUAL "link-fail")
+
+ add_library(compile-${__NAME} OBJECT EXCLUDE_FROM_ALL ${__SOURCES})
+ target_link_libraries(compile-${__NAME} ${BOOST_TEST_LINK_LIBRARIES})
+ target_compile_definitions(compile-${__NAME} PRIVATE ${BOOST_TEST_COMPILE_DEFINITIONS})
+ target_compile_options(compile-${__NAME} PRIVATE ${BOOST_TEST_COMPILE_OPTIONS})
+ target_compile_features(compile-${__NAME} PRIVATE ${BOOST_TEST_COMPILE_FEATURES})
+
+ add_test(NAME compile-${__NAME} COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target compile-${__NAME} --config $<CONFIG>)
+
+ add_executable(${__NAME} EXCLUDE_FROM_ALL $<TARGET_OBJECTS:compile-${__NAME}>)
+ target_link_libraries(${__NAME} ${BOOST_TEST_LINK_LIBRARIES})
+ target_compile_definitions(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_DEFINITIONS})
+ target_compile_options(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_OPTIONS})
+ target_compile_features(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_FEATURES})
+
+ add_test(NAME link-${__NAME} COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${__NAME} --config $<CONFIG>)
+ set_tests_properties(link-${__NAME} PROPERTIES WILL_FAIL TRUE)
+
+ elseif(__TYPE STREQUAL "run" OR __TYPE STREQUAL "run-fail")
+
+ add_executable(${__NAME} EXCLUDE_FROM_ALL ${__SOURCES})
+ target_link_libraries(${__NAME} ${BOOST_TEST_LINK_LIBRARIES})
+ target_compile_definitions(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_DEFINITIONS})
+ target_compile_options(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_OPTIONS})
+ target_compile_features(${__NAME} PRIVATE ${BOOST_TEST_COMPILE_FEATURES})
+
+ add_test(NAME compile-${__NAME} COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${__NAME} --config $<CONFIG>)
+
+ add_test(NAME run-${__NAME} COMMAND ${__NAME} ${__ARGUMENTS})
+ set_tests_properties(run-${__NAME} PROPERTIES DEPENDS compile-${__NAME})
+
+ if(__TYPE STREQUAL "run-fail")
+ set_tests_properties(run-${__NAME} PROPERTIES WILL_FAIL TRUE)
+ endif()
+
+ else()
+
+ message(AUTHOR_WARNING "Unknown test type '${__TYPE}' for test '${__NAME}'")
+
+ endif()
+
+endfunction(boost_test)
diff --git a/src/boost/tools/cmake/include/BoostTestJamfile.cmake b/src/boost/tools/cmake/include/BoostTestJamfile.cmake
new file mode 100644
index 000000000..8240f683f
--- /dev/null
+++ b/src/boost/tools/cmake/include/BoostTestJamfile.cmake
@@ -0,0 +1,80 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+# Include BoostTest outside the include guard for it to clear its global variables
+include(BoostTest)
+
+if(NOT CMAKE_VERSION VERSION_LESS 3.10)
+ include_guard()
+endif()
+
+include(BoostMessage)
+
+# boost_test_jamfile( FILE jamfile [PREFIX prefix]
+# LINK_LIBRARIES libs...
+# COMPILE_DEFINITIONS defs...
+# COMPILE_OPTIONS opts...
+# COMPILE_FEATURES features...
+# )
+
+function(boost_test_jamfile)
+
+ cmake_parse_arguments(_ "" "FILE;PREFIX" "LIBRARIES;LINK_LIBRARIES;COMPILE_DEFINITIONS;COMPILE_OPTIONS;COMPILE_FEATURES" ${ARGN})
+
+ if(__UNPARSED_ARGUMENTS)
+ message(AUTHOR_WARNING "boost_test_jamfile: extra arguments ignored: ${__UNPARSED_ARGUMENTS}")
+ endif()
+
+ if(__LIBRARIES)
+ boost_message(VERBOSE "boost_test_jamfile: LIBRARIES is deprecated, use LINK_LIBRARIES")
+ endif()
+
+ if(NOT __FILE)
+ message(AUTHOR_WARNING "boost_test_jamfile: required argument FILE is missing")
+ return()
+ endif()
+
+ if(DEFINED BUILD_TESTING AND NOT BUILD_TESTING)
+ return()
+ endif()
+
+ file(STRINGS ${__FILE} data)
+
+ set(types compile compile-fail link link-fail run run-fail)
+
+ foreach(line IN LISTS data)
+ if(line)
+
+ string(REGEX MATCHALL "[^ ]+" ll ${line})
+
+ if(ll)
+ list(GET ll 0 e0)
+
+ if(e0 IN_LIST types)
+
+ list(LENGTH ll lln)
+
+ if(NOT lln EQUAL 2)
+
+ boost_message(VERBOSE "boost_test_jamfile: Jamfile line ignored: ${line}")
+
+ else()
+
+ list(GET ll 1 e1)
+
+ boost_test(PREFIX ${__PREFIX} TYPE ${e0}
+ SOURCES ${e1}
+ LINK_LIBRARIES ${__LIBRARIES} ${__LINK_LIBRARIES}
+ COMPILE_DEFINITIONS ${__COMPILE_DEFINITIONS}
+ COMPILE_OPTIONS ${__COMPILE_OPTIONS}
+ COMPILE_FEATURES ${__COMPILE_FEATURES}
+ )
+
+ endif()
+ endif()
+ endif()
+ endif()
+ endforeach(line)
+
+endfunction(boost_test_jamfile)
diff --git a/src/boost/tools/cmake/test/assert/CMakeLists.txt b/src/boost/tools/cmake/test/assert/CMakeLists.txt
new file mode 100644
index 000000000..d358816f8
--- /dev/null
+++ b/src/boost/tools/cmake/test/assert/CMakeLists.txt
@@ -0,0 +1,17 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+cmake_minimum_required(VERSION 3.5...3.16)
+
+project(boost_assert_install_test LANGUAGES CXX)
+
+find_package(boost_assert REQUIRED)
+
+add_executable(main main.cpp)
+target_link_libraries(main Boost::assert)
+
+enable_testing()
+add_test(NAME main COMMAND main)
+
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
diff --git a/src/boost/tools/cmake/test/assert/main.cpp b/src/boost/tools/cmake/test/assert/main.cpp
new file mode 100644
index 000000000..305a35441
--- /dev/null
+++ b/src/boost/tools/cmake/test/assert/main.cpp
@@ -0,0 +1,11 @@
+// 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 <boost/assert.hpp>
+
+int main()
+{
+ int x = 5;
+ BOOST_ASSERT( x > 4 );
+}
diff --git a/src/boost/tools/cmake/test/atomic/CMakeLists.txt b/src/boost/tools/cmake/test/atomic/CMakeLists.txt
new file mode 100644
index 000000000..8eb7edf84
--- /dev/null
+++ b/src/boost/tools/cmake/test/atomic/CMakeLists.txt
@@ -0,0 +1,21 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+cmake_minimum_required(VERSION 3.5...3.16)
+
+project(boost_atomic_install_test LANGUAGES CXX)
+
+find_package(boost_atomic REQUIRED)
+
+if(BOOST_RUNTIME_LINK STREQUAL "static")
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+endif()
+
+add_executable(main main.cpp)
+target_link_libraries(main Boost::atomic)
+
+enable_testing()
+add_test(NAME main COMMAND main)
+
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
diff --git a/src/boost/tools/cmake/test/atomic/main.cpp b/src/boost/tools/cmake/test/atomic/main.cpp
new file mode 100644
index 000000000..21d11af8b
--- /dev/null
+++ b/src/boost/tools/cmake/test/atomic/main.cpp
@@ -0,0 +1,16 @@
+// 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 <boost/atomic.hpp>
+
+struct X
+{
+ double v[ 8 ];
+};
+
+int main()
+{
+ boost::atomic<X> a;
+ a.store( X() );
+}
diff --git a/src/boost/tools/cmake/test/boost_fetch/CMakeLists.txt b/src/boost/tools/cmake/test/boost_fetch/CMakeLists.txt
new file mode 100644
index 000000000..3883c6fe1
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_fetch/CMakeLists.txt
@@ -0,0 +1,25 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+cmake_minimum_required(VERSION 3.5...3.16)
+
+project(boost_fetch_test LANGUAGES CXX)
+
+include("${CMAKE_CURRENT_SOURCE_DIR}/../../include/BoostFetch.cmake")
+
+include(CTest)
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
+
+set(BUILD_TESTING OFF) # hide cache variable
+
+boost_fetch(boostorg/assert TAG develop EXCLUDE_FROM_ALL)
+boost_fetch(boostorg/config TAG develop EXCLUDE_FROM_ALL)
+boost_fetch(boostorg/core TAG develop EXCLUDE_FROM_ALL)
+
+unset(BUILD_TESTING)
+
+add_executable(main main.cpp)
+target_link_libraries(main Boost::core)
+
+add_test(NAME main COMMAND main)
diff --git a/src/boost/tools/cmake/test/boost_fetch/main.cpp b/src/boost/tools/cmake/test/boost_fetch/main.cpp
new file mode 100644
index 000000000..639b9c37a
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_fetch/main.cpp
@@ -0,0 +1,14 @@
+// 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 <boost/core/lightweight_test.hpp>
+
+int main()
+{
+ int x = 5;
+
+ BOOST_TEST_GT( x, 4 );
+
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/cmake/test/boost_test/CMakeLists.txt b/src/boost/tools/cmake/test/boost_test/CMakeLists.txt
new file mode 100644
index 000000000..e595f5d8a
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/CMakeLists.txt
@@ -0,0 +1,56 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+cmake_minimum_required(VERSION 3.5...3.16)
+
+project(boost_cmake_test LANGUAGES CXX)
+
+include(CTest)
+
+set(BUILD_TESTING OFF) # hide cache variable
+
+add_subdirectory(../../../../libs/assert EXCLUDE_FROM_ALL boostorg/assert)
+add_subdirectory(../../../../libs/config EXCLUDE_FROM_ALL boostorg/config)
+add_subdirectory(../../../../libs/core EXCLUDE_FROM_ALL boostorg/core)
+
+unset(BUILD_TESTING)
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
+
+# boost_test
+
+include(BoostTest)
+
+boost_test(TYPE compile SOURCES compile.cpp)
+boost_test(TYPE compile-fail SOURCES compile_fail.cpp)
+boost_test(TYPE link SOURCES link.cpp)
+boost_test(TYPE link-fail SOURCES link_fail.cpp)
+boost_test(TYPE run SOURCES run.cpp)
+boost_test(TYPE run-fail SOURCES run_fail.cpp)
+
+boost_test(TYPE run SOURCES arguments.cpp ARGUMENTS pumpkin LINK_LIBRARIES Boost::core)
+
+boost_test(TYPE run NAME return_exit_code_pass SOURCES return_exit_code.cpp COMPILE_DEFINITIONS EXIT_CODE=0)
+boost_test(TYPE run-fail NAME return_exit_code_fail SOURCES return_exit_code.cpp COMPILE_DEFINITIONS EXIT_CODE=1)
+
+boost_test(TYPE run SOURCES requires_variadic_templates.cpp COMPILE_FEATURES cxx_variadic_templates)
+
+boost_test(TYPE run SOURCES requires_no_rtti.cpp COMPILE_OPTIONS -fno-rtti LINK_LIBRARIES Boost::config)
+boost_test(TYPE run SOURCES requires_no_exceptions.cpp COMPILE_OPTIONS -fno-exceptions LINK_LIBRARIES Boost::config)
+
+boost_test(TYPE compile-fail SOURCES emits_warning.cpp COMPILE_OPTIONS -Wall -Werror)
+
+# boost_test, w/ globals
+
+set(BOOST_TEST_COMPILE_OPTIONS -fno-rtti -fno-exceptions)
+set(BOOST_TEST_LINK_LIBRARIES Boost::config)
+
+boost_test(SOURCES requires_no_rtti.cpp PREFIX boost_cmake_test_globals)
+boost_test(SOURCES requires_no_exceptions.cpp PREFIX boost_cmake_test_globals)
+
+# boost_test_jamfile
+
+include(BoostTestJamfile)
+
+boost_test_jamfile(FILE Jamfile PREFIX boost_cmake_test_jamfile)
diff --git a/src/boost/tools/cmake/test/boost_test/Jamfile b/src/boost/tools/cmake/test/boost_test/Jamfile
new file mode 100644
index 000000000..7ef0c4516
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/Jamfile
@@ -0,0 +1,20 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+import testing ;
+
+project
+ : default-build <warnings-as-errors>on
+ ;
+
+compile compile.cpp ;
+compile-fail compile_fail.cpp ;
+link link.cpp ;
+link-fail link_fail.cpp ;
+run run.cpp ;
+run-fail run_fail.cpp ;
+
+run
+ arguments.cpp :
+ pumpkin ;
diff --git a/src/boost/tools/cmake/test/boost_test/arguments.cpp b/src/boost/tools/cmake/test/boost_test/arguments.cpp
new file mode 100644
index 000000000..8ebe8eddb
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/arguments.cpp
@@ -0,0 +1,18 @@
+// 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 <boost/core/lightweight_test.hpp>
+#include <string.h>
+
+int main( int ac, char const* av[] )
+{
+ BOOST_TEST_EQ( ac, 2 );
+
+ if( ac >= 2 )
+ {
+ BOOST_TEST_CSTR_EQ( av[1], "pumpkin" );
+ }
+
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/cmake/test/boost_test/compile.cpp b/src/boost/tools/cmake/test/boost_test/compile.cpp
new file mode 100644
index 000000000..07df2b88a
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/compile.cpp
@@ -0,0 +1,8 @@
+// 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
+
+int f()
+{
+ return 0;
+}
diff --git a/src/boost/tools/cmake/test/boost_test/compile_fail.cpp b/src/boost/tools/cmake/test/boost_test/compile_fail.cpp
new file mode 100644
index 000000000..58d4181e6
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/compile_fail.cpp
@@ -0,0 +1,8 @@
+// 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
+
+int f()
+{
+ return x;
+}
diff --git a/src/boost/tools/cmake/test/boost_test/emits_warning.cpp b/src/boost/tools/cmake/test/boost_test/emits_warning.cpp
new file mode 100644
index 000000000..91bcf0ccf
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/emits_warning.cpp
@@ -0,0 +1,9 @@
+// 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
+
+int main()
+{
+ int x, y;
+ return x;
+}
diff --git a/src/boost/tools/cmake/test/boost_test/link.cpp b/src/boost/tools/cmake/test/boost_test/link.cpp
new file mode 100644
index 000000000..d843d0c0a
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/link.cpp
@@ -0,0 +1,13 @@
+// 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
+
+int f()
+{
+ return 0;
+}
+
+int main()
+{
+ return f();
+}
diff --git a/src/boost/tools/cmake/test/boost_test/link_fail.cpp b/src/boost/tools/cmake/test/boost_test/link_fail.cpp
new file mode 100644
index 000000000..e271ced9c
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/link_fail.cpp
@@ -0,0 +1,10 @@
+// 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
+
+int f();
+
+int main()
+{
+ return f();
+}
diff --git a/src/boost/tools/cmake/test/boost_test/requires_no_exceptions.cpp b/src/boost/tools/cmake/test/boost_test/requires_no_exceptions.cpp
new file mode 100644
index 000000000..f4ed46110
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/requires_no_exceptions.cpp
@@ -0,0 +1,18 @@
+// 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 <boost/config.hpp>
+
+int main()
+{
+#if defined(BOOST_NO_EXCEPTIONS)
+
+ return 0;
+
+#else
+
+ return 1;
+
+#endif
+}
diff --git a/src/boost/tools/cmake/test/boost_test/requires_no_rtti.cpp b/src/boost/tools/cmake/test/boost_test/requires_no_rtti.cpp
new file mode 100644
index 000000000..33030b5e7
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/requires_no_rtti.cpp
@@ -0,0 +1,18 @@
+// 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 <boost/config.hpp>
+
+int main()
+{
+#if defined(BOOST_NO_RTTI)
+
+ return 0;
+
+#else
+
+ return 1;
+
+#endif
+}
diff --git a/src/boost/tools/cmake/test/boost_test/requires_variadic_templates.cpp b/src/boost/tools/cmake/test/boost_test/requires_variadic_templates.cpp
new file mode 100644
index 000000000..ce516c60b
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/requires_variadic_templates.cpp
@@ -0,0 +1,13 @@
+// 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
+
+template<class... T> int f()
+{
+ return sizeof...(T);
+}
+
+int main()
+{
+ return f<int, void, float>() == 3? 0: 1;
+}
diff --git a/src/boost/tools/cmake/test/boost_test/return_exit_code.cpp b/src/boost/tools/cmake/test/boost_test/return_exit_code.cpp
new file mode 100644
index 000000000..372988bb2
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/return_exit_code.cpp
@@ -0,0 +1,8 @@
+// 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
+
+int main()
+{
+ return EXIT_CODE;
+}
diff --git a/src/boost/tools/cmake/test/boost_test/run.cpp b/src/boost/tools/cmake/test/boost_test/run.cpp
new file mode 100644
index 000000000..a23cef0dc
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/run.cpp
@@ -0,0 +1,7 @@
+// 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
+
+int main()
+{
+}
diff --git a/src/boost/tools/cmake/test/boost_test/run_fail.cpp b/src/boost/tools/cmake/test/boost_test/run_fail.cpp
new file mode 100644
index 000000000..bdb31cb73
--- /dev/null
+++ b/src/boost/tools/cmake/test/boost_test/run_fail.cpp
@@ -0,0 +1,8 @@
+// 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
+
+int main()
+{
+ return 1;
+}
diff --git a/src/boost/tools/cmake/test/mp11/CMakeLists.txt b/src/boost/tools/cmake/test/mp11/CMakeLists.txt
new file mode 100644
index 000000000..6c47a0877
--- /dev/null
+++ b/src/boost/tools/cmake/test/mp11/CMakeLists.txt
@@ -0,0 +1,17 @@
+# 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.5...3.16)
+
+project(boost_mp11_install_test LANGUAGES CXX)
+
+find_package(boost_mp11 REQUIRED)
+
+add_executable(main main.cpp)
+target_link_libraries(main Boost::mp11)
+
+enable_testing()
+add_test(NAME main COMMAND main)
+
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
diff --git a/src/boost/tools/cmake/test/mp11/main.cpp b/src/boost/tools/cmake/test/mp11/main.cpp
new file mode 100644
index 000000000..7b8689ac6
--- /dev/null
+++ b/src/boost/tools/cmake/test/mp11/main.cpp
@@ -0,0 +1,12 @@
+// 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 <boost/mp11.hpp>
+using namespace boost::mp11;
+
+int main()
+{
+ using L1 = mp_list<int, float, int, float>;
+ return mp_size<mp_unique<L1>>::value == 2? 0: 1;
+}
diff --git a/src/boost/tools/cmake/test/timer/CMakeLists.txt b/src/boost/tools/cmake/test/timer/CMakeLists.txt
new file mode 100644
index 000000000..5de5f0980
--- /dev/null
+++ b/src/boost/tools/cmake/test/timer/CMakeLists.txt
@@ -0,0 +1,21 @@
+# 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://www.boost.org/LICENSE_1_0.txt
+
+cmake_minimum_required(VERSION 3.5...3.16)
+
+project(boost_timer_install_test LANGUAGES CXX)
+
+find_package(boost_timer REQUIRED)
+
+if(BOOST_RUNTIME_LINK STREQUAL "static")
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+endif()
+
+add_executable(main main.cpp)
+target_link_libraries(main Boost::timer)
+
+enable_testing()
+add_test(NAME main COMMAND main)
+
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
diff --git a/src/boost/tools/cmake/test/timer/main.cpp b/src/boost/tools/cmake/test/timer/main.cpp
new file mode 100644
index 000000000..25ce9c842
--- /dev/null
+++ b/src/boost/tools/cmake/test/timer/main.cpp
@@ -0,0 +1,11 @@
+// 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 <boost/timer/timer.hpp>
+
+int main()
+{
+ boost::timer::cpu_timer timer;
+ timer.stop();
+}
diff --git a/src/boost/tools/docca/CHANGELOG.md b/src/boost/tools/docca/CHANGELOG.md
new file mode 100644
index 000000000..637b66c87
--- /dev/null
+++ b/src/boost/tools/docca/CHANGELOG.md
@@ -0,0 +1 @@
+* Version 1
diff --git a/src/boost/tools/docca/LICENSE_1_0.txt b/src/boost/tools/docca/LICENSE_1_0.txt
new file mode 100644
index 000000000..36b7cd93c
--- /dev/null
+++ b/src/boost/tools/docca/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.
diff --git a/src/boost/tools/docca/README.md b/src/boost/tools/docca/README.md
new file mode 100644
index 000000000..b2002d0f5
--- /dev/null
+++ b/src/boost/tools/docca/README.md
@@ -0,0 +1,20 @@
+# docca
+
+Docca is a set of XSLT transformations which converts Doxygen
+XML extracted from Javadoc comments in C++ source code, into
+Boost.Quickbook output
+
+These scripts are used by
+[Boost.Beast](https://github.com/boostorg/beast/)
+to generate the reference.
+For example, this
+[Javadoc comment](https://github.com/boostorg/beast/blob/b7230f12f16fe7a9f7a1ece5be1f607c8552448a/include/boost/beast/core/buffers_cat.hpp#L68])
+is extracted by Doxygen into an intermediate XML representation,
+then processed by the XSLT script via Saxon-HE to produce this
+[Boost.Quickbook page](https://www.boost.org/doc/libs/1_71_0/libs/beast/doc/html/beast/ref/boost__beast__buffers_cat.html).
+
+## License
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file [LICENSE_1_0.txt](LICENSE_1_0.txt) or copy at
+https://www.boost.org/LICENSE_1_0.txt)
diff --git a/src/boost/tools/docca/example/Jamfile b/src/boost/tools/docca/example/Jamfile
new file mode 100644
index 000000000..61d564f07
--- /dev/null
+++ b/src/boost/tools/docca/example/Jamfile
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot 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)
+#
+
+import os ;
+
+local broot = [ os.environ BOOST_ROOT ] ;
+
+project docca/doc ;
+
+using boostbook ;
+using quickbook ;
+using doxygen ;
+
+xml docca_bb : main.qbk ;
+
+path-constant out : . ;
+
+install stylesheets
+ :
+ $(broot)/doc/src/boostbook.css
+ :
+ <location>$(out)/html
+ ;
+
+explicit stylesheets ;
+
+install images
+ :
+ [ glob $(broot)/doc/src/images/*.png ]
+ :
+ <location>$(out)/html/images
+ ;
+
+explicit images ;
+
+install callouts
+ :
+ [ glob $(broot)/doc/src/images/callouts/*.png ]
+ :
+ <location>$(out)/html/images/callouts
+ ;
+
+explicit callout ;
+
+boostbook doc
+ :
+ docca_bb
+ :
+ <xsl:param>chapter.autolabel=0
+ <xsl:param>boost.root=$(broot)
+ <xsl:param>chapter.autolabel=0
+ <xsl:param>chunk.first.sections=1 # Chunk the first top-level section?
+ <xsl:param>chunk.section.depth=8 # Depth to which sections should be chunked
+ <xsl:param>generate.section.toc.level=1 # Control depth of TOC generation in sections
+ <xsl:param>toc.max.depth=2 # How many levels should be created for each TOC?
+ <xsl:param>toc.section.depth=2 # How deep should recursive sections appear in the TOC?
+ :
+ <location>temp
+ <dependency>stylesheets
+ <dependency>images
+ ;
diff --git a/src/boost/tools/docca/example/boostbook.dtd b/src/boost/tools/docca/example/boostbook.dtd
new file mode 100644
index 000000000..bd4c3f871
--- /dev/null
+++ b/src/boost/tools/docca/example/boostbook.dtd
@@ -0,0 +1,439 @@
+<!--
+ BoostBook DTD - development version
+
+ For further information, see: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost_Documentation_Format
+
+ Copyright (c) 2002 by Peter Simons <simons@cryp.to>
+ Copyright (c) 2003-2004 by Douglas Gregor <doug.gregor -at- gmail.com>
+ Copyright (c) 2007 by Frank Mori Hess <fmhess@users.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)
+
+ The latest stable DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
+ SYSTEM "http://www.boost.org/tools/boostbook/dtd/1.1/boostbook.dtd"
+
+ $Revision$
+ $Date$
+-->
+
+<!--========== Define XInclude features. ==========-->
+<!-- This is not really integrated into the DTD yet. Needs more
+ research. -->
+<!--
+<!ELEMENT xi:include (xi:fallback)?>
+<!ATTLIST xi:include
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
+ href CDATA #REQUIRED
+ parse (xml|text) "xml"
+ encoding CDATA #IMPLIED>
+
+<!ELEMENT xi:fallback ANY>
+<!ATTLIST xi:fallback
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude">
+ -->
+
+<!ENTITY % local.common.attrib "last-revision CDATA #IMPLIED">
+
+<!--========== Define the BoostBook extensions ==========-->
+<!ENTITY % boost.common.attrib "%local.common.attrib;
+ id CDATA #IMPLIED">
+
+<!ENTITY % boost.namespace.mix
+ "class|class-specialization|struct|struct-specialization|
+ union|union-specialization|typedef|enum|
+ free-function-group|function|overloaded-function|
+ namespace">
+
+<!ENTITY % boost.template.mix
+ "template-type-parameter|template-nontype-parameter|template-varargs">
+
+<!ENTITY % boost.class.members
+ "static-constant|typedef|enum|
+ copy-assignment|constructor|destructor|method-group|
+ method|overloaded-method|data-member|class|class-specialization|struct|
+ struct-specialization|union|union-specialization">
+
+<!ENTITY % boost.class.mix
+ "%boost.class.members;|free-function-group|function|overloaded-function">
+
+<!ENTITY % boost.class.content
+ "template?, inherit*, purpose?, description?,
+ (%boost.class.mix;|access)*">
+
+<!ENTITY % boost.class-specialization.content
+ "template?, specialization?, inherit?, purpose?, description?,
+ (%boost.class.mix;|access)*">
+
+<!ENTITY % boost.function.semantics
+ "purpose?, description?, requires?, effects?, postconditions?,
+ returns?, throws?, complexity?, notes?, rationale?">
+
+<!ENTITY % library.content
+ "libraryinfo, (title, ((section|library-reference|testsuite))+)?">
+
+<!ELEMENT library (%library.content;)>
+<!ATTLIST library
+ name CDATA #REQUIRED
+ dirname CDATA #REQUIRED
+ html-only CDATA #IMPLIED
+ url CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT boostbook (title, (chapter|library)*)>
+<!ATTLIST boostbook %boost.common.attrib;>
+
+<!ELEMENT libraryinfo (author+, copyright*, legalnotice*, librarypurpose, librarycategory*)>
+<!ATTLIST libraryinfo %boost.common.attrib;>
+
+<!ELEMENT librarypurpose (#PCDATA|code|ulink|functionname|methodname|classname|macroname|headername|enumname|globalname)*>
+<!ATTLIST librarypurpose %boost.common.attrib;>
+
+<!ELEMENT librarycategory (#PCDATA)>
+<!ATTLIST librarycategory
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT libraryname (#PCDATA)>
+<!ATTLIST libraryname %boost.common.attrib;>
+
+<!ELEMENT library-reference ANY>
+<!ATTLIST library-reference
+ %boost.common.attrib;>
+
+<!ELEMENT librarylist EMPTY>
+<!ATTLIST librarylist %boost.common.attrib;>
+
+<!ELEMENT librarycategorylist (librarycategorydef)*>
+<!ATTLIST librarycategorylist %boost.common.attrib;>
+
+<!ELEMENT librarycategorydef (#PCDATA)>
+<!ATTLIST librarycategorydef
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT header ANY>
+<!ATTLIST header
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT namespace (%boost.namespace.mix;)*>
+<!ATTLIST namespace
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT class (%boost.class.content;)>
+<!ATTLIST class
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT struct (%boost.class.content;)>
+<!ATTLIST struct
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT union (%boost.class.content;)>
+<!ATTLIST union
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT class-specialization (%boost.class-specialization.content;)>
+<!ATTLIST class-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT struct-specialization (%boost.class-specialization.content;)>
+<!ATTLIST struct-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT union-specialization (%boost.class-specialization.content;)>
+<!ATTLIST union-specialization
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT access (%boost.class.members;)+>
+<!ATTLIST access
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!--========= C++ Templates =========-->
+<!ELEMENT template (%boost.template.mix;)*>
+<!ATTLIST template %boost.common.attrib;>
+
+<!ELEMENT template-type-parameter (default?, purpose?)>
+<!ATTLIST template-type-parameter
+ name CDATA #REQUIRED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT template-nontype-parameter (type, default?, purpose?)>
+<!ATTLIST template-nontype-parameter
+ name CDATA #REQUIRED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT template-varargs EMPTY>
+<!ATTLIST template-varargs %boost.common.attrib;>
+
+<!ELEMENT specialization (template-arg)*>
+<!ATTLIST specialization %boost.common.attrib;>
+
+<!ELEMENT template-arg ANY>
+<!ATTLIST template-arg
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT default ANY>
+<!ATTLIST default %boost.common.attrib;>
+
+<!ELEMENT inherit (type, purpose?)>
+<!ATTLIST inherit
+ access CDATA #IMPLIED
+ pack CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT purpose ANY>
+<!ATTLIST purpose %boost.common.attrib;>
+
+<!ELEMENT description ANY>
+<!ATTLIST description %boost.common.attrib;>
+
+<!ELEMENT type ANY>
+<!ATTLIST type %boost.common.attrib;>
+
+<!ELEMENT typedef (type, purpose?, description?)>
+<!ATTLIST typedef
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT enum (enumvalue*, purpose?, description?)>
+<!ATTLIST enum
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT enumvalue (default?, purpose?, description?)>
+<!ATTLIST enumvalue
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT static-constant (type, default, purpose?, description?)>
+<!ATTLIST static-constant
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT data-member (type, purpose?, description?)>
+<!ATTLIST data-member
+ name CDATA #REQUIRED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT paramtype ANY>
+<!ATTLIST paramtype %boost.common.attrib;>
+
+<!ELEMENT effects ANY>
+<!ATTLIST effects %boost.common.attrib;>
+
+<!ELEMENT postconditions ANY>
+<!ATTLIST postconditions %boost.common.attrib;>
+
+<!ELEMENT method-group (method|overloaded-method)*>
+<!ATTLIST method-group
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT constructor (template?, parameter*, %boost.function.semantics;)>
+<!ATTLIST constructor
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT destructor (%boost.function.semantics;)>
+<!ATTLIST destructor
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT method (template?, type, parameter*, %boost.function.semantics;)>
+<!ATTLIST method
+ name CDATA #REQUIRED
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT function (template?, type, parameter*, %boost.function.semantics;)>
+<!ATTLIST function
+ name CDATA #REQUIRED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT overloaded-method (signature*, %boost.function.semantics;)>
+<!ATTLIST overloaded-method
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT overloaded-function (signature*, %boost.function.semantics;)>
+<!ATTLIST overloaded-function
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT signature (template?, type, parameter*)>
+<!ATTLIST signature
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT requires ANY>
+<!ATTLIST requires %boost.common.attrib;>
+
+<!ELEMENT returns ANY>
+<!ATTLIST returns %boost.common.attrib;>
+
+<!ELEMENT throws ANY>
+<!ATTLIST throws %boost.common.attrib;>
+
+<!ELEMENT complexity ANY>
+<!ATTLIST complexity %boost.common.attrib;>
+
+<!ELEMENT notes ANY>
+<!ATTLIST notes %boost.common.attrib;>
+
+<!ELEMENT rationale ANY>
+<!ATTLIST rationale %boost.common.attrib;>
+
+<!ELEMENT functionname (#PCDATA)>
+<!ATTLIST functionname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT enumname (#PCDATA)>
+<!ATTLIST enumname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT macroname (#PCDATA)>
+<!ATTLIST macroname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT headername (#PCDATA)>
+<!ATTLIST headername
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT globalname (#PCDATA)>
+<!ATTLIST globalname
+ alt CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT copy-assignment
+ (template?, type?, parameter*, %boost.function.semantics;)>
+<!ATTLIST copy-assignment
+ cv CDATA #IMPLIED
+ specifiers CDATA #IMPLIED
+ %boost.common.attrib;>
+
+<!ELEMENT free-function-group (function|overloaded-function)*>
+<!ATTLIST free-function-group
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT precondition ANY>
+<!ATTLIST precondition %boost.common.attrib;>
+
+<!ELEMENT code ANY>
+<!ATTLIST code %boost.common.attrib;>
+
+<!ELEMENT using-namespace EMPTY>
+<!ATTLIST using-namespace
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!ELEMENT using-class EMPTY>
+<!ATTLIST using-class
+ name CDATA #REQUIRED
+ %boost.common.attrib;>
+
+<!--========== Boost Testsuite Extensions ==========-->
+<!ENTITY % boost.testsuite.tests
+ "compile-test|link-test|run-test|
+ compile-fail-test|link-fail-test|run-fail-test">
+<!ENTITY % boost.testsuite.test.content
+ "source*, lib*, requirement*, purpose, if-fails?">
+
+<!ELEMENT testsuite ((%boost.testsuite.tests;)+)>
+<!ATTLIST testsuite %boost.common.attrib;>
+
+<!ELEMENT compile-test (%boost.testsuite.test.content;)>
+<!ATTLIST compile-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT link-test (%boost.testsuite.test.content;)>
+<!ATTLIST link-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT run-test (%boost.testsuite.test.content;)>
+<!ATTLIST run-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT compile-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST compile-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT link-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST link-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT run-fail-test (%boost.testsuite.test.content;)>
+<!ATTLIST run-fail-test
+ filename CDATA #REQUIRED
+ name CDATA #IMPLIED>
+
+<!ELEMENT source (#PCDATA|snippet)*>
+
+<!ELEMENT snippet EMPTY>
+<!ATTLIST snippet
+ name CDATA #REQUIRED>
+
+<!ELEMENT lib (#PCDATA)>
+
+<!ELEMENT requirement (#PCDATA)>
+<!ATTLIST requirement
+ name CDATA #REQUIRED>
+
+<!ELEMENT if-fails ANY>
+
+<!ELEMENT parameter (paramtype, default?, description?)>
+<!ATTLIST parameter
+ name CDATA #IMPLIED
+ pack CDATA #IMPLIED>
+
+<!ELEMENT programlisting ANY>
+<!ATTLIST programlisting
+ name CDATA #IMPLIED>
+
+<!--========== Customize the DocBook DTD ==========-->
+<!ENTITY % local.tech.char.class "|functionname|libraryname|enumname|headername|macroname|code">
+<!ENTITY % local.para.class
+ "|using-namespace|using-class|librarylist|librarycategorylist">
+<!ENTITY % local.descobj.class "|libraryinfo">
+<!ENTITY % local.classname.attrib "alt CDATA #IMPLIED">
+<!ENTITY % local.methodname.attrib "alt CDATA #IMPLIED">
+<!ENTITY % local.refentry.class "|library-reference|testsuite">
+<!ENTITY % local.title.char.mix "">
+<!ENTITY % programlisting.module "IGNORE">
+<!ENTITY % parameter.module "IGNORE">
+<!ENTITY % function.module "IGNORE">
+<!ENTITY % type.module "IGNORE">
+
+<!--========== Import DocBook DTD ==========-->
+<!ENTITY % DocBook PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+%DocBook;
diff --git a/src/boost/tools/docca/example/include/docca/example.hpp b/src/boost/tools/docca/example/include/docca/example.hpp
new file mode 100644
index 000000000..f15913573
--- /dev/null
+++ b/src/boost/tools/docca/example/include/docca/example.hpp
@@ -0,0 +1,857 @@
+//
+// Copyright (c) 2015-2016 Vinnie Falco (vinnie dot falco at gmail dot 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)
+//
+
+#ifndef EXAMPLE_HPP
+#define EXAMPLE_HPP
+
+#include <cstddef>
+#include <string>
+
+// This is a sample header file to show docca XLST results
+//
+// namespace, enum, type alias, global, static global,
+// function, static function, struct/class
+
+namespace example {
+
+/** Enum
+
+ Description
+*/
+enum enum_t
+{
+ /// 0
+ zero,
+
+ /// 1
+ one,
+
+ /// 2
+ two
+};
+
+/** Enum class
+
+ Description
+*/
+enum class enum_c
+{
+ /// aaa
+ aaa,
+
+ /// bbb
+ bbb,
+
+ /// ccc
+ ccc
+};
+
+/** Type alias
+
+ Description
+*/
+using type = std::string;
+
+/** Template type alias
+
+ Description
+*/
+template<class T>
+using t_type = std::vector<T>;
+
+/** Void or deduced
+
+ Description
+*/
+using vod = __deduced__;
+
+/** See below
+
+ Description
+*/
+using sb = __see_below__;
+
+/** Implementation-defined
+
+ Description
+*/
+using impdef = __implementation_defined__;
+
+/** Variable
+
+ Description
+*/
+extern std::size_t var;
+
+/** Static variable
+
+ Description
+*/
+static std::size_t s_var = 0;
+
+/** Brief with @b bold text.
+
+ Function returning @ref type.
+
+ @return The type
+
+ @see t_func.
+
+ @throw std::exception on error
+ @throw std::domain_error on bad parameters
+
+ @par Thread Safety
+
+ Cannot be called concurrently.
+
+ @note Additional notes.
+
+ @param arg1 Function parameter 1
+ @param arg2 Function parameter 2
+*/
+type
+func(int arg1, std::string arg2);
+
+/** Brief for function starting with _
+
+ @return @ref type
+
+ @see func
+*/
+type
+_func(float arg1, std::size arg2);
+
+/** Brief.
+
+ Function description.
+
+ See @ref func.
+
+ @tparam T Template parameter 1
+ @tparam U Template parameter 2
+ @tparam V Template parameter 3
+
+ @param t Function parameter 1
+ @param u Function parameter 2
+ @param v Function parameter 3
+
+ @return nothing
+*/
+template<class T, class U>
+void
+t_func(T t, U const& u, V&& v);
+
+/** Overloaded function 1
+
+ Description
+
+ @param arg1 Parameter 1
+*/
+void
+overload(int arg1);
+
+/** Overloaded function 2
+
+ Description
+
+ @param arg1 Parameter 1
+ @param arg2 Parameter 2
+*/
+void
+overload(int arg1, int arg2);
+
+/** Overloaded function 3
+
+ Description
+
+ @param arg1 Parameter 1
+ @param arg2 Parameter 2
+ @param arg3 Parameter 3
+*/
+void
+overload(int arg1, int arg2, int arg3);
+
+/** Markdown examples
+
+ @par List
+
+ 1. Lists with extra long lines that can *span* multiple lines
+ and overflow even the longest of buffers.
+ 2. With Numbers
+ + Or not
+ + Nesting
+ 1. Deeply
+ + And returning `here`.
+
+ Another list I enjoy:
+
+ -# 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
+
+ @par Table
+
+ First Header | Second Header
+ ------------- | -------------
+ Content Cell | Content Cell
+ Content Cell | Content Cell
+*/
+void markdown();
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+/** Detail class
+
+ Description
+*/
+struct detail_type
+{
+};
+
+/** Detail function
+
+ Description
+*/
+void
+detail_function();
+
+} // detail
+
+//------------------------------------------------------------------------------
+
+/// Nested namespace
+namespace nested {
+
+/** Enum
+
+ Description
+*/
+enum enum_t
+{
+ /// 0
+ zero,
+
+ /// 1
+ one,
+
+ /// 2
+ two
+};
+
+/** Enum class
+
+ Description
+*/
+enum class enum_c
+{
+ /// aaa
+ aaa,
+
+ /// bbb
+ bbb,
+
+ /// ccc
+ ccc
+};
+
+/** Type alias
+
+ Description
+*/
+using type = std::string;
+
+/** Template type alias
+
+ Description
+*/
+template<class T>
+using t_type = std::vector<T>;
+
+/** Variable
+
+ Description
+*/
+extern std::size_t var;
+
+/** Static variable
+
+ Description
+*/
+static std::size_t s_var = 0;
+
+/** Brief with @b bold text.
+
+ Function returning @ref type.
+
+ @return The type
+
+ @see t_func.
+
+ @throw std::exception on error
+ @throw std::domain_error on bad parameters
+
+ @par Thread Safety
+
+ Cannot be called concurrently.
+
+ @note Additional notes.
+
+ @param arg1 Function parameter 1
+ @param arg2 Function parameter 2
+*/
+type
+func(int arg1, std::string arg2);
+
+/** Brief for function starting with _
+
+@return @ref type
+
+@see func
+*/
+type
+_func(float arg1, std::size arg2);
+
+/** Brief.
+
+ Function description.
+
+ See @ref func.
+
+ @tparam T Template parameter 1
+ @tparam U Template parameter 2
+ @tparam V Template parameter 3
+
+ @param t Function parameter 1
+ @param u Function parameter 2
+ @param v Function parameter 3
+
+ @return nothing
+*/
+template<class T, class U>
+void
+t_func(T t, U const& u, V&& v);
+
+/** Overloaded function 1
+
+ Description
+
+ @param arg1 Parameter 1
+*/
+void
+overload(int arg1);
+
+/** Overloaded function 2
+
+ Description
+
+ @param arg1 Parameter 1
+ @param arg2 Parameter 2
+*/
+void
+overload(int arg1, int arg2);
+
+/** Overloaded function 3
+
+ Description
+
+ @param arg1 Parameter 1
+ @param arg2 Parameter 2
+ @param arg3 Parameter 3
+*/
+void
+overload(int arg1, int arg2, int arg3);
+
+} // nested
+
+/// Overloads operators
+struct Num
+{
+
+ /// Addition
+ friend
+ Num
+ operator +(Num, Num);
+
+ /// Subtraction
+ friend
+ Num
+ operator -(Num, Num);
+
+ /// Multiplication
+ friend
+ Num
+ operator *(Num, Num);
+
+ /// Division
+ friend
+ Num
+ operator /(Num, Num);
+
+};
+
+/// @ref Num addition
+Num
+operator +(Num, Num);
+
+/// @ref Num subtraction
+Num
+operator -(Num, Num);
+
+/// @ref Num multiplication
+Num
+operator *(Num, Num);
+
+/// @ref Num division
+Num
+operator /(Num, Num);
+
+/** Template class type.
+
+ Description.
+
+ @tparam T Template parameter 1
+ @tparam U Template parameter 2
+*/
+template<class T, class U>
+class class_type
+{
+public:
+ /** Enum
+
+ Description
+ */
+ enum enum_t
+ {
+ /// 0
+ zero,
+
+ /// 1
+ one,
+
+ /// 2
+ two,
+
+ /// _3
+ _three
+ };
+
+ /** Enum class
+
+ Description
+ */
+ enum class enum_c
+ {
+ /// aaa
+ aaa,
+
+ /// bbb
+ bbb,
+
+ /// ccc
+ ccc,
+
+ /// _ddd
+ _ddd
+ };
+
+ /** Type alias
+
+ Description
+ */
+ using type = std::string;
+
+ /** Template type alias
+
+ Description
+ */
+ template<class T>
+ using t_type = std::vector<T>;
+
+ /** Variable
+
+ Description
+ */
+ extern std::size_t var;
+
+ /** Static variable
+
+ Description
+ */
+ static std::size_t s_var = 0;
+
+ /** Default Ctor
+
+ Description
+ */
+ class_type();
+
+ /** Dtor
+
+ Description
+ */
+ ~class_type();
+
+ /** Brief with @b bold text.
+
+ Function returning @ref type.
+
+ @return The type
+
+ @see t_func.
+
+ @throw std::exception on error
+ @throw std::domain_error on bad parameters
+
+ @par Thread Safety
+
+ Cannot be called concurrently.
+
+ @note Additional notes.
+
+ @param arg1 Function parameter 1
+ @param arg2 Function parameter 2
+ */
+ type
+ func(int arg1, std::string arg2);
+
+ /** Brief.
+
+ Function description.
+
+ See @ref func.
+
+ @tparam T Template parameter 1
+ @tparam U Template parameter 2
+ @tparam V Template parameter 3
+
+ @param t Function parameter 1
+ @param u Function parameter 2
+ @param v Function parameter 3
+
+ @return nothing
+ */
+ template<class T, class U>
+ void
+ t_func(T t, U const& u, V&& v);
+
+ /** Overloaded function 1
+
+ Description
+
+ @param arg1 Parameter 1
+ */
+ void
+ overload(int arg1);
+
+ /** Overloaded function 2
+
+ Description
+
+ @param arg1 Parameter 1
+ @param arg2 Parameter 2
+ */
+ void
+ overload(int arg1, int arg2);
+
+ /** Overloaded function 3
+
+ Description
+
+ @param arg1 Parameter 1
+ @param arg2 Parameter 2
+ @param arg3 Parameter 3
+ */
+ void
+ overload(int arg1, int arg2, int arg3);
+
+ /** Less-than operator
+
+ Description
+ */
+ bool
+ operator< (class_type const& rhs) const;
+
+ /** Greater-than operator
+
+ Description
+ */
+ bool
+ operator> (class_type const& rhs) const;
+
+ /** Less-than-or-equal-to operator
+
+ Description
+ */
+ bool
+ operator<= (class_type const& rhs) const;
+
+ /** Greater-than-or-equal-to operator
+
+ Description
+ */
+ bool
+ operator>= (class_type const& rhs) const;
+
+ /** Equality operator
+
+ Description
+ */
+ bool
+ operator== (class_type const& rhs) const;
+
+ /** Inequality operator
+
+ Description
+ */
+ bool
+ operator!= (class_type const& rhs) const;
+
+ /** Arrow operator
+
+ Description
+ */
+ std::size_t operator->() const;
+
+ /** Index operator
+
+ Description
+ */
+ enum_c& operator[](std::size_t);
+
+ /** Index operator
+
+ Description
+ */
+ enum_c operator[](std::size_t) const;
+
+ /// Public data
+ std::size_t pub_data_;
+
+ /// Public static data
+ static std::size_t pub_sdata_;
+
+protected:
+ /** Protected data
+
+ Description
+ */
+ std::size_t prot_data_;
+
+ /** Protected enum
+
+ Description
+ */
+ enum_c _prot_enum;
+
+ /** Static protected data
+
+ Description
+ */
+ static std::size_t prot_sdata_;
+
+ /** Protected type
+
+ Description
+ */
+ struct prot_type
+ {
+ };
+
+ /** Protected function
+
+ Description
+ */
+ void prot_memfn();
+
+ /** Protected function returning @ref prot_type
+
+ Description
+ */
+ prot_type prot_rvmemfn();
+
+ /** Protected static member function
+
+ Description
+ */
+ static void static_prot_memfn();
+
+private:
+ /** Private data
+
+ Description
+ */
+ std::size_t priv_data_;
+
+ /** Static private data
+
+ Description
+ */
+ static std::size_t priv_sdata_;
+
+ /** Private type
+
+ Description
+ */
+ struct priv_type
+ {
+ };
+
+ /** Private function
+
+ Description
+ */
+ void priv_memfn();
+
+ /** Private function returning *ref priv_type
+
+ Description
+ */
+ priv_type priv_rvmemfn();
+
+ /** Static private member function
+
+ Description
+ */
+ static void static_priv_memfn();
+
+ /** Friend class
+
+ Description
+ */
+ friend friend_class;
+};
+
+/// Other base class 1
+class other_base_class1
+{
+};
+
+/// Other base class 2
+class other_base_class2
+{
+};
+
+/** Derived type
+
+ Description
+*/
+template<class T, class U>
+class derived_type :
+ public class_type<T, U>,
+ protected other_base_class1,
+ private other_base_class2
+{
+};
+
+/** References to all identifiers:
+
+ Description one @ref one
+
+ @par See Also
+
+ @li @ref type
+
+ @li @ref t_type
+
+ @li @ref vod
+
+ @li @ref impdef
+
+ @li @ref var
+
+ @li @ref s_var
+
+ @li @ref func
+
+ @li @ref t_func
+
+ @li @ref overload
+
+ @li @ref nested::enum_t : @ref nested::zero @ref nested::one @ref nested::two
+
+ @li @ref nested::enum_c : nested::enum_c::aaa @ref nested::enum_c::bbb @ref nested::enum_c::ccc
+
+ @li @ref nested::type
+
+ @li @ref nested::t_type
+
+ @li @ref nested::var
+
+ @li @ref nested::s_var
+
+ @li @ref nested::func
+
+ @li @ref nested::t_func
+
+ @li @ref nested::overload
+
+ @li @ref class_type
+
+ @li @ref class_type::enum_t : @ref class_type::zero @ref class_type::one @ref class_type::two @ref class_type::_three
+
+ @li @ref class_type::enum_c : class_type::enum_c::aaa @ref class_type::enum_c::bbb @ref class_type::enum_c::ccc class_type::enum_c::_ddd
+
+ @li @ref class_type::type
+
+ @li @ref class_type::t_type
+
+ @li @ref class_type::var
+
+ @li @ref class_type::s_var
+
+ @li @ref class_type::class_type
+
+ @li @ref class_type::func
+
+ @li @ref class_type::t_func
+
+ @li @ref class_type::overload
+
+ @li @ref class_type::pub_data_
+
+ @li @ref class_type::pub_sdata_
+
+ @li @ref class_type::_prot_enum
+
+ @li @ref class_type::prot_type
+
+ @li @ref class_type::priv_type
+
+ @li @ref derived_type
+
+ @li @ref Num
+
+*/
+void all_ref();
+
+} // example
+
+namespace other {
+
+/// other function
+void func();
+
+/// other class
+struct class_type
+{
+};
+
+
+} // other
+
+#endif
diff --git a/src/boost/tools/docca/example/index.xml b/src/boost/tools/docca/example/index.xml
new file mode 100644
index 000000000..c364e4ed2
--- /dev/null
+++ b/src/boost/tools/docca/example/index.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "boostbook.dtd">
+
+<!--
+ Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot 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)
+-->
+
+<section id="docca.index">
+ <title>Index</title>
+ <index/>
+</section>
diff --git a/src/boost/tools/docca/example/main.qbk b/src/boost/tools/docca/example/main.qbk
new file mode 100644
index 000000000..43ddf6ae1
--- /dev/null
+++ b/src/boost/tools/docca/example/main.qbk
@@ -0,0 +1,28 @@
+[/
+ Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot 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)
+]
+
+[library docca
+ [quickbook 1.6]
+ [copyright 2016 Vinnie Falco]
+ [purpose Documentation Library]
+ [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])
+ ]
+ [category template]
+ [category generic]
+]
+
+[template mdash[] '''&mdash; ''']
+[template indexterm1[term1] '''<indexterm><primary>'''[term1]'''</primary></indexterm>''']
+[template indexterm2[term1 term2] '''<indexterm><primary>'''[term1]'''</primary><secondary>'''[term2]'''</secondary></indexterm>''']
+
+[section:ref Reference]
+[include reference.qbk]
+[endsect]
+[xinclude index.xml]
diff --git a/src/boost/tools/docca/example/makeqbk.sh b/src/boost/tools/docca/example/makeqbk.sh
new file mode 100644
index 000000000..e6fa0c30a
--- /dev/null
+++ b/src/boost/tools/docca/example/makeqbk.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/bash
+
+# Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot 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)
+
+mkdir -p temp
+doxygen source.dox
+cd temp
+xsltproc combine.xslt index.xml > all.xml
+xsltproc ../reference.xsl all.xml > ../reference.qbk
+
diff --git a/src/boost/tools/docca/example/reference.xsl b/src/boost/tools/docca/example/reference.xsl
new file mode 100644
index 000000000..de5675294
--- /dev/null
+++ b/src/boost/tools/docca/example/reference.xsl
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Variables (Edit for your project) -->
+<xsl:variable name="doc-ref" select="'docca.ref.'"/>
+<xsl:variable name="doc-ns" select="'example'"/>
+<xsl:variable name="debug" select="0"/>
+<xsl:variable name="private" select="0"/>
+<!-- End Variables -->
+
+<xsl:include href="../include/docca/doxygen.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/src/boost/tools/docca/example/source.dox b/src/boost/tools/docca/example/source.dox
new file mode 100644
index 000000000..c55616ee7
--- /dev/null
+++ b/src/boost/tools/docca/example/source.dox
@@ -0,0 +1,333 @@
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = "docca"
+PROJECT_NUMBER =
+PROJECT_BRIEF = Documentation Library
+PROJECT_LOGO =
+OUTPUT_DIRECTORY =
+CREATE_SUBDIRS = NO
+ALLOW_UNICODE_NAMES = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
+ALWAYS_DETAILED_SEC = YES
+INLINE_INHERITED_MEMB = YES
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH = include/
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = YES
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = YES
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 4
+ALIASES =
+TCL_SUBST =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+EXTENSION_MAPPING =
+MARKDOWN_SUPPORT = YES
+AUTOLINK_SUPPORT = YES
+BUILTIN_STL_SUPPORT = NO
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+GROUP_NESTED_COMPOUNDS = NO
+SUBGROUPING = YES
+INLINE_GROUPED_CLASSES = NO
+INLINE_SIMPLE_STRUCTS = NO
+TYPEDEF_HIDES_STRUCT = NO
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = YES
+EXTRACT_PACKAGE = NO
+EXTRACT_STATIC = YES
+EXTRACT_LOCAL_CLASSES = NO
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+HIDE_COMPOUND_REFERENCE= NO
+SHOW_INCLUDE_FILES = NO
+SHOW_GROUPED_MEMB_INC = NO
+FORCE_LOCAL_INCLUDES = NO
+INLINE_INFO = NO
+SORT_MEMBER_DOCS = NO
+SORT_BRIEF_DOCS = NO
+SORT_MEMBERS_CTORS_1ST = YES
+SORT_GROUP_NAMES = NO
+SORT_BY_SCOPE_NAME = NO
+STRICT_PROTO_MATCHING = NO
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = NO
+GENERATE_BUGLIST = NO
+GENERATE_DEPRECATEDLIST= NO
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = NO
+SHOW_FILES = NO
+SHOW_NAMESPACES = NO
+FILE_VERSION_FILTER =
+LAYOUT_FILE =
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_AS_ERROR = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = include/docca/example.hpp
+
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS =
+RECURSIVE = NO
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = YES
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+FILTER_SOURCE_PATTERNS =
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION = NO
+REFERENCES_LINK_SOURCE = YES
+SOURCE_TOOLTIPS = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+CLANG_ASSISTED_PARSING = NO
+CLANG_OPTIONS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 1
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = NO
+HTML_OUTPUT = dhtm
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_EXTRA_STYLESHEET =
+HTML_EXTRA_FILES =
+HTML_COLORSTYLE_HUE = 220
+HTML_COLORSTYLE_SAT = 100
+HTML_COLORSTYLE_GAMMA = 80
+HTML_TIMESTAMP = NO
+HTML_DYNAMIC_SECTIONS = NO
+HTML_INDEX_NUM_ENTRIES = 100
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+DOCSET_PUBLISHER_NAME = Publisher
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+GENERATE_QHP = NO
+QCH_FILE =
+QHP_NAMESPACE = org.doxygen.Project
+QHP_VIRTUAL_FOLDER = doc
+QHP_CUST_FILTER_NAME =
+QHP_CUST_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
+QHG_LOCATION =
+GENERATE_ECLIPSEHELP = NO
+ECLIPSE_DOC_ID = org.doxygen.Project
+DISABLE_INDEX = NO
+GENERATE_TREEVIEW = NO
+ENUM_VALUES_PER_LINE = 4
+TREEVIEW_WIDTH = 250
+EXT_LINKS_IN_WINDOW = NO
+FORMULA_FONTSIZE = 10
+FORMULA_TRANSPARENT = YES
+USE_MATHJAX = NO
+MATHJAX_FORMAT = HTML-CSS
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_EXTENSIONS =
+MATHJAX_CODEFILE =
+SEARCHENGINE = YES
+SERVER_BASED_SEARCH = NO
+EXTERNAL_SEARCH = NO
+SEARCHENGINE_URL =
+SEARCHDATA_FILE = searchdata.xml
+EXTERNAL_SEARCH_ID =
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4
+EXTRA_PACKAGES =
+LATEX_HEADER =
+LATEX_FOOTER =
+LATEX_EXTRA_STYLESHEET =
+LATEX_EXTRA_FILES =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+LATEX_SOURCE_CODE = NO
+LATEX_BIB_STYLE = plain
+LATEX_TIMESTAMP = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+RTF_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_SUBDIR =
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = YES
+XML_OUTPUT = temp/
+XML_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+GENERATE_DOCBOOK = NO
+DOCBOOK_OUTPUT = docbook
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED = DOXYGEN \
+ GENERATING_DOCS \
+ _MSC_VER
+
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+EXTERNAL_PAGES = YES
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = NO
+MSCGEN_PATH =
+DIA_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+DOT_NUM_THREADS = 0
+DOT_FONTNAME = Helvetica
+DOT_FONTSIZE = 10
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+UML_LIMIT_NUM_FIELDS = 10
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+INTERACTIVE_SVG = NO
+DOT_PATH =
+DOTFILE_DIRS =
+MSCFILE_DIRS =
+DIAFILE_DIRS =
+PLANTUML_JAR_PATH =
+PLANTUML_INCLUDE_PATH =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 0
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
diff --git a/src/boost/tools/docca/include/docca/assemble-quickbook.xsl b/src/boost/tools/docca/include/docca/assemble-quickbook.xsl
new file mode 100644
index 000000000..fe39870a0
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/assemble-quickbook.xsl
@@ -0,0 +1,20 @@
+<!-- Concatenate all the text files from a directory into one big file -->
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="xs">
+
+ <xsl:output method="text"/>
+
+ <!-- TODO: remove this coupling; should be configured in the build file somehow
+ (add support for Saxon parameter-passing in the build?) -->
+ <xsl:param name="input-dir" select="'stage2/results'"/>
+
+ <xsl:template match="page">
+ <xsl:copy-of select="unparsed-text(concat($input-dir, '/', @href))"/>
+ <xsl:apply-templates select="page"/>
+ <!-- Two line breaks before to ensure it doesn't get absorbed into a preceding list -->
+ <xsl:text>&#xA;&#xA;[endsect]&#xA;</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/base-extract-xml-pages.xsl b/src/boost/tools/docca/include/docca/base-extract-xml-pages.xsl
new file mode 100644
index 000000000..685380c4d
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/base-extract-xml-pages.xsl
@@ -0,0 +1,427 @@
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:d="http://github.com/vinniefalco/docca"
+ exclude-result-prefixes="xs d"
+ expand-text="yes">
+
+ <!-- TODO: make sure this doesn't screw up any formatting -->
+ <!-- NEW TODO: verify we don't need/want this -->
+ <!--
+ <xsl:output indent="yes"/>
+ -->
+
+ <xsl:include href="common.xsl"/>
+
+ <xsl:key name="visible-memberdefs-by-id"
+ match="memberdef[$include-private-members or not(@prot eq 'private')]"
+ use="@id"/>
+
+ <xsl:key name="elements-by-refid" match="compound | member" use="@refid"/>
+
+ <xsl:variable name="index-xml" select="/"/>
+
+ <xsl:template match="/">
+ <index>
+ <xsl:apply-templates select="/doxygenindex/compound"/>
+ </index>
+ <!-- Testing the ID-related functions
+ <xsl:value-of select="replace(d:extract-ns('put'), '::$', '')"/>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:value-of select="replace(d:extract-ns('foobar::parser::put'), '::$', '')"/>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:value-of select="d:extract-ns('foobar::parser::put&lt;foo::bar, bat::bang>')"/>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:value-of select="d:strip-ns('boost::beast::http::parser::basic_parser&lt; foo::isRequest, bar::parser &gt;')"/>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:value-of select="d:strip-doc-ns('boost::beast::http::parser::basic_parser&lt; foo::isRequest, bar::parser &gt;')"/>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:value-of select="d:make-id('boost::beast::http::parser::basic_parser&lt; foo::isRequest, bar::parser &gt;')"/>
+ -->
+ </xsl:template>
+
+ <!-- Default implementation; can be customized/overridden -->
+ <xsl:function name="d:should-ignore-compound">
+ <xsl:param name="compound" as="element(compound)"/>
+ <xsl:sequence select="false()"/>
+ </xsl:function>
+
+ <xsl:template match="compound[d:should-ignore-compound(.)]"/>
+ <xsl:template match="compound">
+ <!-- Load each input file only once -->
+ <xsl:variable name="source-doc" select="d:get-source-doc(.)"/>
+ <!-- Ignore private classes unless private members are enabled -->
+ <xsl:if test="$include-private-members or not($source-doc/doxygen/compounddef/@prot eq 'private')">
+ <!-- Look up memberdefs (and constrain by visibility) only once -->
+ <xsl:variable name="memberdefs" select="key('visible-memberdefs-by-id', member/@refid, $source-doc)"/>
+ <!-- Create a filtered copy of members within their minimal context, listing only the visible ones -->
+ <xsl:variable name="visible-members" as="element(member)*">
+ <xsl:variable name="compound" as="element()">
+ <compound kind="{@kind}" refid="{@refid}">
+ <name>{name}</name>
+ <xsl:copy-of select="member[@refid = $memberdefs/@id]"/>
+ </compound>
+ </xsl:variable>
+ <xsl:sequence select="$compound/member"/>
+ </xsl:variable>
+ <xsl:apply-templates mode="create-page" select=".">
+ <xsl:with-param name="source-doc" select="$source-doc" tunnel="yes"/>
+ <xsl:with-param name="memberdefs" select="$memberdefs" tunnel="yes"/>
+ <xsl:with-param name="visible-members" select="$visible-members" tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:function name="d:get-source-doc" as="document-node()">
+ <xsl:param name="compound" as="element(compound)"/>
+ <xsl:sequence select="document($compound/@refid||'.xml', $index-xml)"/>
+ </xsl:function>
+
+ <!-- Split up the content into class, struct, and member pages -->
+ <xsl:template mode="create-page" match="*"/>
+ <xsl:template mode="create-page" match="compound[@kind = 'namespace']">
+ <xsl:apply-templates mode="child-pages" select="."/>
+ </xsl:template>
+ <xsl:template mode="create-page" match="compound[@kind = ('class','struct')]
+ | compound/member">
+ <xsl:variable name="page-id" as="xs:string">
+ <xsl:apply-templates mode="page-id" select="."/>
+ </xsl:variable>
+ <page id="{$page-id}" href="{$page-id}.xml">
+ <xsl:result-document href="xml-pages/{$page-id}.xml">
+ <xsl:apply-templates mode="page-content" select=".">
+ <xsl:with-param name="page-id" select="$page-id" tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:result-document>
+ <xsl:apply-templates mode="child-pages" select="."/>
+ </page>
+ </xsl:template>
+
+ <!-- Create the member page for each child (or, if overloaded, the overload-list page) -->
+ <xsl:template mode="child-pages" match="compound">
+ <xsl:param name="visible-members" tunnel="yes"/>
+ <!-- Create a page for each unique member name -->
+ <xsl:for-each select="$visible-members[not(name = preceding-sibling::member/name)]">
+ <xsl:apply-templates mode="create-page" select=".">
+ <xsl:with-param name="is-overload-list-page" select="d:is-overloaded(.)" tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- A member page doesn't have children, unless it is an overload-list page -->
+ <xsl:template mode="child-pages" match="compound/member">
+ <xsl:param name="is-overload-list-page" tunnel="yes"/>
+ <xsl:if test="$is-overload-list-page">
+ <xsl:apply-templates mode="create-page" select="d:overloaded-members(.)">
+ <xsl:with-param name="is-overload-list-page" select="false()" tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:template>
+
+
+ <xsl:template mode="page-id" match="compound">{d:make-id(name)}</xsl:template>
+ <xsl:template mode="page-id" match="member">
+ <xsl:param name="is-overload-list-page" tunnel="yes"/>
+ <xsl:value-of>
+ <xsl:apply-templates mode="base-member-page-id" select="."/>
+ <!-- Append the overload-specific suffix, if applicable -->
+ <xsl:if test="d:is-overloaded(.) and not($is-overload-list-page)">
+ <xsl:value-of select="d:make-id('.overload'||d:overload-position(.))"/>
+ </xsl:if>
+ </xsl:value-of>
+ </xsl:template>
+
+ <xsl:function name="d:is-overloaded" as="xs:boolean">
+ <xsl:param name="member" as="element(member)"/>
+ <xsl:sequence select="exists(d:overloaded-members($member)[2])"/>
+ </xsl:function>
+
+ <xsl:function name="d:overload-position" as="xs:integer">
+ <xsl:param name="member" as="element(member)"/>
+ <xsl:sequence select="1 + count($member/preceding-sibling::member[name eq $member/name])"/>
+ </xsl:function>
+
+ <xsl:function name="d:overloaded-members" as="element(member)+">
+ <xsl:param name="member" as="element(member)"/>
+ <xsl:sequence select="$member/../member[name eq $member/name]"/>
+ </xsl:function>
+
+
+ <xsl:template mode="base-member-page-id" priority="1"
+ match="compound[@kind eq 'namespace']
+ /member">{d:make-id(../name||'::'||name)}</xsl:template>
+ <xsl:template mode="base-member-page-id" match="compound/member">{d:make-id(../name||'.' ||name)}</xsl:template>
+
+
+ <!-- The content for a class or struct is the original source document, pared down some -->
+ <xsl:template mode="page-content" match="compound">
+ <xsl:param name="source-doc" tunnel="yes"/>
+ <xsl:apply-templates mode="compound-page" select="$source-doc"/>
+ </xsl:template>
+
+ <!-- By default, copy everything -->
+ <xsl:template mode="compound-page" match="@* | node()" name="copy-in-compound-page">
+ <xsl:copy>
+ <xsl:apply-templates mode="#current" select="@*"/>
+ <xsl:apply-templates mode="compound-page-insert" select="."/>
+ <xsl:apply-templates mode="#current"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- By default, don't insert anything -->
+ <xsl:template mode="compound-page-insert" match="*"/>
+
+ <xsl:template mode="compound-page" match="listofallmembers"/>
+
+ <xsl:template mode="compound-page" match="memberdef/@*"/>
+
+ <!-- But directly inside <memberdef>, don't copy anything... -->
+ <xsl:template mode="compound-page" match="memberdef/node()"/>
+
+ <!-- ...except for <name>, <briefdescription>, and <type> -->
+ <xsl:template mode="compound-page" match="memberdef/name
+ | memberdef/briefdescription
+ | memberdef/type" priority="1">
+ <xsl:call-template name="copy-in-compound-page"/>
+ </xsl:template>
+
+ <!-- Insert a reference to each child member's page ID -->
+ <xsl:template mode="compound-page-insert" match="memberdef">
+ <xsl:attribute name="d:page-refid" select="d:make-id(/doxygen/compounddef/compoundname||'.'||name)"/>
+ </xsl:template>
+
+ <!-- Alternative implementation in case we need to start controlling whitespace more
+ <xsl:template mode="compound-page" match="memberdef">
+ <memberdef>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:copy-of select="name"/>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:copy-of select="briefdescription"/>
+ </memberdef>
+ </xsl:template>
+ -->
+
+ <!-- The content for a member page is a subset of the source document -->
+ <xsl:template mode="page-content" match="compound/member">
+ <xsl:param name="is-overload-list-page" tunnel="yes"/>
+ <xsl:choose>
+ <xsl:when test="$is-overload-list-page">
+ <!-- For the overload list page, include the content for every like-named member -->
+ <xsl:apply-templates mode="list-page" select=".">
+ <xsl:with-param name="applicable-members" select="d:overloaded-members(.)" tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Otherwise, this page is just for one implementation (whether overloaded or not) -->
+ <xsl:apply-templates mode="member-page" select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template mode="list-page member-page" match="member" priority="2">
+ <xsl:param name="applicable-members" as="element(member)+" select="." tunnel="yes"/>
+ <xsl:param name="source-doc" tunnel="yes"/>
+ <xsl:param name="memberdefs" tunnel="yes"/>
+ <xsl:apply-templates mode="#current" select="$source-doc">
+ <xsl:with-param name="target-memberdefs"
+ select="$memberdefs[@id = $applicable-members/@refid]"
+ tunnel="yes"/>
+ <xsl:with-param name="member" select="." tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Always copy the name of the parent compound -->
+ <xsl:template mode="list-page member-page" match="compoundname" priority="2">
+ <xsl:copy-of select="."/>
+ </xsl:template>
+
+ <!-- Otherwise, only copy an element if it's the target member or one of its ancestors -->
+ <xsl:template mode="list-page member-page" match="*" priority="1">
+ <xsl:param name="target-memberdefs" tunnel="yes"/>
+ <xsl:if test=". intersect $target-memberdefs/ancestor-or-self::*">
+ <xsl:next-match/>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- By default, copy everything -->
+ <xsl:template mode="list-page" match="@* | node()">
+ <xsl:copy>
+ <xsl:apply-templates mode="#current" select="@*"/>
+ <xsl:apply-templates mode="list-page-insert" select="."/>
+ <xsl:apply-templates mode="#current"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- By default, don't insert anything -->
+ <xsl:template mode="list-page-insert" match="*"/>
+
+
+ <!-- By default, copy everything -->
+ <xsl:template mode="member-page
+ copy-member-content" match="@* | node()">
+ <xsl:copy>
+ <xsl:apply-templates mode="#current" select="@*"/>
+ <xsl:apply-templates mode="member-page-insert" select="."/>
+ <xsl:apply-templates mode="#current"/>
+ <xsl:apply-templates mode="member-page-append" select="."/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- By default, don't insert or append anything -->
+ <xsl:template mode="member-page-insert
+ member-page-append" match="*"/>
+
+ <!-- Strip out extraneous whitespace -->
+ <xsl:template mode="list-page member-page" match="compounddef/text() | sectiondef/text()"/>
+
+ <!-- Switch to an unfiltered copy once we're done filtering out the undesired elements -->
+ <xsl:template mode="list-page member-page" match="memberdef/node()" priority="2">
+ <xsl:apply-templates mode="copy-member-content" select="."/>
+ </xsl:template>
+
+ <!-- Add the page ID to the top of all page types -->
+ <xsl:template mode="compound-page-insert
+ member-page-insert
+ list-page-insert" match="/doxygen" priority="2">
+ <xsl:param name="page-id" tunnel="yes"/>
+ <xsl:attribute name="d:page-id" select="$page-id"/>
+ <xsl:next-match/>
+ </xsl:template>
+
+ <!-- Also, if applicable, insert the overload position and/or base compound reference of this member -->
+ <xsl:template mode="member-page-insert" match="/doxygen" priority="1">
+ <xsl:param name="member" tunnel="yes"/>
+ <xsl:if test="d:is-overloaded($member)">
+ <xsl:attribute name="d:overload-position" select="d:overload-position($member)"/>
+ <xsl:attribute name="d:overload-size" select="count(d:overloaded-members($member))"/>
+ </xsl:if>
+ <xsl:if test="$member[not(starts-with(@refid, ../@refid))]">
+ <xsl:variable name="base-compound" select="$index-xml/*/compound[starts-with($member/@refid, @refid)]
+ [not(d:should-ignore-compound(.))]"/>
+ <xsl:apply-templates mode="base-compound-atts" select="$base-compound"/>
+ </xsl:if>
+ <xsl:next-match/>
+ </xsl:template>
+
+ <xsl:template mode="base-compound-atts" match="compound">
+ <xsl:attribute name="d:base-compound-name" select="d:strip-doc-ns(name)"/>
+ <xsl:attribute name="d:base-compound-refid">
+ <xsl:apply-templates mode="page-id" select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- Make data available for the typedef tables, if applicable -->
+ <xsl:template mode="member-page-append" match="memberdef[@kind eq 'typedef']
+ [type/ref]
+ [not(contains(type, '*'))]">
+ <xsl:for-each select="type/ref">
+ <d:referenced-typedef-class>
+ <xsl:variable name="compound" select="d:get-target-element(.)[self::compound]"/>
+ <xsl:apply-templates mode="compound-page" select="$compound ! d:get-source-doc(.)/*/compounddef"/>
+ </d:referenced-typedef-class>
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- Finally, add the page type -->
+ <xsl:template mode="compound-page-insert" match="/doxygen">
+ <xsl:attribute name="d:page-type" select="'compound'"/>
+ </xsl:template>
+ <xsl:template mode="member-page-insert" match="/doxygen">
+ <xsl:attribute name="d:page-type" select="'member'"/>
+ </xsl:template>
+ <xsl:template mode="list-page-insert" match="/doxygen">
+ <xsl:attribute name="d:page-type" select="'overload-list'"/>
+ </xsl:template>
+
+ <!-- For overload-list pages, include the page id for each member -->
+ <xsl:template mode="list-page-insert" match="memberdef">
+ <xsl:param name="applicable-members" tunnel="yes"/>
+ <xsl:variable name="this-id" select="@id"/>
+ <xsl:variable name="original-member" select="$applicable-members[@refid eq $this-id]"/>
+ <xsl:attribute name="d:page-refid">
+ <xsl:apply-templates mode="page-id" select="$original-member">
+ <xsl:with-param name="is-overload-list-page" select="false()" tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- For public innerclasses, insert the referenced class inline -->
+ <xsl:template mode="compound-page-insert" match="innerclass[@prot eq 'public']">
+ <xsl:attribute name="d:page-refid" select="d:make-id(.)"/>
+ <d:referenced-inner-class>
+ <xsl:variable name="compound" select="d:get-target-element(.)" as="element(compound)"/>
+ <xsl:apply-templates mode="compound-page" select="d:get-source-doc($compound)/*/compounddef"/>
+ </d:referenced-inner-class>
+ </xsl:template>
+
+ <!-- TODO: refactor this rule -->
+ <!-- Resolve the referenced page IDs for later link generation -->
+ <xsl:template mode="compound-page-insert member-page-insert" match="ref" name="insert-referenced-page-id">
+ <xsl:attribute name="d:refid">
+ <xsl:apply-templates mode="page-id" select="d:get-target-element(.)"/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:function name="d:get-target-element" as="element()?"> <!-- to allow for partial builds -->
+ <!--
+ <xsl:function name="d:get-target-element" as="element()">
+ -->
+ <xsl:param name="ref" as="element()"/> <!-- <ref> or <innerclass> or... -->
+ <xsl:variable name="referenced-elements" select="key('elements-by-refid', $ref/@refid, $index-xml)"/>
+ <xsl:variable name="result" as="element()?">
+ <xsl:choose>
+ <!-- Handle the case where the referenced element appears two or more times in index.xml -->
+ <!-- If there's no ambiguity, we're done! -->
+ <xsl:when test="count($referenced-elements) eq 1">
+ <xsl:apply-templates mode="find-target-element" select="$referenced-elements"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Otherwise, see if a namespace in the link text successfully disambiguates -->
+ <xsl:variable name="qualified-reference" as="element()*">
+ <xsl:variable name="parent-in-link-text"
+ select="if (contains($ref,'::'))
+ then d:extract-ns-without-suffix($ref)
+ else ''"/>
+ <xsl:sequence select="$referenced-elements[ends-with(parent::compound/name, '::'||$parent-in-link-text)]"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="count($qualified-reference) eq 1">
+ <xsl:apply-templates mode="find-target-element" select="$qualified-reference"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Otherwise, favor the member that's in the same class or namespace as the current page -->
+ <xsl:variable name="sibling-reference" as="element()*">
+ <xsl:variable name="compound-for-current-page" select="root($ref)/doxygen/compounddef/compoundname/string()"/>
+ <xsl:sequence select="$referenced-elements[parent::compound/name eq $compound-for-current-page]"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="count($sibling-reference) eq 1">
+ <xsl:apply-templates mode="find-target-element" select="$sibling-reference"/>
+ </xsl:when>
+ <!-- If all else fails, give up and just use the first one -->
+ <xsl:otherwise>
+ <xsl:apply-templates mode="find-target-element" select="$referenced-elements[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="not($result)">
+ <xsl:message>Unable to find referenced ID: <xsl:value-of select="$ref/@refid"/></xsl:message>
+ </xsl:if>
+ <xsl:sequence select="$result"/>
+ </xsl:function>
+
+ <xsl:template mode="find-target-element" match="compound | member">
+ <xsl:sequence select="."/>
+ </xsl:template>
+
+ <!-- In the index XML, enumvalue "members" immediately follow the corresponding enum member -->
+ <xsl:template mode="find-target-element" match="member[@kind eq 'enumvalue']">
+ <xsl:sequence select="preceding-sibling::member[@kind eq 'enum'][1]"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/base-stage1.xsl b/src/boost/tools/docca/include/docca/base-stage1.xsl
new file mode 100644
index 000000000..6e5d47977
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/base-stage1.xsl
@@ -0,0 +1,590 @@
+<!DOCTYPE xsl:stylesheet [
+<!-- TODO: complete this list -->
+<!ENTITY BLOCK_LEVEL_ELEMENT "programlisting
+ | itemizedlist
+ | orderedlist
+ | parameterlist
+ | simplesect
+ | para
+ | table
+ | linebreak">
+]>
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:d="http://github.com/vinniefalco/docca"
+ exclude-result-prefixes="xs d"
+ expand-text="yes">
+
+ <xsl:include href="common.xsl"/>
+
+ <xsl:output indent="yes"/>
+
+ <xsl:template match="/doxygen" priority="1">
+ <page id="{@d:page-id}" type="{@d:page-type}">
+ <xsl:apply-templates mode="index-term-atts" select="."/>
+ <title>
+ <xsl:apply-templates mode="page-title" select="."/>
+ </title>
+ <xsl:apply-templates select="@d:base-compound-refid"/>
+ <xsl:next-match/>
+ </page>
+ </xsl:template>
+
+ <xsl:template match="@d:base-compound-refid">
+ <div>(Inherited from <ref d:refid="{.}">{../@d:base-compound-name}</ref>)</div>
+ </xsl:template>
+
+ <!-- Put an index term on every page except class (compound) and overloaded-member pages -->
+ <xsl:template mode="index-term-atts" match="doxygen[@d:page-type eq 'compound' or @d:overload-position]"/>
+ <xsl:template mode="index-term-atts" match="doxygen">
+ <xsl:attribute name="primary-index-term">
+ <xsl:apply-templates mode="primary-index-term" select="."/>
+ </xsl:attribute>
+ <xsl:apply-templates mode="secondary-index-term-att" select="."/>
+ </xsl:template>
+
+ <!-- By default, use the member name as the primary term... -->
+ <xsl:template mode="primary-index-term" match="doxygen">
+ <xsl:apply-templates mode="member-name" select="."/>
+ </xsl:template>
+ <!-- ...and the compound name as the secondary term. -->
+ <xsl:template mode="secondary-index-term-att" match="doxygen">
+ <xsl:attribute name="secondary-index-term">
+ <xsl:apply-templates mode="compound-name" select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- But with namespace members, use the fully-qualified name as the primary term... -->
+ <xsl:template mode="primary-index-term" match="doxygen[compounddef/@kind eq 'namespace']">
+ <xsl:apply-templates mode="compound-and-member-name" select="."/>
+ </xsl:template>
+ <!-- ...and no secondary term. -->
+ <xsl:template mode="secondary-index-term-att" match="doxygen[compounddef/@kind eq 'namespace']"/>
+
+ <xsl:template mode="compound-name" match="doxygen"
+ >{d:strip-doc-ns(compounddef/compoundname)}</xsl:template>
+
+ <xsl:template mode="member-name" match="doxygen"
+ >{(compounddef/sectiondef/memberdef/name)[1]}</xsl:template>
+
+ <xsl:template mode="compound-and-member-name" match="doxygen">
+ <xsl:variable name="compound-name" as="xs:string">
+ <xsl:apply-templates mode="compound-name" select="."/>
+ </xsl:variable>
+ <xsl:if test="$compound-name">{$compound-name}::</xsl:if>
+ <xsl:apply-templates mode="member-name" select="."/>
+ </xsl:template>
+
+ <xsl:template mode="page-title" match="doxygen[@d:page-type eq 'compound']">
+ <xsl:apply-templates mode="compound-name" select="."/>
+ </xsl:template>
+ <xsl:template mode="page-title" match="doxygen">
+ <xsl:apply-templates mode="compound-and-member-name" select="."/>
+ <xsl:apply-templates mode="overload-qualifier" select="."/>
+ </xsl:template>
+
+ <xsl:template mode="overload-qualifier" match="doxygen"/>
+ <xsl:template mode="overload-qualifier" match="doxygen[@d:overload-position]">
+ <xsl:text> (</xsl:text>
+ <xsl:value-of select="@d:overload-position"/>
+ <xsl:text> of </xsl:text>
+ <xsl:value-of select="@d:overload-size"/>
+ <xsl:text> overloads)</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template match="/doxygen[@d:page-type eq 'compound']">
+ <xsl:apply-templates select="compounddef"/>
+ </xsl:template>
+
+ <xsl:template match="/doxygen[@d:page-type eq 'member']">
+ <xsl:apply-templates select="compounddef/sectiondef/memberdef"/> <!-- should just be one -->
+ </xsl:template>
+
+ <xsl:template match="/doxygen[@d:page-type eq 'overload-list']">
+ <xsl:apply-templates select="(compounddef/sectiondef/memberdef)[1]"/>
+ </xsl:template>
+
+ <xsl:template match="compounddef | memberdef" priority="2">
+ <xsl:next-match/>
+ <xsl:apply-templates mode="includes" select=".">
+ <xsl:with-param name="is-footer" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- For convenience, pre-calculate some member sequences and tunnel them through -->
+ <xsl:template match="compounddef" priority="1">
+ <xsl:next-match>
+ <xsl:with-param name="public-types"
+ select="sectiondef[@kind eq 'public-type']/memberdef
+ | innerclass[@prot eq 'public'][not(d:should-ignore-inner-class(.))]"
+ tunnel="yes"/>
+ <xsl:with-param name="friends"
+ select="sectiondef[@kind eq 'friend']/memberdef[not(type eq 'friend class')]
+ [not(d:should-ignore-friend(.))]"
+ tunnel="yes"/>
+ </xsl:next-match>
+ </xsl:template>
+
+ <xsl:template match="compounddef">
+ <xsl:param name="public-types" tunnel="yes"/>
+ <xsl:param name="friends" tunnel="yes"/>
+
+ <xsl:apply-templates select="briefdescription"/>
+
+ <xsl:apply-templates mode="section"
+ select=".,
+
+ ( $public-types/self::memberdef/..
+ | $public-types/self::innerclass
+ )[1],
+
+ sectiondef[@kind = ( 'public-func', 'public-static-func')],
+ sectiondef[@kind = ('protected-func','protected-static-func')],
+ sectiondef[@kind = ( 'private-func', 'private-static-func')][$include-private-members],
+
+ sectiondef[@kind = ( 'public-attrib', 'public-static-attrib')],
+ sectiondef[@kind = ('protected-attrib','protected-static-attrib')],
+ sectiondef[@kind = ( 'private-attrib', 'private-static-attrib')][$include-private-members],
+
+ $friends/..,
+
+ sectiondef[@kind eq 'related'],
+
+ detaileddescription
+ "/>
+ </xsl:template>
+
+ <xsl:template match="memberdef">
+ <xsl:apply-templates select="briefdescription"/>
+ <xsl:apply-templates mode="section" select="., detaileddescription"/>
+ </xsl:template>
+
+ <xsl:template match="memberdef[@kind eq 'enum']">
+ <xsl:apply-templates select="briefdescription"/>
+ <xsl:apply-templates mode="section" select="., parent::sectiondef, detaileddescription"/>
+ </xsl:template>
+
+ <xsl:template match="memberdef[/doxygen/@d:page-type eq 'overload-list']">
+ <xsl:apply-templates mode="overload-list" select="../../sectiondef/memberdef"/>
+ </xsl:template>
+
+ <xsl:template mode="overload-list" match="memberdef">
+ <xsl:apply-templates select="briefdescription[not(. = ../preceding-sibling::*/briefdescription)]"/>
+ <overloaded-member>
+ <xsl:apply-templates mode="normalize-params" select="templateparamlist"/>
+ <xsl:apply-templates mode="modifier" select="(@explicit, @friend, @static)[. eq 'yes'],
+ @virt[. eq 'virtual']"/>
+ <xsl:apply-templates select="type"/>
+ <ref d:refid="{@d:page-refid}">{name}</ref>
+ <params>
+ <xsl:apply-templates select="param"/>
+ </params>
+ <xsl:apply-templates mode="modifier" select="@const[. eq 'yes']"/>
+ </overloaded-member>
+ </xsl:template>
+
+ <xsl:template mode="modifier" match="@*">
+ <modifier>{local-name(.)}</modifier>
+ </xsl:template>
+ <xsl:template mode="modifier" match="@virt">
+ <modifier>virtual</modifier>
+ </xsl:template>
+
+
+ <xsl:template match="type">
+ <type>
+ <xsl:value-of select="d:cleanup-type(normalize-space(.))"/>
+ </type>
+ </xsl:template>
+
+ <!-- d:cleanup-param() may not be needed, and the above may suffice. (TODO: confirm this and remove d:cleanup-param() if so)
+ <xsl:template match="param/type">
+ <type>
+ <xsl:value-of select="d:cleanup-param(.)"/>
+ </type>
+ </xsl:template>
+ -->
+
+ <!-- TODO: Should this be a custom rule or built-in? -->
+ <xsl:template mode="section" match="simplesect[matches(title,'Concepts:?')]"/>
+
+ <xsl:template mode="section" match="*">
+ <section>
+ <heading>
+ <xsl:apply-templates mode="section-heading" select="."/>
+ </heading>
+ <xsl:apply-templates mode="section-body" select="."/>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="simplesect | parameterlist">
+ <xsl:apply-templates mode="section" select="."/>
+ </xsl:template>
+
+ <xsl:template mode="section-heading" match="memberdef |
+ compounddef ">Synopsis</xsl:template>
+ <xsl:template mode="section-heading" match="detaileddescription">Description</xsl:template>
+
+ <xsl:template mode="section-heading" match="simplesect[@kind eq 'note' ]">Remarks</xsl:template>
+ <xsl:template mode="section-heading" match="simplesect[@kind eq 'see' ]">See Also</xsl:template>
+ <xsl:template mode="section-heading" match="simplesect[@kind eq 'return']">Return Value</xsl:template>
+ <xsl:template mode="section-heading" match="simplesect" >{title}</xsl:template>
+
+ <xsl:template mode="section-heading" match="parameterlist[@kind eq 'exception' ]">Exceptions</xsl:template>
+ <xsl:template mode="section-heading" match="parameterlist[@kind eq 'templateparam']">Template Parameters</xsl:template>
+ <xsl:template mode="section-heading" match="parameterlist ">Parameters</xsl:template>
+
+ <xsl:template mode="section-heading" match="innerclass
+ | sectiondef[@kind eq 'public-type']">Types</xsl:template>
+ <xsl:template mode="section-heading" match="sectiondef[@kind eq 'friend' ]">Friends</xsl:template>
+ <xsl:template mode="section-heading" match="sectiondef[@kind eq 'related' ]">Related Functions</xsl:template>
+
+ <xsl:template mode="section-heading" match="sectiondef[@kind eq 'enum']">Values</xsl:template>
+
+ <xsl:template mode="section-heading" match="sectiondef">
+ <xsl:apply-templates mode="access-level" select="@kind"/>
+ <xsl:apply-templates mode="member-kind" select="@kind"/>
+ </xsl:template>
+
+ <xsl:template mode="access-level" match="@kind[starts-with(.,'public' )]"/>
+ <xsl:template mode="access-level" match="@kind[starts-with(.,'protected')]">Protected </xsl:template>
+ <xsl:template mode="access-level" match="@kind[starts-with(.,'private' )]">Private </xsl:template>
+
+ <xsl:template mode="member-kind" match="@kind[ends-with(.,'func' )]">Member Functions</xsl:template>
+ <xsl:template mode="member-kind" match="@kind[ends-with(.,'attrib')]">Data Members</xsl:template>
+
+ <xsl:template mode="section-body" match="sectiondef | innerclass | parameterlist">
+ <table>
+ <tr>
+ <th>
+ <xsl:apply-templates mode="column-1-name" select="."/>
+ </th>
+ <th>
+ <xsl:apply-templates mode="column-2-name" select="."/>
+ </th>
+ </tr>
+ <xsl:apply-templates mode="table-body" select="."/>
+ </table>
+ </xsl:template>
+
+ <xsl:template mode="column-1-name" match="*">Name</xsl:template>
+ <xsl:template mode="column-2-name" match="*">Description</xsl:template>
+
+ <xsl:template mode="column-1-name"
+ match="parameterlist[@kind = ('exception','templateparam')]">Type</xsl:template>
+
+ <xsl:template mode="column-2-name" match="parameterlist[@kind eq 'exception']">Thrown On</xsl:template>
+
+
+ <xsl:template mode="table-body" match="parameterlist">
+ <xsl:apply-templates mode="parameter-row" select="parameteritem"/>
+ </xsl:template>
+
+ <xsl:template mode="parameter-row" match="parameteritem">
+ <tr>
+ <td>
+ <code>
+ <!-- ASSUMPTION: <parameternamelist> only ever has one <parametername> child -->
+ <xsl:apply-templates select="parameternamelist/parametername/node()"/>
+ </code>
+ </td>
+ <td>
+ <xsl:apply-templates select="parameterdescription/node()"/>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template mode="table-body" match="sectiondef[@kind eq 'enum']">
+ <xsl:apply-templates mode="enum-row" select="memberdef/enumvalue"/> <!-- Use input order for enum values -->
+ </xsl:template>
+
+ <xsl:template mode="enum-row" match="enumvalue">
+ <tr>
+ <td>
+ <code>{name}</code>
+ </td>
+ <td>
+ <xsl:apply-templates select="briefdescription, detaileddescription"/>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template mode="table-body" match="sectiondef | innerclass">
+ <xsl:variable name="member-nodes" as="element()*">
+ <xsl:apply-templates mode="member-nodes" select="."/>
+ </xsl:variable>
+ <xsl:apply-templates mode="member-row" select="$member-nodes">
+ <xsl:sort select="d:member-name(.)"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template mode="member-nodes" match="innerclass | sectiondef[@kind eq 'public-type']">
+ <xsl:param name="public-types" tunnel="yes"/>
+ <xsl:sequence select="$public-types"/>
+ </xsl:template>
+
+ <xsl:template mode="member-nodes" match="sectiondef[@kind eq 'friend']">
+ <xsl:param name="friends" tunnel="yes"/>
+ <xsl:sequence select="$friends"/>
+ </xsl:template>
+
+ <xsl:template mode="member-nodes" match="sectiondef">
+ <xsl:sequence select="memberdef"/>
+ </xsl:template>
+
+
+ <xsl:function name="d:member-name">
+ <xsl:param name="element"/>
+ <xsl:apply-templates mode="member-name" select="$element"/>
+ </xsl:function>
+
+ <xsl:template mode="member-name" match="memberdef">
+ <xsl:sequence select="name"/>
+ </xsl:template>
+ <xsl:template mode="member-name" match="innerclass">
+ <xsl:sequence select="d:referenced-inner-class/compounddef/compoundname ! d:strip-ns(.)"/>
+ </xsl:template>
+
+
+ <!-- Only output a table row for the first instance of each name (ignore overloads) -->
+ <xsl:template mode="member-row" match="memberdef[name = preceding-sibling::memberdef/name]"/>
+ <xsl:template mode="member-row" match="*">
+ <tr>
+ <td>
+ <bold>
+ <ref d:refid="{@d:page-refid}">{d:member-name(.)}</ref>
+ </bold>
+ </td>
+ <td>
+ <xsl:apply-templates mode="member-description" select="."/>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template mode="member-description" match="innerclass">
+ <xsl:apply-templates select="d:referenced-inner-class/compounddef/briefdescription"/>
+ </xsl:template>
+ <xsl:template mode="member-description" match="memberdef">
+ <xsl:variable name="descriptions" select="../memberdef[name eq current()/name]/briefdescription"/>
+ <!-- Pull in any overload descriptions but only if they vary -->
+ <xsl:for-each select="distinct-values($descriptions)">
+ <xsl:apply-templates select="$descriptions[. eq current()][1]"/>
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <xsl:template mode="section-body" match="detaileddescription | simplesect">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template mode="section-body" match="compounddef | memberdef" priority="1">
+ <xsl:apply-templates mode="includes" select="."/>
+ <xsl:next-match/>
+ </xsl:template>
+
+ <xsl:template mode="section-body" match="compounddef">
+ <compound>
+ <xsl:apply-templates mode="normalize-params" select="templateparamlist"/>
+ <kind>{@kind}</kind>
+ <name>{d:strip-ns(compoundname)}</name>
+ <xsl:for-each select="basecompoundref[not(d:should-ignore-base(.))]">
+ <base>
+ <prot>{@prot}</prot>
+ <name>{d:strip-doc-ns(.)}</name>
+ </base>
+ </xsl:for-each>
+ </compound>
+ </xsl:template>
+
+ <xsl:template mode="section-body" match="memberdef[@kind eq 'typedef']">
+ <typedef>
+ <xsl:apply-templates mode="normalize-params" select="templateparamlist"/>
+ <xsl:apply-templates select="name, type"/>
+ </typedef>
+ <!-- Nested compounddefs were derived from refs in the typedef's type -->
+ <xsl:apply-templates select="d:referenced-typedef-class/compounddef"/>
+ </xsl:template>
+
+ <!-- Suppress the display of several aspects of referenced typedef classes -->
+
+ <!-- Don't show the briefdescription -->
+ <xsl:template match="d:referenced-typedef-class/compounddef/briefdescription"/>
+
+ <!-- Don't show the Synopsis -->
+ <xsl:template mode="section" match="d:referenced-typedef-class/compounddef"/>
+
+ <!-- Exclude the "Description" heading (only show the body) -->
+ <xsl:template mode="section" match="d:referenced-typedef-class/compounddef/detaileddescription">
+ <xsl:apply-templates mode="section-body" select="."/>
+ </xsl:template>
+
+ <!-- Don't show the includes header or footer -->
+ <xsl:template mode="includes" match="d:referenced-typedef-class/compounddef"/>
+
+
+ <xsl:template mode="section-body" match="memberdef[@kind eq 'enum']">
+ <enum>
+ <xsl:apply-templates select="name"/>
+ </enum>
+ </xsl:template>
+
+ <xsl:template mode="section-body" match="memberdef[@kind eq 'variable']">
+ <variable>
+ <xsl:apply-templates mode="modifier" select="@static[. eq 'yes']"/>
+ <xsl:apply-templates select="type, name"/>
+ <xsl:apply-templates select="initializer[count(../initializer) eq 1]"/>
+ </variable>
+ </xsl:template>
+
+ <xsl:template mode="section-body" match="memberdef[@kind = ('function','friend')]">
+ <function>
+ <xsl:apply-templates mode="normalize-params" select="templateparamlist"/>
+ <xsl:apply-templates mode="modifier" select="@static[. eq 'yes'],
+ @virt [. eq 'virtual']"/>
+ <xsl:apply-templates select="type, name"/>
+ <params>
+ <xsl:apply-templates select="param"/>
+ </params>
+ <xsl:apply-templates mode="modifier" select="@const[. eq 'yes']"/>
+ </function>
+ </xsl:template>
+
+ <!-- TODO: make sure this is robust and handles all the possible cases well -->
+ <xsl:template mode="normalize-params" match="templateparamlist/param/type[not(../declname)]
+ [starts-with(.,'class ')]"
+ priority="1">
+ <type>class</type>
+ <declname>{substring-after(.,'class ')}</declname>
+ </xsl:template>
+
+ <xsl:template mode="normalize-params" match="templateparamlist/param/type[not(../declname)]">
+ <ERROR message="param neither has a declname nor a 'class ' prefix in the type"/>
+ </xsl:template>
+
+ <xsl:template mode="normalize-params" match="templateparamlist/param/defname"/>
+
+
+ <!-- We only need to keep the @file attribute -->
+ <xsl:template match="location/@*[. except ../@file]"/>
+
+ <xsl:template match="briefdescription | detaileddescription">
+ <div>
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="simplesect/title"/>
+
+ <!-- TODO: verify we don't need this; it was causing duplicate headings in simplesect sections
+ <xsl:template match="title">
+ <heading>
+ <xsl:apply-templates/>
+ </heading>
+ </xsl:template>
+ -->
+
+ <!-- By default, don't output an includes header or footer -->
+ <xsl:template mode="includes" match="*"/>
+
+ <!-- TODO: Review; this is meant to effect what the previous code did, but I'm not sure it captures the original intentions -->
+ <xsl:template mode="includes" match="compounddef
+ | memberdef[@kind eq 'friend' or ../../@kind eq 'namespace']
+ [not(/doxygen/@d:page-type eq 'overload-list')]">
+ <xsl:param name="is-footer"/>
+ <para>
+ <xsl:choose>
+ <xsl:when test="$is-footer">
+ <footer>
+ <xsl:apply-templates select="location"/>
+ </footer>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="location"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </para>
+ </xsl:template>
+
+ <!-- Strip the project namespace prefix from link display names
+ (matching the text node so this will still work with the strip-leading-space mode/process below) -->
+ <!-- TODO: figure out if we need anything like this (maybe not).
+ <xsl:template match="ref/text()[starts-with(.,$doc-ns)]">
+ <xsl:value-of select="d:strip-doc-ns(.)"/>
+ </xsl:template>
+ -->
+
+
+ <!-- When a <para> directly contains a mix of inline nodes and block-level elements, normalize its content -->
+ <xsl:template match="para[&BLOCK_LEVEL_ELEMENT;]">
+ <para>
+ <xsl:for-each-group select="* | text()" group-adjacent="d:is-inline(.)">
+ <xsl:apply-templates mode="capture-ranges" select="."/>
+ </xsl:for-each-group>
+ </para>
+ </xsl:template>
+
+ <xsl:function name="d:is-inline">
+ <xsl:param name="node"/>
+ <xsl:sequence select="not($node/../(&BLOCK_LEVEL_ELEMENT;)[. is $node])"/>
+ </xsl:function>
+
+ <!-- Process the block-level elements as usual -->
+ <xsl:template mode="capture-ranges" match="node()">
+ <xsl:apply-templates select="current-group()"/>
+ </xsl:template>
+
+ <!-- Wrap contiguous ranges of inline children in a nested <para> -->
+ <xsl:template mode="capture-ranges" match="node()[d:is-inline(.)]">
+ <xsl:choose>
+ <!-- But only if it has text or if the group has more than one node -->
+ <xsl:when test="normalize-space(.) or current-group()[2]">
+ <para>
+ <xsl:apply-templates mode="strip-leading-space" select="."/>
+ </para>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:next-match/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <!-- Strip leading whitespace from the nested paragraphs to prevent eventual interpretation as a code block -->
+ <xsl:template mode="strip-leading-space" match="*">
+ <xsl:copy>
+ <xsl:apply-templates mode="#current" select="@* | node()[1]"/>
+ </xsl:copy>
+ <xsl:apply-templates mode="#current" select="following-sibling::node()[1]
+ [ancestor-or-self::node() intersect current-group()]"/>
+ </xsl:template>
+
+ <xsl:template mode="strip-leading-space" match="@*">
+ <xsl:copy/>
+ </xsl:template>
+
+ <xsl:template mode="strip-leading-space" match="text()">
+ <xsl:param name="done-stripping" tunnel="yes" select="false()"/>
+ <xsl:choose>
+ <xsl:when test="$done-stripping">
+ <xsl:apply-templates select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:sequence select="replace(.,'^\s+','')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates mode="#current" select="following-sibling::node()[1]
+ [ancestor-or-self::node() intersect current-group()]">
+ <xsl:with-param name="done-stripping" select="$done-stripping or normalize-space(.)" tunnel="yes"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+
+ <xsl:template mode="#default normalize-params" match="@* | node()">
+ <xsl:copy copy-namespaces="no">
+ <xsl:apply-templates mode="#current" select="@* | node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/common.xsl b/src/boost/tools/docca/include/docca/common.xsl
new file mode 100644
index 000000000..b9b02c5a6
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/common.xsl
@@ -0,0 +1,107 @@
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:d="http://github.com/vinniefalco/docca"
+ exclude-result-prefixes="xs d">
+
+ <xsl:variable name="nl" select="'&#xA;'"/>
+
+ <xsl:variable name="leading-ns-regex" select="'^([^:&lt;]+::)+'"/>
+
+ <xsl:function name="d:extract-ns-without-suffix">
+ <xsl:param name="name"/>
+ <xsl:sequence select="replace(d:extract-ns($name), '::$', '')"/>
+ </xsl:function>
+
+ <xsl:function name="d:extract-ns">
+ <xsl:param name="name"/>
+ <xsl:sequence select="replace($name, '('||$leading-ns-regex||').*', '$1')"/>
+ </xsl:function>
+
+ <!-- Strip all C++ namespace prefixes that come at the beginning -->
+ <xsl:function name="d:strip-ns">
+ <xsl:param name="name"/>
+ <xsl:sequence select="replace($name, $leading-ns-regex, '')"/>
+ </xsl:function>
+
+ <!-- Strip the common C++ namespace prefix for the docs as a whole -->
+ <!-- ASSUMPTION: $doc-ns is defined in the customizing stylesheet -->
+ <xsl:function name="d:strip-doc-ns">
+ <xsl:param name="name"/>
+ <xsl:sequence select="if ($name eq $doc-ns)
+ then ''
+ else replace($name, '^'||$doc-ns||'::', '')"/>
+ </xsl:function>
+
+ <xsl:function name="d:make-id">
+ <xsl:param name="name"/>
+ <xsl:sequence select="d:perform-replacements($name, $id-replacements)"/>
+ </xsl:function>
+
+ <xsl:function name="d:perform-replacements">
+ <xsl:param name="name"/>
+ <xsl:param name="replacements"/>
+ <xsl:variable name="next" select="head($replacements)"/>
+ <xsl:variable name="rest" select="tail($replacements)"/>
+ <xsl:sequence select="if (exists($next))
+ then d:perform-replacements(replace($name, $next/@pattern, $next/@with), $rest)
+ else $name"/>
+ </xsl:function>
+
+ <xsl:variable name="id-replacements" select="$additional-id-replacements, $base-id-replacements"/>
+
+ <!-- Can be overridden by a customizing stylesheet -->
+ <xsl:variable name="additional-id-replacements" as="element(replace)*" select="()"/>
+
+ <xsl:variable name="base-id-replacements" as="element(replace)+">
+ <replace pattern="::" with="__"/>
+ <replace pattern="=" with="_eq_"/>
+ <replace pattern="!" with="_not_"/>
+ <replace pattern="->" with="_arrow_"/>
+ <replace pattern="&lt;" with="_lt_"/>
+ <replace pattern=">" with="_gt_"/>
+ <replace pattern="^~" with="_dtor_"/> <!-- destructor -->
+ <replace pattern="~" with="_"/>
+ <replace pattern="\[" with="_lb_"/>
+ <replace pattern="\]" with="_rb_"/>
+ <replace pattern="\(" with="_lp_"/>
+ <replace pattern="\)" with="_rp_"/>
+ <replace pattern="\+" with="_plus_"/>
+ <replace pattern="-" with="_minus_"/>
+ <replace pattern="\*" with="_star_"/>
+ <replace pattern="/" with="_slash_"/>
+ <replace pattern=" " with="_"/>
+ </xsl:variable>
+
+ <xsl:function name="d:cleanup-param">
+ <xsl:param name="name"/>
+ <xsl:sequence select="d:perform-replacements($name, $param-replacements)"/>
+ </xsl:function>
+
+ <xsl:function name="d:cleanup-type">
+ <xsl:param name="name"/>
+ <xsl:sequence select="d:perform-replacements($name, $type-replacements)"/>
+ </xsl:function>
+
+ <xsl:variable name="param-replacements" select="$additional-param-replacements, $base-param-replacements"/>
+
+ <!-- Can be overridden by a customizing stylesheet -->
+ <xsl:variable name="additional-param-replacements" as="element(replace)*" select="()"/>
+
+ <xsl:variable name="base-param-replacements" as="element(replace)*">
+ <!-- Reformats '*', '&', and '...' in parameters, e.g. "void const*" -->
+ <replace pattern=" \*$" with="*"/>
+ <replace pattern=" (&amp;&amp;?)(\.{{3}})?$" with="$1$2"/>
+ </xsl:variable>
+
+ <!-- NOTE: $type-replacements includes $param-replacements -->
+ <xsl:variable name="type-replacements" select="$additional-type-replacements, $base-type-replacements, $param-replacements"/>
+
+ <!-- Can be overridden by a customizing stylesheet -->
+ <xsl:variable name="additional-type-replacements" as="element(replace)*" select="()"/>
+
+ <xsl:variable name="base-type-replacements" as="element(replace)*">
+ <replace pattern="^virtual$" with=""/>
+ </xsl:variable>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/config.xsl b/src/boost/tools/docca/include/docca/config.xsl
new file mode 100644
index 000000000..bb2ce8aab
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/config.xsl
@@ -0,0 +1,47 @@
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:d="http://github.com/vinniefalco/docca"
+ exclude-result-prefixes="xs d"
+ expand-text="yes">
+
+<!-- CONFIG_TEMPLATE -->
+
+ <xsl:variable name="additional-id-replacements" as="element(replace)*">
+ <replace pattern="boost::asio::error" with=""/>
+ </xsl:variable>
+
+ <xsl:variable name="additional-type-replacements" as="element(replace)*">
+ <replace pattern="BOOST_ASIO_DECL ?(.*)" with="$1"/>
+ </xsl:variable>
+
+ <xsl:variable name="include-private-members" select="false()"/>
+
+ <!-- TODO: refactor the stage-two-specific rules into a separate module that can't intefere with stage one -->
+ <xsl:template mode="includes-template" match="location"
+ >Defined in header [include_file {substring-after(@file, 'include/')}]
+ </xsl:template>
+
+<!-- INCLUDES_FOOT_TEMPLATE -->
+
+ <xsl:function name="d:should-ignore-compound">
+ <xsl:param name="element" as="element(compound)"/>
+ <xsl:sequence select="contains($element/name, '::detail')"/> <!-- TODO: Confirm this should be custom and not built-in behavior -->
+ </xsl:function>
+
+ <xsl:function name="d:should-ignore-base">
+ <xsl:param name="element" as="element(basecompoundref)"/>
+ <xsl:sequence select="contains($element, '::detail')"/> <!-- TODO: Confirm this should be custom and not built-in behavior -->
+ </xsl:function>
+
+ <xsl:function name="d:should-ignore-inner-class">
+ <xsl:param name="element" as="element(innerclass)"/>
+ <xsl:sequence select="contains($element, '_handler')"/>
+ </xsl:function>
+
+ <xsl:function name="d:should-ignore-friend">
+ <xsl:param name="element" as="element(memberdef)"/>
+ <xsl:sequence select="contains($element, '_helper')"/>
+ </xsl:function>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/debug-friendly-quickbook.xsl b/src/boost/tools/docca/include/docca/debug-friendly-quickbook.xsl
new file mode 100644
index 000000000..4d2cb7393
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/debug-friendly-quickbook.xsl
@@ -0,0 +1,23 @@
+<!--
+ All this stylesheet does is output a .txt file for each (erroneously-but-unavoidably-named)
+ .xml file that actually contains a fragment of Quickbook content. This isn't needed for the
+ regular build, but it's useful for viewing in the browser when debugging.
+-->
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="xs">
+
+ <xsl:output method="text"/>
+
+ <xsl:param name="input-dir"/>
+
+ <xsl:template match="page">
+ <xsl:variable name="input-uri" select="$input-dir||'/'||@href"/>
+ <xsl:result-document href="{replace($input-uri, '\.xml$', '.txt')}">
+ <xsl:copy-of select="unparsed-text($input-uri)"/>
+ </xsl:result-document>
+ <xsl:apply-templates select="page"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/emphasized-types.xsl b/src/boost/tools/docca/include/docca/emphasized-types.xsl
new file mode 100644
index 000000000..e3ea174ad
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/emphasized-types.xsl
@@ -0,0 +1,43 @@
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="xs">
+
+ <xsl:variable name="emphasized-template-parameter-types" select="
+ 'Allocator',
+ 'AsyncStream',
+ 'AsyncReadStream',
+ 'AsyncWriteStream',
+ 'Body',
+ 'BufferSequence',
+ 'BufferSequence', (: TODO: Was this intended to be 'BufferSequence_' ?? :)
+ 'CompletionCondition',
+ 'CompletionHandler',
+ 'CompletionToken',
+ 'ConnectCondition',
+ 'ConnectHandler',
+ 'ConstBufferSequence',
+ 'DynamicBuffer',
+ 'EndpointSequence',
+ 'ExecutionContext',
+ 'Executor',
+ 'Executor_',
+ 'Executor1',
+ 'Executor2',
+ 'Fields',
+ 'Handler',
+ 'Handler_',
+ 'IteratorConnectHandler',
+ 'MutableBufferSequence',
+ 'Protocol',
+ 'RangeConnectHandler',
+ 'RatePolicy',
+ 'ReadHandler',
+ 'Stream',
+ 'SyncStream',
+ 'SyncReadStream',
+ 'SyncWriteStream',
+ 'WriteHandler'
+ "/>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/extract-xml-pages.xsl b/src/boost/tools/docca/include/docca/extract-xml-pages.xsl
new file mode 100644
index 000000000..cb6d1497c
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/extract-xml-pages.xsl
@@ -0,0 +1,12 @@
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:d="http://github.com/vinniefalco/docca"
+ exclude-result-prefixes="xs d">
+
+ <xsl:import href="base-extract-xml-pages.xsl"/>
+
+ <!-- TODO: consider refactoring to stage-specific configurations -->
+ <xsl:include href="config.xsl"/>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/stage1.xsl b/src/boost/tools/docca/include/docca/stage1.xsl
new file mode 100644
index 000000000..ac44de5af
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/stage1.xsl
@@ -0,0 +1,11 @@
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="xs"
+ expand-text="yes">
+
+ <xsl:import href="base-stage1.xsl"/>
+
+ <xsl:include href="config.xsl"/>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/docca/include/docca/stage2.xsl b/src/boost/tools/docca/include/docca/stage2.xsl
new file mode 100644
index 000000000..211beb438
--- /dev/null
+++ b/src/boost/tools/docca/include/docca/stage2.xsl
@@ -0,0 +1,228 @@
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY SYNTAX_BLOCK "*[ self::compound
+ | self::function
+ | self::typedef
+ | self::enum
+ | self::variable
+ | self::overloaded-member
+ ]">
+]>
+<xsl:stylesheet version="3.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:d="http://github.com/vinniefalco/docca"
+ expand-text="yes">
+
+ <xsl:output method="text"/>
+
+ <xsl:import href="common.xsl"/>
+
+ <xsl:include href="config.xsl"/>
+ <xsl:include href="emphasized-types.xsl"/>
+
+ <xsl:param name="DEBUG" select="false()"/>
+
+ <xsl:variable name="list-indent-width" select="4"/>
+
+ <xsl:template mode="before" match="/page">
+ <xsl:text>{$nl}</xsl:text>
+ <xsl:text>[section:{tokenize(@id,'\.')[last()]} {d:qb-escape(title)}]</xsl:text>
+ <xsl:apply-templates mode="indexterm" select="."/>
+ </xsl:template>
+
+ <xsl:template mode="indexterm" match="page"/>
+ <xsl:template mode="indexterm" match="page[@primary-index-term]"
+ >{$nl}[indexterm1 {d:qb-escape(@primary-index-term)}]{$nl}</xsl:template>
+ <xsl:template mode="indexterm" match="page[@secondary-index-term]" priority="1"
+ >{$nl}[indexterm2 {d:qb-escape(@primary-index-term)}..{
+ d:qb-escape(@secondary-index-term)}]{$nl}</xsl:template>
+
+ <!-- Title is already included in section header -->
+ <xsl:template match="/page/title"/>
+
+ <xsl:template match="heading">{$nl}[heading {.}]</xsl:template>
+
+ <xsl:template match="location">
+ <xsl:apply-templates mode="includes-template" select="."/>
+ </xsl:template>
+
+ <xsl:template match="footer/location">
+ <xsl:apply-templates mode="includes-template-footer" select="."/>
+ </xsl:template>
+
+ <xsl:template mode="before" match="&SYNTAX_BLOCK;">{$nl}```{$nl}</xsl:template>
+ <xsl:template mode="after" match="&SYNTAX_BLOCK;">{$nl}```{$nl}</xsl:template>
+
+ <!-- Merge adjacent overloaded-members into one syntax block, separated by one blank line -->
+ <xsl:template mode="after" match="overloaded-member[following-sibling::*[1]/self::overloaded-member]" priority="1"/>
+ <xsl:template mode="before" match="overloaded-member[preceding-sibling::*[1]/self::overloaded-member]" priority="1"
+ >{$nl}{$nl}</xsl:template>
+
+ <xsl:template mode="after" match="overloaded-member/type[normalize-space(.)]
+ | function/type[normalize-space(.)]">{$nl}</xsl:template>
+
+ <xsl:template mode="append" match="function">;</xsl:template>
+
+ <xsl:template mode="append" match="overloaded-member">
+ <xsl:text>;{$nl}</xsl:text>
+ <xsl:variable name="more-link" as="element()">
+ <emphasis>'''&amp;raquo;''' <ref d:refid="{ref/@d:refid}">more...</ref></emphasis>
+ </xsl:variable>
+ <xsl:text> ``</xsl:text>
+ <xsl:apply-templates select="$more-link"/>
+ <xsl:text>``</xsl:text>
+ </xsl:template>
+
+ <xsl:template priority="1"
+ match="&SYNTAX_BLOCK;//ref">``[link {$doc-ref}.{@d:refid} {d:qb-escape(.)}]``</xsl:template>
+ <xsl:template match="td[1]//ref" >[link {$doc-ref}.{@d:refid} {d:qb-escape(.)}]</xsl:template>
+ <xsl:template match="ref" >[link {$doc-ref}.{@d:refid} `{d:qb-escape(.)}`]</xsl:template>
+
+ <xsl:template mode="before" match="computeroutput[not(ref)] | code">`</xsl:template>
+ <xsl:template mode="after" match="computeroutput[not(ref)] | code">`</xsl:template>
+
+ <xsl:template mode="before" match="enum/name">enum </xsl:template>
+
+ <xsl:template mode="before" match="typedef/name">using </xsl:template>
+ <xsl:template mode="after" match="typedef/name"> = </xsl:template>
+ <xsl:template mode="after" match="typedef/type">;</xsl:template>
+
+ <xsl:template match="type[. eq '__implementation_defined__' ]">``['implementation-defined]``</xsl:template>
+ <xsl:template match="type[. eq '__see_below__' ]">``['see-below]``</xsl:template>
+ <xsl:template match="type[. = ('__deduced__','void_or_deduced')]">``__deduced__``</xsl:template>
+
+ <xsl:template mode="before" match="variable/name | variable/initializer">{' '}</xsl:template>
+ <xsl:template mode="append" match="variable">;</xsl:template>
+
+ <xsl:template mode="after" match="compound/kind">{' '}</xsl:template>
+
+ <xsl:template mode="before" match="base[1]"> :{$nl} </xsl:template>
+ <xsl:template mode="before" match="base" >{$nl} </xsl:template>
+ <xsl:template mode="after" match="base[position() ne last()]">,</xsl:template>
+
+ <xsl:template mode="after" match="base/prot">{' '}</xsl:template>
+
+ <xsl:template mode="before" match="templateparamlist">template&lt;</xsl:template>
+ <xsl:template mode="after" match="templateparamlist">>{$nl}</xsl:template>
+
+ <xsl:template mode="before" match="param">{$nl} </xsl:template>
+ <xsl:template mode="after" match="param[position() ne last()]">,</xsl:template>
+
+ <xsl:template mode="after" match="param[declname]/type">{' '}</xsl:template>
+
+
+ <xsl:template mode="before" match="params">(</xsl:template>
+ <xsl:template mode="after" match="params">)</xsl:template>
+
+ <xsl:template match="templateparamlist/param/declname[. = $emphasized-template-parameter-types]"
+ >__{translate(.,'_','')}__</xsl:template>
+
+ <xsl:template mode="before" match="defval"> = </xsl:template>
+
+ <xsl:template mode="before" match="modifier[. eq 'const']">{' '}</xsl:template>
+ <xsl:template mode="after" match="modifier[. eq 'const']"/>
+
+ <xsl:template mode="after" match="modifier">{$nl}</xsl:template>
+
+
+ <xsl:template mode="#all" match="ERROR">[role red error.{@message}]</xsl:template>
+
+ <xsl:template mode="before" match="table">{$nl}[table </xsl:template>
+ <xsl:template mode="after" match="table">{$nl}]</xsl:template>
+
+ <!-- ASSUMPTION: table rows have either <th> or <td>, not both -->
+ <xsl:template mode="before" match="tr[th] | th">[</xsl:template>
+ <xsl:template mode="after" match="tr[th] | th">]</xsl:template>
+
+ <xsl:template mode="before" match="tr">{$nl} [</xsl:template>
+ <xsl:template mode="after" match="tr">{$nl} ]</xsl:template>
+
+ <xsl:template mode="before" match="td">{$nl} [</xsl:template>
+ <xsl:template mode="after" match="td">{$nl} ]</xsl:template>
+
+ <xsl:template mode="before" match="bold">[*</xsl:template>
+ <xsl:template mode="after" match="bold">]</xsl:template>
+
+ <xsl:template mode="before" match="emphasis">['</xsl:template>
+ <xsl:template mode="after" match="emphasis">]</xsl:template>
+
+ <xsl:template mode="before" match="ulink">[@{@url} </xsl:template>
+ <xsl:template mode="after" match="ulink">]</xsl:template>
+
+ <xsl:template mode="after" match="itemizedlist | orderedlist">{$nl}</xsl:template>
+
+ <xsl:template match="listitem">
+ <xsl:text>{$nl}</xsl:text>
+ <xsl:apply-templates mode="list-item-indent" select="."/>
+ <xsl:apply-templates mode="list-item-label" select=".."/>
+ <xsl:text> </xsl:text>
+ <!-- ASSUMPTION: <para> always appears as a child of list items -->
+ <xsl:apply-templates select="para/node()"/>
+ </xsl:template>
+
+ <!-- TODO: verify this works as expected (find an example of a nested list) -->
+ <xsl:template mode="list-item-indent"
+ match="listitem">{ancestor::listitem ! (1 to $list-indent-width) ! ' '}</xsl:template>
+
+ <xsl:template mode="list-item-label" match="itemizedlist">*</xsl:template>
+ <xsl:template mode="list-item-label" match="orderedlist" >#</xsl:template>
+
+ <xsl:template mode="append" match="/page/div[1]">
+ <xsl:if test="$DEBUG">
+ <xsl:text>['</xsl:text>
+ <xsl:text>[role red \[Page type: [*{/*/@type}]\]] </xsl:text>
+ <xsl:text>[role green \[[@../../doc/html/{translate($doc-ref,'.','/')}/{
+ translate(/page/@id,'.','/')}.html [role green doc_build_html]]\]] </xsl:text>
+ <xsl:text>[@../build/xml-pages/{/page/@id}.xml [role blue [*\[doxygen_page_xml\]]]]</xsl:text>
+ <xsl:text>[@../build/stage1_visualized/visualized/{/page/@id}.html [role magenta ---stage1_visualized-->]]</xsl:text>
+ <xsl:text>[@../build/stage1_visualized/results/{ /page/@id}.xml [role blue [*\[docca_page_xml\]]]]</xsl:text>
+ <xsl:text>[@../build/stage2_visualized/visualized/{/page/@id}.html [role magenta ---stage2_visualized-->]]</xsl:text>
+ <xsl:text>[@../build/stage2_visualized/results/{ /page/@id}.txt [role blue [*\[quickbook_result\]]]]</xsl:text>
+ <xsl:text>]</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template mode="before" match="para | div">{$nl}</xsl:template>
+
+ <xsl:template match="sp">{' '}</xsl:template>
+
+ <xsl:template match="linebreak">{$nl}{$nl}</xsl:template>
+
+ <xsl:template mode="before" match="programlisting">{$nl}```{$nl}</xsl:template>
+ <xsl:template mode="after" match="programlisting" >```{$nl}</xsl:template>
+
+ <xsl:template mode="after" match="codeline">{$nl}</xsl:template>
+
+ <!-- Ignore whitespace-only text nodes -->
+ <xsl:template match="text()[not(normalize-space())]"/>
+
+ <!-- Boilerplate default rules for elements -->
+ <!-- Convention of this stylesheet is to favor use of just "before" and "after"
+ and to utilize "append" (and maybe "insert") only when a distinction is needed -->
+ <xsl:template match="*" priority="10">
+ <xsl:apply-templates mode="before" select="."/>
+ <!-- enable if needed/desired
+ <xsl:apply-templates mode="insert" select="."/> -->
+ <xsl:next-match/>
+ <xsl:apply-templates mode="append" select="."/>
+ <xsl:apply-templates mode="after" select="."/>
+ </xsl:template>
+
+ <!-- Default before/after/insert/append rules are to do nothing -->
+ <xsl:template mode="before" match="*"/>
+ <!-- enable if needed/desired
+ <xsl:template mode="insert" match="*"/> -->
+ <xsl:template mode="append" match="*"/>
+ <xsl:template mode="after" match="*"/>
+
+
+ <xsl:function name="d:qb-escape">
+ <xsl:param name="string"/>
+ <xsl:sequence select="replace(
+ replace($string, '\[', '\\['),
+ '\]',
+ '\\]'
+ )"/>
+ </xsl:function>
+
+</xsl:stylesheet>
diff --git a/src/boost/tools/index.html b/src/boost/tools/index.html
new file mode 100644
index 000000000..65236fedd
--- /dev/null
+++ b/src/boost/tools/index.html
@@ -0,0 +1,105 @@
+<!-- Copyright 2004 Aleksey Gurtovoy -->
+<!-- Copyright 2003 Beman Dawes -->
+<!-- Copyright 2003 Douglas Gregor -->
+<!-- Copyright 2005 Eric Niebler -->
+<!-- Copyright 2005 Hartmut Kaiser -->
+<!-- Copyright 2004 John Maddock -->
+<!-- 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>
+ <head>
+ <title>Boost Tools</title>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
+ <meta name="ProgId" content="FrontPage.Editor.Document">
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+ <link rel="stylesheet" href="../doc/src/boostbook.css" type="text/css" />
+ </head>
+ <body bgcolor="#ffffff">
+
+ <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
+ <tr>
+ <td width="277">
+ <a href="../index.html">
+ <img src="../boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"></a></td>
+ <td width="337" align="middle">
+ <font size="7">Tools</font>
+ </td>
+ </tr>
+ </table>
+
+ <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" height="26" width="681">
+ <tr>
+ <td height="16" width="671"><a href="../more/getting_started/index.html">Getting Started</a>&nbsp;&nbsp;<font color="#FFFFFF">&nbsp;
+ </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="../libs/libraries.htm">
+ Libraries</a><a href="../tools/index.html">&nbsp;</a>&nbsp;<font color="#FFFFFF">&nbsp;
+ </font>&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.boost.org">Web Site</a>&nbsp;&nbsp;<font color="#FFFFFF">&nbsp;
+ </font>&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.boost.org/users/news/">News</a>&nbsp;&nbsp;<font color="#FFFFFF">&nbsp;
+ </font>&nbsp;&nbsp;&nbsp; <a href="http://www.boost.org/community/">Community</a>&nbsp;&nbsp;<font color="#FFFFFF">&nbsp;
+ </font>&nbsp;&nbsp;&nbsp;&nbsp;
+ <a href="http://www.boost.org/users/faq.html">FAQ</a>&nbsp;&nbsp;<font color="#FFFFFF">&nbsp;
+ </font>&nbsp;&nbsp;&nbsp;&nbsp; <a href="../more/index.htm">More Info</a>&nbsp;</td>
+ </tr>
+ </table>
+
+ <p>Boost developers, testers, and maintainers have developed various tools to
+ help with the administration of the Boost Libraries. Like everything else about
+ Boost, these tools are available in source form, and are part of the regular
+ Boost distribution.</p>
+ <p>Users may find these tools useful when porting Boost libraries to a new
+ platform, or for use with their own applications.</p>
+ <ul>
+ <li>
+ <a href="build/index.html">Boost.Build</a> - The Boost build system, including
+ the full Boost version of the jam sources.<br>
+ &nbsp;
+ <li>
+ <a href="inspect/index.html">Inspect </a>- The inspection tool used to detect
+ errors in the Boost directory hierarchy.<br>
+ &nbsp;
+ <li>
+ <a href="../doc/html/boostbook.html">BoostBook</a> - A Boost documentation
+ system, based on <a href="http://www.docbook.org/">DocBook</a> and the <a href="http://www.w3.org/Style/XSL/">
+ Extensible Stylesheet Language (XSL)</a>, used by some Boost libraries.<br>
+ &nbsp;
+ <li>
+ <a href="bcp/index.html">bcp</a> - A utility to extract subsets of Boost; to
+ determine which parts of Boost your code is using; and to print reports on
+ Boost usage (including Licence information).<br>
+ &nbsp;
+ <li>
+ <a href="quickbook/index.html">QuickBook</a> - QuickBook is a WikiWiki style
+ documentation tool geared towards C++ documentation using simple rules and markup
+ for simple formatting tasks. QuickBook generates <a href="../doc/html/boostbook.html">
+ BoostBook</a> XML.<br>
+ &nbsp;
+ <li>
+ <a href="../libs/wave/doc/wave_driver.html">Wave</a> - A Standards conformant C/C++
+ preprocessor usable on top of any other compiler. Usable for instance for the debugging
+ of the expansion of macros in your code or as a replacement for your built-in
+ preprocessor. <br>
+ &nbsp;
+ <li>
+ <a href="auto_index/index.html">AutoIndex</a> - A tool for indexing Boostbook/Docbook
+ documents. <br>
+ &nbsp;
+ </li>
+ </ul>
+ <hr>
+ <p>Revised
+<!--webbot bot="Timestamp" s-type="EDITED"
+s-format="%d %b %Y" startspan -->13 Mar 2008<!--webbot bot="Timestamp" endspan i-checksum="14911" --></p>
+
+<p> Copyright Beman Dawes 2003<br>
+ Copyright Douglas Gregor 2003<br>
+ Copyright Aleksey Gurtovoy 2004<br>
+ Copyright John Maddock 2004<br>
+ Copyright Eric Niebler 2005<br>
+ Copyright Hartmut Kaiser 2005<br>
+<br>
+Distributed under the Boost Software License, Version 1.0.
+(See file <a href="../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
+or <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>) </p>
+ </body>
+</html>
diff --git a/src/boost/tools/inspect/apple_macro_check.cpp b/src/boost/tools/inspect/apple_macro_check.cpp
new file mode 100644
index 000000000..7afb8f9fd
--- /dev/null
+++ b/src/boost/tools/inspect/apple_macro_check.cpp
@@ -0,0 +1,105 @@
+// apple_macro_check implementation ------------------------------------------------//
+
+// Copyright Marshall Clow 2007.
+// Based on the tab-check checker by Beman Dawes
+//
+// 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 "apple_macro_check.hpp"
+#include <functional>
+#include "boost/regex.hpp"
+#include "boost/lexical_cast.hpp"
+#include "boost/filesystem/operations.hpp"
+
+namespace fs = boost::filesystem;
+
+namespace
+{
+ boost::regex apple_macro_regex(
+ "("
+ "^\\s*#\\s*undef\\s*" // # undef
+ "\\b(check|verify|require|check_error)\\b" // followed by apple macro name, whole word
+ ")"
+ "|" // or (ignored)
+ "("
+ "//[^\\n]*" // single line comments (//)
+ "|"
+ "/\\*.*?\\*/" // multi line comments (/**/)
+ "|"
+ "\"(?:\\\\\\\\|\\\\\"|[^\"])*\"" // string literals
+ ")"
+ "|" // or
+ "("
+ "\\b(check|verify|require|check_error)\\b" // apple macro name, whole word
+ "\\s*\\(" // followed by 0 or more spaces and an opening paren
+ ")"
+ , boost::regex::normal);
+
+} // unnamed namespace
+
+
+namespace boost
+{
+ namespace inspect
+ {
+ apple_macro_check::apple_macro_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" );
+ }
+
+ void apple_macro_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:" "naapple_macros" ) != string::npos) return;
+
+ // Only check files in the boost directory, as we can avoid including the
+ // apple test headers elsewhere.
+ path relative( relative_to( full_path, search_root_path() ) );
+ if ( relative.empty() || *relative.begin() != "boost") return;
+
+ boost::sregex_iterator cur(contents.begin(), contents.end(), apple_macro_regex), end;
+
+ long errors = 0;
+
+ for( ; cur != end; ++cur /*, ++m_files_with_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()
+ }
+ }
+
+ ++errors;
+ error( library_name, full_path,
+ "Apple macro clash: " + std::string((*cur)[0].first, (*cur)[0].second-1),
+ line_number );
+ }
+ }
+ if(errors > 0) {
+ ++m_files_with_errors;
+ }
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/apple_macro_check.hpp b/src/boost/tools/inspect/apple_macro_check.hpp
new file mode 100644
index 000000000..5acdcf70c
--- /dev/null
+++ b/src/boost/tools/inspect/apple_macro_check.hpp
@@ -0,0 +1,39 @@
+// apple_macro_check header --------------------------------------------------------//
+
+// Copyright Marshall Clow 2007.
+// Based on the tab-check checker by Beman Dawes
+// 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_APPLE_MACRO_CHECK_HPP
+#define BOOST_APPLE_MACRO_CHECK_HPP
+
+#include "inspector.hpp"
+
+
+namespace boost
+{
+ namespace inspect
+ {
+ class apple_macro_check : public inspector
+ {
+ long m_files_with_errors;
+ public:
+
+ apple_macro_check();
+ virtual const char * name() const { return "*APPLE-MACROS*"; }
+ virtual const char * desc() const { return "calls to Apple's debugging macros in file"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~apple_macro_check()
+ { std::cout << " " << m_files_with_errors << " files with Apple macros" << line_break(); }
+ };
+ }
+}
+
+#endif // BOOST_APPLE_MACRO_CHECK_HPP
diff --git a/src/boost/tools/inspect/ascii_check.cpp b/src/boost/tools/inspect/ascii_check.cpp
new file mode 100644
index 000000000..da2aa4020
--- /dev/null
+++ b/src/boost/tools/inspect/ascii_check.cpp
@@ -0,0 +1,102 @@
+// ascii_check implementation ------------------------------------------------//
+
+// Copyright Marshall Clow 2007.
+// Based on the tab-check checker by Beman Dawes
+//
+// 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 test.
+
+#include "ascii_check.hpp"
+#include <functional>
+
+namespace boost
+{
+ namespace inspect
+ {
+
+ static const string gPunct ( "$_{}[]#()<>%:;.?*+-/ˆ&|~!=,\\\"'@^`" );
+
+ // Legal characters for a source file are defined in section 2.2 of the standard
+ // I have added '@', '^', and '`' to the "legal" chars because they are commonly
+ // used in comments, and they are strictly ASCII.
+ struct non_ascii : public std::unary_function<char, bool> {
+ public:
+ non_ascii () {}
+ ~non_ascii () {}
+ bool operator () ( char c ) const
+ {
+ if ( c == ' ' ) return false;
+ if ( c >= 'a' && c <= 'z' ) return false;
+ if ( c >= 'A' && c <= 'Z' ) return false;
+ if ( c >= '0' && c <= '9' ) return false;
+ // Horizontal/Vertical tab, newline, and form feed
+ if ( c == '\t' || c == '\n' || c == '\r' || c == '\v' || c == '\f' ) return false;
+ return gPunct.find ( c ) == string::npos;
+ }
+ };
+
+ struct is_CRLF : public std::unary_function<char, bool> {
+ public:
+ is_CRLF () {}
+ ~is_CRLF () {}
+ bool operator () ( char c ) const
+ {
+ return c == '\015' || c == '\012';
+ }
+ };
+
+ const char *kCRLF = "\012\015";
+
+// Given a position in the file, extract and return the line
+ std::string find_line ( const std::string &contents, std::string::const_iterator iter_pos )
+ {
+ std::size_t pos = iter_pos - contents.begin ();
+
+ // Search backwards for a CR or LR
+ std::size_t start_pos = contents.find_last_of ( kCRLF, pos );
+ std::string::const_iterator line_start = contents.begin () + ( start_pos == std::string::npos ? 0 : start_pos + 1 );
+
+
+ // Search forwards for a CR or LF
+ std::size_t end_pos = contents.find_first_of ( kCRLF, pos + 1 );
+ std::string::const_iterator line_end;
+ if ( end_pos == std::string::npos )
+ line_end = contents.end ();
+ else
+ line_end = contents.begin () + end_pos - 1;
+
+ return std::string ( line_start, line_end );
+ }
+
+ ascii_check::ascii_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" );
+ }
+
+ void ascii_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:" "noascii" ) != string::npos) return;
+ string::const_iterator bad_char = std::find_if ( contents.begin (), contents.end (), non_ascii ());
+ if ( bad_char != contents.end ())
+ {
+ ++m_files_with_errors;
+ int ln = std::count( contents.begin(), bad_char, '\n' ) + 1;
+ string the_line = find_line ( contents, bad_char );
+ error( library_name, full_path, "Non-ASCII: " + the_line, ln );
+ }
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/ascii_check.hpp b/src/boost/tools/inspect/ascii_check.hpp
new file mode 100644
index 000000000..6094ce856
--- /dev/null
+++ b/src/boost/tools/inspect/ascii_check.hpp
@@ -0,0 +1,38 @@
+// ascii_check header --------------------------------------------------------//
+
+// Copyright Marshall Clow 2007.
+// Based on the tab-check checker by Beman Dawes
+// 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_ASCII_CHECK_HPP
+#define BOOST_ASCII_CHECK_HPP
+
+#include "inspector.hpp"
+
+namespace boost
+{
+ namespace inspect
+ {
+ class ascii_check : public inspector
+ {
+ long m_files_with_errors;
+ public:
+
+ ascii_check();
+ virtual const char * name() const { return "*ASCII*"; }
+ virtual const char * desc() const { return "non-ASCII chars in file"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~ascii_check()
+ { std::cout << " " << m_files_with_errors << " files with non-ASCII chars" << line_break(); }
+ };
+ }
+}
+
+#endif // BOOST_ASCII_CHECK_HPP
diff --git a/src/boost/tools/inspect/assert_macro_check.cpp b/src/boost/tools/inspect/assert_macro_check.cpp
new file mode 100644
index 000000000..340a9f5ba
--- /dev/null
+++ b/src/boost/tools/inspect/assert_macro_check.cpp
@@ -0,0 +1,110 @@
+// assert_macro_check implementation ------------------------------------------------//
+
+// Copyright Eric Niebler 2010.
+// Based on the assert_macro_check checker by Marshall Clow
+//
+// 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 "assert_macro_check.hpp"
+#include <functional>
+#include "boost/regex.hpp"
+#include "boost/lexical_cast.hpp"
+#include "boost/filesystem/operations.hpp"
+
+namespace fs = boost::filesystem;
+
+namespace
+{
+ boost::regex assert_macro_regex(
+ "("
+ "^\\s*#\\s*undef\\s*" // # undef
+ "\\b(assert)\\b" // followed by assert macro, whole word
+ ")"
+ "|" // or (ignored)
+ "("
+ "//[^\\n]*" // single line comments (//)
+ "|"
+ "/\\*.*?\\*/" // multi line comments (/**/)
+ "|"
+ "\"(?:\\\\\\\\|\\\\\"|[^\"])*\"" // string literals
+ ")"
+ "|" // or
+ "("
+ "\\b(assert)\\b" // assert macro, whole word
+ "\\s*\\(" // followed by 0 or more spaces and an opening paren
+ ")"
+ , boost::regex::normal);
+
+} // unnamed namespace
+
+
+namespace boost
+{
+ namespace inspect
+ {
+ assert_macro_check::assert_macro_check()
+ : m_files_with_errors(0)
+ , m_from_boost_root(
+ fs::exists(search_root_path() / "boost") &&
+ fs::exists(search_root_path() / "libs"))
+ {
+ register_signature( ".c" );
+ register_signature( ".cpp" );
+ register_signature( ".cxx" );
+ register_signature( ".h" );
+ register_signature( ".hpp" );
+ register_signature( ".hxx" );
+ register_signature( ".ipp" );
+ }
+
+ void assert_macro_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:" "naassert_macro" ) != string::npos)
+ return;
+
+ // Check files iff (a) they are in the boost directory, or (b) they
+ // are in the src directory under libs.
+ if (m_from_boost_root) {
+ path relative( relative_to( full_path, search_root_path() ) );
+ path::const_iterator pbeg = relative.begin(), pend = relative.end();
+ if (pbeg != std::find(pbeg, pend, "boost") &&
+ !(pbeg == std::find(pbeg, pend, "libs") && pend != std::find(pbeg, pend, "src")))
+ return;
+ }
+
+ long errors = 0;
+ boost::sregex_iterator cur(contents.begin(), contents.end(), assert_macro_regex), end;
+ for( ; cur != end; ++cur )
+ {
+ 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()
+ }
+ }
+
+ ++errors;
+ error( library_name, full_path, "C-style assert macro on line "
+ + boost::lexical_cast<string>( line_number ) );
+ }
+ }
+ if(errors > 0)
+ ++m_files_with_errors;
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/assert_macro_check.hpp b/src/boost/tools/inspect/assert_macro_check.hpp
new file mode 100644
index 000000000..c28a377f3
--- /dev/null
+++ b/src/boost/tools/inspect/assert_macro_check.hpp
@@ -0,0 +1,40 @@
+// assert_macro_check header --------------------------------------------------------//
+
+// Copyright Eric Niebler 2010.
+// Based on the apple_macro_check checker by Marshall Clow
+// 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_ASSERT_MACRO_CHECK_HPP
+#define BOOST_ASSERT_MACRO_CHECK_HPP
+
+#include "inspector.hpp"
+
+
+namespace boost
+{
+ namespace inspect
+ {
+ class assert_macro_check : public inspector
+ {
+ long m_files_with_errors;
+ bool m_from_boost_root;
+ public:
+
+ assert_macro_check();
+ virtual const char * name() const { return "*ASSERT-MACROS*"; }
+ virtual const char * desc() const { return "presence of C-style assert macro in file (use BOOST_ASSERT instead)"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~assert_macro_check()
+ { std::cout << " " << m_files_with_errors << " files with a C-style assert macro" << line_break(); }
+ };
+ }
+}
+
+#endif // BOOST_ASSERT_MACRO_CHECK_HPP
diff --git a/src/boost/tools/inspect/build/Jamfile.v2 b/src/boost/tools/inspect/build/Jamfile.v2
new file mode 100644
index 000000000..e3a53a03d
--- /dev/null
+++ b/src/boost/tools/inspect/build/Jamfile.v2
@@ -0,0 +1,56 @@
+# Inspect Jamfile
+
+# Copyright Vladimir Prus
+
+# Distributed under the Boost Software License, Version 1.0.
+# See http://www.boost.org/LICENSE_1_0.txt
+
+project
+ :
+ requirements
+ :
+ source-location ..
+ ;
+
+exe inspect
+ :
+ apple_macro_check.cpp
+ ascii_check.cpp
+ assert_macro_check.cpp
+ copyright_check.cpp
+ crlf_check.cpp
+ deprecated_macro_check.cpp
+ end_check.cpp
+ inspect.cpp
+ license_check.cpp
+ link_check.cpp
+ minmax_check.cpp
+ path_name_check.cpp
+ tab_check.cpp
+ unnamed_namespace_check.cpp
+ /boost//filesystem/<link>static
+ /boost//regex/<link>static
+ :
+ :
+ release
+ ;
+
+install dist-bin
+ :
+ inspect
+ :
+ <install-type>EXE
+ <location>../../../dist/bin
+ :
+ release
+ ;
+
+install dist-lib
+ :
+ inspect
+ :
+ <install-type>LIB
+ <location>../../../dist/lib
+ :
+ release
+ ;
diff --git a/src/boost/tools/inspect/build/msvc/boost_inspect.sln b/src/boost/tools/inspect/build/msvc/boost_inspect.sln
new file mode 100644
index 000000000..a4a1a40ab
--- /dev/null
+++ b/src/boost/tools/inspect/build/msvc/boost_inspect.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inspect", "boost_inspect.vcxproj", "{0EC8AC1C-6D1F-47FC-A06A-9CC3F924BD82}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0EC8AC1C-6D1F-47FC-A06A-9CC3F924BD82}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0EC8AC1C-6D1F-47FC-A06A-9CC3F924BD82}.Debug|Win32.Build.0 = Debug|Win32
+ {0EC8AC1C-6D1F-47FC-A06A-9CC3F924BD82}.Release|Win32.ActiveCfg = Release|Win32
+ {0EC8AC1C-6D1F-47FC-A06A-9CC3F924BD82}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/boost/tools/inspect/build/msvc/boost_inspect.vcxproj b/src/boost/tools/inspect/build/msvc/boost_inspect.vcxproj
new file mode 100644
index 000000000..3c35c22b8
--- /dev/null
+++ b/src/boost/tools/inspect/build/msvc/boost_inspect.vcxproj
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>inspect</ProjectName>
+ <ProjectGuid>{0EC8AC1C-6D1F-47FC-A06A-9CC3F924BD82}</ProjectGuid>
+ <RootNamespace>boost_inspect</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\..\..\stage\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>"$(TargetDir)\$(TargetName).exe" ../.. -text -brief</Command>
+ </PostBuildEvent>
+ <PostBuildEvent>
+ <Message>Executing test $(TargetName).exe...</Message>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>..\..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\..\..\stage\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\apple_macro_check.cpp" />
+ <ClCompile Include="..\..\ascii_check.cpp" />
+ <ClCompile Include="..\..\assert_macro_check.cpp" />
+ <ClCompile Include="..\..\copyright_check.cpp" />
+ <ClCompile Include="..\..\crlf_check.cpp" />
+ <ClCompile Include="..\..\deprecated_macro_check.cpp" />
+ <ClCompile Include="..\..\end_check.cpp" />
+ <ClCompile Include="..\..\inspect.cpp" />
+ <ClCompile Include="..\..\license_check.cpp" />
+ <ClCompile Include="..\..\link_check.cpp" />
+ <ClCompile Include="..\..\minmax_check.cpp" />
+ <ClCompile Include="..\..\path_name_check.cpp" />
+ <ClCompile Include="..\..\tab_check.cpp" />
+ <ClCompile Include="..\..\unnamed_namespace_check.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/boost/tools/inspect/build/msvc/readme.txt b/src/boost/tools/inspect/build/msvc/readme.txt
new file mode 100644
index 000000000..a549811ad
--- /dev/null
+++ b/src/boost/tools/inspect/build/msvc/readme.txt
@@ -0,0 +1,8 @@
+The provided Microsoft VC++ 10 solution assumes the following commands have been run
+in the root directory:
+
+ b2 --toolset=msvc-10.0express --build-type=complete --with-filesystem stage
+ b2 --toolset=msvc-10.0express --build-type=complete --with-regex stage
+
+boost-no-inspect
+
diff --git a/src/boost/tools/inspect/copyright_check.cpp b/src/boost/tools/inspect/copyright_check.cpp
new file mode 100644
index 000000000..f56bbc955
--- /dev/null
+++ b/src/boost/tools/inspect/copyright_check.cpp
@@ -0,0 +1,35 @@
+// copyright_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 "copyright_check.hpp"
+
+namespace boost
+{
+ namespace inspect
+ {
+ copyright_check::copyright_check() : m_files_with_errors(0)
+ {
+ }
+
+ void copyright_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:" "nocopyright" ) != string::npos) return;
+
+ if ( contents.find( "Copyright" ) == string::npos
+ && contents.find( "copyright" ) == string::npos )
+ {
+ ++m_files_with_errors;
+ error( library_name, full_path, name() );
+ }
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/copyright_check.hpp b/src/boost/tools/inspect/copyright_check.hpp
new file mode 100644
index 000000000..278596e3e
--- /dev/null
+++ b/src/boost/tools/inspect/copyright_check.hpp
@@ -0,0 +1,39 @@
+// copyright_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_COPYRIGHT_CHECK_HPP
+#define BOOST_COPYRIGHT_CHECK_HPP
+
+#include "inspector.hpp"
+
+namespace boost
+{
+ namespace inspect
+ {
+ class copyright_check : public source_inspector
+ {
+ long m_files_with_errors;
+ public:
+
+ copyright_check();
+ virtual const char * name() const { return "*C*"; }
+ virtual const char * desc() const { return "missing copyright notice"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~copyright_check()
+ { std::cout << " " << m_files_with_errors << " files " << desc() << line_break(); }
+ };
+ }
+}
+
+#endif // BOOST_COPYRIGHT_CHECK_HPP
diff --git a/src/boost/tools/inspect/crlf_check.cpp b/src/boost/tools/inspect/crlf_check.cpp
new file mode 100644
index 000000000..c38271140
--- /dev/null
+++ b/src/boost/tools/inspect/crlf_check.cpp
@@ -0,0 +1,97 @@
+// crlf_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)
+
+// Contributed by Joerg Walter
+
+#include "crlf_check.hpp"
+
+namespace boost
+{
+ namespace inspect
+ {
+ crlf_check::crlf_check() : m_files_with_errors(0)
+ {
+ }
+
+ void crlf_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:" "nocrlf" ) != string::npos) return;
+
+ // this file deliberately contains errors
+ const char test_file_name[] = "wrong_line_ends_test.cpp";
+
+ bool failed = false;
+ // The understanding on line endings, as I remember it, was that
+ // either "\n" or "\r\n" is OK, and they can be mixed, but "\r" alone
+ // is not acceptable. Mixed line endings are allowed because Boost files
+ // are commonly edited in both Windows and UNIX environments, and editors
+ // in those environments generally accept either ending. Even Mac people
+ // agreed with this policy. --Beman
+
+ // Joerg's original implementation is saved below,
+ // in case we change our minds!
+
+ for ( std::string::const_iterator itr ( contents.begin() );
+ itr != contents.end(); ++itr )
+ {
+ if ( *itr == '\r' && ((itr+1) == contents.end() || *(itr+1) != '\n') )
+ {
+ failed = true;
+ break;
+ }
+ }
+
+ if (failed && full_path.leaf() != test_file_name)
+ {
+ ++m_files_with_errors;
+ error( library_name, full_path, name() );
+ }
+
+ if (!failed && full_path.leaf() == test_file_name)
+ {
+ ++m_files_with_errors;
+ error( library_name, full_path, string(name()) + " should have cr-only line endings" );
+ }
+
+/*
+ size_t cr_count = 0;
+ size_t lf_count = 0;
+ size_t crlf_count = 0;
+ bool had_cr = false;
+ for ( size_t i = 0; i < contents.length(); ++i )
+ {
+ switch ( contents[i] )
+ {
+ case '\r':
+ had_cr = true;
+ ++cr_count;
+ break;
+ case '\n':
+ ++lf_count;
+ if ( had_cr )
+ ++crlf_count;
+ // fallthrough
+ default:
+ had_cr = false;
+ break;
+ }
+ }
+ if ( cr_count > 0 && lf_count != crlf_count )
+ {
+ ++m_files_with_errors;
+ error( library_name, full_path, desc() );
+ }
+*/
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/crlf_check.hpp b/src/boost/tools/inspect/crlf_check.hpp
new file mode 100644
index 000000000..c6627ceee
--- /dev/null
+++ b/src/boost/tools/inspect/crlf_check.hpp
@@ -0,0 +1,40 @@
+// crfl_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)
+
+// Contributed by Joerg Walter
+
+#ifndef BOOST_CRLF_CHECK_HPP
+#define BOOST_CRLF_CHECK_HPP
+
+#include "inspector.hpp"
+
+namespace boost
+{
+ namespace inspect
+ {
+ class crlf_check : public source_inspector
+ {
+ long m_files_with_errors;
+ public:
+
+ crlf_check();
+ virtual const char * name() const { return "*EOL*"; }
+ virtual const char * desc() const { return "invalid (cr only) line-ending"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~crlf_check()
+ { std::cout << " " << m_files_with_errors << " files with invalid line endings" << line_break(); }
+ };
+ }
+}
+
+#endif // BOOST_CRLF_CHECK_HPP
diff --git a/src/boost/tools/inspect/deprecated_macro_check.cpp b/src/boost/tools/inspect/deprecated_macro_check.cpp
new file mode 100644
index 000000000..7eeeda00c
--- /dev/null
+++ b/src/boost/tools/inspect/deprecated_macro_check.cpp
@@ -0,0 +1,146 @@
+// deprecated macro check implementation ---------------------------------------------//
+// Protect against ourself: boostinspect:ndprecated_macros
+
+// Copyright Eric Niebler 2010.
+// Based on the assert_macro_check checker by Marshall Clow
+//
+// 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 "deprecated_macro_check.hpp"
+#include <functional>
+#include "boost/regex.hpp"
+#include "boost/lexical_cast.hpp"
+#include "boost/filesystem/operations.hpp"
+
+namespace fs = boost::filesystem;
+
+namespace
+{
+ const char * boost150macros [] = {
+ "BOOST_NO_0X_HDR_ARRAY",
+ "BOOST_NO_0X_HDR_CHRONO",
+ "BOOST_NO_0X_HDR_CODECVT",
+ "BOOST_NO_0X_HDR_CONDITION_VARIABLE",
+ "BOOST_NO_0X_HDR_FORWARD_LIST",
+ "BOOST_NO_0X_HDR_FUTURE",
+ "BOOST_NO_0X_HDR_INITIALIZER_LIST",
+ "BOOST_NO_INITIALIZER_LISTS",
+ "BOOST_NO_0X_HDR_MUTEX",
+ "BOOST_NO_0X_HDR_RANDOM",
+ "BOOST_NO_0X_HDR_RATIO",
+ "BOOST_NO_0X_HDR_REGEX",
+ "BOOST_NO_0X_HDR_SYSTEM_ERROR",
+ "BOOST_NO_0X_HDR_THREAD",
+ "BOOST_NO_0X_HDR_TUPLE",
+ "BOOST_NO_0X_HDR_TYPE_TRAITS",
+ "BOOST_NO_0X_HDR_TYPEINDEX",
+ "BOOST_NO_0X_HDR_UNORDERED_SET",
+ "BOOST_NO_0X_HDR_UNORDERED_MAP",
+ "BOOST_NO_STD_UNORDERED",
+ NULL
+ };
+
+ const char * boost151macros [] = {
+ "BOOST_NO_AUTO_DECLARATIONS",
+ "BOOST_NO_AUTO_MULTIDECLARATIONS",
+ "BOOST_NO_CHAR16_T",
+ "BOOST_NO_CHAR32_T",
+ "BOOST_NO_TEMPLATE_ALIASES",
+ "BOOST_NO_CONSTEXPR",
+ "BOOST_NO_DECLTYPE",
+ "BOOST_NO_DECLTYPE_N3276",
+ "BOOST_NO_DEFAULTED_FUNCTIONS",
+ "BOOST_NO_DELETED_FUNCTIONS",
+ "BOOST_NO_EXPLICIT_CONVERSION_OPERATORS",
+ "BOOST_NO_EXTERN_TEMPLATE",
+ "BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS",
+ "BOOST_NO_LAMBDAS",
+ "BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS",
+ "BOOST_NO_NOEXCEPT",
+ "BOOST_NO_NULLPTR",
+ "BOOST_NO_RAW_LITERALS",
+ "BOOST_NO_RVALUE_REFERENCES",
+ "BOOST_NO_SCOPED_ENUMS",
+ "BOOST_NO_STATIC_ASSERT",
+ "BOOST_NO_STD_UNORDERED",
+ "BOOST_NO_UNICODE_LITERALS",
+ "BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX",
+ "BOOST_NO_VARIADIC_TEMPLATES",
+ "BOOST_NO_VARIADIC_MACROS",
+ "BOOST_NO_NUMERIC_LIMITS_LOWEST",
+ NULL
+ };
+
+ const char * boost153macros [] = {
+ "BOOST_HAS_STATIC_ASSERT",
+ "BOOST_HAS_RVALUE_REFS",
+ "BOOST_HAS_VARIADIC_TMPL",
+ "BOOST_HAS_CHAR16_T",
+ "BOOST_HAS_CHAR32_T",
+ NULL
+ };
+} // unnamed namespace
+
+
+namespace boost
+{
+ namespace inspect
+ {
+ deprecated_macro_check::deprecated_macro_check()
+ : m_files_with_errors(0)
+ , m_from_boost_root(
+ fs::exists(search_root_path() / "boost") &&
+ fs::exists(search_root_path() / "libs"))
+ {
+ register_signature( ".c" );
+ register_signature( ".cpp" );
+ register_signature( ".cxx" );
+ register_signature( ".h" );
+ register_signature( ".hpp" );
+ register_signature( ".hxx" );
+ register_signature( ".ipp" );
+ }
+
+ void deprecated_macro_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:" "ndprecated_macros" ) != string::npos)
+ return;
+
+ const char **ptr;
+ long errors = 0;
+ for ( ptr = boost150macros; *ptr != NULL; ++ptr )
+ {
+ if ( contents.find( *ptr ) != string::npos ) {
+ ++errors;
+ error( library_name, full_path, string ( "Boost macro deprecated in 1.50: " ) + *ptr );
+ }
+ }
+
+ for ( ptr = boost151macros; *ptr != NULL; ++ptr )
+ {
+ if ( contents.find( *ptr ) != string::npos ) {
+ ++errors;
+ error( library_name, full_path, string ( "Boost macro deprecated in 1.51: " ) + *ptr );
+ }
+ }
+
+ for ( ptr = boost153macros; *ptr != NULL; ++ptr )
+ {
+ if ( contents.find( *ptr ) != string::npos ) {
+ ++errors;
+ error( library_name, full_path, string ( "Boost macro deprecated in 1.53: " ) + *ptr );
+ }
+ }
+
+ if(errors > 0)
+ ++m_files_with_errors;
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/deprecated_macro_check.hpp b/src/boost/tools/inspect/deprecated_macro_check.hpp
new file mode 100644
index 000000000..c9093907d
--- /dev/null
+++ b/src/boost/tools/inspect/deprecated_macro_check.hpp
@@ -0,0 +1,40 @@
+// deprecated_macro_check header --------------------------------------------------------//
+
+// Copyright Eric Niebler 2010.
+// Based on the apple_macro_check checker by Marshall Clow
+// 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_DEPRECATED_MACRO_CHECK_HPP
+#define BOOST_DEPRECATED_MACRO_CHECK_HPP
+
+#include "inspector.hpp"
+
+
+namespace boost
+{
+ namespace inspect
+ {
+ class deprecated_macro_check : public inspector
+ {
+ long m_files_with_errors;
+ bool m_from_boost_root;
+ public:
+
+ deprecated_macro_check();
+ virtual const char * name() const { return "*DEPRECATED-MACROS*"; }
+ virtual const char * desc() const { return "presence of deprecated BOOST macro in file (see docs for replacements)"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~deprecated_macro_check()
+ { std::cout << " " << m_files_with_errors << " files with a deprecated BOOST macro" << line_break(); }
+ };
+ }
+}
+
+#endif // BOOST_DEPRECATED_MACRO_CHECK_HPP
diff --git a/src/boost/tools/inspect/end_check.cpp b/src/boost/tools/inspect/end_check.cpp
new file mode 100644
index 000000000..9c1e438af
--- /dev/null
+++ b/src/boost/tools/inspect/end_check.cpp
@@ -0,0 +1,58 @@
+// end_check implementation -------------------------------------------------//
+
+// Copyright Beman Dawes 2002.
+// Copyright Daniel James 2009.
+//
+// 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 "end_check.hpp"
+#include <boost/next_prior.hpp>
+
+namespace boost
+{
+ namespace inspect
+ {
+ end_check::end_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" );
+ }
+
+ void end_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:" "noend" ) != string::npos) return;
+
+ // this file deliberately contains errors
+ const char test_file_name[] = "wrong_line_ends_test.cpp";
+
+ char final_char = contents.begin() == contents.end() ? '\0'
+ : *(boost::prior(contents.end()));
+
+ bool failed = final_char != '\n' && final_char != '\r';
+
+ if (failed && full_path.leaf() != test_file_name)
+ {
+ ++m_files_with_errors;
+ error( library_name, full_path, string(name()) + ' ' + desc() );
+ }
+
+ if (!failed && full_path.leaf() == test_file_name)
+ {
+ ++m_files_with_errors;
+ error( library_name, full_path, string(name()) + " should not end with a newline" );
+ }
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/end_check.hpp b/src/boost/tools/inspect/end_check.hpp
new file mode 100644
index 000000000..41e5041ce
--- /dev/null
+++ b/src/boost/tools/inspect/end_check.hpp
@@ -0,0 +1,40 @@
+// end_check header ---------------------------------------------------------//
+
+// Copyright Beman Dawes 2002.
+// Copyright Rene Rivera 2004.
+// Copyright Daniel James 2009.
+//
+// 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_END_CHECK_HPP
+#define BOOST_END_CHECK_HPP
+
+#include "inspector.hpp"
+
+namespace boost
+{
+ namespace inspect
+ {
+ class end_check : public inspector
+ {
+ long m_files_with_errors;
+ public:
+
+ end_check();
+ virtual const char * name() const { return "*END*"; }
+ virtual const char * desc() const { return "file doesn't end with a newline"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~end_check()
+ { std::cout << " " << m_files_with_errors << " files that don't end with a newline" << line_break(); }
+ };
+ }
+}
+
+#endif // BOOST_END_CHECK_HPP
diff --git a/src/boost/tools/inspect/index.html b/src/boost/tools/inspect/index.html
new file mode 100644
index 000000000..c8abdf337
--- /dev/null
+++ b/src/boost/tools/inspect/index.html
@@ -0,0 +1,55 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<title>Inspect Tool</title>
+</head>
+
+<body bgcolor="#FFFFFF">
+
+<h1>
+<img src="../../boost.png" alt="boost.png (6897 bytes)" align="center" width="277" height="86">Inspect
+Tool</h1>
+<p>It is not uncommon for various common errors or
+<a href="http://www.boost.org/more/lib_guide.htm">guideline violations</a> to creep into the
+Boost libraries. The <i>inspect</i> program detects and reports several common
+problems. It can be used to scan a proposed Boost submission to identify various
+failures.</p>
+<p>The <i>inspect</i> program is written in C++ to limit tool chain
+dependencies, and should be portable to any system.</p>
+<p>The program is run in the directory to be scanned for errors. Sub-directories
+are also included in the scan.</p>
+<p>If the first program argument is <code>-help</code>, a usage message is
+displayed, showing all available program options.</p>
+<p>The program sources include:</p>
+<ul>
+ <li><a href="inspector.hpp">inspect.hpp</a> and <a href="inspect.cpp">
+ inspect.cpp</a></li>
+ <li><a href="link_check.hpp">link_check.hpp</a> and <a href="link_check.cpp">
+ link_check.cpp</a></li>
+ <li><a href="path_name_check.hpp">path_name_check.hpp</a> and
+ <a href="path_name_check.cpp">path_name_check.cpp</a></li>
+ <li><a href="tab_check.hpp">tab_check.hpp</a> and <a href="tab_check.cpp">
+ tab_check.cpp</a></li>
+</ul>
+<p>A <a href="build/Jamfile.v2">Jamfile</a> is provided to build the program
+using Boost.Build.</p>
+<p>A Microsoft Visual Studio solution file is provided to aid maintenance. See
+<a href="build/msvc/readme.txt">readme.txt</a>
+before using it.</p>
+<hr>
+<p>Revised
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->29 June, 2008<!--webbot bot="Timestamp" endspan i-checksum="19976" --></p>
+
+<p> Copyright Beman Dawes, 2003</p>
+<p> Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <a href="../../LICENSE_1_0.txt">
+LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
+www.boost.org/LICENSE_1_0.txt</a>)</p>
+
+</body>
+
+</html>
diff --git a/src/boost/tools/inspect/inspect.cpp b/src/boost/tools/inspect/inspect.cpp
new file mode 100644
index 000000000..eb759fb3e
--- /dev/null
+++ b/src/boost/tools/inspect/inspect.cpp
@@ -0,0 +1,1041 @@
+// inspect program -------------------------------------------------------------------//
+
+// Copyright Beman Dawes 2002.
+// Copyright Rene Rivera 2004-2006.
+// 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)
+
+// This program recurses through sub-directories looking for various problems.
+// It contains some Boost specific features, like ignoring "bin",
+// and the code that identifies library names assumes the Boost directory
+// structure.
+
+// See http://www.boost.org/tools/inspect/ for more information.
+
+const char* boost_no_inspect = "boost-" "no-inspect";
+
+// Directories with a file name of the boost_no_inspect value are not inspected.
+// Files that contain the boost_no_inspect value are not inspected.
+
+
+#include <vector>
+#include <list>
+#include <algorithm>
+#include <cstring>
+
+#include "boost/shared_ptr.hpp"
+#include "boost/lexical_cast.hpp"
+#include "boost/filesystem/operations.hpp"
+#include "boost/filesystem/fstream.hpp"
+
+#include <stdio.h> // for popen, pclose
+#if defined(_MSC_VER)
+# define POPEN _popen
+# define PCLOSE _pclose
+#else
+# define POPEN popen
+# define PCLOSE pclose
+#endif
+
+#include "time_string.hpp"
+
+#include "inspector.hpp"
+
+// the inspectors
+#include "copyright_check.hpp"
+#include "crlf_check.hpp"
+#include "end_check.hpp"
+#include "license_check.hpp"
+#include "link_check.hpp"
+#include "path_name_check.hpp"
+#include "tab_check.hpp"
+#include "ascii_check.hpp"
+#include "apple_macro_check.hpp"
+#include "assert_macro_check.hpp"
+#include "deprecated_macro_check.hpp"
+#include "minmax_check.hpp"
+#include "unnamed_namespace_check.hpp"
+
+#if !defined(INSPECT_USE_BOOST_TEST)
+#define INSPECT_USE_BOOST_TEST 0
+#endif
+
+#if INSPECT_USE_BOOST_TEST
+#include "boost/test/included/prg_exec_monitor.hpp"
+#endif
+
+namespace fs = boost::filesystem;
+
+using namespace boost::inspect;
+
+namespace
+{
+ fs::path search_root = fs::initial_path();
+
+ class inspector_element
+ {
+ typedef boost::shared_ptr< boost::inspect::inspector > inspector_ptr;
+
+ public:
+ inspector_ptr inspector;
+ explicit
+ inspector_element( boost::inspect::inspector * p ) : inspector(p) {}
+ };
+
+ typedef std::list< inspector_element > inspector_list;
+
+ long file_count = 0;
+ long directory_count = 0;
+ long error_count = 0;
+ const int max_offenders = 5; // maximum "worst offenders" to display
+
+ boost::inspect::string_set content_signatures;
+
+ struct error_msg
+ {
+ string library;
+ string rel_path;
+ string msg;
+ int line_number;
+
+ bool operator<( const error_msg & rhs ) const
+ {
+ if ( library < rhs.library ) return true;
+ if ( library > rhs.library ) return false;
+ if ( rel_path < rhs.rel_path ) return true;
+ if ( rel_path > rhs.rel_path ) return false;
+ if ( line_number < rhs.line_number ) return true;
+ if ( line_number > rhs.line_number ) return false;
+ return msg < rhs.msg;
+ }
+ };
+
+ typedef std::vector< error_msg > error_msg_vector;
+ error_msg_vector msgs;
+
+ struct lib_error_count
+ {
+ int error_count;
+ string library;
+
+ bool operator<( const lib_error_count & rhs ) const
+ {
+ return error_count > rhs.error_count;
+ }
+ };
+
+ typedef std::vector< lib_error_count > lib_error_count_vector;
+ lib_error_count_vector libs;
+
+// visit_predicate (determines which directories are visited) --------------//
+
+ typedef bool(*pred_type)(const path&);
+
+ bool visit_predicate( const path & pth )
+ {
+ string local( boost::inspect::relative_to( pth, search_root_path() ) );
+ string leaf( pth.leaf().string() );
+ if (leaf[0] == '.') // ignore hidden by convention directories such as
+ return false; // .htaccess, .git, .svn, .bzr, .DS_Store, etc.
+
+ return
+ // don't look at binaries
+ leaf != "bin"
+ && leaf != "bin.v2"
+ // no point in checking doxygen xml output
+ && local.find("doc/xml") != 0
+ && local.find("doc\\xml") != 0
+ // ignore if tag file present
+ && !boost::filesystem::exists(pth / boost_no_inspect)
+ ;
+ }
+
+// library_from_content ----------------------------------------------------//
+
+ string library_from_content( const string & content )
+ {
+ const string unknown_library ( "unknown" );
+ const string lib_root ( "www.boost.org/libs/" );
+ string::size_type pos( content.find( lib_root ) );
+
+ string lib = unknown_library;
+
+ if ( pos != string::npos ) {
+
+ pos += lib_root.length();
+
+ const char delims[] = " " // space and...
+ "/\n\r\t";
+
+ string::size_type n = content.find_first_of( string(delims), pos );
+ if (n != string::npos)
+ lib = string(content, pos, n - pos);
+
+ }
+
+ return lib;
+ }
+
+// find_signature ----------------------------------------------------------//
+
+ bool find_signature( const path & file_path,
+ const boost::inspect::string_set & signatures )
+ {
+ string name( file_path.leaf().string() );
+ if ( signatures.find( name ) == signatures.end() )
+ {
+ string::size_type pos( name.rfind( '.' ) );
+ if ( pos == string::npos
+ || signatures.find( name.substr( pos ) )
+ == signatures.end() ) return false;
+ }
+ return true;
+ }
+
+// load_content ------------------------------------------------------------//
+
+ void load_content( const path & file_path, string & target )
+ {
+ target = "";
+
+ if ( !find_signature( file_path, content_signatures ) ) return;
+
+ fs::ifstream fin( file_path, std::ios_base::in|std::ios_base::binary );
+ if ( !fin )
+ throw string( "could not open input file: " ) + file_path.string();
+ std::getline( fin, target, '\0' ); // read the whole file
+ }
+
+// check -------------------------------------------------------------------//
+
+ void check( const string & lib,
+ const path & pth, const string & content, const inspector_list & insp_list )
+ {
+ // invoke each inspector
+ for ( inspector_list::const_iterator itr = insp_list.begin();
+ itr != insp_list.end(); ++itr )
+ {
+ itr->inspector->inspect( lib, pth ); // always call two-argument form
+ if ( find_signature( pth, itr->inspector->signatures() ) )
+ {
+ itr->inspector->inspect( lib, pth, content );
+ }
+ }
+ }
+
+// visit_all ---------------------------------------------------------------//
+
+ template< class DirectoryIterator >
+ void visit_all( const string & lib,
+ const path & dir_path, const inspector_list & insps )
+ {
+ static DirectoryIterator end_itr;
+ ++directory_count;
+
+ for ( DirectoryIterator itr( dir_path ); itr != end_itr; ++itr )
+ {
+ if ( fs::is_directory( *itr ) )
+ {
+ if ( visit_predicate( *itr ) )
+ {
+ string cur_lib( boost::inspect::impute_library( *itr ) );
+ check( cur_lib, *itr, "", insps );
+ visit_all<DirectoryIterator>( cur_lib, *itr, insps );
+ }
+ }
+ else if (itr->path().leaf().string()[0] != '.') // ignore if hidden
+ {
+ ++file_count;
+ string content;
+ load_content( *itr, content );
+ if (content.find(boost_no_inspect) == string::npos)
+ check( lib.empty() ? library_from_content( content ) : lib,
+ *itr, content, insps );
+ }
+ }
+ }
+
+// display -----------------------------------------------------------------//
+
+ enum display_format_type
+ {
+ display_html, display_text
+ }
+ display_format = display_html;
+
+ enum display_mode_type
+ {
+ display_full, display_brief
+ }
+ display_mode = display_full;
+
+// display_summary_helper --------------------------------------------------//
+
+ void display_summary_helper( const string & current_library, int err_count )
+ {
+ if (display_format == display_text)
+ {
+ std::cout << " " << current_library << " (" << err_count << ")\n";
+ }
+ else
+ {
+ std::cout
+ << " <a href=\"#"
+ << current_library // what about malformed for URI refs? [gps]
+ << "\">" << current_library
+ << "</a> ("
+ << err_count << ")<br>\n";
+ }
+ }
+
+// display_summary ---------------------------------------------------------//
+
+ void display_summary()
+ {
+ if (display_format == display_text)
+ {
+ std::cout << "Summary:\n";
+ }
+ else
+ {
+ std::cout <<
+ "<h2>Summary</h2>\n"
+ "<blockquote>\n"
+ ;
+ }
+
+ 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 )
+ {
+ display_summary_helper( current_library, err_count );
+ current_library = itr->library;
+ err_count = 0;
+ }
+ ++err_count;
+ }
+ display_summary_helper( current_library, err_count );
+
+ if (display_format == display_text)
+ std::cout << "\n";
+ else
+ std::cout << "</blockquote>\n";
+ }
+
+// html_encode -------------------------------------------------------------//
+
+ std::string html_encode(std::string const& text)
+ {
+ std::string result;
+
+ for(std::string::const_iterator it = text.begin(),
+ end = text.end(); it != end; ++it)
+ {
+ switch(*it) {
+ case '<':
+ result += "&lt;";
+ break;
+ case '>':
+ result += "&gt;";
+ break;
+ case '&':
+ result += "&amp;";
+ break;
+ default:
+ result += *it;
+ }
+ }
+
+ return result;
+ }
+
+// display_details ---------------------------------------------------------//
+
+ void display_details()
+ {
+ if (display_format == display_text)
+ {
+ // display error messages with group indication
+ error_msg current;
+ string sep;
+ for ( error_msg_vector::iterator itr ( msgs.begin() );
+ itr != msgs.end(); ++itr )
+ {
+ if ( current.library != itr->library )
+ {
+ if ( display_full == display_mode )
+ std::cout << "\n|" << itr->library << "|\n";
+ else
+ std::cout << "\n\n|" << itr->library << '|';
+ }
+
+ if ( current.library != itr->library
+ || current.rel_path != itr->rel_path )
+ {
+ if ( display_full == display_mode )
+ {
+ std::cout << " " << itr->rel_path << ":\n";
+ }
+ else
+ {
+ path current_rel_path(current.rel_path);
+ path this_rel_path(itr->rel_path);
+ if (current_rel_path.branch_path() != this_rel_path.branch_path())
+ {
+ std::cout << "\n " << this_rel_path.branch_path().string() << '/';
+ }
+ std::cout << "\n " << this_rel_path.leaf() << ':';
+ }
+ }
+ if ( current.library != itr->library
+ || current.rel_path != itr->rel_path
+ || current.msg != itr->msg )
+ {
+ const string m = itr->msg;
+
+ if ( display_full == display_mode )
+ std::cout << " " << m << '\n';
+ else
+ std::cout << ' ' << m;
+ }
+ current.library = itr->library;
+ current.rel_path = itr->rel_path;
+ current.msg = itr->msg;
+ }
+ std::cout << "\n";
+ }
+ else // html
+ {
+ // display error messages with group indication
+ error_msg current;
+ bool first_sep = true;
+ bool first = true;
+ for ( error_msg_vector::iterator itr ( msgs.begin() );
+ itr != msgs.end(); ++itr )
+ {
+ if ( current.library != itr->library )
+ {
+ if ( !first ) std::cout << "</pre>\n";
+ std::cout << "\n<h3><a name=\"" << itr->library
+ << "\">" << itr->library << "</a></h3>\n<pre>";
+ }
+ 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 = ":<br>&nbsp;&nbsp;&nbsp; ";
+ else sep = ": ";
+ else
+ if (itr->line_number) sep = "<br>&nbsp;&nbsp;&nbsp; ";
+ 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 << "</pre>\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 <<
+ "<h2>Worst Offenders</h2>\n"
+ "<blockquote>\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
+ << " <a href=\"#"
+ << itr->library
+ << "\">" << itr->library
+ << "</a> ("
+ << itr->error_count << ")<br>\n";
+ }
+ last_error_count = itr->error_count;
+ }
+
+ if (display_format == display_text)
+ std::cout << "\n";
+ else
+ std::cout << "</blockquote>\n";
+ }
+
+
+ const char * options()
+ {
+ return
+ " Output Options:\n\n"
+ " -brief\n"
+ " -text\n"
+ " -version-string <version message>\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 <version message>\n"
+ " default is all checks on; otherwise options specify desired checks"
+ "\n";
+ }
+
+ const char * doctype_declaration()
+ {
+ return
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"
+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
+ ;
+ }
+
+ std::string validator_link(const std::string & text)
+ {
+ return
+ // with link to validation service
+ "<a href=\"http://validator.w3.org/check?uri=referer\">"
+ + text
+ + "</a>"
+ ;
+ }
+
+} // unnamed namespace
+
+namespace boost
+{
+ namespace inspect
+ {
+
+// line_break --------------------------------------------------------------//
+
+ const char * line_break()
+ {
+ return display_format ? "\n" : "<br>\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
+{
+ // <hack> 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 1;
+ }
+
+ 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<fs::directory_iterator>( 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
+ << "<html>\n"
+ "<head>\n"
+ "<style> body { font-family: sans-serif; } </style>\n"
+ "<title>Boost Inspection Report</title>\n"
+ "</head>\n"
+
+ "<body>\n"
+ // we should not use a table, of course [gps]
+ "<table>\n"
+ "<tr>\n"
+ "<td><img src=\"http://www.boost.org/boost.png\" alt=\"Boost logo\" />"
+ "</td>\n"
+ "<td>\n"
+ "<h1>Boost Inspection Report</h1>\n"
+ "<b>Run Date:</b> " << run_date << "\n"
+ //"&nbsp;&nbsp;/ " << validator_link( "validate me" ) << " /\n"
+ "</td>\n"
+ "</tr>\n"
+ "</table>\n"
+
+ "<p>This report is generated by an <a href=\"http://www.boost.org/tools/inspect/index.html\">inspection\n"
+ "program</a> that checks files for the problems noted below.</p>\n"
+ ;
+ if (version_string) {
+ std::cout
+ << "<p>The files checked were from "
+ << html_encode(version_string)
+ << ".</p>\n";
+ }
+
+
+ std::cout
+ << "<h2>Totals</h2>\n"
+ << file_count << " files scanned<br>\n"
+ << directory_count << " directories scanned (including root)<br>\n"
+ << error_count << " problems reported\n<p>";
+ }
+
+ for ( inspector_list::iterator itr = inspectors.begin();
+ itr != inspectors.end(); ++itr )
+ {
+
+ inspector_keys += static_cast<string>(" ")
+ + itr->inspector->name()
+ + ' ' + itr->inspector->desc()
+ + line_break()
+ ;
+ }
+
+ if (display_format == display_text)
+ std::cout << "\nProblem counts:\n";
+ else
+ std::cout << "\n<h2>Problem counts</h2>\n<blockquote><p>\n" ;
+
+ } // end of block: starts reporting
+
+ if (display_format == display_text)
+ std::cout << "\n" ;
+ else
+ std::cout << "</blockquote>\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 << "<h2>Details</h2>\n" << inspector_keys;
+ std::cout << "\n<p>Directories with a file named \"" << boost_no_inspect << "\" will not be inspected.<br>\n"
+ "Files containing \"" << boost_no_inspect << "\" will not be inspected.</p>\n";
+ }
+ display_details();
+ }
+
+ if (display_format == display_text)
+ {
+ std::cout << "\n\n" ;
+ }
+ else
+ {
+ std::cout
+ << "</body>\n"
+ "</html>\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 <set>
+#include <iostream>
+#include <ostream>
+#include <string>
+#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 <boost/algorithm/string/case_conv.hpp>
+#include <cstdlib>
+#include <set>
+
+// #include <iostream>
+
+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<std::string> 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) == "&amp;") {
+ 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<bookmark_set::iterator, bool> 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 <map>
+
+#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 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<title>valid link</title>
+</head>
+
+<body>
+
+<p><a href="#link-target">valid bookmark link</a></p>
+<p><a href="link_check_test.html">valid relative link</a></p>
+<p><a href="foo.html#bar">broken relative link with bookmark</a></p>
+<p><a href="#broken">broken bookmark link</a></p>
+<p><a name="link-target">bookmark</a></p>
+<p><a name="second-target">second bookmark</a></p>
+<p><a name="SECOND-TARGET">duplicate second bookmark</a></p>
+<p>&nbsp;</p>
+
+</body>
+
+</html> \ 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 <algorithm>
+
+#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<string>( 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 <string>
+#include <algorithm>
+#include <cctype>
+#include <cstring>
+
+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<string>(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 <string>
+#include <ctime>
+
+#include <boost/config/warning_disable.hpp>
+
+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(
+ "\\<namespace\\s*(\\?\\?<|\\{)" // trigraph ??< or {
+ );
+
+} // unnamed namespace (ironical? :-)
+
+
+
+namespace boost
+{
+ namespace inspect
+ {
+ unnamed_namespace_check::unnamed_namespace_check() : m_errors(0)
+ {
+ register_signature( ".h" );
+ register_signature( ".hh" ); // just in case
+ register_signature( ".hpp" );
+ register_signature( ".hxx" ); // just in case
+ register_signature( ".inc" );
+ register_signature( ".ipp" );
+ register_signature( ".inl" );
+ }
+
+ void unnamed_namespace_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:" "nounnamed" ) != string::npos) return;
+
+
+ boost::sregex_iterator cur(contents.begin(), contents.end(), unnamed_namespace_regex), end;
+ for( ; cur != end; ++cur, ++m_errors )
+ {
+ const string::size_type
+ ln = std::count( contents.begin(), (*cur)[0].first, '\n' ) + 1;
+
+ error( library_name, full_path, "Unnamed namespace", ln );
+ }
+
+
+ }
+ } // namespace inspect
+} // namespace boost
+
+
diff --git a/src/boost/tools/inspect/unnamed_namespace_check.hpp b/src/boost/tools/inspect/unnamed_namespace_check.hpp
new file mode 100644
index 000000000..87f36b717
--- /dev/null
+++ b/src/boost/tools/inspect/unnamed_namespace_check.hpp
@@ -0,0 +1,39 @@
+// 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)
+
+#ifndef BOOST_UNNAMED_NAMESPACE_CHECK_HPP_GP_20060718
+#define BOOST_UNNAMED_NAMESPACE_CHECK_HPP_GP_20060718
+
+#include "inspector.hpp"
+
+namespace boost
+{
+ namespace inspect
+ {
+ class unnamed_namespace_check : public inspector
+ {
+ long m_errors;
+ public:
+
+ unnamed_namespace_check();
+ virtual const char * name() const { return "*U*"; }
+ virtual const char * desc() const { return "unnamed namespace in header"; }
+
+ virtual void inspect(
+ const std::string & library_name,
+ const path & full_path,
+ const std::string & contents );
+
+ virtual ~unnamed_namespace_check()
+ { std::cout << " " << m_errors << " usages of unnamed namespaces in headers (including .ipp files)" << line_break(); }
+ };
+ }
+}
+
+
+#endif // include guard
diff --git a/src/boost/tools/inspect/wrong_line_ends_test.cpp b/src/boost/tools/inspect/wrong_line_ends_test.cpp
new file mode 100644
index 000000000..05d1a1b42
--- /dev/null
+++ b/src/boost/tools/inspect/wrong_line_ends_test.cpp
@@ -0,0 +1 @@
+// this is a test file; it isn't supposed to have correct line endings // Copyright Beman Dawes, 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) line ending with cr line ending without any cr or nl \ No newline at end of file
diff --git a/src/boost/tools/litre/cplusplus.py b/src/boost/tools/litre/cplusplus.py
new file mode 100644
index 000000000..c48e0678e
--- /dev/null
+++ b/src/boost/tools/litre/cplusplus.py
@@ -0,0 +1,810 @@
+# Copyright David Abrahams 2004.
+# Copyright Daniel Wallin 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)
+
+import os
+import tempfile
+import litre
+import re
+import sys
+import traceback
+
+# Thanks to Jean Brouwers for this snippet
+def _caller(up=0):
+ '''Get file name, line number, function name and
+ source text of the caller's caller as 4-tuple:
+ (file, line, func, text).
+
+ The optional argument 'up' allows retrieval of
+ a caller further back up into the call stack.
+
+ Note, the source text may be None and function
+ name may be '?' in the returned result. In
+ Python 2.3+ the file name may be an absolute
+ path.
+ '''
+ try: # just get a few frames'
+ f = traceback.extract_stack(limit=up+2)
+ if f:
+ return f[0]
+ except:
+ pass
+ # running with psyco?
+ return ('', 0, '', None)
+
+class Example:
+ closed = False
+ in_emph = None
+
+ def __init__(self, node, section, line_offset, line_hash = '#'):
+ # A list of text fragments comprising the Example. Start with a #line
+ # directive
+ self.section = section
+ self.line_hash = line_hash
+ self.node = node
+ self.body = []
+ self.line_offset = line_offset
+ self._number_of_prefixes = 0
+
+ self.emphasized = [] # indices of text strings that have been
+ # emphasized. These are generally expected to be
+ # invalid C++ and will need special treatment
+
+ def begin_emphasis(self):
+ self.in_emph = len(self.body)
+
+ def end_emphasis(self):
+ self.emphasized.append( (self.in_emph, len(self.body)) )
+
+ def append(self, s):
+ self.append_raw(self._make_line(s))
+
+ def prepend(self, s):
+ self.prepend_raw(self._make_line(s))
+
+ def append_raw(self, s):
+ self.body.append(s)
+
+ def prepend_raw(self, s):
+ self.body.insert(0,s)
+ self.emphasized = [ (x[0]+1,x[1]+1) for x in self.emphasized ]
+ self._number_of_prefixes += 1
+
+ def replace(self, s1, s2):
+ self.body = [x.replace(s1,s2) for x in self.body]
+
+ def sub(self, pattern, repl, count = 1, flags = re.MULTILINE):
+ pat = re.compile(pattern, flags)
+ for i,txt in enumerate(self.body):
+ if count > 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
+ : <include>.
+ %s
+ %s
+ ;
+ """ % (
+ '\n'.join(self.jam_prefix)
+ , target_rule
+ , output
+ , input
+ , ' '.join(['<include>%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 "<html>\n<head>\n<title>\nCompile Times</title>\n</head>\n\n";
+print "<body bgcolor=\"#ffffff\" text=\"#000000\">\n";
+print "<img border=\"0\" src=\"boost.png\" width=\"277\" height=\"86\">";
+print "<p>\n";
+print "Compile time for each successful regression test in seconds.\n";
+print "<p>\n";
+
+print "<table border=\"1\">\n";
+print "<tr><td>Test</td>\n";
+
+while(<>) {
+ if(/^\*\*\* (.*) \*\*\*$/) {
+ $filename = $1;
+ $first = ($first == 0 ? 0 : $first-1);
+ if($first == 0) {
+ print "</tr>\n\n<tr align=right>\n<td align=left><a href=\"http://www.boost.org/$filename\">$filename</a></td>\n";
+ }
+ } elsif(/^\*\* (.*)/) {
+ $compiler = $1;
+ if($first) {
+ print "<td>$compiler</td>\n";
+ } else {
+ $ct = 1;
+ }
+ } elsif($ct && /^CPU time: ([.0-9]*) s user, ([.0-9]*) s system/) {
+ $time = $1 + $2;
+ } elsif($ct && /^Pass$/) {
+ printf "<td>%.02f</td>\n", $time;
+ $ct = 0;
+ } elsif($ct && /^Fail$/) {
+ print "<td>-</td>\n";
+ $ct = 0;
+ }
+}
+
+print "</tr>\n";
+print "</table>\n";
+print "</body>\n</html>\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
+ <toolset>gcc:<c++-template-depth>300
+ <toolset>darwin:<c++-template-depth>300
+ <toolset>gcc:<cflags>-g0
+ <toolset>darwin:<cflags>-g0
+ <toolset>msvc:<cflags>/wd4709
+ <warnings>all
+ <define>BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE
+ : default-build
+ <cxxstd>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
+ :
+ <install-type>EXE
+ <location>$(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: '^<windows.h>$'
+ Priority: 10
+ - Regex: '^<boost/.*>$'
+ 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 :
+ <xsl:param>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 @@
+<!--
+Copyright Daniel James 2013-2018
+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)
+-->
+
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article>
+ <title>Simple Example</title>
+ <para>Interesting stuff goes here.</para>
+</article>
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 :
+ <xsl:param>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 :
+ <dependency>css
+ <dependency>images
+ ;
+
+install css : [ glob $(BOOST_ROOT)/doc/src/*.css ]
+ : <location>html ;
+install images : [ glob $(BOOST_ROOT)/doc/src/images/*.png ]
+ : <location>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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE language SYSTEM "language.dtd">
+<language
+
+name="boost"
+version="0.1.0"
+kateversion="2.4"
+section="boost::hs"
+extensions="*.boost"
+mimetype="allFiles"
+author="Copyright 2006 -2007 Matias Capeletto, matias.capeletto@gmail.com"
+license="Distributed under the Boost Software License, Version 1.0.
+http://www.boost.org/LICENSE_1_0.txt"
+
+>
+
+<highlighting>
+
+
+<list name="boost.free.function">
+
+ <!-- boost.any -->
+
+ <item> any_cast </item>
+
+ <!-- boost.asign -->
+
+ <item> ptr_list_of </item>
+ <item> list_of </item>
+ <item> map_list_of </item>
+ <item> tuple_list_of </item>
+ <item> ref_list_of </item>
+ <item> cref_list_of </item>
+ <item> make_list_inserter </item>
+
+ <!-- boost.bind -->
+
+ <item> bind </item>
+ <item> mem_fn </item>
+
+ <!-- boost.conversion -->
+
+ <item> polymorphic_cast </item>
+ <item> polymorphic_downcast </item>
+ <item> lexical_cast </item>
+
+ <!-- boost.fusion -->
+
+ <item> at </item>
+ <item> value_at </item>
+ <item> has_key </item>
+ <item> at_key </item>
+ <item> value_at_key </item>
+ <item> at_c </item>
+ <item> value_at_c </item>
+
+ <item> advance_c </item>
+ <item> next </item>
+ <item> equal_to </item>
+ <item> advance </item>
+ <item> distance </item>
+ <item> deref </item>
+ <item> value_of </item>
+ <item> prior </item>
+ <item> begin </item>
+ <item> end </item>
+ <item> size </item>
+ <item> empty </item>
+ <item> front </item>
+ <item> back </item>
+
+ <item> is_sequence </item>
+ <item> is_view </item>
+ <item> value_of </item>
+ <item> tag_of </item>
+ <item> category_of </item>
+
+ <item> as_list </item>
+ <item> as_vector </item>
+ <item> as_set </item>
+ <item> as_map </item>
+
+ <item> make_list </item>
+ <item> make_cons </item>
+ <item> make_vector </item>
+ <item> make_set </item>
+ <item> make_map </item>
+
+ <item> tuple_open </item>
+ <item> tuple_close </item>
+ <item> tuple_delimiter </item>
+
+ <item> fold </item>
+ <item> accumulate </item>
+ <item> for_each </item>
+
+ <item> any </item>
+ <item> all </item>
+ <item> none </item>
+ <item> find </item>
+ <item> find_if </item>
+ <item> count </item>
+ <item> count_if </item>
+
+ <item> filter </item>
+ <item> filter_if </item>
+ <item> transform </item>
+ <item> replace </item>
+ <item> replace_if </item>
+ <item> remove </item>
+ <item> remove_if </item>
+ <item> reverse </item>
+ <item> clear </item>
+ <item> erase </item>
+ <item> erase_key </item>
+ <item> insert </item>
+ <item> insert_range </item>
+ <item> join </item>
+ <item> zip </item>
+ <item> pop_back </item>
+ <item> pop_front </item>
+ <item> push_back </item>
+ <item> push_front </item>
+
+ <item> tuple_size </item>
+ <item> tuple_element </item>
+ <item> get </item>
+ <item> tag_of </item>
+
+ <!-- boost.hash -->
+
+ <item> hash_combine </item>
+ <item> hash_range </item>
+ <item> hash_value </item>
+
+ <!-- boost.multi_index -->
+
+ <item> get </item>
+ <item> project </item>
+
+ <!-- boost.optional -->
+
+ <item> get_pointer </item>
+
+ <!-- boost.property_map -->
+
+ <item> put </item>
+
+ <!-- boost.ref -->
+
+ <item> unwrap_reference </item>
+
+ <!-- boost.test -->
+
+ <item> init_unit_test_suite </item>
+
+ <!-- boost.concepts -->
+
+ <item> distance </item>
+ <item> advance </item>
+ <item> swap </item>
+
+</list>
+
+
+
+
+<list name="boost.template.classes">
+
+ <!-- boost.any -->
+
+ <item> any </item>
+
+ <!-- boost.commpressed_pair -->
+
+ <item> compressed_pair </item>
+
+ <!-- boost.fusion -->
+
+ <item> cons </item>
+ <item> single_view </item>
+ <item> filter_view </item>
+ <item> iterator_range </item>
+ <item> joint_view </item>
+ <item> zip_view </item>
+ <item> transform_view </item>
+ <item> reverse_view </item>
+ <item> list_tie </item>
+ <item> vector_tie </item>
+
+ <!-- boost.hash -->
+
+ <item> hash </item>
+
+ <!-- boost.iterators -->
+
+ <item> counting_iterator </item>
+ <item> filter_iterator </item>
+ <item> function_output_iterator </item>
+ <item> dereferenced iterator </item>
+ <item> indirect_iterator </item>
+ <item> permutation_iterator </item>
+ <item> reverse_iterator </item>
+ <item> shared_container_iterator </item>
+ <item> transform_iterator </item>
+ <item> zip_iterator </item>
+
+ <!-- boost.iterator -->
+
+ <item> iterator_facade </item>
+ <item> iterator_adaptor </item>
+ <item> iterator_adaptor_ </item>
+
+ <!-- boost.multi_index -->
+
+ <item> nth_index </item>
+ <item> index </item>
+ <item> nth_index_iterator </item>
+ <item> nth_index_const_iterator </item>
+ <item> index_iterator </item>
+ <item> index_const_iterator </item>
+
+ <item> sequenced </item>
+ <item> ordered_unique </item>
+ <item> ordered_non_unique </item>
+ <item> hashed_unique </item>
+ <item> hashed_non_unique </item>
+ <item> identity </item>
+ <item> member </item>
+ <item> member_offset </item>
+
+ <item> const_mem_fun </item>
+ <item> mem_fun </item>
+ <item> const_mem_fun_explicit </item>
+ <item> mem_fun_explicit </item>
+
+ <item> composite_key </item>
+ <item> composite_key_result </item>
+ <item> composite_key_equal_to </item>
+ <item> composite_key_result_equal_to </item>
+ <item> composite_key_compare </item>
+ <item> composite_key_result_less </item>
+ <item> composite_key_result_greater </item>
+ <item> composite_key_hash </item>
+ <item> composite_key_result_hash </item>
+
+ <item> indexed_by </item>
+ <item> tag </item>
+
+ <!-- boost.optional -->
+
+ <item> optional </item>
+
+ <!-- boost.ref -->
+
+ <item> ref </item>
+ <item> cref </item>
+ <item> reference_wrapper </item>
+
+ <!-- boost.bimap -->
+
+ <item> set_of </item>
+ <item> multiset_of </item>
+ <item> unordered_set_of </item>
+ <item> unordered_multiset_of </item>
+ <item> list_of </item>
+ <item> vector_of </item>
+ <item> set_of_relation </item>
+ <item> multiset_of_relation </item>
+ <item> unordered_set_of_relation </item>
+ <item> unordered_multiset_of_relation </item>
+ <item> list_of_relation </item>
+ <item> vector_of_relation </item>
+
+ <!-- boost.function -->
+
+ <item> function </item>
+
+</list>
+
+
+
+<list name="boost.classes">
+
+ <!-- boost.fusion -->
+
+ <item> ignore </item>
+
+ <!-- boost.iterator -->
+
+ <item> iterator_core_access </item>
+
+ <!-- boost.test -->
+
+ <item> execution_monitor </item>
+ <item> execution_exception </item>
+ <item> execution_aborted </item>
+
+
+</list>
+
+
+<list name="boost.metaprogramming">
+
+ <!-- boost.call_traits -->
+
+ <item> call_traits </item>
+
+ <!-- boost.ConceptCheck -->
+
+ <item> function_requires </item>
+ <item> IntegerConcept </item>
+ <item> SignedIntegerConcept </item>
+ <item> UnsignedIntegerConcept </item>
+ <item> ConvertibleConcept </item>
+ <item> AssignableConcept </item>
+ <item> SGIAssignableConcept </item>
+ <item> DefaultConstructibleConcept </item>
+ <item> CopyConstructibleConcept </item>
+ <item> EqualityComparableConcept </item>
+ <item> LessThanComparableConcept </item>
+ <item> ComparableConcept </item>
+ <item> InputIteratorConcept </item>
+ <item> OutputIteratorConcept </item>
+ <item> ForwardIteratorConcept </item>
+ <item> Mutable_ForwardIteratorConcept </item>
+ <item> BidirectionalIteratorConcept </item>
+ <item> Mutable_BidirectionalIteratorConcept </item>
+ <item> RandomAccessIteratorConcept </item>
+ <item> Mutable_RandomAccessIteratorConcept </item>
+ <item> GeneratorConcept </item>
+ <item> UnaryFunctionConcept </item>
+ <item> BinaryFunctionConcept </item>
+ <item> UnaryPredicateConcept </item>
+ <item> BinaryPredicateConcept </item>
+ <item> Const_BinaryPredicateConcept </item>
+ <item> AdaptableGeneratorConcept </item>
+ <item> AdaptableUnaryFunctionConcept </item>
+ <item> AdaptableBinaryFunctionConcept </item>
+ <item> AdaptablePredicateConcept </item>
+ <item> AdaptableBinaryPredicateConcept </item>
+ <item> ContainerConcept </item>
+ <item> Mutable_ContainerConcept </item>
+ <item> ForwardContainerConcept </item>
+ <item> Mutable_ForwardContainerConcept </item>
+ <item> ReversibleContainerConcept </item>
+ <item> Mutable_ReversibleContainerConcept </item>
+ <item> RandomAccessContainerConcept </item>
+ <item> Mutable_RandomAccessContainerConcept </item>
+ <item> SequenceConcept </item>
+ <item> FrontInsertionSequenceConcept </item>
+ <item> BackInsertionSequenceConcept </item>
+ <item> AssociativeContainerConcept </item>
+ <item> UniqueAssociativeContainerConcept </item>
+ <item> MultipleAssociativeContainerConcept </item>
+ <item> SimpleAssociativeContainerConcept </item>
+ <item> PairAssociativeContainerConcept </item>
+ <item> SortedAssociativeContainerConcept </item>
+ <item> null_archetype </item>
+ <item> default_constructible_archetype </item>
+ <item> assignable_archetype </item>
+ <item> copy_constructible_archetype </item>
+ <item> equality_comparable_archetype </item>
+ <item> convertible_to_archetype </item>
+ <item> trivial_iterator_archetype </item>
+ <item> mutable_trivial_iterator_archetype </item>
+ <item> input_iterator_archetype </item>
+ <item> forward_iterator_archetype </item>
+ <item> bidirectional_iterator_archetype </item>
+ <item> random_access_iterator_archetype </item>
+ <item> unary_function_archetype </item>
+ <item> binary_function_archetype </item>
+ <item> predicate_archetype </item>
+ <item> binary_predicate_archetype </item>
+
+ <!-- boost.iterator -->
+
+ <item> ReadableIteratorConcept </item>
+ <item> WritableIteratorConcept </item>
+ <item> SwappableIteratorConcept </item>
+ <item> LvalueIteratorConcept </item>
+ <item> IncrementableIteratorConcept </item>
+ <item> SinglePassIteratorConcept </item>
+ <item> ForwardTraversalConcept </item>
+ <item> BidirectionalTraversalConcept </item>
+ <item> RandomAccessTraversalConcept </item>
+ <item> InteroperableIteratorConcept </item>
+
+ <!-- boost.enable_if -->
+
+ <item> enable_if </item>
+ <item> disable_if </item>
+ <item> lazy_enable_if </item>
+ <item> lazy_disable_if </item>
+ <item> enable_if_c </item>
+ <item> disable_if_c </item>
+ <item> lazy_enable_if_c </item>
+ <item> lazy_disable_if_c </item>
+
+ <!-- boost.iterator -->
+
+ <item> indirect_reference </item>
+ <item> pointee </item>
+
+ <!-- boost.mpl -->
+
+ <item> empty_sequence </item>
+ <item> filter_view </item>
+ <item> iterator_range </item>
+ <item> joint_view </item>
+ <item> single_view </item>
+ <item> transform_view </item>
+ <item> zip_view </item>
+
+ <item> at </item>
+ <item> at_c </item>
+ <item> back </item>
+ <item> begin </item>
+ <item> clear </item>
+ <item> empty </item>
+ <item> end </item>
+ <item> erase </item>
+ <item> erase_key </item>
+ <item> front </item>
+ <item> has_key </item>
+ <item> insert </item>
+ <item> insert_range </item>
+ <item> is_sequence </item>
+ <item> order </item>
+ <item> pop_back </item>
+ <item> pop_front </item>
+ <item> push_back </item>
+ <item> push_front </item>
+ <item> sequence_tag </item>
+ <item> size </item>
+
+ <item> advance </item>
+ <item> distance </item>
+ <item> next </item>
+ <item> prior </item>
+ <item> deref </item>
+ <item> iterator_category </item>
+
+ <item> back_inserter </item>
+ <item> front_inserter </item>
+ <item> inserter </item>
+
+ <item> fold </item>
+ <item> iter_fold </item>
+ <item> reverse_fold </item>
+ <item> reverse_iter_fold </item>
+ <item> accumulate </item>
+
+ <item> find </item>
+ <item> find_if </item>
+ <item> contains </item>
+ <item> count </item>
+ <item> count_if </item>
+ <item> lower_bound </item>
+ <item> upper_bound </item>
+ <item> min_element </item>
+ <item> max_element </item>
+ <item> equal </item>
+
+ <item> copy </item>
+ <item> copy_if </item>
+ <item> transform </item>
+ <item> replace </item>
+ <item> replace_if </item>
+ <item> remove </item>
+ <item> remove_if </item>
+ <item> unique </item>
+ <item> partition </item>
+ <item> stable_partition </item>
+ <item> sort </item>
+ <item> reverse </item>
+ <item> reverse_copy </item>
+ <item> reverse_copy_if </item>
+ <item> reverse_transform </item>
+ <item> reverse_replace </item>
+ <item> reverse_replace_if </item>
+ <item> reverse_remove </item>
+ <item> reverse_remove_if </item>
+ <item> reverse_unique </item>
+ <item> reverse_partition </item>
+ <item> reverse_stable_partition </item>
+
+ <item> if_ </item>
+ <item> if_c </item>
+ <item> eval_if </item>
+ <item> eval_if_c </item>
+
+ <item> apply </item>
+ <item> apply_wrap </item>
+ <item> unpack_args </item>
+
+ <item> _ </item>
+ <item> _1 </item>
+ <item> _2 </item>
+ <item> _3 </item>
+ <item> _4 </item>
+ <item> _5 </item>
+
+ <item> bind </item>
+ <item> quote </item>
+ <item> arg </item>
+ <item> protect </item>
+
+ <item> plus </item>
+ <item> minus </item>
+ <item> times </item>
+ <item> divides </item>
+ <item> modulus </item>
+ <item> negate </item>
+
+ <item> less </item>
+ <item> less_equal </item>
+ <item> greater </item>
+ <item> greater_equal </item>
+ <item> equal_to </item>
+ <item> not_equal_to </item>
+
+ <item> and_ </item>
+ <item> or_ </item>
+ <item> not_ </item>
+
+ <item> bitand_ </item>
+ <item> bitor_ </item>
+ <item> bitxor_ </item>
+ <item> shift_left </item>
+ <item> shift_right </item>
+
+ <item> identity </item>
+ <item> always </item>
+ <item> inherit </item>
+ <item> inherit_linearly </item>
+ <item> numeric_cast </item>
+ <item> min </item>
+ <item> max </item>
+ <item> sizeof_ </item>
+
+ <item> bool_ </item>
+ <item> int_ </item>
+ <item> long_ </item>
+ <item> size_t </item>
+ <item> integral_c </item>
+
+ <item> pair </item>
+ <item> empty_base </item>
+ <item> void_ </item>
+
+ <!-- boost.operators -->
+
+ <item> less_than_comparable </item>
+ <item> less_than_comparable1 </item>
+ <item> less_than_comparable2 </item>
+
+ <item> equality_comparable </item>
+ <item> equality_comparable1 </item>
+
+ <item> equality_comparable2 </item>
+
+ <item> addable </item>
+ <item> addable1 </item>
+
+ <item> addable2 </item>
+
+ <item> subtractable </item>
+ <item> subtractable1 </item>
+
+ <item> subtractable2 </item>
+
+ <item> subtractable2_left </item>
+
+ <item> multipliable </item>
+ <item> multipliable1 </item>
+ <item> multipliable2 </item>
+
+ <item> dividable </item>
+ <item> dividable1 </item>
+ <item> dividable2 </item>
+
+ <item> dividable2_left </item>
+
+ <item> modable </item>
+ <item> modable1 </item>
+ <item> modable2 </item>
+
+ <item> modable2_left </item>
+
+ <item> orable </item>
+ <item> orable1 </item>
+ <item> orable2 </item>
+
+ <item> andable </item>
+ <item> andable1 </item>
+ <item> andable2 </item>
+
+ <item> xorable </item>
+ <item> xorable1 </item>
+ <item> xorable2 </item>
+
+ <item> incrementable </item>
+ <item> decrementable </item>
+
+ <item> left_shiftable </item>
+ <item> left_shiftable1 </item>
+ <item> left_shiftable2 </item>
+
+ <item> right_shiftable </item>
+ <item> right_shiftable1 </item>
+ <item> right_shiftable2 </item>
+
+ <item> equivalent </item>
+ <item> equivalent1 </item>
+ <item> equivalent2 </item>
+
+ <item> partially_ordered </item>
+ <item> partially_ordered1 </item>
+ <item> partially_ordered2 </item>
+
+ <item> totally_ordered </item>
+ <item> totally_ordered1 </item>
+ <item> totally_ordered2 </item>
+
+ <item> additive </item>
+ <item> additive1 </item>
+ <item> additive2 </item>
+
+ <item> multiplicative </item>
+ <item> multiplicative1 </item>
+ <item> multiplicative2 </item>
+
+ <item> integer_multiplicative </item>
+ <item> integer_multiplicative1 </item>
+ <item> integer_multiplicative2 </item>
+
+ <item> arithmetic </item>
+ <item> arithmetic1 </item>
+ <item> arithmetic2 </item>
+
+ <item> integer_arithmetic </item>
+ <item> integer_arithmetic1 </item>
+ <item> integer_arithmetic2 </item>
+
+ <item> bitwise </item>
+ <item> bitwise1 </item>
+ <item> bitwise2 </item>
+
+ <item> unit_steppable </item>
+
+ <item> shiftable </item>
+ <item> shiftable1 </item>
+ <item> shiftable2 </item>
+
+ <item> ring_operators </item>
+ <item> ring_operators1 </item>
+ <item> ring_operators2 </item>
+
+ <item> ordered_ring_operators </item>
+ <item> ordered_ring_operators1 </item>
+ <item> ordered_ring_operators2 </item>
+
+ <item> field_operators </item>
+ <item> field_operators1 </item>
+ <item> field_operators2 </item>
+
+ <item> ordered_field_operators </item>
+ <item> ordered_field_operators1 </item>
+
+ <item> ordered_field_operators2 </item>
+
+ <item> euclidian_ring_operators </item>
+ <item> euclidian_ring_operators1 </item>
+ <item> euclidian_ring_operators2 </item>
+
+ <item> ordered_euclidian_ring_operators </item>
+ <item> ordered_euclidian_ring_operators1 </item>
+ <item> ordered_euclidian_ring_operators2 </item>
+
+ <item> operators </item>
+ <item> operators2 </item>
+
+ <item> dereferenceable </item>
+ <item> indexable </item>
+
+ <item> input_iteratable </item>
+ <item> output_iteratable </item>
+ <item> forward_iteratable </item>
+ <item> bidirectional_iteratable </item>
+ <item> random_access_iteratable </item>
+
+ <item> input_iterator_helper </item>
+ <item> output_iterator_helper </item>
+ <item> forward_iterator_helper </item>
+ <item> bidirectional_iterator_helper </item>
+ <item> random_access_iterator_helper </item>
+
+ <!-- boost.property_map -->
+
+ <item> property_traits </item>
+
+
+ <!-- boost.ref -->
+
+ <item> is_reference_wrapper </item>
+
+ <!-- boost.type_traits -->
+
+ <item> add_const </item>
+ <item> add_cv </item>
+ <item> add_pointer </item>
+ <item> add_reference </item>
+ <item> add_volatile </item>
+ <item> aligned_storage </item>
+ <item> alignment_of </item>
+ <item> extent </item>
+ <item> function_traits </item>
+ <item> has_nothrow_assign </item>
+ <item> has_nothrow_constructor </item>
+ <item> has_nothrow_copy </item>
+ <item> has_trivial_assign </item>
+ <item> has_trivial_constructor </item>
+ <item> has_trivial_copy </item>
+ <item> has_trivial_destructor </item>
+ <item> has_virtual_destructor </item>
+ <item> integral_constant </item>
+ <item> is_abstract </item>
+ <item> is_arithmetic </item>
+ <item> is_array </item>
+ <item> is_base_of </item>
+ <item> is_class </item>
+ <item> is_compound </item>
+ <item> is_const </item>
+ <item> is_convertible </item>
+ <item> is_empty </item>
+ <item> is_enum </item>
+ <item> is_floating_point </item>
+ <item> is_function </item>
+ <item> is_fundamental </item>
+ <item> is_integral </item>
+ <item> is_member_function_pointer </item>
+ <item> is_member_object_pointer </item>
+ <item> is_member_pointer </item>
+ <item> is_object </item>
+ <item> is_pod </item>
+ <item> is_pointer </item>
+ <item> is_polymorphic </item>
+ <item> is_same </item>
+ <item> is_scalar </item>
+ <item> is_stateless </item>
+ <item> is_reference </item>
+ <item> is_union </item>
+ <item> is_void </item>
+ <item> is_volatile </item>
+ <item> rank </item>
+ <item> remove_all_extents </item>
+ <item> remove_const </item>
+ <item> remove_cv </item>
+ <item> remove_extent </item>
+ <item> remove_pointer </item>
+ <item> remove_reference </item>
+ <item> remove_volatile </item>
+ <item> type_with_alignment </item>
+
+
+
+ <!-- boost.utility (TODO) -->
+
+ <item> base_from_member </item>
+ <item> checked_delete </item>
+ <item> checked_array_delete </item>
+ <item> next </item>
+ <item> prior </item>
+ <item> noncopyable </item>
+ <item> addressof </item>
+ <item> result_of </item>
+
+</list>
+
+
+
+
+<list name="boost.exception">
+
+ <!-- boost.any -->
+
+ <item> bad_any_cast </item>
+
+ <!-- boost.assign -->
+
+ <item> assignment_exception </item>
+
+</list>
+
+
+
+<list name="boost.container">
+
+ <!-- boost.array -->
+
+ <item> array </item>
+
+ <!-- boost.dynamic_bitset -->
+
+ <item> dynamic_bitset </item>
+
+ <!-- boost.fusion -->
+
+ <item> tuple </item>
+
+ <!-- boost.mpl -->
+
+ <item> range_c </item>
+ <item> vector_c </item>
+ <item> list_c </item>
+ <item> set_c </item>
+
+ <!-- boost.multi_index -->
+
+ <item> multi_index_container </item>
+
+ <!-- boost.bimap -->
+
+ <item> bimap </item>
+
+ <!-- boost.property_map -->
+
+ <item> identity_property_map </item>
+ <item> iterator_property_map </item>
+ <item> associative_property_map </item>
+ <item> const_associative_property_map </item>
+ <item> vector_property_map </item>
+
+</list>
+
+
+
+
+<list name="boost.macro">
+
+ <!-- boost.ConceptCheck -->
+
+ <item> BOOST_CLASS_REQUIRE </item>
+
+ <!-- boost.fusion -->
+
+ <item> FUSION_MAX_VECTOR_SIZE </item>
+ <item> FUSION_MAX_LIST_SIZE </item>
+ <item> FUSION_MAX_SET_SIZE </item>
+ <item> FUSION_MAX_MAP_SIZE </item>
+
+ <!-- boost.mpl -->
+
+ <item> BOOST_MPL_ASSERT </item>
+ <item> BOOST_MPL_ASSERT_MSG </item>
+ <item> BOOST_MPL_ASSERT_NOT </item>
+ <item> BOOST_MPL_ASSERT_RELATION </item>
+
+ <item> BOOST_MPL_HAS_XXX_TRAIT_DEF </item>
+ <item> BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF </item>
+
+ <item> BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS </item>
+ <item> BOOST_MPL_CFG_NO_HAS_XXX </item>
+ <item> BOOST_MPL_LIMIT_METAFUNCTION_ARITY </item>
+ <item> BOOST_MPL_LIMIT_VECTOR_SIZE </item>
+ <item> BOOST_MPL_LIMIT_LIST_SIZE </item>
+ <item> BOOST_MPL_LIMIT_SET_SIZE </item>
+ <item> BOOST_MPL_LIMIT_MAP_SIZE </item>
+ <item> BOOST_MPL_LIMIT_UNROLLING </item>
+
+ <item> BOOST_MPL_AUX_LAMBDA_SUPPORT </item>
+
+ <!-- boost.multi_index -->
+
+ <item> BOOST_MULTI_INDEX_MEMBER </item>
+ <item> BOOST_MULTI_INDEX_CONST_MEM_FUN </item>
+ <item> BOOST_MULTI_INDEX_MEM_FUN </item>
+
+ <!-- boost.static_assert -->
+
+ <item> BOOST_STATIC_ASSERT </item>
+
+ <!-- boost.test -->
+
+ <item> BOOST_TEST_CATCH_SYSTEM_ERRORS </item>
+ <item> BOOST_PRG_MON_CONFIRM </item>
+ <item> BOOST_TEST_DONT_PRINT_LOG_VALUE </item>
+
+ <item> BOOST_CHECK </item>
+ <item> BOOST_CHECK_PRED </item>
+ <item> BOOST_CHECK_MSG </item>
+ <item> BOOST_CHECK_EQUAL </item>
+ <item> BOOST_CHECK_CLOSE </item>
+ <item> BOOST_CHECK_SMALL </item>
+ <item> BOOST_CHECK_BITWISE_EQUAL </item>
+
+ <item> BOOST_WARN </item>
+ <item> BOOST_WARN_PRED </item>
+ <item> BOOST_WARN_MSG </item>
+ <item> BOOST_WARN_EQUAL </item>
+ <item> BOOST_WARN_CLOSE </item>
+ <item> BOOST_WARN_SMALL </item>
+ <item> BOOST_WARN_BITWISE_EQUAL </item>
+
+ <item> BOOST_REQUIRE </item>
+ <item> BOOST_REQUIRE_PRED </item>
+ <item> BOOST_REQUIRE_MSG </item>
+ <item> BOOST_REQUIRE_EQUAL </item>
+ <item> BOOST_REQUIRE_CLOSE </item>
+ <item> BOOST_REQUIRE_SMALL </item>
+ <item> BOOST_REQUIRE_BITWISE_EQUAL </item>
+
+ <item> BOOST_PASS </item>
+ <item> BOOST_PASS_PRED </item>
+ <item> BOOST_PASS_MSG </item>
+ <item> BOOST_PASS_EQUAL </item>
+ <item> BOOST_PASS_CLOSE </item>
+ <item> BOOST_PASS_SMALL </item>
+ <item> BOOST_PASS_BITWISE_EQUAL </item>
+
+ <item> BOOST_MSG_ONLY </item>
+ <item> BOOST_SET_CHECKPOINT </item>
+ <item> BOOST_CHECK_PRED_WITH_ARGS </item>
+ <item> BOOST_CHECK_EQUAL_COLL </item>
+
+ <item> BOOST_ERROR </item>
+ <item> BOOST_FAIL </item>
+
+</list>
+
+
+<list name="boost.fusion.result_of">
+
+ <item> advance_c </item>
+ <item> next </item>
+ <item> equal_to </item>
+ <item> advance </item>
+ <item> distance </item>
+ <item> deref </item>
+ <item> value_of </item>
+ <item> prior </item>
+ <item> begin </item>
+ <item> end </item>
+ <item> size </item>
+ <item> empty </item>
+ <item> front </item>
+ <item> back </item>
+
+</list>
+
+
+
+
+<list name="boost.concepts.member.functions">
+
+ <!-- boost.iterator -->
+
+ <item> dereference </item>
+ <item> equal </item>
+ <item> increment </item>
+ <item> decrement </item>
+ <item> advance </item>
+ <item> distance_to </item>
+ <item> begin </item>
+ <item> end </item>
+ <item> size </item>
+ <item> max_size </item>
+ <item> empty </item>
+ <item> swap </item>
+ <item> rbegin </item>
+ <item> rend </item>
+ <item> front </item>
+ <item> insert </item>
+ <item> erase </item>
+ <item> clear </item>
+ <item> resize </item>
+ <item> push_front </item>
+ <item> pop_front </item>
+ <item> push_back </item>
+ <item> pop_back </item>
+ <item> erase </item>
+ <item> clear </item>
+ <item> find </item>
+ <item> count </item>
+ <item> equal_range </item>
+ <item> key_comp </item>
+ <item> lower_bound </item>
+ <item> upper_bound </item>
+ <item> equal_range </item>
+ <item> get_allocator </item>
+ <item> hash_function </item>
+ <item> key_eq </item>
+ <item> bucket_count </item>
+ <item> max_bucket_count </item>
+ <item> bucket_size </item>
+ <item> bucket </item>
+ <item> load_factor </item>
+ <item> max_load_factor </item>
+ <item> at </item>
+
+</list>
+
+
+
+
+<list name="boost.concepts.free.functions">
+
+ <!-- boost.test -->
+
+ <item> cpp_main </item>
+ <item> test_main </item>
+
+</list>
+
+
+
+
+<list name="boost.tags">
+
+ <!-- boost.iterator -->
+
+ <item> readable_iterator_t </item>
+ <item> writable_iterator_t </item>
+ <item> readable_writable_iterator_t </item>
+ <item> readable_lvalue_iterator_t </item>
+ <item> writable_lvalue_iterator_t </item>
+
+ <!-- boost.property_map -->
+
+ <item> readable_property_map_tag </item>
+ <item> writable_property_map_tag </item>
+ <item> read_write_property_map_tag </item>
+ <item> lvalue_property_map_tag </item>
+
+</list>
+
+
+
+
+<list name="boost.member.functions">
+
+ <item> base </item>
+ <item> base_reference </item>
+
+</list>
+
+<list name="boost.constants">
+
+ <!-- boost.test -->
+ <item> exit_success </item>
+ <item> exit_failure </item>
+ <item> exit_exception_failure </item>
+
+</list>
+
+<list name="boost.concepts.member.typedef">
+
+ <item> value_type </item>
+ <item> iterator </item>
+ <item> const_iterator </item>
+ <item> reference </item>
+ <item> const_reference </item>
+ <item> pointer </item>
+ <item> difference_type </item>
+ <item> size_type </item>
+ <item> reverse_iterator </item>
+ <item> const_reverse_iterator </item>
+ <item> key_type </item>
+ <item> data_type </item>
+ <item> hasher </item>
+ <item> key_equal </item>
+ <item> local_iterator </item>
+ <item> const_local_iterator </item>
+ <item> key_compare </item>
+ <item> value_compare </item>
+ <item> iterator_category </item>
+ <item> value_type </item>
+ <item> difference_type </item>
+ <item> pointer </item>
+ <item> reference </item>
+
+</list>
+
+<list name="boost.namespaces" >
+
+ <item> std </item>
+ <item> boost </item>
+ <item> assign </item>
+ <item> bimaps </item>
+ <item> call_traits </item>
+ <item> concept_check </item>
+ <item> conversion </item>
+ <item> date_time </item>
+ <item> dynamic_bitset </item>
+ <item> enable_if </item>
+ <item> filesystem </item>
+ <item> format </item>
+ <item> hash </item>
+ <item> graph </item>
+ <item> integer </item>
+ <item> in_place_factory </item>
+ <item> io_state_saver </item>
+ <item> iostream </item>
+ <item> lambda </item>
+ <item> math </item>
+ <item> minmax </item>
+ <item> mpl </item>
+ <item> multi_array </item>
+ <item> multi_index </item>
+ <item> numeric </item>
+ <item> operators </item>
+ <item> parameter </item>
+ <item> pointer_container </item>
+ <item> pool </item>
+ <item> preprocesor </item>
+ <item> program_options </item>
+ <item> property_map </item>
+ <item> python </item>
+ <item> random </item>
+ <item> regex </item>
+ <item> serialization </item>
+ <item> signals </item>
+ <item> smart_ptr </item>
+ <item> static_assert </item>
+ <item> spirit </item>
+ <item> string_algo </item>
+ <item> test </item>
+ <item> thread </item>
+ <item> timer </item>
+ <item> tokenizer </item>
+ <item> tribool </item>
+ <item> tuples </item>
+ <item> type_traits </item>
+ <item> uBLAS </item>
+ <item> utility </item>
+ <item> value_initialized </item>
+ <item> wave </item>
+ <item> fusion </item>
+
+</list>
+
+
+<!-- TODO LIST BEGIN
+
+<list name="boost.date_time">
+
+ <item> day_functor </item>
+ <item> month_functor </item>
+ <item> week_functor </item>
+ <item> year_functor </item>
+ <item> c_local_adjustor </item>
+ <item> c_time </item>
+ <item> constrained_value </item>
+ <item> date </item>
+ <item> day_clock </item>
+ <item> weekdays::Sunday </item>
+ <item> weekdays::Monday </item>
+ <item> weekdays::Tuesday </item>
+ <item> weekdays::Wednesday </item>
+ <item> weekdays::Thursday </item>
+ <item> weekdays::Friday </item>
+ <item> weekdays::Saturday </item>
+ <item> weekdays </item>
+ <item> months_of_year::Jan </item>
+ <item> months_of_year::Feb </item>
+ <item> months_of_year::Mar </item>
+ <item> months_of_year::Apr </item>
+ <item> months_of_year::May </item>
+ <item> months_of_year::Jun </item>
+ <item> months_of_year::Jul </item>
+ <item> months_of_year::Aug </item>
+ <item> months_of_year::Sep </item>
+ <item> months_of_year::Oct </item>
+ <item> months_of_year::Nov </item>
+ <item> months_of_year::Dec </item>
+ <item> months_of_year </item>
+ <item> NotAMonth </item>
+ <item> NumMonths </item>
+ <item> date_duration </item>
+ <item> duration_traits_long </item>
+ <item> duration_traits_adapted </item>
+ <item> weeks_duration </item>
+ <item> months_duration </item>
+ <item> years_duration </item>
+ <item> date_facet </item>
+ <item> date_input_facet </item>
+ <item> simple_format </item>
+ <item> month_formatter </item>
+ <item> ymd_formatter </item>
+ <item> date_formatter </item>
+ <item> ostream_month_formatter </item>
+ <item> ostream_weekday_formatter </item>
+ <item> ostream_ymd_formatter </item>
+ <item> ostream_date_formatter </item>
+ <item> date_generator_formatter </item>
+ <item> date_generator_parser </item>
+ <item> year_based_generator </item>
+ <item> partial_date </item>
+ <item> nth_kday_of_month </item>
+ <item> first_kday_of_month </item>
+ <item> last_kday_of_month </item>
+ <item> first_kday_after </item>
+ <item> first_kday_before </item>
+ <item> days_until_weekday </item>
+ <item> days_before_weekday </item>
+ <item> next_weekday </item>
+ <item> previous_weekday </item>
+ <item> date_itr_base </item>
+ <item> date_itr </item>
+ <item> date_resolutions </item>
+ <item> date_resolutions::day </item>
+ <item> date_resolutions::week </item>
+ <item> date_resolutions::months </item>
+ <item> date_resolutions::year </item>
+ <item> date_resolutions::decade </item>
+ <item> date_resolutions::century </item>
+ <item> date_names_put </item>
+ <item> all_date_names_put </item>
+ <item> dst_calculator </item>
+ <item> dst_calc_engine </item>
+ <item> us_dst_rules </item>
+ <item> null_dst_rules </item>
+ <item> dst_day_calc_rule </item>
+ <item> day_calc_dst_rule </item>
+ <item> time_from_ftime </item>
+ <item> format_date_parser </item>
+ <item> gregorian_calendar_base </item>
+ <item> iso_format_base </item>
+ <item> iso_format </item>
+ <item> iso_extended_format </item>
+ <item> utc_adjustment </item>
+ <item> dynamic_local_time_adjustor </item>
+ <item> class static_local_time_adjustor </item>
+ <item> local_adjustor </item>
+ <item> us_dst_trait </item>
+ <item> eu_dst_trait </item>
+ <item> uk_dst_trait </item>
+ <item> acst_dst_trait </item>
+ <item> microsec_clock </item>
+ <item> month_format_spec </item>
+ <item> month_format_spec::month_as_integer </item>
+ <item> month_format_spec::month_as_short_string </item>
+ <item> month_format_spec::month_as_long_string </item>
+ <item> ymd_order_spec </item>
+ <item> period </item>
+ <item> period_formatter </item>
+ <item> period_parser </item>
+ <item> special_values </item>
+ <item> special_values::not_a_date_time </item>
+ <item> special_values::neg_infin </item>
+ <item> special_values::pos_infin </item>
+ <item> special_values::min_date_time </item>
+ <item> special_values::max_date_time </item>
+ <item> special_values::not_special </item>
+ <item> special_values_formatter </item>
+ <item> special_values_parser </item>
+ <item> convert_string_type </item>
+ <item> gather_month_strings </item>
+ <item> gather_weekday_strings </item>
+ <item> base_time </item>
+ <item> second_clock </item>
+ <item> time_resolutions </item>
+ <item> time_resolutions::sec </item>
+ <item> time_resolutions::tenth </item>
+ <item> time_resolutions::hundreth </item>
+ <item> time_resolutions::milli </item>
+ <item> time_resolutions::ten_thousandth </item>
+ <item> time_resolutions::micro </item>
+ <item> time_resolutions::nano </item>
+ <item> dst_flags </item>
+ <item> dst_flags::not_dst </item>
+ <item> dst_flags::is_dst </item>
+ <item> dst_flags::calculate </item>
+ <item> time_duration </item>
+ <item> subsecond_duration </item>
+ <item> time_formats </item>
+ <item> time_facet </item>
+ <item> time_input_facet </item>
+ <item> ostream_time_duration_formatter </item>
+ <item> ostream_time_formatter </item>
+ <item> ostream_time_period_formatter </item>
+ <item> time_itr </item>
+ <item> parse_delimited_time_duration </item>
+ <item> parse_delimited_time </item>
+ <item> parse_undelimited_time_duration </item>
+ <item> parse_iso_time </item>
+ <item> time_resolution_traits </item>
+ <item> counted_time_rep </item>
+ <item> counted_time_system </item>
+ <item> split_timedate_system </item>
+ <item> time_zone_base </item>
+ <item> dst_adjustment_offsets </item>
+ <item> time_zone_names_base </item>
+ <item> time_zone_names </item>
+ <item> year_month_day_base </item>
+
+ <item> gregorian_calendar </item>
+ <item> fancy_date_rep </item>
+ <item> bad_day_of_month </item>
+ <item> greg_day </item>
+ <item> greg_day_policies </item>
+ <item> greg_day_rep </item>
+ <item> bad_day_of_year </item>
+ <item> greg_day_of_year_policies </item>
+ <item> greg_day_of_year_rep </item>
+ <item> date_duration_rep </item>
+ <item> date_duration </item>
+ <item> greg_durations_config </item>
+ <item> months </item>
+ <item> years </item>
+ <item> weeks </item>
+ <item> bad_month </item>
+ <item> greg_month </item>
+ <item> greg_month_policies </item>
+ <item> greg_month_rep </item>
+ <item> bad_weekday </item>
+ <item> greg_weekday </item>
+ <item> greg_weekday_policies </item>
+ <item> greg_weekday_rep </item>
+ <item> bad_year </item>
+ <item> greg_year </item>
+ <item> greg_year_policies </item>
+ <item> greg_year_rep </item>
+ <item> greg_year_month_day </item>
+ <item> date_period </item>
+ <item> day_clock </item>
+ <item> date_iterator </item>
+ <item> day_iterator </item>
+ <item> week_iterator </item>
+ <item> month_iterator </item>
+ <item> year_iterator </item>
+ <item> date_from_iso_string </item>
+ <item> from_streamdate_period_from_string </item>
+ <item> date_period_from_wstring </item>
+
+ <item> ptime </item>
+ <item> time_duration </item>
+ <item> simple_time_rep </item>
+ <item> posix_time_system_config </item>
+ <item> millisec_posix_time_system_config </item>
+ <item> hours </item>
+ <item> minutes </item>
+ <item> seconds </item>
+ <item> millisec </item>
+ <item> milliseconds </item>
+ <item> microsec </item>
+ <item> microseconds </item>
+ <item> nanosec </item>
+ <item> nanoseconds </item>
+ <item> posix_time_system </item>
+ <item> time_iterator </item>
+ <item> second_clock </item>
+ <item> microsec_clock </item>
+ <item> no_dst </item>
+ <item> us_dst </item>
+ <item> duration_from_string </item>
+ <item> time_from_string </item>
+ <item> time_period </item>
+
+ <item> to_tm </item>
+ <item> custom_time_zone </item>
+ <item> dst_calc_rule_ptr </item>
+ <item> dst_calc_rule </item>
+ <item> partial_date_dst_rule </item>
+ <item> first_last_dst_rule </item>
+ <item> last_last_dst_rule </item>
+ <item> nth_last_dst_rule </item>
+ <item> nth_kday_dst_rule </item>
+ <item> nth_day_of_the_week_in_month_dst_rule </item>
+ <item> ambiguous_result </item>
+ <item> time_label_invalid </item>
+ <item> dst_not_valid </item>
+ <item> local_date_time_base </item>
+ <item> local_date_time </item>
+ <item> BOOST_SERIALIZATION_SPLIT_FREE </item>
+ <item> local_time_period </item>
+ <item> local_time_iterator </item>
+ <item> local_sec_clock </item>
+ <item> local_microsec_clock </item>
+ <item> time_zone_ptr </item>
+
+</list>
+
+<list name="boost.filesystem">
+
+ <item> path </item>
+ <item> portable_posix_name </item>
+ <item> windows_name </item>
+ <item> portable_name </item>
+ <item> portable_directory_name </item>
+ <item> portable_file_name </item>
+ <item> no_check </item>
+ <item> native </item>
+
+ <item> directory_iterator </item>
+ <item> exists </item>
+ <item> symbolic_link_exists </item>
+ <item> is_directory </item>
+ <item> is_empty </item>
+ <item> equivalent </item>
+ <item> file_size </item>
+ <item> last_write_time </item>
+ <item> create_directory </item>
+ <item> remove </item>
+ <item> remove_all </item>
+ <item> rename </item>
+ <item> copy_file </item>
+ <item> initial_path </item>
+ <item> current_path </item>
+ <item> complete </item>
+ <item> system_complete </item>
+
+ <item> error_code </item>
+ <item> error_code::no_error </item>
+ <item> error_code::system_error </item>
+ <item> error_code::other_error </item>
+ <item> error_code::security_error </item>
+ <item> error_code::read_only_error </item>
+ <item> error_code::io_error </item>
+ <item> error_code::path_error </item>
+ <item> error_code::not_found_error </item>
+ <item> error_code::not_directory_error </item>
+ <item> error_code::busy_error </item>
+ <item> error_code::already_exists_error </item>
+ <item> error_code::not_empty_error </item>
+ <item> error_code::error_code::is_directory_error </item>
+ <item> error_code::out_of_space_error </item>
+ <item> error_code::out_of_memory_error </item>
+ <item> error_code::out_of_resource_error </item>
+ <item> filesystem_error </item>
+
+ <item> create_directories </item>
+ <item> extension </item>
+ <item> basename </item>
+ <item> change_extension </item>
+
+</list>
+
+<list name="boost.format">
+
+ <item> basic_format </item>
+ <item> format </item>
+ <item> wformat </item>
+
+</list>
+
+<list name="boost.function">
+
+ <item> bad_function_call </item>
+ <item> function_base </item>
+ <item> functionN </item>
+ <item> function </item>
+ <item> function_equal </item>
+
+</list>
+
+<list name="boost.graph">
+
+</list>
+
+<list name="boost.integer">
+
+ <item> integer_traits </item>
+
+ <item> int_fast_t </item>
+ <item> int_t </item>
+ <item> uint_t </item>
+ <item> int_max_value_t </item>
+ <item> int_min_value_t </item>
+ <item> uint_value_t </item>
+
+ <item> high_bit_mask_t </item>
+ <item> low_bits_mask_t </item>
+
+ <item> static_log2 </item>
+
+ <item> static_signed_min </item>
+ <item> static_signed_max </item>
+ <item> static_unsigned_min </item>
+ <item> static_unsigned_max </item>
+
+</list>
+
+<list name="boost.interval">
+
+ <item> interval_policies </item>
+ <item> interval </item>
+ <item> lower </item>
+ <item> upper </item>
+ <item> width </item>
+ <item> median </item>
+ <item> norm </item>
+ <item> singleton </item>
+ <item> in_zero </item>
+ <item> subset </item>
+ <item> proper_subset </item>
+ <item> overlap </item>
+ <item> intersection </item>
+ <item> hull </item>
+ <item> bisect </item>
+ <item> division_part1 </item>
+ <item> division_part2 </item>
+ <item> multiplicative_inverse </item>
+
+</list>
+
+<list name="boost.in_place_factory">
+
+ <item> in_place_factory_base </item>
+ <item> in_place_factory </item>
+ <item> in_place </item>
+ <item> typed_in_place_factory_base </item>
+ <item> typed_in_place_factory </item>
+
+</list>
+
+<list name="boost.io_state_saver">
+
+ <item> ios_flags_saver </item>
+ <item> ios_precision_saver </item>
+ <item> ios_width_saver </item>
+ <item> ios_base_all_saver </item>
+ <item> basic_ios_iostate_saver </item>
+ <item> basic_ios_exception_saver </item>
+ <item> basic_ios_tie_saver </item>
+ <item> basic_ios_rdbuf_saver </item>
+ <item> basic_ios_fill_saver </item>
+ <item> basic_ios_locale_saver </item>
+ <item> basic_ios_all_saver </item>
+ <item> ios_iostate_saver </item>
+ <item> wios_iostate_saver </item>
+ <item> ios_exception_saver </item>
+ <item> wios_exception_saver </item>
+ <item> ios_tie_saver </item>
+ <item> wios_tie_saver </item>
+ <item> ios_rdbuf_saver </item>
+ <item> wios_rdbuf_saver </item>
+ <item> ios_fill_saver </item>
+ <item> wios_fill_saver </item>
+ <item> ios_locale_saver </item>
+ <item> wios_locale_saver </item>
+ <item> ios_all_saver </item>
+ <item> wios_all_saver </item>
+ <item> ios_iword_saver </item>
+ <item> ios_pword_saver </item>
+ <item> ios_all_word_saver </item>
+
+</list>
+
+<list name="boost.iostream">
+
+ <item> aggregate_filter </item>
+ <item> array </item>
+ <item> array_sink </item>
+ <item> array_source </item>
+ <item> back_insert_device </item>
+ <item> basic_array </item>
+ <item> basic_array_sink </item>
+ <item> basic_array_source </item>
+ <item> basic_bzip2_compressor </item>
+ <item> basic_bzip2_decompressor </item>
+ <item> basic_counter </item>
+ <item> basic_file </item>
+ <item> basic_file_sink </item>
+ <item> basic_file_source </item>
+ <item> basic_gzip_compressor </item>
+ <item> basic_gzip_decompressor </item>
+ <item> basic_line_filter </item>
+ <item> basic_null_device </item>
+ <item> basic_null_sink </item>
+ <item> basic_null_source </item>
+ <item> basic_regex_filter </item>
+ <item> basic_stdio_filter </item>
+ <item> basic_zlib_compressor </item>
+ <item> basic_zlib_decompressor </item>
+ <item> bzip2_compressor </item>
+ <item> bzip2_decompressor </item>
+ <item> bzip2_error </item>
+ <item> bzip2_params </item>
+ <item> category_of </item>
+ <item> chain </item>
+ <item> char_traits </item>
+ <item> char_type_of </item>
+ <item> code_converter </item>
+ <item> combination </item>
+ <item> composite </item>
+ <item> counter </item>
+ <item> device </item>
+ <item> dual_use_filter </item>
+ <item> dual_use_wfilter </item>
+ <item> file </item>
+ <item> file_descriptor </item>
+ <item> file_descriptor_sink </item>
+ <item> file_descriptor_source </item>
+ <item> file_sink </item>
+ <item> file_source </item>
+ <item> filtering_stream </item>
+ <item> filtering_streambuf </item>
+ <item> filter </item>
+ <item> gzip_compressor </item>
+ <item> gzip_decompressor </item>
+ <item> gzip_error </item>
+ <item> gzip_params </item>
+ <item> input_filter </item>
+ <item> input_wfilter </item>
+ <item> inverse </item>
+ <item> line_filter </item>
+ <item> mapped_file </item>
+ <item> mapped_file_sink </item>
+ <item> mapped_file_source </item>
+ <item> mode_of </item>
+ <item> multichar_dual_use_filter </item>
+ <item> multichar_dual_use_wfilter </item>
+ <item> multichar_filter </item>
+ <item> multichar_input_filter </item>
+ <item> multichar_input_wfilter </item>
+ <item> multichar_output_filter </item>
+ <item> multichar_output_wfilter </item>
+ <item> multichar_wfilter </item>
+ <item> newline_filter </item>
+ <item> null_sink </item>
+ <item> null_source </item>
+ <item> output_filter </item>
+ <item> output_wfilter </item>
+ <item> regex_filter </item>
+ <item> restriction </item>
+ <item> seekable_filter </item>
+ <item> seekable_wfilter </item>
+ <item> sink </item>
+ <item> source </item>
+ <item> stdio_filter </item>
+ <item> stream </item>
+ <item> stream_buffer </item>
+ <item> symmetric_filter </item>
+ <item> tee_device </item>
+ <item> tee_filter </item>
+ <item> warray </item>
+ <item> warray_sink </item>
+ <item> warray_source </item>
+ <item> wchain </item>
+ <item> wcounter </item>
+ <item> wdevice </item>
+ <item> wfile </item>
+ <item> wfile_sink </item>
+ <item> wfile_source </item>
+ <item> wfilter </item>
+ <item> wline_filter </item>
+ <item> wnull_sink </item>
+ <item> wnull_source </item>
+ <item> wregex_filter </item>
+ <item> wsink </item>
+ <item> wsource </item>
+ <item> wstdio_filter </item>
+ <item> zlib_compressor </item>
+ <item> zlib_decompressor </item>
+ <item> zlib_error </item>
+ <item> zlib_params </item>
+
+ <item> back_inserter </item>
+ <item> close </item>
+ <item> combine </item>
+ <item> compose </item>
+ <item> copy </item>
+ <item> flush </item>
+ <item> get </item>
+ <item> imbue </item>
+ <item> invert </item>
+ <item> offset_to_position </item>
+ <item> optimal_buffer_size </item>
+ <item> position_to_offset </item>
+ <item> put </item>
+ <item> putback </item>
+ <item> read </item>
+ <item> restrict </item>
+ <item> seek </item>
+ <item> tee </item>
+ <item> test_filter_pair </item>
+ <item> test_input_filter </item>
+ <item> test_output_filter </item>
+ <item> write </item>
+
+ <item> BOOST_IOS </item>
+ <item> BOOST_IOSTREAMS_BASIC_ISTREAM </item>
+ <item> BOOST_IOSTREAMS_BASIC_IOS </item>
+ <item> BOOST_IOSTREAMS_BASIC_IOSTREAM </item>
+ <item> BOOST_IOSTREAMS_BASIC_OSTREAM </item>
+ <item> BOOST_IOSTREAMS_BASIC_STREAMBUF </item>
+ <item> BOOST_IOSTREAMS_CHAR_TRAITS </item>
+ <item> BOOST_IOSTREAMS_COMPONENT </item>
+ <item> BOOST_IOSTREAMS_COMPONENT_TYPE </item>
+ <item> BOOST_IOSTREAMS_DEFAULT_DEVICE_BUFFER_SIZE </item>
+ <item> BOOST_IOSTREAMS_DEFAULT_FILTER_BUFFER_SIZE </item>
+ <item> BOOST_IOSTREAMS_DEFAULT_PBACK_BUFFER_SIZE </item>
+ <item> BOOST_IOSTREAMS_FAILURE </item>
+ <item> BOOST_IOSTREAMS_PIPABLE </item>
+ <item> BOOST_IOSTREAMS_PUBSEEKOFF </item>
+ <item> BOOST_IOSTREAMS_PUBSEEKPOS </item>
+ <item> BOOST_IOSTREAMS_PUBSYNC </item>
+
+</list>
+
+<list name="boost.lambda">
+
+ <item> _1 </item>
+ <item> _2 </item>
+ <item> _3 </item>
+
+ <item> placeholder1_type </item>
+ <item> placeholder2_type </item>
+ <item> placeholder3_type </item>
+
+ <item> bind </item>
+
+ <item> ret </item>
+ <item> var </item>
+ <item> constant </item>
+ <item> var_type </item>
+ <item> constant_type </item>
+
+ <item> if_then </item>
+ <item> if_then_else </item>
+ <item> if_then_else_return </item>
+ <item> while_loop </item>
+ <item> do_while_loop </item>
+ <item> for_loop </item>
+ <item> switch_statement </item>
+ <item> case_statement </item>
+ <item> default_statement </item>
+
+ <item> if_ </item>
+ <item> else_ </item>
+ <item> while_ </item>
+ <item> do_ </item>
+ <item> for_ </item>
+
+ <item> try_catch </item>
+ <item> catch_exception </item>
+ <item> catch_all </item>
+
+ <item> constructor </item>
+ <item> destructor </item>
+ <item> destructor </item>
+ <item> new_ptr </item>
+ <item> new_array </item>
+ <item> delete_ptr </item>
+ <item> delete_array </item>
+
+ <item> unlambda </item>
+ <item> protect </item>
+
+ <item> make_const </item>
+ <item> const_parameters </item>
+ <item> break_const </item>
+
+ <item> ll_static_cast </item>
+ <item> ll_dynamic_cast </item>
+ <item> ll_const_cast </item>
+ <item> ll_reinterpret_cast </item>
+
+ <item> ll_sizeof </item>
+ <item> ll_typeid </item>
+
+ <item> call_begin </item>
+ <item> call_end </item>
+
+</list>
+
+<list name="boost.math">
+
+ <item> quaternion </item>
+ <item> octonion </item>
+
+ <item> gcd </item>
+ <item> lcm </item>
+ <item> static_gcd </item>
+ <item> static_lcm </item>
+ <item> gcd_evaluator </item>
+ <item> lcm_evaluator </item>
+
+ <item> acosh </item>
+ <item> asinh </item>
+ <item> atanh </item>
+ <item> sinc </item>
+ <item> sinhc </item>
+
+</list>
+
+<list name="boost.minmax">
+
+ <item> minmax </item>
+ <item> minmax_element </item>
+ <item> first_min_element </item>
+ <item> last_min_element </item>
+ <item> first_max_element </item>
+ <item> last_max_element </item>
+ <item> first_min_first_max_element </item>
+ <item> first_min_last_max_element </item>
+ <item> last_min_first_max_element </item>
+ <item> last_min_last_max_element </item>
+
+</list>
+
+<list name="boost.multi_array">
+
+ <item> multi_array_types </item>
+ <item> multi_array_types::index </item>
+ <item> multi_array_types::size_type </item>
+ <item> multi_array_types::difference_type </item>
+ <item> multi_array_types::index_range </item>
+ <item> multi_array_types::extent_range </item>
+ <item> multi_array_types::index_gen </item>
+ <item> multi_array_types::extent_gen </item>
+
+ <item> multi_array </item>
+ <item> multi_array_ref </item>
+ <item> const_multi_array_ref </item>
+
+ <item> extents </item>
+ <item> indices </item>
+
+ <item> subarray_gen </item>
+ <item> const_subarray_gen </item>
+ <item> array_view_gen </item>
+ <item> const_array_view_gen </item>
+
+ <item> c_storage_order </item>
+ <item> fortran_storage_order </item>
+ <item> general_storage_order </item>
+
+</list>
+
+<list name="boost.numeric">
+
+ <item> converter </item>
+ <item> bounds </item>
+
+ <item> int_float_mixture_enum </item>
+
+ <item> int_float_mixture_enum::integral_to_integral </item>
+ <item> int_float_mixture_enum::integral_to_float </item>
+ <item> int_float_mixture_enum::float_to_integral </item>
+ <item> int_float_mixture_enum::float_to_float </item>
+
+ <item> sign_mixture_enum </item>
+ <item> sign_mixture_enum::unsigned_to_unsigned </item>
+ <item> sign_mixture_enum::signed_to_signed </item>
+ <item> sign_mixture_enum::signed_to_unsigned </item>
+ <item> sign_mixture_enum::unsigned_to_signed </item>
+
+ <item> udt_builtin_mixture_enum </item>
+ <item> udt_builtin_mixture_enum::builtin_to_builtin </item>
+ <item> udt_builtin_mixture_enum::builtin_to_udt </item>
+ <item> udt_builtin_mixture_enum::udt_to_builtin </item>
+ <item> udt_builtin_mixture_enum::udt_to_udt </item>
+
+ <item> int_float_mixture </item>
+ <item> sign_mixture </item>
+ <item> udt_builtin_mixture </item>
+ <item> is_subranged </item>
+
+ <item> conversion_traits </item>
+
+ <item> range_check_result </item>
+ <item> range_check_result::cInRange </item>
+ <item> range_check_result::cNegOverflow </item>
+ <item> range_check_result::cPosOverflow </item>
+
+ <item> def_overflow_handler </item>
+ <item> silent_overflow_handler </item>
+
+ <item> bad_numeric_cast </item>
+ <item> negative_overflow </item>
+ <item> positive_overflow </item>
+
+ <item> Trunc </item>
+ <item> RoundEven </item>
+ <item> Ceil </item>
+ <item> Floor </item>
+
+ <item> raw_numeric_converter </item>
+
+ <item> UseInternalRangeChecker </item>
+
+ <item> numeric_cast </item>
+
+</list>
+
+<list name="boost.parameter">
+
+ <item> BOOST_PARAMETER_KEYWORD </item>
+ <item> BOOST_PARAMETER_FUN </item>
+ <item> BOOST_PARAMETER_MATCH </item>
+
+</list>
+
+<list name="boost.pointer_container">
+
+ <item> new_clone </item>
+ <item> delete_clone </item>
+ <item> allocate_clone </item>
+ <item> deallocate_clone </item>
+ <item> heap_clone_allocator </item>
+ <item> view_clone_allocator </item>
+
+ <item> ptr_sequence_adapter </item>
+ <item> ptr_set_adapter </item>
+ <item> ptr_multiset_adapter </item>
+ <item> ptr_map_adapter </item>
+ <item> ptr_multimap_adapter </item>
+
+ <item> ptr_vector </item>
+ <item> ptr_deque </item>
+ <item> ptr_list </item>
+ <item> ptr_array </item>
+
+ <item> ptr_set </item>
+ <item> ptr_multiset </item>
+ <item> ptr_map </item>
+ <item> ptr_multimap </item>
+
+ <item> nullable </item>
+ <item> bad_ptr_container_operation </item>
+ <item> bad_index </item>
+ <item> bad_pointer </item>
+
+</list>
+
+<list name="boost.pool">
+
+ <item> pool </item>
+ <item> object_pool </item>
+ <item> singleton_pool </item>
+ <item> pool_allocator </item>
+
+</list>
+
+<list name="boost.preprocesor">
+
+ <item> BOOST_PP_ADD </item>
+ <item> BOOST_PP_ADD_D </item>
+ <item> BOOST_PP_AND </item>
+ <item> BOOST_PP_APPLY </item>
+ <item> BOOST_PP_ARRAY_DATA </item>
+ <item> BOOST_PP_ARRAY_ELEM </item>
+ <item> BOOST_PP_ARRAY_INSERT </item>
+ <item> BOOST_PP_ARRAY_INSERT_D </item>
+ <item> BOOST_PP_ARRAY_POP_BACK </item>
+ <item> BOOST_PP_ARRAY_POP_BACK_Z </item>
+ <item> BOOST_PP_ARRAY_POP_FRONT </item>
+ <item> BOOST_PP_ARRAY_POP_FRONT_Z </item>
+ <item> BOOST_PP_ARRAY_PUSH_BACK </item>
+ <item> BOOST_PP_ARRAY_PUSH_FRONT </item>
+ <item> BOOST_PP_ARRAY_REMOVE </item>
+ <item> BOOST_PP_ARRAY_REMOVE_D </item>
+ <item> BOOST_PP_ARRAY_REPLACE </item>
+ <item> BOOST_PP_ARRAY_REPLACE_D </item>
+ <item> BOOST_PP_ARRAY_REVERSE </item>
+ <item> BOOST_PP_ARRAY_SIZE </item>
+ <item> BOOST_PP_ASSERT </item>
+ <item> BOOST_PP_ASSERT_MSG </item>
+ <item> BOOST_PP_ASSIGN_SLOT </item>
+ <item> BOOST_PP_BITAND </item>
+ <item> BOOST_PP_BITNOR </item>
+ <item> BOOST_PP_BITOR </item>
+ <item> BOOST_PP_BITXOR </item>
+ <item> BOOST_PP_BOOL </item>
+ <item> BOOST_PP_CAT </item>
+ <item> BOOST_PP_COMMA </item>
+ <item> BOOST_PP_COMMA_IF </item>
+ <item> BOOST_PP_COMPL </item>
+ <item> BOOST_PP_CONFIG_EXTENDED_LINE_INFO </item>
+ <item> BOOST_PP_DEC </item>
+ <item> BOOST_PP_DEDUCE_D </item>
+ <item> BOOST_PP_DEDUCE_R </item>
+ <item> BOOST_PP_DEDUCE_Z </item>
+ <item> BOOST_PP_DIV </item>
+ <item> BOOST_PP_DIV_D </item>
+ <item> BOOST_PP_EMPTY </item>
+ <item> BOOST_PP_ENUM </item>
+ <item> BOOST_PP_ENUM_BINARY_PARAMS </item>
+ <item> BOOST_PP_ENUM_BINARY_PARAMS_Z </item>
+ <item> BOOST_PP_ENUM_PARAMS </item>
+ <item> BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT </item>
+ <item> BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS </item>
+ <item> BOOST_PP_ENUM_PARAMS_Z </item>
+ <item> BOOST_PP_ENUM_SHIFTED </item>
+ <item> BOOST_PP_ENUM_SHIFTED_PARAMS </item>
+ <item> BOOST_PP_ENUM_SHIFTED_PARAMS_Z </item>
+ <item> BOOST_PP_ENUM_TRAILING </item>
+ <item> BOOST_PP_ENUM_TRAILING_BINARY_PARAMS </item>
+ <item> BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z </item>
+ <item> BOOST_PP_ENUM_TRAILING_PARAMS </item>
+ <item> BOOST_PP_ENUM_TRAILING_PARAMS_Z </item>
+ <item> BOOST_PP_EQUAL </item>
+ <item> BOOST_PP_EQUAL_D </item>
+ <item> BOOST_PP_EXPAND </item>
+ <item> BOOST_PP_EXPR_IF </item>
+ <item> BOOST_PP_EXPR_IIF </item>
+ <item> BOOST_PP_FILENAME_x </item>
+ <item> BOOST_PP_FOR </item>
+ <item> BOOST_PP_FRAME_FINISH </item>
+ <item> BOOST_PP_FRAME_FLAGS </item>
+ <item> BOOST_PP_FRAME_ITERATION </item>
+ <item> BOOST_PP_FRAME_START </item>
+ <item> BOOST_PP_GREATER </item>
+ <item> BOOST_PP_GREATER_D </item>
+ <item> BOOST_PP_GREATER_EQUAL </item>
+ <item> BOOST_PP_GREATER_EQUAL_D </item>
+ <item> BOOST_PP_IDENTITY </item>
+ <item> BOOST_PP_IF </item>
+ <item> BOOST_PP_IIF </item>
+ <item> BOOST_PP_INC </item>
+ <item> BOOST_PP_INCLUDE_SELF </item>
+ <item> BOOST_PP_INDIRECT_SELF </item>
+ <item> BOOST_PP_INTERCEPT </item>
+ <item> BOOST_PP_IS_ITERATING </item>
+ <item> BOOST_PP_IS_SELFISH </item>
+ <item> BOOST_PP_ITERATE </item>
+ <item> BOOST_PP_ITERATION </item>
+ <item> BOOST_PP_ITERATION_DEPTH </item>
+ <item> BOOST_PP_ITERATION_FINISH </item>
+ <item> BOOST_PP_ITERATION_FLAGS </item>
+ <item> BOOST_PP_ITERATION_LIMITS </item>
+ <item> BOOST_PP_ITERATION_START </item>
+ <item> BOOST_PP_LESS </item>
+ <item> BOOST_PP_LESS_D </item>
+ <item> BOOST_PP_LESS_EQUAL </item>
+ <item> BOOST_PP_LESS_EQUAL_D </item>
+ <item> BOOST_PP_LIMIT_DIM </item>
+ <item> BOOST_PP_LIMIT_FOR </item>
+ <item> BOOST_PP_LIMIT_ITERATION </item>
+ <item> BOOST_PP_LIMIT_ITERATION_DIM </item>
+ <item> BOOST_PP_LIMIT_MAG </item>
+ <item> BOOST_PP_LIMIT_REPEAT </item>
+ <item> BOOST_PP_LIMIT_SEQ </item>
+ <item> BOOST_PP_LIMIT_SLOT_COUNT </item>
+ <item> BOOST_PP_LIMIT_SLOT_SIG </item>
+ <item> BOOST_PP_LIMIT_TUPLE </item>
+ <item> BOOST_PP_LIMIT_WHILE </item>
+ <item> BOOST_PP_LINE </item>
+ <item> BOOST_PP_LIST_APPEND </item>
+ <item> BOOST_PP_LIST_APPEND_D </item>
+ <item> BOOST_PP_LIST_AT </item>
+ <item> BOOST_PP_LIST_AT_D </item>
+ <item> BOOST_PP_LIST_CAT </item>
+ <item> BOOST_PP_LIST_CAT_D </item>
+ <item> BOOST_PP_LIST_CONS </item>
+ <item> BOOST_PP_LIST_ENUM </item>
+ <item> BOOST_PP_LIST_ENUM_R </item>
+ <item> BOOST_PP_LIST_FILTER </item>
+ <item> BOOST_PP_LIST_FILTER_D </item>
+ <item> BOOST_PP_LIST_FIRST </item>
+ <item> BOOST_PP_LIST_FIRST_N </item>
+ <item> BOOST_PP_LIST_FIRST_N_D </item>
+ <item> BOOST_PP_LIST_FOLD_LEFT </item>
+ <item> BOOST_PP_LIST_FOLD_LEFT_2ND </item>
+ <item> BOOST_PP_LIST_FOLD_LEFT_2ND_D </item>
+ <item> BOOST_PP_LIST_FOLD_LEFT_D </item>
+ <item> BOOST_PP_LIST_FOLD_RIGHT </item>
+ <item> BOOST_PP_LIST_FOLD_RIGHT_2ND </item>
+ <item> BOOST_PP_LIST_FOLD_RIGHT_2ND_D </item>
+ <item> BOOST_PP_LIST_FOLD_RIGHT_D </item>
+ <item> BOOST_PP_LIST_FOR_EACH </item>
+ <item> BOOST_PP_LIST_FOR_EACH_I </item>
+ <item> BOOST_PP_LIST_FOR_EACH_I_R </item>
+ <item> BOOST_PP_LIST_FOR_EACH_PRODUCT </item>
+ <item> BOOST_PP_LIST_FOR_EACH_PRODUCT_R </item>
+ <item> BOOST_PP_LIST_FOR_EACH_R </item>
+ <item> BOOST_PP_LIST_IS_CONS </item>
+ <item> BOOST_PP_LIST_IS_NIL </item>
+ <item> BOOST_PP_LIST_NIL </item>
+ <item> BOOST_PP_LIST_REST </item>
+ <item> BOOST_PP_LIST_REST_N </item>
+ <item> BOOST_PP_LIST_REST_N_D </item>
+ <item> BOOST_PP_LIST_REVERSE </item>
+ <item> BOOST_PP_LIST_REVERSE_D </item>
+ <item> BOOST_PP_LIST_SIZE </item>
+ <item> BOOST_PP_LIST_SIZE_D </item>
+ <item> BOOST_PP_LIST_TO_TUPLE </item>
+ <item> BOOST_PP_LIST_TO_TUPLE_R </item>
+ <item> BOOST_PP_LIST_TRANSFORM </item>
+ <item> BOOST_PP_LIST_TRANSFORM_D </item>
+ <item> BOOST_PP_LOCAL_ITERATE </item>
+ <item> BOOST_PP_LOCAL_LIMITS </item>
+ <item> BOOST_PP_LOCAL_MACRO </item>
+ <item> BOOST_PP_LPAREN </item>
+ <item> BOOST_PP_LPAREN_IF </item>
+ <item> BOOST_PP_MAX </item>
+ <item> BOOST_PP_MAX_D </item>
+ <item> BOOST_PP_MIN </item>
+ <item> BOOST_PP_MIN_D </item>
+ <item> BOOST_PP_MOD </item>
+ <item> BOOST_PP_MOD_D </item>
+ <item> BOOST_PP_MUL </item>
+ <item> BOOST_PP_MUL_D </item>
+ <item> BOOST_PP_NIL </item>
+ <item> BOOST_PP_NOR </item>
+ <item> BOOST_PP_NOT </item>
+ <item> BOOST_PP_NOT_EQUAL </item>
+ <item> BOOST_PP_NOT_EQUAL_D </item>
+ <item> BOOST_PP_OR </item>
+ <item> BOOST_PP_RELATIVE_FINISH </item>
+ <item> BOOST_PP_RELATIVE_FLAGS </item>
+ <item> BOOST_PP_RELATIVE_ITERATION </item>
+ <item> BOOST_PP_RELATIVE_START </item>
+ <item> BOOST_PP_REPEAT </item>
+ <item> BOOST_PP_REPEAT_1ST </item>
+ <item> BOOST_PP_REPEAT_2ND </item>
+ <item> BOOST_PP_REPEAT_3RD </item>
+ <item> BOOST_PP_REPEAT_FROM_TO </item>
+ <item> BOOST_PP_REPEAT_FROM_TO_1ST </item>
+ <item> BOOST_PP_REPEAT_FROM_TO_2ND </item>
+ <item> BOOST_PP_REPEAT_FROM_TO_3RD </item>
+ <item> BOOST_PP_REPEAT_FROM_TO_D </item>
+ <item> BOOST_PP_RPAREN </item>
+ <item> BOOST_PP_RPAREN_IF </item>
+ <item> BOOST_PP_SEQ_CAT </item>
+ <item> BOOST_PP_SEQ_CAT_S </item>
+ <item> BOOST_PP_SEQ_ELEM </item>
+ <item> BOOST_PP_SEQ_ENUM </item>
+ <item> BOOST_PP_SEQ_FILTER </item>
+ <item> BOOST_PP_SEQ_FILTER_S </item>
+ <item> BOOST_PP_SEQ_FIRST_N </item>
+ <item> BOOST_PP_SEQ_FOLD_LEFT </item>
+ <item> BOOST_PP_SEQ_FOLD_RIGHT </item>
+ <item> BOOST_PP_SEQ_FOR_EACH </item>
+ <item> BOOST_PP_SEQ_FOR_EACH_I </item>
+ <item> BOOST_PP_SEQ_FOR_EACH_I_R </item>
+ <item> BOOST_PP_SEQ_FOR_EACH_PRODUCT </item>
+ <item> BOOST_PP_SEQ_FOR_EACH_PRODUCT_R </item>
+ <item> BOOST_PP_SEQ_FOR_EACH_R </item>
+ <item> BOOST_PP_SEQ_HEAD </item>
+ <item> BOOST_PP_SEQ_INSERT </item>
+ <item> BOOST_PP_SEQ_NIL </item>
+ <item> BOOST_PP_SEQ_POP_BACK </item>
+ <item> BOOST_PP_SEQ_POP_FRONT </item>
+ <item> BOOST_PP_SEQ_PUSH_BACK </item>
+ <item> BOOST_PP_SEQ_PUSH_FRONT </item>
+ <item> BOOST_PP_SEQ_REMOVE </item>
+ <item> BOOST_PP_SEQ_REPLACE </item>
+ <item> BOOST_PP_SEQ_REST_N </item>
+ <item> BOOST_PP_SEQ_REVERSE </item>
+ <item> BOOST_PP_SEQ_REVERSE_S </item>
+ <item> BOOST_PP_SEQ_SIZE </item>
+ <item> BOOST_PP_SEQ_SUBSEQ </item>
+ <item> BOOST_PP_SEQ_TAIL </item>
+ <item> BOOST_PP_SEQ_TO_ARRAY </item>
+ <item> BOOST_PP_SEQ_TO_TUPLE </item>
+ <item> BOOST_PP_SEQ_TRANSFORM </item>
+ <item> BOOST_PP_SEQ_TRANSFORM_S </item>
+ <item> BOOST_PP_SLOT </item>
+ <item> BOOST_PP_STRINGIZE </item>
+ <item> BOOST_PP_SUB </item>
+ <item> BOOST_PP_SUB_D </item>
+ <item> BOOST_PP_TUPLE_EAT </item>
+ <item> BOOST_PP_TUPLE_ELEM </item>
+ <item> BOOST_PP_TUPLE_REM </item>
+ <item> BOOST_PP_TUPLE_REM_CTOR </item>
+ <item> BOOST_PP_TUPLE_REVERSE </item>
+ <item> BOOST_PP_TUPLE_TO_LIST </item>
+ <item> BOOST_PP_TUPLE_TO_SEQ </item>
+ <item> BOOST_PP_VALUE </item>
+ <item> BOOST_PP_WHILE </item>
+ <item> BOOST_PP_WSTRINGIZE </item>
+ <item> BOOST_PP_XOR </item>
+
+</list>
+
+
+<list name="boost.program_options">
+
+ <item> environment_iterator </item>
+ <item> eof_iterator </item>
+
+ <item> error </item>
+ <item> invalid_syntax </item>
+ <item> unknown_option </item>
+ <item> ambiguous_option </item>
+ <item> multiple_values </item>
+ <item> multiple_occurrences </item>
+ <item> validation_error </item>
+ <item> invalid_option_value </item>
+ <item> too_many_positional_options_error </item>
+ <item> too_few_positional_options_error </item>
+ <item> invalid_command_line_syntax </item>
+ <item> invalid_command_line_style </item>
+
+ <item> basic_option </item>
+ <item> option </item>
+ <item> woption </item>
+
+ <item> option_description </item>
+ <item> options_description_easy_init </item>
+ <item> options_description </item>
+ <item> duplicate_option_error </item>
+
+ <item> basic_parsed_options </item>
+ <item> basic_command_line_parser </item>
+ <item> parsed_options </item>
+ <item> wparsed_options </item>
+ <item> ext_parser </item>
+ <item> command_line_parser </item>
+ <item> wcommand_line_parser </item>
+ <item> parse_command_line </item>
+ <item> parse_config_file </item>
+ <item> collect_unrecognized </item>
+ <item> parse_environment </item>
+
+ <item> positional_options_description </item>
+
+ <item> value_semantic </item>
+ <item> value_semantic_codecvt_helper </item>
+ <item> untyped_value </item>
+ <item> typed_value </item>
+ <item> value </item>
+ <item> wvalue </item>
+ <item> bool_switch </item>
+
+ <item> variable_value </item>
+ <item> abstract_variables_map </item>
+ <item> variables_map </item>
+ <item> store </item>
+ <item> notify </item>
+
+ <item> BOOST_PROGRAM_OPTIONS_VERSION </item>
+
+</list>
+
+<list name="boost.python">
+
+</list>
+
+<list name="boost.random">
+
+</list>
+
+<list name="boost.range">
+
+ <item> range_value </item>
+ <item> range_iterator </item>
+ <item> range_const_iterator </item>
+ <item> range_difference </item>
+ <item> range_size </item>
+ <item> range_reverse_iterator </item>
+ <item> range_const_reverse_iterator </item>
+ <item> range_result_iterator </item>
+ <item> range_reverse_result_iterator </item>
+ <item> begin </item>
+ <item> end </item>
+ <item> empty </item>
+ <item> size </item>
+ <item> rbegin </item>
+ <item> rend </item>
+ <item> const_begin </item>
+ <item> const_end </item>
+ <item> const_rbegin </item>
+ <item> const_rend </item>
+ <item> iterator_range </item>
+ <item> sub_range </item>
+
+</list>
+
+<list name="boost.rational">
+
+ <item> rational </item>
+ <item> rational_cast </item>
+ <item> numerator </item>
+ <item> denominator </item>
+
+</list>
+
+<list name="boost.regex">
+
+</list>
+
+<list name="boost.serialization">
+
+ <item> text_oarchive </item>
+ <item> text_iarchive </item>
+ <item> text_woarchive </item>
+ <item> text_wiarchive </item>
+ <item> binary_oarchive </item>
+ <item> binary_iarchive </item>
+ <item> xml_oarchive </item>
+ <item> xml_iarchive </item>
+ <item> xml_woarchive </item>
+ <item> xml_wiarchive </item>
+ <item> common_iarchive </item>
+
+ <item> archive_flags </item>
+ <item> archive_flags::no_header </item>
+ <item> archive_flags::no_codecvt </item>
+ <item> archive_flags::no_xml_tag_checking </item>
+
+ <item> access </item>
+
+ <item> serialize </item>
+ <item> load </item>
+ <item> save </item>
+
+ <item> base_object </item>
+ <item> split_member </item>
+ <item> split_free </item>
+ <item> load_construct_data </item>
+ <item> save_construct_data </item>
+ <item> register_type </item>
+ <item> void_cast_register </item>
+
+ <item> version_type </item>
+ <item> object_id_type </item>
+ <item> object_id_reference_type </item>
+ <item> class_id_type </item>
+ <item> class_id_optional_type </item>
+ <item> class_id_reference_type </item>
+ <item> tracking_type </item>
+ <item> classname_type </item>
+
+ <item> BOOST_SERIALIZATION_SPLIT_MEMBER </item>
+ <item> BOOST_SERIALIZATION_SPLIT_FREE </item>
+ <item> BOOST_CLASS_EXPORT_GUID </item>
+ <item> BOOST_CLASS_EXPORT </item>
+ <item> BOOST_CLASS_TRACKING </item>
+ <item> BOOST_CLASS_IMPLEMENTATION </item>
+
+</list>
+
+<list name="boost.signals">
+
+ <item> signal </item>
+ <item> connect_position </item>
+ <item> connect_position::at_front </item>
+ <item> connect_position::at_back </item>
+ <item> slot </item>
+ <item> trackable </item>
+ <item> connection </item>
+ <item> scoped_connection </item>
+ <item> visit_each </item>
+ <item> last_value </item>
+ <item> swap </item>
+
+</list>
+
+
+<list name="boost.smart_ptr">
+
+ <item> scoped_ptr </item>
+ <item> scoped_array </item>
+ <item> swap </item>
+
+ <item> weak_ptr </item>
+ <item> make_shared </item>
+
+ <item> shared_ptr_traits </item>
+ <item> static_cast_tag </item>
+ <item> struct const_cast_tag </item>
+ <item> struct dynamic_cast_tag </item>
+ <item> struct polymorphic_cast_tag </item>
+ <item> sp_enable_shared_from_this </item>
+ <item> shared_ptr </item>
+ <item> static_pointer_cast </item>
+ <item> const_pointer_cast </item>
+ <item> dynamic_pointer_cast </item>
+ <item> shared_static_cast </item>
+ <item> shared_dynamic_cast </item>
+ <item> shared_polymorphic_cast </item>
+ <item> shared_polymorphic_downcast </item>
+ <item> get_pointer </item>
+ <item> get_deleter </item>
+
+ <item> shared_array </item>
+
+ <item> intrusive_ptr </item>
+ <item> intrusive_ptr_add_ref </item>
+ <item> intrusive_ptr_release </item>
+
+</list>
+
+<list name="boost.spirit">
+
+</list>
+
+<list name="boost.string_algo">
+
+ <item> to_lower_copy </item>
+ <item> to_lower </item>
+ <item> to_upper_copy </item>
+ <item> to_upper </item>
+ <item> is_classified </item>
+ <item> is_space </item>
+ <item> is_alnum </item>
+ <item> is_alpha </item>
+ <item> is_cntrl </item>
+ <item> is_digit </item>
+ <item> is_graph </item>
+ <item> is_lower </item>
+ <item> is_print </item>
+ <item> is_punct </item>
+ <item> is_upper </item>
+ <item> is_xdigit </item>
+ <item> is_any_of </item>
+ <item> is_from_range</item>
+ <item> is_equal </item>
+
+ <item> FormatterConcept </item>
+ <item> token_compress_mode_type </item>
+
+ <item> erase_range_copy </item>
+ <item> erase_range </item>
+ <item> erase_first_copy </item>
+ <item> erase_first </item>
+ <item> ierase_first_copy </item>
+ <item> ierase_first </item>
+ <item> erase_last_copy </item>
+ <item> erase_last </item>
+ <item> ierase_last_copy </item>
+ <item> ierase_last </item>
+ <item> erase_nth_copy </item>
+ <item> erase_nth </item>
+ <item> ierase_nth_copy </item>
+ <item> ierase_nth </item>
+ <item> erase_all_copy </item>
+ <item> erase_all </item>
+ <item> ierase_all_copy </item>
+ <item> ierase_all </item>
+ <item> erase_head_copy </item>
+ <item> erase_head </item>
+ <item> erase_tail_copy </item>
+ <item> erase_tail </item>
+ <item> find </item>
+ <item> find_first </item>
+ <item> ifind_first </item>
+ <item> find_last </item>
+ <item> ifind_last </item>
+ <item> find_nth </item>
+ <item> ifind_nth </item>
+ <item> find_head </item>
+ <item> find_tail </item>
+ <item> find_token </item>
+ <item> find_format_copy </item>
+ <item> find_format </item>
+ <item> find_format_all_copy </item>
+ <item> find_format_all </item>
+ <item> regex_finder </item>
+ <item> regex_formatter </item>
+ <item> find_iterator </item>
+ <item> split_iterator </item>
+ <item> make_find_iterator </item>
+ <item> make_split_iterator </item>
+ <item> first_finder </item>
+ <item> last_finder </item>
+ <item> nth_finder </item>
+ <item> head_finder </item>
+ <item> tail_finder </item>
+ <item> token_finder </item>
+ <item> range_finder </item>
+ <item> const_formatter </item>
+ <item> identity_formatter </item>
+ <item> empty_formatter </item>
+ <item> starts_with </item>
+ <item> istarts_with </item>
+ <item> ends_with </item>
+ <item> iends_with </item>
+ <item> contains </item>
+ <item> icontains </item>
+ <item> equals </item>
+ <item> iequals </item>
+ <item> all </item>
+ <item> find_regex </item>
+ <item> replace_regex_copy </item>
+ <item> replace_regex </item>
+ <item> replace_all_regex_copy </item>
+ <item> replace_all_regex </item>
+ <item> erase_regex_copy </item>
+ <item> erase_regex </item>
+ <item> erase_all_regex_copy </item>
+ <item> erase_all_regex </item>
+ <item> find_all_regex </item>
+ <item> split_regex </item>
+ <item> regex_finder </item>
+ <item> regex_formatter </item>
+ <item> replace_range_copy </item>
+ <item> replace_range </item>
+ <item> replace_first_copy </item>
+ <item> replace_first </item>
+ <item> ireplace_first_copy </item>
+ <item> ireplace_first </item>
+ <item> replace_last_copy </item>
+ <item> replace_last </item>
+ <item> ireplace_last_copy </item>
+ <item> ireplace_last </item>
+ <item> replace_nth_copy </item>
+ <item> replace_nth </item>
+ <item> ireplace_nth_copy </item>
+ <item> ireplace_nth </item>
+ <item> replace_all_copy </item>
+ <item> replace_all </item>
+ <item> ireplace_all_copy </item>
+ <item> ireplace_all </item>
+ <item> replace_head_copy </item>
+ <item> replace_head </item>
+ <item> replace_tail_copy </item>
+ <item> replace_tail </item>
+
+ <item> has_native_replace </item>
+ <item> has_stable_iterators </item>
+ <item> has_const_time_insert </item>
+ <item> has_const_time_erase </item>
+
+ <item> find_all </item>
+ <item> ifind_all </item>
+ <item> split </item>
+ <item> trim_left_copy_if </item>
+ <item> trim_left_copy </item>
+ <item> trim_left_if </item>
+ <item> trim_left </item>
+ <item> trim_right_copy_if </item>
+ <item> trim_right_copy </item>
+ <item> trim_right_if </item>
+ <item> trim_right </item>
+ <item> trim_copy_if </item>
+ <item> trim_copy </item>
+ <item> trim_if </item>
+ <item> trim </item>
+
+</list>
+
+<list name="boost.thread">
+
+ <item> barrier </item>
+ <item> condition </item>
+ <item> lock_error </item>
+ <item> thread_resource_error </item>
+ <item> mutex </item>
+ <item> try_mutex </item>
+ <item> timed_mutex </item>
+ <item> BOOST_ONCE_INIT </item>
+ <item> call_once </item>
+ <item> recursive_mutex </item>
+ <item> recursive_try_mutex </item>
+ <item> recursive_timed_mutex </item>
+ <item> thread </item>
+ <item> thread_group </item>
+ <item> thread_specific_ptr </item>
+ <item> xtime_clock_types </item>
+ <item> xtime </item>
+ <item> xtime_get </item>
+
+</list>
+
+<list name="boost.timer">
+
+ <item> timer </item>
+ <item> progress_timer </item>
+ <item> progress_display </item>
+
+</list>
+
+<list name="boost.tokenizer">
+
+ <item> tokenizer </item>
+ <item> make_token_iterator </item>
+ <item> token_iterator_generator </item>
+ <item> char_separator </item>
+ <item> escaped_list_separator </item>
+ <item> offset_separator </item>
+
+</list>
+
+<list name="boost.tribool">
+
+ <item> BOOST_TRIBOOL_THIRD_STATE </item>
+ <item> tribool </item>
+ <item> indeterminate </item>
+ <item> indeterminate_name </item>
+ <item> get_default_indeterminate_name </item>
+
+</list>
+
+<list name="boost.tuple">
+
+ <item> tuple </item>
+ <item> make_tuple </item>
+ <item> tie </item>
+ <item> set_open </item>
+ <item> set_close </item>
+ <item> set_delimiter </item>
+ <item> get </item>
+
+</list>
+
+TODO LIST END -->
+
+<!-- Contexts -->
+
+
+
+
+
+<list name="boost.uBLAS">
+
+ <!-- coming soon! -->
+
+</list>
+
+<!--
+<list name="boost.value_initialized">
+
+ <item> value_initialized </item>
+ <item> get </item>
+
+</list>
+
+
+<list name="boost.variant">
+
+ <item> BOOST_VARIANT_LIMIT_TYPES </item>
+ <item> BOOST_VARIANT_ENUM_PARAMS </item>
+ <item> BOOST_VARIANT_ENUM_SHIFTED_PARAMS </item>
+ <item> BOOST_VARIANT_NO_REFERENCE_SUPPORT </item>
+ <item> BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT </item>
+ <item> BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT </item>
+
+ <item> variant </item>
+ <item> make_variant_over </item>
+ <item> swap </item>
+ <item> make_recursive_variant </item>
+ <item> make_recursive_variant_over </item>
+ <item> recursive_wrapper </item>
+ <item> is_recursive_wrapper </item>
+ <item> unwrap_recursive_wrapper </item>
+ <item> apply_visitor_delayed_t </item>
+ <item> apply_visitor </item>
+ <item> bad_get </item>
+ <item> get </item>
+ <item> bad_visit </item>
+ <item> static_visitor </item>
+ <item> visitor_ptr_t </item>
+ <item> visitor_ptr </item>
+
+</list>
+-->
+<list name="boost.wave">
+
+ <!-- maybe later... -->
+
+</list>
+
+
+
+<contexts>
+
+
+<context name="main" attribute="boost.free.function" >
+
+ <keyword attribute="boost.free.function" context="#stay" String="boost.free.function" />
+ <keyword attribute="boost.template.classes" context="#stay" String="boost.template.classes" />
+ <keyword attribute="boost.classes" context="#stay" String="boost.classes" />
+ <keyword attribute="boost.metaprogramming" context="#stay" String="boost.metaprogramming" />
+ <keyword attribute="boost.exception" context="#stay" String="boost.exception" />
+ <keyword attribute="boost.container" context="#stay" String="boost.container" />
+ <keyword attribute="boost.macro" context="#stay" String="boost.macro" />
+ <keyword attribute="boost.object" context="#stay" String="boost.object" />
+ <keyword attribute="boost.fusion.result_of" context="#stay" String="boost.fusion.result_of" />
+ <keyword attribute="boost.concepts.member.functions" context="#stay" String="boost.concepts.member.functions" />
+ <keyword attribute="boost.concepts.free.functions" context="#stay" String="boost.concepts.free.functions" />
+ <keyword attribute="boost.tags" context="#stay" String="boost.tags" />
+ <keyword attribute="boost.member.functions" context="#stay" String="boost.member.functions" />
+ <keyword attribute="boost.constants" context="#stay" String="boost.constants" />
+ <keyword attribute="boost.concepts.member.typedef" context="#stay" String="boost.concepts.member.typedef" />
+ <keyword attribute="boost.namespaces" context="#stay" String="boost.namespaces" />
+
+
+</context>
+
+</contexts>
+
+
+<!--
+ This section defines the colors and format of each type of string parsed
+ Try to use defaults so the user can change it as he wished
+-->
+
+<itemDatas>
+
+ <itemData name="boost.free.function" defStyleNum="dsFunction"/>
+ <itemData name="boost.template.classes" defStyleNum="dsDataType"/>
+ <itemData name="boost.classes" defStyleNum="dsDataType"/>
+ <itemData name="boost.metaprogramming" defStyleNum="dsFunction"/>
+ <itemData name="boost.exception" defStyleNum="dsDataType" color="#0095ff" selColor="#ffffff" bold="1" italic="0"/>
+ <itemData name="boost.container" defStyleNum="dsDataType"/>
+ <itemData name="boost.macro" defStyleNum="dsOthers"/>
+ <itemData name="boost.object" defStyleNum="dsDataType" color="#0095ff" selColor="#ffffff" bold="1" italic="0"/>
+ <itemData name="boost.fusion.result_of" defStyleNum="dsFunction"/>
+ <itemData name="boost.concepts.member.functions" defStyleNum="dsFunction"/>
+ <itemData name="boost.concepts.free.functions" defStyleNum="dsFunction"/>
+ <itemData name="boost.tags" defStyleNum="dsOthers"/>
+ <itemData name="boost.member.functions" defStyleNum="dsFunction"/>
+ <itemData name="boost.constants" defStyleNum="dsKeyword" color="#0095ff" selColor="#ffffff" bold="1" italic="0"/>
+ <itemData name="boost.concepts.member.typedef" defStyleNum="dsDataType"/>
+ <itemData name="boost.namespaces" defStyleNum="dsDataType"/>
+
+ <!--
+ This is an extract from the official Kate page
+ It is leave here as a reference.
+
+ dsNormal used for normal text.
+ dsKeyword used for keywords.
+ dsDataType used for data types.
+ dsDecVal used for decimal values.
+ dsBaseN used for values with a base other than 10.
+ dsFloat used for float values.
+ dsChar used for a character.
+ dsString used for strings.
+ dsComment used for comments.
+ dsOthers used for 'other' things.
+ dsAlert used for warning messages.
+ dsFunction used for function calls.
+ dsRegionMarker used for region markers.
+ dsError used for error highlighting and wrong syntax.
+
+ -->
+</itemDatas>
+
+</highlighting>
+
+<general>
+
+ <keywords casesensitive="1" />
+
+</general>
+
+</language>
+
+
+<!-- [ About the code ]
+
+
+Introduction
+================================================
+This kate syntax files aims to improve boost C++ productivity by providing a
+consitent highligthing framework.
+This files work with kate-part so it can be used in every text procesing application
+of KDE. (KWrite,Kate,Konqueror,KDevelop,etc)
+
+
+Aknowelegments
+=================================================
+
+
+
+Version history
+=================================================
+
+[ 0.1.0 ] Initial beta.
+
+Known bugs
+=================================================
+
+
+Included boost libraries
+=================================================
+
+[ boost.any ]
+Safe, generic container for single values of different value types.
+- Kevlin Henney
+
+[ boost.array ]
+STL compliant container wrapper for arrays of constant size.
+- Nicolai Josuttis.
+
+[ boost.assign ]
+Filling containers with constant or generated data has never been easier.
+- Thorsten Ottosen.
+
+[ boost.bind ]
+Generalized binders for function/object/pointers and member functions.
+- Peter Dimov.
+
+[ boost.call_traits ]
+Defines types for passing parameters.
+- John Maddock, Howard Hinnant, et al.
+
+[ boost.compressed_pair ]
+Empty member optimization.
+- John Maddock, Howard Hinnant, et al.
+
+[ boost.concept_check ]
+Tools for generic programming
+- Jeremy Siek.
+
+[ boost.conversion ]
+Polymorphic and lexical casts
+- Dave Abrahams, Kevlin Henney.
+
+[ boost.crc ]
+Cyclic Redundancy Code
+- Daryle Walker.
+
+[ boost.date_time ]
+Date-Time library.
+- Jeff Garland.
+
+[ boost.dynamic_bitset ]
+A runtime sized version of std::bitset
+- Jeremy Siek, Chuck Allison.
+
+[ boost.enable_if ]
+Selective inclusion of function template overloads
+- Jaakko Järvi, Jeremiah Willcock, Andrew Lumsdaine.
+
+[ boost.filesystem ]
+Portable paths, iteration over directories, and other useful filesystem operations.
+- Beman Dawes.
+
+[ boost.format ]
+Type-safe 'printf-like' format operations.
+- Samuel Krempp.
+
+[ boost.function ]
+Function object wrappers for deferred calls or callbacks.
+- Doug Gregor.
+
+[ boost.functional ]
+Enhanced function object adaptors.
+- Mark Rodgers.
+
+[ boost.fusion ]
+Fusion between compile and run time
+Joel de Guzman
+
+[ boost.hash ]
+A TR1 hash function object that can be extended to hash user defined types
+- Daniel James.
+
+[ boost.graph ]
+Generic graph components and algorithms
+- Jeremy Siek, University of Notre Dame team.
+
+[ boost.integer ]
+Headers to ease dealing with integral types.
+
+[ boost.interval ]
+Extends the usual arithmetic functions to mathematical intervals
+- Guillaume Melquiond, Herv´ Brönnimann, Sylvain Pion.
+
+[ boost.in_place_factory ]
+Generic in-place construction of contained objects with a variadic argument-list.
+- Fernando Cacciola.
+
+[ boost.io_state_savers ] - Save I/O state to prevent jumbled data
+- Daryle Walker.
+
+[ boost.iostreams ]
+Framework for defining streams, stream buffers and i/o filters.
+- Jonathan Turkanis.
+
+[ boost.iterators ]
+Iterator construction framework, adaptors, concepts, and more.
+- Dave Abrahams, Jeremy Siek, Thomas Witt.
+
+[ boost.lambda ]
+Define small unnamed function objects at the actual call site, and more.
+- Jaakko Järvi, Gary Powell.
+
+[ boost.math ]
+Several contributions in the domain of mathematics.
+
+[ boost.minmax ]
+standard library extensions for simultaneous min/max and min/max element computations,
+- Hervé Brönnimann.
+
+[ boost.mpl ]
+Template metaprogramming framework of compile-time algorithms, sequences and metafunction classes
+- Aleksey Gurtovoy.
+
+[ boost.multi_array ]
+Multidimensional containers and adaptors for arrays of contiguous data
+- Ron Garcia.
+
+[ boost.multi_index ]
+Containers with multiple STL-compatible access interfaces
+- Joaquín M López Muñoz.
+
+[ boost.numeric ]
+Optimized Policy-based Numeric Conversions
+- Fernando Cacciola.
+
+[ boost.operators ]
+Templates ease arithmetic classes and iterators
+- Dave Abrahams, Jeremy Siek.
+
+[ boost.optional ]
+Discriminated-union wrapper for optional values.
+- Fernando Cacciola.
+
+[ boost.parameter ]
+Write functions that accept arguments by name.
+- David Abrahams, Daniel Wallin.
+
+[ boost.pointer_container ]
+Containers for storing heap-allocated polymorphic objects to ease OO-programming.
+- Thorsten Ottosen.
+
+[ boost.pool ]
+Memory pool management
+- Steve Cleary.
+
+[ boost.preprocessor ]
+Preprocessor metaprogramming tools including repetition and recursion.
+- Vesa Karvonen, Paul Mensonides.
+
+[ boost.program_options ]
+Access to configuration data given on command line, in config files and other sources.
+- Vladimir Prus.
+
+[ boost.property_map ]
+Concepts defining interfaces which map key objects to value objects.
+- Jeremy Siek.
+
+[ boost.python ]
+Reflects C++ classes and functions into Python
+- Dave Abrahams.
+
+[ boost.random ]
+A complete system for random number generation
+- Jens Maurer.
+
+[ boost.range ]
+A new infrastructure for generic algorithms that builds on top of the new iterator concepts.
+- Thorsten Ottosen.
+
+[ boost.rational ]
+A rational number class,
+- Paul Moore.
+
+[ boost.ref ]
+A utility library for passing references to generic functions.
+- Jaako Järvi, Peter Dimov, Doug Gregor, Dave Abrahams.
+
+[ boost.regex ]
+Regular expression library.
+- John Maddock.
+
+[ boost.serialization ]
+Serialization for persistence and marshalling.
+- Robert Ramey
+
+[ boost.signals ]
+managed signals & slots callback implementation.
+- Doug Gregor.
+
+[ boost.smart_ptr ]
+Five smart pointer class templates.
+- Greg Colvin, Beman Dawes, Peter Dimov, and Darin Adler.
+
+[ boost.static_assert ]
+Static assertions (compile time assertions).
+- John Maddock.
+
+[ boost.spirit ]
+LL parser framework represents parsers directly as EBNF grammars in inlined C++.
+- Joel de Guzman and team.
+
+[ boost.string_algo ]
+String algorithms library
+- Pavol Droba
+
+[ boost.test ]
+Support for simple program testing, full unit testing, and for program execution monitoring.
+- Gennadiy Rozental.
+
+[ boost.thread ]
+Portable C++ multi-threading.
+- William Kempf.
+
+[ boost.timer ]
+Event timer, progress timer, and progress display classes.
+- Beman Dawes.
+
+[ boost.tokenizer ]
+Break of a string or other character sequence into a series of tokens.
+- John Bandela.
+
+[ boost.tribool ]
+3-state boolean type library.
+- Doug Gregor.
+
+[ boost.tuple ]
+Ease definition of functions returning multiple values, and more.
+- Jaakko Järvi.
+
+[ boost.type_traits ]
+Templates for fundamental properties of types.
+- John Maddock, Steve Cleary, et al.
+
+[ boost.uBLAS ]
+Basic linear algebra for dense, packed and sparse matrices.
+- Joerg Walter, Mathias Koch.
+
+[ boost.utility ]
+Class noncopyable plus checked_delete(), checked_array_delete(), next(), prior() function templates,
+plus base-from-member idiom.
+- Dave Abrahams and others.
+
+[ boost.value_initialized ]
+Wrapper for uniform-syntax value initialization.
+- Fernando Cacciola, based on the original idea of David Abrahams.
+
+[ boost.variant ]
+Safe, generic, stack-based discriminated union container.
+- Eric Friedman, Itay Maman.
+
+[ boost.wave ]
+Preprocessor functionality packed behind an easy to use iterator interface.
+- Hartmut Kaiser
+
+
+-->
+
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE language SYSTEM "language.dtd">
+
+<language
+
+name="c++"
+version="0.1.0"
+kateversion="2.4"
+section="boost::hs"
+extensions="*.cpp;*.hpp;*.h"
+mimetype="allFiles"
+author="Based on the original cpp.xml from katepart, Copyright 2006 -2007 Matias Capeletto, matias.capeletto@gmail.com"
+priority="9"
+license="Distributed under the Boost Software License, Version 1.0.
+http://www.boost.org/LICENSE_1_0.txt"
+
+>
+
+<highlighting>
+
+<!-- Keywords lists -->
+
+<list name="keywords">
+
+ <item> asm </item>
+ <item> break </item>
+ <item> case </item>
+ <item> catch </item>
+ <item> class </item>
+ <item> const_cast </item>
+ <item> continue </item>
+ <item> default </item>
+ <item> delete </item>
+ <item> do </item>
+ <item> dynamic_cast</item>
+ <item> else </item>
+ <item> enum </item>
+ <item> explicit </item>
+ <item> export </item>
+ <item> extern </item>
+ <item> false </item>
+ <item> friend </item>
+ <item> for </item>
+ <item> goto </item>
+ <item> if </item>
+ <item> inline </item>
+ <item> namespace </item>
+ <item> new </item>
+ <item> operator </item>
+ <item> private </item>
+ <item> protected </item>
+ <item> public </item>
+ <item> reinterpret_cast </item>
+ <item> return </item>
+ <item> sizeof </item>
+ <item> static_cast </item>
+ <item> struct </item>
+ <item> switch </item>
+ <item> template </item>
+ <item> this </item>
+ <item> throw </item>
+ <item> true </item>
+ <item> try </item>
+ <item> typedef </item>
+ <item> typeid </item>
+ <item> type_info </item>
+ <item> typename </item>
+ <item> union </item>
+ <item> using </item>
+ <item> virtual </item>
+ <item> while </item>
+ <item> and </item>
+ <item> and_eq </item>
+ <item> bad_cast </item>
+ <item> bad_typeid </item>
+ <item> bitand </item>
+ <item> bitor </item>
+ <item> compl </item>
+ <item> not </item>
+ <item> not_eq </item>
+ <item> or </item>
+ <item> or_eq </item>
+ <item> xor </item>
+ <item> xor_eq </item>
+ <item> except </item>
+ <item> finally </item>
+ <item> xalloc </item>
+
+</list>
+
+<list name="qt_extensions">
+
+ <item> K_DCOP </item>
+ <item> SLOT </item>
+ <item> SIGNAL </item>
+ <item> Q_CLASSINFO </item>
+ <item> Q_ENUMS </item>
+ <item> Q_EXPORT </item>
+ <item> Q_OBJECT </item>
+ <item> Q_OVERRIDE </item>
+ <item> Q_PROPERTY </item>
+ <item> Q_SETS </item>
+ <item> TRUE </item>
+ <item> FALSE </item>
+ <item> connect </item>
+ <item> disconnect </item>
+ <item> emit </item>
+ <item> signals </item>
+ <item> slots </item>
+ <item> foreach </item>
+
+</list>
+
+<list name="types">
+
+ <item> auto </item>
+ <item> bool </item>
+ <item> char </item>
+ <item> const </item>
+ <item> double </item>
+ <item> float </item>
+ <item> int </item>
+ <item> long </item>
+ <item> mutable </item>
+ <item> register </item>
+ <item> short </item>
+ <item> signed </item>
+ <item> static </item>
+ <item> unsigned </item>
+ <item> void </item>
+ <item> volatile </item>
+ <item> uchar </item>
+ <item> uint </item>
+ <item> int8_t </item>
+ <item> int16_t </item>
+ <item> int32_t </item>
+ <item> int64_t </item>
+ <item> uint8_t </item>
+ <item> uint16_t </item>
+ <item> uint32_t </item>
+ <item> uint64_t </item>
+ <item> wchar_t </item>
+
+</list>
+
+<!-- Contexts -->
+
+<contexts>
+
+<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
+
+ <DetectSpaces />
+
+ <IncludeRules context="boost::hs call finder" />
+ <IncludeRules context="preprocessor finder" />
+ <IncludeRules context="keyword finder" />
+ <IncludeRules context="extensions finder" />
+ <IncludeRules context="built in types finder" />
+ <IncludeRules context="##std-c++" />
+ <IncludeRules context="##boost" />
+ <IncludeRules context="character finder" />
+ <IncludeRules context="string finder" />
+
+ <DetectIndentifier />
+
+ <IncludeRules context="number finder" />
+ <IncludeRules context="##Doxygen" />
+ <IncludeRules context="quickbook_import_markup" />
+ <IncludeRules context="comment finder" />
+ <IncludeRules context="region finder" />
+ <IncludeRules context="symbol finder" />
+
+</context>
+
+<!-- String listerals -->
+
+<context attribute="String" name="string finder">
+ <DetectChar attribute="String" context="String" char="&quot;"/>
+</context>
+
+<context attribute="String" lineEndContext="#pop" name="String">
+
+ <LineContinue attribute="String" context="#stay"/>
+ <HlCStringChar attribute="String Char" context="#stay"/>
+ <DetectChar attribute="String" context="#pop" char="&quot;"/>
+
+</context>
+
+<!-- Character literals -->
+
+<context attribute="Character" name="character finder">
+ <HlCChar attribute="Char" context="#stay"/>
+</context>
+
+
+<!-- built in types -->
+
+<context attribute="built in types" name="built in types finder">
+ <keyword attribute="Data Type" context="#stay" String="types" />
+</context>
+
+<!-- extensions -->
+
+<context attribute="Extensions" name="extensions finder">
+ <keyword attribute="Extensions" context="#stay" String="qt_extensions" />
+</context>
+
+<!-- Keywords -->
+
+<context attribute="Keyword" name="keyword finder">
+ <keyword attribute="Keyword" context="#stay" String="keywords" />
+</context>
+
+<!-- Detect number literals -->
+
+<context attribute="Float" name="number finder">
+
+
+ <Float attribute="Float" context="#stay">
+ <AnyChar String="fF" attribute="Float" context="#stay"/>
+ </Float>
+
+ <HlCOct attribute="Octal" context="#stay"/>
+
+ <HlCHex attribute="Hex" context="#stay"/>
+
+ <Int attribute="Decimal" context="#stay">
+
+ <StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="TRUE"/>
+ <StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="TRUE"/>
+ <StringDetect attribute="Decimal" context="#stay" String="LLU" insensitive="TRUE"/>
+ <StringDetect attribute="Decimal" context="#stay" String="UL" insensitive="TRUE"/>
+ <StringDetect attribute="Decimal" context="#stay" String="LU" insensitive="TRUE"/>
+ <StringDetect attribute="Decimal" context="#stay" String="LL" insensitive="TRUE"/>
+ <StringDetect attribute="Decimal" context="#stay" String="U" insensitive="TRUE"/>
+ <StringDetect attribute="Decimal" context="#stay" String="L" insensitive="TRUE"/>
+
+ </Int>
+
+</context>
+
+
+<!-- Comments -->
+
+<context attribute="Commnet" name="comment finder">
+ <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
+ <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
+</context>
+
+<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
+ <DetectSpaces />
+ <IncludeRules context="##Alerts" />
+ <DetectIdentifier />
+</context>
+
+<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
+ <DetectSpaces />
+ <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
+ <IncludeRules context="##Alerts" />
+ <DetectIdentifier />
+</context>
+
+<!-- QuickBook import markups -->
+
+<context attribute="Comment" lineEndContext="#stay" name="Quickbook Commentar 1">
+ <DetectSpaces />
+ <StringDetect attribute="Extensions" context="#pop" String="*/" endRegion="Comment"/>
+ <IncludeRules context="##Alerts" />
+ <DetectIdentifier />
+</context>
+
+<context attribute="Comment" lineEndContext="#stay" name="Quickbook Commentar 2">
+ <DetectSpaces />
+ <StringDetect attribute="Extensions" context="#pop" String="&gt;&gt;*/" endRegion="Comment"/>
+ <IncludeRules context="##Alerts" />
+ <DetectIdentifier />
+</context>
+
+<context attribute="Comment" lineEndContext="#stay" name="Quickbook Commentar 3">
+ <DetectSpaces />
+ <StringDetect attribute="Extensions" context="#pop" String="&gt;*/" endRegion="Comment"/>
+ <IncludeRules context="##Alerts" />
+ <DetectIdentifier />
+</context>
+
+<context name="quickbook_import_markup" attribute="Commnet">
+ <RegExpr attribute="Extensions" context="Commentar 1" String="//\[\s*\w+"/>
+ <StringDetect attribute="Extensions" context="Commentar 1" String="//]"/>
+ <StringDetect attribute="Extensions" context="Commentar 1" String="//`"/>
+ <StringDetect attribute="Extensions" context="Commentar 1" String="//&lt;--"/>
+ <StringDetect attribute="Extensions" context="Commentar 1" String="//--&gt;"/>
+ <StringDetect attribute="Extensions" context="Quickbook Commentar 1" String="/*`" beginRegion="Comment"/>
+ <StringDetect attribute="Extensions" context="Quickbook Commentar 2" String="/*&lt;&lt;" beginRegion="Comment"/>
+ <StringDetect attribute="Extensions" context="Quickbook Commentar 3" String="/*&lt;" beginRegion="Comment"/>
+</context>
+
+
+<!-- Regions -->
+
+<context attribute="Symbol" name="region finder">
+
+ <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
+ <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
+
+</context>
+
+<!-- Other reserved symbols -->
+
+<context attribute="Symbol" name="symbol finder">
+
+ <AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;?[]{|}~^&#59;"/>
+
+</context>
+
+<!-- Preprocessor -->
+
+<context attribute="Preprocessor" name="preprocessor finder">
+
+ <!-- ifdef/ifndef region markers -->
+
+ <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0" beginRegion="Outscoped" firstNonSpace="true" />
+
+ <!-- Enter the preprocessor -->
+
+ <DetectChar attribute="Preprocessor" context="Preprocessor" char="#" firstNonSpace="true" />
+
+</context>
+
+<context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
+
+ <LineContinue attribute="Preprocessor" context="#stay"/>
+ <RegExpr attribute="Preprocessor" context="Define" String="define.*((?=\\))"/>
+ <RegExpr attribute="Preprocessor" context="#stay" String="define.*"/>
+ <RangeDetect attribute="Prep. Lib" context="#stay" char="&quot;" char1="&quot;"/>
+ <RangeDetect attribute="Prep. Lib" context="#stay" char="&lt;" char1="&gt;"/>
+ <IncludeRules context="##Doxygen" />
+ <IncludeRules context="quickbook_import_markup" />
+ <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
+ <Detect2Chars attribute="Comment" context="Commentar/Preprocessor" char="/" char1="*"/>
+
+</context>
+
+<context attribute="Preprocessor" lineEndContext="#pop" name="Define">
+ <LineContinue attribute="Preprocessor" context="#stay"/>
+</context>
+
+<context attribute="Comment" lineEndContext="#stay" name="Commentar/Preprocessor">
+ <DetectSpaces />
+ <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" />
+ <DetectIdentifier />
+</context>
+
+<context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
+ <DetectSpaces />
+ <IncludeRules context="##Alerts" />
+ <DetectIdentifier />
+ <DetectChar attribute="String" context="String" char="&quot;"/>
+ <IncludeRules context="##Doxygen" />
+ <IncludeRules context="quickbook_import_markup" />
+ <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
+ <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
+ <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true" />
+ <RegExpr attribute="Preprocessor" context="#pop" String="#\s*(endif|else|elif)" endRegion="Outscoped" firstNonSpace="true" />
+</context>
+
+<context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
+
+ <DetectSpaces />
+ <IncludeRules context="##Alerts" />
+ <DetectIdentifier />
+ <DetectChar attribute="String" context="String" char="&quot;"/>
+ <IncludeRules context="##Doxygen" />
+ <IncludeRules context="quickbook_import_markup" />
+ <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
+ <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
+ <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true"/>
+ <RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="Outscoped" firstNonSpace="true"/>
+
+</context>
+
+
+<!-- boost::hs -->
+
+<context attribute="Comment" lineEndContext="#pop" name="boost::hs skip line" >
+
+</context>
+
+
+<context attribute="Comment" lineEndContext="#pop#pop" name="boost::hs skip line and pop pop" >
+
+</context>
+
+
+<context attribute="Comment" lineEndContext="boost::hs is off" name="boost::hs has gone off" >
+
+</context>
+
+
+<context attribute="Comment" name="boost::hs call finder">
+
+ <StringDetect attribute="boost::hs" context="boost::hs skip line" String="//boost::hs::begin_region()" beginRegion="boost::hs::Region" firstNonSpace="true" />
+ <StringDetect attribute="boost::hs" context="boost::hs skip line" String="//boost::hs::end_region()" endRegion="boost::hs::Region" firstNonSpace="true" />
+
+ <StringDetect attribute="boost::hs" context="boost::hs has gone off" String="//boost::hs::turn_off()" beginRegion="boost::hs::ScapedRegion" firstNonSpace="true" />
+ <StringDetect attribute="boost::hs" context="boost::hs skip line" String="//boost::hs::turn_on()" firstNonSpace="true" />
+
+</context>
+
+<context attribute="Normal Text" name="boost::hs is off">
+
+ <StringDetect attribute="boost::hs" context="boost::hs skip line and pop pop" String="//boost::hs::turn_off()" endRegion="boost::hs::ScapedRegion" firstNonSpace="true" />
+ <StringDetect attribute="boost::hs" context="#stay" String="//boost::hs::turn_on()" firstNonSpace="true" />
+
+</context>
+
+
+</contexts>
+
+<itemDatas>
+
+ <itemData name="Normal Text" defStyleNum="dsNormal"/>
+ <itemData name="Keyword" defStyleNum="dsKeyword"/>
+ <itemData name="Extensions" defStyleNum="dsKeyword" color="#0095ff" selColor="#ffffff" bold="1" italic="0"/>
+ <itemData name="Data Type" defStyleNum="dsDataType"/>
+ <itemData name="Decimal" defStyleNum="dsDecVal"/>
+ <itemData name="Octal" defStyleNum="dsBaseN"/>
+ <itemData name="Hex" defStyleNum="dsBaseN"/>
+ <itemData name="Float" defStyleNum="dsFloat"/>
+ <itemData name="Char" defStyleNum="dsChar"/>
+ <itemData name="String" defStyleNum="dsString"/>
+ <itemData name="String Char" defStyleNum="dsChar"/>
+ <itemData name="Comment" defStyleNum="dsComment"/>
+ <itemData name="Symbol" defStyleNum="dsNormal"/>
+ <itemData name="Preprocessor" defStyleNum="dsOthers"/>
+ <itemData name="Prep. Lib" defStyleNum="dsOthers"/>
+ <itemData name="boost::hs" defStyleNum="dsOthers"/>
+
+</itemDatas>
+
+</highlighting>
+
+<general>
+
+ <comments>
+
+ <comment name="singleLine" start="//" />
+ <comment name="multiLine" start="/*" end="*/" region="Comment"/>
+
+ </comments>
+
+ <keywords casesensitive="1" />
+
+</general>
+
+</language>
+
+
+<!--
+
+Aknowelegments
+=================================================
+
+Version history
+=================================================
+
+[ 0.1.0 ] Initial beta.
+
+Known bugs
+=================================================
+
+--> \ 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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE language SYSTEM "language.dtd">
+<language
+
+name="quickbook"
+version="0.9.4"
+kateversion="2.4"
+section="boost::hs"
+extensions="*.qbk"
+mimetype="allFiles"
+author="Copyright 2006 -2007 Matias Capeletto, matias.capeletto@gmail.com"
+license="Distributed under the Boost Software License, Version 1.0.
+http://www.boost.org/LICENSE_1_0.txt"
+
+>
+
+<highlighting>
+
+<!-- Contexts -->
+
+<contexts>
+
+<!--
+ Main context
+ This is bottom the context, every thing the user type will stack another
+ context. This context is special because some things can only be called
+ from here. (e.g. The quickbook description)
+-->
+
+<context name="c_main" attribute="d_normal" lineEndContext="#stay">
+
+ <IncludeRules context="c_main_before_code" />
+ <IncludeRules context="c_cpp_code_block_finder" />
+ <IncludeRules context="c_main_after_code" />
+ <IncludeRules context="c_normal" />
+
+</context>
+
+<context name="c_main_before_code" attribute="d_normal" lineEndContext="#stay">
+
+ <IncludeRules context="c_sections_finder" />
+ <IncludeRules context="c_predefined_macros" />
+ <IncludeRules context="c_boost::hs call finder" />
+ <IncludeRules context="c_item_list_finder" />
+
+</context>
+
+<context name="c_main_after_code" attribute="d_normal" lineEndContext="#stay">
+
+ <IncludeRules context="c_scape_sequence_finder" />
+ <IncludeRules context="c_headings_finder" />
+ <IncludeRules context="c_includes_finder" />
+ <IncludeRules context="c_macro_definition_finder" />
+ <IncludeRules context="c_template_definition_finder" />
+ <IncludeRules context="c_quickbook_type_finder" />
+ <IncludeRules context="c_text_block_finder" />
+ <IncludeRules context="c_table_finder" />
+ <IncludeRules context="c_variable_list_finder" />
+ <IncludeRules context="c_import_finder" />
+
+</context>
+
+<!-- Common Structures, this constructions can be called in almost every context -->
+
+<context name="c_common_structures" attribute="d_normal" lineEndContext="#stay">
+
+ <DetectSpaces/>
+ <IncludeRules context="c_common_structures_before_code" />
+ <IncludeRules context="c_cpp_inline_code_block_finder" />
+ <IncludeRules context="c_common_structures_after_code" />
+
+</context>
+
+<context name="c_common_structures_before_code" attribute="d_normal" lineEndContext="#stay">
+
+ <DetectSpaces/>
+ <IncludeRules context="c_scape_sequence_finder" />
+ <IncludeRules context="c_predefined_macros" />
+ <IncludeRules context="c_language_finder" />
+ <IncludeRules context="c_comment_finder" />
+ <IncludeRules context="c_boost::hs call finder" />
+ <IncludeRules context="c_no_processing_finder" />
+
+</context>
+
+<context name="c_common_structures_after_code" attribute="d_normal" lineEndContext="#stay">
+
+ <IncludeRules context="c_anchor_finder" />
+ <IncludeRules context="c_image_finder" />
+ <IncludeRules context="c_link_finder" />
+ <IncludeRules context="c_cpp_link_finder" />
+ <IncludeRules context="c_text_format_finder" />
+
+</context>
+
+<!-- Normal contex, defines plain text and look for a structure to appear -->
+
+<context name="c_normal" attribute="d_normal" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <IncludeRules context="c_common_structures" />
+ <IncludeRules context="c_simple_text_block_finder" />
+
+</context>
+
+<!-- Inside tables and list, you can not use every construction -->
+
+<context name="c_strict_normal" attribute="d_normal" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <IncludeRules context="c_common_structures" />
+
+</context>
+
+<!-- Normal block contexs, this contexts will be stacked so we can know the state -->
+
+<context name="c_normal_block" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_bold_block" attribute="d_normal_bold" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_indirect_normal_block" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop" />
+</context>
+
+<context name="c_deep_normal_block" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop" />
+</context>
+
+<context name="c_indirect_normal_bold_block" attribute="d_normal_bold" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop" />
+</context>
+
+<!-- Blocks used in macros and templates bodies -->
+
+<context name="c_indirect_main_block" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_main" />
+
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop" />
+</context>
+
+<context name="c_deep_main_block" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_main" />
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop" />
+</context>
+
+<!-- No processing block -->
+
+<context name="c_no_processing_block" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_predefined_macros" />
+ <StringDetect String="'''" attribute="d_structure" context="#pop" endRegion="r_no_processing"/>
+</context>
+
+<context name="c_no_processing_finder" attribute="d_normal" lineEndContext="#stay">
+ <StringDetect String="'''" attribute="d_structure" context="c_no_processing_block" beginRegion="r_no_processing"/>
+</context>
+
+<!-- Items list finder -->
+
+<context name="c_item_list" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="^\s*[\*\#]\s" minimal="true" attribute="d_structure" context="c_item_list"/>
+ <RegExpr String="^." minimal="true" attribute="d_structure" lookAhead="true" context="#pop"/>
+ <IncludeRules context="c_strict_normal" />
+</context>
+
+<context name="c_item_list_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="^\s*[\*\#]\s" minimal="true" attribute="d_structure" context="c_item_list"/>
+</context>
+
+<!-- Code blocks -->
+
+<context name="c_back_to_quickbook_block" attribute="d_normal" lineEndContext="#stay">
+ <Detect2Chars char="`" char1="`" attribute="d_structure" context="#pop" />
+ <IncludeRules context="c_strict_normal" />
+</context>
+
+<context name="c_code_block" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="^[\S]" minimal="true" attribute="d_structure" lookAhead="true" context="#pop" />
+ <Detect2Chars char="`" char1="`" attribute="d_structure" context="c_back_to_quickbook_block" />
+ <IncludeRules context="c_predefined_macros" />
+ <IncludeRules context="##C++" />
+</context>
+
+<context name="c_preformated_code_block" attribute="d_normal" lineEndContext="#stay">
+ <Detect2Chars char="`" char1="`" attribute="d_structure" context="#pop" endRegion="r_code_block" />
+ <IncludeRules context="c_predefined_macros" />
+ <IncludeRules context="##C++" />
+</context>
+
+<context name="c_inline_code_block" attribute="d_normal" lineEndContext="#stay">
+ <DetectChar char="`" attribute="d_structure" context="#pop" />
+ <IncludeRules context="c_predefined_macros" />
+ <IncludeRules context="##C++"/>
+</context>
+
+<context name="c_cpp_code_block_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="^[\s]" minimal="true" attribute="d_structure" context="c_code_block" />
+</context>
+
+<context name="c_cpp_inline_code_block_finder" attribute="d_normal" lineEndContext="#stay">
+ <Detect2Chars char="`" char1="`" attribute="d_structure" context="c_preformated_code_block" beginRegion="r_code_block" />
+ <DetectChar char="`" attribute="d_structure" context="c_inline_code_block" />
+</context>
+
+<context name="c_language_finder" attribute="d_normal" lineEndContext="#stay">
+ <StringDetect String="[c++]" attribute="d_structure" context="#stay" />
+ <StringDetect String="[python]" attribute="d_structure" context="#stay" />
+</context>
+
+<!-- Sections and Headings -->
+
+<context name="c_section_definition" attribute="d_anchor" lineEndContext="#stay">
+ <DetectChar char=" " attribute="d_structure" context="c_indirect_normal_bold_block" />
+</context>
+
+<context name="c_sections_finder" attribute="d_normal" lineEndContext="#stay">
+ <StringDetect String="[section" attribute="d_structure" context="c_section_definition" beginRegion="r_section" />
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop" endRegion="r_section"/>
+</context>
+
+<context name="c_headings_finder" attribute="d_normal" lineEndContext="#stay">
+ <StringDetect String="[heading" minimal="true" attribute="d_structure" context="c_normal_bold_block" />
+ <RegExpr String="\[h[1-6]\b" minimal="true" attribute="d_structure" context="c_normal_bold_block" />
+</context>
+
+
+<!-- Macros -->
+
+<context name="c_macro_definition" attribute="d_macro" lineEndContext="c_indirect_main_block">
+ <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_main_block" />
+</context>
+
+<context name="c_predefined_macros" attribute="d_macro">
+ <RegExpr String="[_]{2}[\w_]+[_]{2}" minimal="true" attribute="d_macro" context="#stay" />
+</context>
+
+<context name="c_macro_definition_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[def\b[\s]*" attribute="d_structure" context="c_macro_definition" />
+</context>
+
+
+<!-- Templates -->
+
+<context name="c_template_parameters" attribute="d_path" lineEndContext="#stay">
+ <DetectChar char="]" attribute="d_structure" context="c_deep_main_block" />
+</context>
+
+<context name="c_template_definition" attribute="d_macro" lineEndContext="c_indirect_main_block">
+ <DetectChar char="[" attribute="d_structure" context="c_template_parameters" />
+ <RegExpr String="\\\s" minimal="true" attribute="d_structure" context="c_indirect_main_block"/>
+ <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_main_block" />
+</context>
+
+<context name="c_template_definition_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[template\b[\s]*" attribute="d_structure" context="c_template_definition" />
+</context>
+
+<!-- Text format logic -->
+
+<context name="c_text_format_finder" attribute="d_normal">
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold" />
+ <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_italic" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_underline" />
+ <Detect2Chars char="[" char1="-" attribute="d_structure" context="c_normal_strikeout" />
+ <Detect2Chars char="[" char1="^" attribute="d_structure" context="c_normal_teletype" />
+ <Detect2Chars char="[" char1="~" attribute="d_structure" context="c_normal_replaceable" />
+ <RegExpr String="(?=(^|\W))[\*][\S][^\[\]]*[\S]?[\*](?=($|\W))" minimal="true" attribute="d_normal_bold" context="#stay" />
+ <RegExpr String="(?=(^|\W))[/][\S][^\[\]]*[\S]?[/](?=($|\W))" minimal="true" attribute="d_normal_italic" context="#stay" />
+ <RegExpr String="(?=(^|\W))[_][\S][^\[\]]*[\S]?[_](?=($|\W))" minimal="true" attribute="d_normal_underline" context="#stay" />
+ <RegExpr String="(?=(^|\W))[=][\S][^\[\]]*[\S]?[=](?=($|\W))" minimal="true" attribute="d_normal_teletype" context="#stay" />
+</context>
+
+<context name="c_normal_bold" attribute="d_normal_bold" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold" />
+ <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_underline" />
+ <RegExpr String="(?=(^|\W))[/][\S][^\[\]]*[\S]?[/](?=($|\W))" minimal="true" attribute="d_normal_bold_italic" context="#stay" />
+ <RegExpr String="(?=(^|\W))[_][\S][^\[\]]*[\S]?[_](?=($|\W))" minimal="true" attribute="d_normal_bold_underline" context="#stay" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_italic" attribute="d_normal_italic" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_italic_underline" />
+ <RegExpr String="(?=(^|\W))[\*][\S][^\[\]]*[\S]?[\*](?=($|\W))" minimal="true" attribute="d_normal_bold_italic" context="#stay" />
+ <RegExpr String="(?=(^|\W))[_][\S][^\[\]]*[\S]?[_](?=($|\W))" minimal="true" attribute="d_normal_italic_underline" context="#stay" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_underline" attribute="d_normal_underline" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_underline" />
+ <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_italic_underline" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_underline" />
+ <RegExpr String="(?=(^|\W))[\*][\S][^\[\]]*[\S]?[\*](?=($|\W))" minimal="true" attribute="d_normal_bold_underline" context="#stay" />
+ <RegExpr String="(?=(^|\W))[/][\S][^\[\]]*[\S]?[/](?=($|\W))" minimal="true" attribute="d_normal_italic_underline" context="#stay" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_bold_italic" attribute="d_normal_bold_italic" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic" />
+ <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_italic_underline" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_bold_underline" attribute="d_normal_bold_underline" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_underline" />
+ <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic_underline" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_underline" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_italic_underline" attribute="d_normal_italic_underline" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic_underline" />
+ <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_italic_underline" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_italic_underline" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_bold_italic_underline" attribute="d_normal_bold_italic_underline" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic_underline" />
+ <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic_underline" />
+ <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_italic_underline" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_strikeout" attribute="d_normal_strikeout" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_teletype" attribute="d_normal_teletype" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_normal_replaceable" attribute="d_normal_ replaceable" lineEndContext="#stay">
+ <IncludeRules context="c_common_structures" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<!-- Links -->
+
+<context name="c_link" attribute="d_anchor" lineEndContext="c_indirect_normal_block">
+ <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_normal_block" />
+</context>
+
+<context name="c_web_link" attribute="d_path" lineEndContext="c_indirect_normal_block">
+ <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_normal_block" />
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_link_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[link\b[\s]*" attribute="d_structure" context="c_link" />
+ <Detect2Chars char="[" char1="@" attribute="d_structure" context="c_web_link" />
+</context>
+
+<context name="c_cpp_link_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[(funcref|classref|memberref|enumref|headerref)\b[\s]*" attribute="d_structure" context="c_link" />
+</context>
+
+<!-- Anchors -->
+
+<context name="c_anchor" attribute="d_anchor" lineEndContext="#stay">
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_anchor_finder" attribute="d_normal" lineEndContext="#stay">
+ <Detect2Chars char="[" char1="#" attribute="d_structure" context="c_anchor" />
+</context>
+
+<!-- Images -->
+
+<context name="c_image" attribute="d_path" lineEndContext="#stay">
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_image_finder" attribute="d_normal" lineEndContext="#stay">
+ <Detect2Chars char="[" char1="$" attribute="d_structure" context="c_image" />
+</context>
+
+<!-- Comments -->
+
+<context name="c_comment" attribute="d_comment" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <!-- Is this the best approach here? -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <DetectChar char="[" attribute="d_structure" context="c_comment" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_comment" />
+</context>
+
+<context name="c_comment_finder" >
+ <Detect2Chars char="[" char1="/" attribute="d_structure" context="c_comment" beginRegion="r_comment" />
+</context>
+
+<!-- Scape sequences -->
+
+<context name="c_scape_sequence_finder" attribute="d_normal" lineEndContext="#stay">
+ <DetectChar char="\" attribute="d_structure" context="c_scape_character" />
+</context>
+
+<context name="c_scape_character" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="." minimal="true" attribute="d_normal" context="#pop" />
+</context>
+
+<!-- Text blocks -->
+
+<context name="c_normal_text_block" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_strict_normal" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_text_block"/>
+</context>
+
+<context name="c_text_block_finder" attribute="d_normal" lineEndContext="#stay">
+ <Detect2Chars char="[" char1=":" attribute="d_structure" context="c_normal_text_block" beginRegion="r_text_block" />
+ <RegExpr String="[\[][\x0022]" minimal="true" attribute="d_structure" context="c_normal_text_block" beginRegion="r_text_block"/>
+ <RegExpr String="\[(pre|footnote|blurb|warning|note|tip|important|pre|caution)(\b|\W|$)" minimal="true" attribute="d_structure" context="c_normal_text_block" beginRegion="r_text_block"/>
+</context>
+
+
+<context name="c_simple_text_block" attribute="d_anchor" lineEndContext="#stay">
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+ <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_normal_block" />
+</context>
+
+<context name="c_simple_text_block_finder" attribute="d_normal" lineEndContext="#stay">
+ <DetectChar char="[" attribute="d_structure" context="c_simple_text_block" />
+</context>
+
+<!-- Includes -->
+
+<context name="c_included_path" attribute="d_path" lineEndContext="#stay">
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop" />
+</context>
+
+<context name="c_include" attribute="d_anchor" lineEndContext="#stay">
+ <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_included_path" />
+</context>
+
+<context name="c_includes_finder" attribute="d_normal" lineEndContext="#stay">
+ <StringDetect String="[include" attribute="d_structure" context="c_include" />
+ <StringDetect String="[xinclude" attribute="d_structure" context="c_include" />
+</context>
+
+<!-- Import -->
+
+<context name="c_import_path" attribute="d_path" lineEndContext="#stay">
+ <IncludeRules context="c_simple_text_block_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_import_finder" attribute="d_normal" lineEndContext="#stay">
+ <StringDetect String="[import" attribute="d_structure" context="c_import_path" />
+</context>
+
+<!-- Document Type logic -->
+
+<context name="c_quickbook_type_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[(book|article|library|chapter|part|appendix|preface|qandadiv|qandaset|reference|set)\b" minimal="true" attribute="d_structure" context="c_documment_definition" beginRegion="r_documment_definition" />
+</context>
+
+<context name="c_documment_definition" attribute="d_normal_bold" lineEndContext="#stay">
+ <IncludeRules context="c_quickbook_attribute_finder" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_documment_definition"/>
+</context>
+
+<context name="c_quickbook_attribute_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[(quickbook|version|id|dirname|copyright|purpose|category|authors|license|source\-mode)\b" minimal="true" attribute="d_structure" context="c_normal_block" />
+
+</context>
+
+<!-- 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]]] -->
+
+<context name="c_table" attribute="d_normal_bold" lineEndContext="#stay">
+ <IncludeRules context="c_strict_normal" />
+ <DetectChar char="[" attribute="d_structure" context="c_table_title_row" />
+</context>
+
+<context name="c_table_title_row" attribute="d_nop" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <DetectChar char="[" attribute="d_structure" context="c_table_title_cell" />
+ <DetectChar char="]" attribute="d_structure" context="c_table_body" />
+</context>
+
+<context name="c_table_title_cell" attribute="d_table_title_cell" lineEndContext="#stay">
+ <IncludeRules context="c_strict_normal" />
+
+ <DetectChar char="[" attribute="d_structure" context="c_table_cell" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_table_body" attribute="d_nop" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <DetectChar char="[" attribute="d_structure" context="c_table_row" />
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop" endRegion="r_table"/>
+</context>
+
+<context name="c_table_row" attribute="d_nop" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <DetectChar char="[" attribute="d_structure" context="c_table_cell" />
+
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_table_cell" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+ <RegExpr String="Row[\s]+[\d]+[\s]*,[\s]*Col[\s]+[\d]+[\s]*:" minimal="true" attribute="d_structure" context="#stay" />
+ <!--DetectChar char="[" attribute="d_structure" context="c_table_cell" /-->
+ <DetectChar char="]" attribute="d_structure" context="#pop" />
+</context>
+
+<context name="c_table_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[table\b" minimal="true" attribute="d_structure" context="c_table" beginRegion="r_table" />
+</context>
+
+<!-- Variable List
+
+ [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]]
+ ]
+ -->
+
+<context name="c_variable_list" attribute="d_normal_bold" lineEndContext="#stay">
+ <IncludeRules context="c_strict_normal" />
+ <DetectChar char="[" attribute="d_structure" context="c_var_list_body_1" />
+ <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_variable_list"/>
+</context>
+
+<context name="c_var_list_body_1" attribute="d_nop" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <DetectChar char="[" attribute="d_structure" context="c_var_list_element_name" />
+</context>
+
+<context name="c_var_list_body_2" attribute="d_nop" lineEndContext="#stay">
+
+ <!-- For performance the [endsect] resets the engine -->
+ <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/>
+
+ <DetectChar char="[" attribute="d_structure" context="c_var_list_element_info" />
+</context>
+
+<context name="c_var_list_body_3" attribute="d_nop" lineEndContext="#stay">
+ <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop#pop#pop" />
+</context>
+
+<context name="c_var_list_element_name" attribute="d_list_element_name" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+ <DetectChar char="]" attribute="d_structure" context="c_var_list_body_2" />
+</context>
+
+<context name="c_var_list_element_info" attribute="d_normal" lineEndContext="#stay">
+ <IncludeRules context="c_normal" />
+ <DetectChar char="]" attribute="d_structure" context="c_var_list_body_3" />
+</context>
+
+<context name="c_variable_list_finder" attribute="d_normal" lineEndContext="#stay">
+ <RegExpr String="\[variablelist\b" minimal="true" attribute="d_structure" context="c_variable_list" beginRegion="r_variable_list" />
+</context>
+
+
+<!--
+ boost::hs
+-->
+
+<context name="c_boost::hs call finder" attribute="d_boost::hs">
+ <StringDetect String="[/boost::hs::turn_off()]" attribute="d_boost::hs" context="c_scape_highlighting" />
+ <StringDetect String="[/boost::hs::turn_on()]" attribute="d_boost::hs" context="#stay" />
+ <StringDetect String="[/boost::hs::begin_region()]" attribute="d_boost::hs" context="#stay" beginRegion="r_boost::hs::region" />
+ <StringDetect String="[/boost::hs::end_region()]" attribute="d_boost::hs" context="#stay" endRegion="r_boost::hs::region" />
+</context>
+
+<context name="c_scape_highlighting" attribute="d_normal" lineEndContext="#stay">
+ <StringDetect String="[/boost::hs::turn_on()]" attribute="d_boost::hs" context="#pop" />
+ <StringDetect String="[/boost::hs::turn_off()]" attribute="d_boost::hs" context="#stay" />
+</context>
+
+</contexts>
+
+<!--
+ This section defines the colors and format of each type of string parsed
+ Try to use defaults so the user can change it as he wished
+-->
+
+<itemDatas>
+
+ <itemData name="d_normal" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_bold" bold="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_italic" italic="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_underline" underline="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_bold_italic" bold="true" italic="true" defStyleNum="dsNormal" />
+ <itemData name="d_normal_bold_underline" bold="true" underline="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_italic_underline" italic="true" underline="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_bold_italic_underline" bold="true" italic="true" underline="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_strikeout" strikeout="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_teletype" italic="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_normal_replaceable" italic="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_anchor" defStyleNum="dsDataType" />
+
+ <itemData name="d_macro" defStyleNum="dsDataType" />
+
+ <itemData name="d_path" defStyleNum="dsOthers" />
+
+ <itemData name="d_structure" color="#5555FF" defStyleNum="dsNormal" />
+
+ <itemData name="d_comment" defStyleNum="dsComment" />
+
+ <itemData name="d_table_title_cell" color="#000000" bold="true" backgroundColor="#E6E6E6" defStyleNum="dsNormal" />
+
+ <itemData name="d_list_element_name" bold="true" defStyleNum="dsNormal" />
+
+ <itemData name="d_nop" defStyleNum="dsComment" />
+
+ <itemData name="d_boost::hs" defStyleNum="dsFunction" />
+
+</itemDatas>
+
+<!-- Last Part, Give acces to some tools, for example comment/uncomment in edit menu -->
+
+</highlighting>
+
+<general>
+
+ <comments>
+
+ <comment name="multiLine" start="[/" end="]" region="r_comment" />
+
+ </comments>
+
+</general>
+
+</language>
+
+<!--
+
+Aknowelegments
+=================================================
+
+Boost.Quickbook is a poweful C++ documentation tool.
+It is developped by Joel de Guzman and Eric Niebler, I am very thankful they give
+this tool a Boost License and allowed C++ developpers to document their work
+in a easy and fun way.
+Check www.boost.org to get the tool and meet one of the most impressive c++
+library communities in the world.
+
+Version history
+=================================================
+
+[ 0.9.4 ] Add [heading ]
+Add templates
+Add import
+[ 0.9.3 ] "[endsect]" reset the engine to avoid lags in long files
+[ 0.9.2 ] Change file name ( quickbook_sintaxis.xml -> boost::hs::quickbook.xml )
+Change section ( Docs -> boost::hs ),
+Change name ( Boost.Quickbook -> quickbook )
+This changes aims to incorporate a boost kate sintaxis framework in KDE.
+[ 0.9.1 ] Fixed simple formating ( for example: "*this] [that*" is not longer bolded ).
+[ 0.9.0 ] Initial beta, sended to Joel de Guzman and Eric Niebler.
+
+Known bugs
+=================================================
+
+Feedback will be appreciated.
+They are very small and it is very unlikely to encounter one.
+
+* List items * and # are not fully implemented.
+* The line ` \\ C++ comment ` is not working because of Kate C++
+highlight definitions.
+* Python code is not yet supported.
+
+-->
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE language SYSTEM "language.dtd">
+
+<language
+
+name="std-c++"
+version="0.1.0"
+kateversion="2.4"
+section="boost::hs"
+extensions="*.std"
+mimetype="allFiles"
+author="Copyright 2006 -2007 Matias Capeletto, matias.capeletto@gmail.com"
+priority="9"
+license="Distributed under the Boost Software License, Version 1.0.
+http://www.boost.org/LICENSE_1_0.txt"
+
+>
+
+
+
+<highlighting>
+
+<list name="std.free.function" >
+
+ <!-- std.algorithm -->
+
+ <item> adjacent_find </item>
+ <item> binary_search </item>
+ <item> copy </item>
+ <item> copy_backward </item>
+ <item> count </item>
+ <item> count_if </item>
+ <item> equal </item>
+ <item> equal_range </item>
+ <item> fill </item>
+ <item> fill_n </item>
+ <item> find </item>
+ <item> find_end </item>
+ <item> find_first_of </item>
+ <item> find_if </item>
+ <item> for_each </item>
+ <item> generate </item>
+ <item> generate_n </item>
+ <item> includes </item>
+ <item> inplace_merge </item>
+ <item> iter_swap </item>
+ <item> lexicographical_compare </item>
+ <item> lower_bound </item>
+ <item> make_heap </item>
+ <item> max </item>
+ <item> max_element </item>
+ <item> merge </item>
+ <item> min </item>
+ <item> min_element </item>
+ <item> mismatch </item>
+ <item> next_permutation </item>
+ <item> nth_element </item>
+ <item> partial_sort </item>
+ <item> partial_sort_copy </item>
+ <item> partition </item>
+ <item> pop_heap </item>
+ <item> prev_permutation </item>
+ <item> push_heap </item>
+ <item> random_shuffle </item>
+ <item> remove </item>
+ <item> remove_copy </item>
+ <item> remove_copy_if </item>
+ <item> remove_if </item>
+ <item> replace </item>
+ <item> replace_copy </item>
+ <item> replace_copy_if </item>
+ <item> replace_if </item>
+ <item> reverse </item>
+ <item> reverse_copy </item>
+ <item> rotate </item>
+ <item> rotate_copy </item>
+ <item> search </item>
+ <item> search_n </item>
+ <item> set_difference </item>
+ <item> set_intersection </item>
+ <item> set_symmetric_difference </item>
+ <item> set_union </item>
+ <item> sort </item>
+ <item> sort_heap </item>
+ <item> stable_partition </item>
+ <item> stable_sort </item>
+ <item> swap </item>
+ <item> swap_ranges </item>
+ <item> transform </item>
+ <item> unique </item>
+ <item> unique_copy </item>
+ <item> upper_bound </item>
+
+ <!-- std.assert -->
+
+ <item> assert </item>
+
+ <!-- std.math -->
+
+ <item> abs </item>
+ <item> arg </item>
+ <item> conj </item>
+ <item> cos </item>
+ <item> cosh </item>
+ <item> exp </item>
+ <item> imag </item>
+ <item> log </item>
+ <item> log10 </item>
+ <item> norm </item>
+ <item> polar </item>
+ <item> pow </item>
+ <item> real </item>
+ <item> sin </item>
+ <item> sinh </item>
+ <item> sqrt </item>
+ <item> tan </item>
+ <item> tanh </item>
+ <item> acos </item>
+ <item> asin </item>
+ <item> atan </item>
+ <item> atan2 </item>
+
+ <!-- std.exception -->
+
+ <item> terminate_handler </item>
+ <item> unexpected_handler </item>
+
+ <item> set_terminate </item>
+
+ <item> set_unexpected </item>
+ <item> terminate </item>
+ <item> unexpected </item>
+ <item> uncaught_exception </item>
+
+ <!-- std.iterator -->
+
+ <item> advance </item>
+ <item> distance </item>
+
+ <!-- std.memory -->
+
+ <item> get_temporary_buffer </item>
+ <item> return_temporary_buffer </item>
+ <item> uninitialized_copy </item>
+ <item> uninitialized_fill </item>
+ <item> uninitialized_fill_n </item>
+
+ <!-- std.new -->
+
+ <item> set_new_handler </item>
+
+ <!-- std.numeric -->
+
+ <item> accumulate </item>
+ <item> inner_product </item>
+ <item> partial_sum </item>
+ <item> adjacent_difference </item>
+
+ <!-- std.string -->
+
+ <item> getline </item>
+ <item> swap </item>
+
+ <!-- std.pair -->
+
+ <item> make_pair </item>
+
+ <!-- std.locale -->
+
+ <item> has_facet </item>
+ <item> use_facet </item>
+ <item> isalnum </item>
+ <item> isalpha </item>
+ <item> iscntrl </item>
+ <item> isdigit </item>
+ <item> isgraph </item>
+ <item> islower </item>
+ <item> isprint </item>
+ <item> ispunct </item>
+ <item> isspace </item>
+ <item> isupper </item>
+ <item> isxdigit </item>
+ <item> tolower </item>
+ <item> toupper </item>
+
+</list>
+
+<list name="std.template.classes" >
+
+ <!-- std.complex -->
+
+ <item> complex </item>
+
+ <!-- std_iterator -->
+
+ <item> back_insert_iterator </item>
+ <item> back_inserter </item>
+ <item> front_insert_iterator </item>
+ <item> front_inserter </item>
+ <item> insert_iterator </item>
+ <item> inserter </item>
+ <item> istream_iterator </item>
+ <item> istreambuf_iterator </item>
+ <item> iterator </item>
+ <item> ostream_iterator </item>
+ <item> ostreambuf_iterator </item>
+ <item> reverse_iterator </item>
+
+ <!-- std.memory -->
+
+ <item> allocator </item>
+ <item> raw_storage_iterator </item>
+ <item> auto_ptr </item>
+ <item> auto_ptr_ref </item>
+
+ <!-- std.string -->
+
+ <item> basic_string </item>
+
+ <!-- std.utility -->
+
+ <item> pair </item>
+
+ <!-- std.valarray -->
+
+ <item> gslice_array </item>
+ <item> indirect_array </item>
+ <item> mask_array </item>
+ <item> slice_array </item>
+ <item> valarray </item>
+
+ <!-- std.locale -->
+
+ <item> messages </item>
+ <item> codecvt_byname </item>
+ <item> collate </item>
+ <item> collate_byname </item>
+ <item> ctype </item>
+ <item> ctype_byname </item>
+ <item> messages_byname </item>
+ <item> money_base </item>
+ <item> money_get </item>
+ <item> money_put </item>
+ <item> moneypunct </item>
+ <item> moneypunct_byname </item>
+ <item> num_get </item>
+ <item> num_put </item>
+ <item> numpunct </item>
+ <item> numpunct_byname </item>
+ <item> time_base </item>
+ <item> time_get </item>
+ <item> time_get_byname </item>
+ <item> time_put </item>
+ <item> time_put_byname </item>
+
+ <!-- std.ios -->
+
+ <item> basic_ios </item>
+ <item> fpos </item>
+
+ <!-- std.ios_fwd -->
+
+ <item> istreambuf_iterator </item>
+ <item> ostreambuf_iterator </item>
+ <item> basic_streambuf </item>
+ <item> basic_istream </item>
+ <item> basic_ostream </item>
+ <item> basic_iostream </item>
+ <item> basic_stringbuf </item>
+ <item> basic_istringstream </item>
+ <item> basic_ostringstream </item>
+ <item> basic_stringstream </item>
+ <item> basic_filebuf </item>
+ <item> basic_ifstream </item>
+ <item> basic_ofstream </item>
+ <item> basic_fstream </item>
+
+</list>
+
+
+
+
+<list name="std.classes" >
+
+ <!-- std.iomanip -->
+
+ <item> resetiosflags </item>
+ <item> setiosflags </item>
+ <item> setbase </item>
+
+ <item> setfill </item>
+ <item> setprecision </item>
+ <item> setw </item>
+
+ <!-- std.new -->
+
+ <item> new_handler </item>
+ <item> nothrow_t </item>
+
+ <!-- std.string -->
+
+ <item> string </item>
+ <item> wstring </item>
+
+ <!-- std.valarray -->
+
+ <item> slice </item>
+ <item> gslice </item>
+
+ <!-- std.locale -->
+
+ <item> locale </item>
+ <item> codecvt </item>
+ <item> codecvt_base </item>
+ <item> ctype_base </item>
+ <item> messages_base </item>
+
+ <!-- std.ios -->
+
+ <item> ios_base </item>
+ <item> streamoff </item>
+ <item> streampos </item>
+ <item> streamsize </item>
+ <item> wios </item>
+ <item> wstreampos </item>
+ <item> ios </item>
+
+ <!-- std.ios_fwd -->
+
+ <item> streambuf </item>
+ <item> istream </item>
+ <item> ostream </item>
+ <item> iostream </item>
+ <item> stringbuf </item>
+ <item> istringstream </item>
+ <item> ostringstream </item>
+ <item> stringstream </item>
+ <item> filebuf </item>
+ <item> ifstream </item>
+ <item> ofstream </item>
+ <item> fstream </item>
+ <item> wstreambuf </item>
+ <item> wistream </item>
+ <item> wostream </item>
+ <item> wiostream </item>
+ <item> wstringbuf </item>
+ <item> wistringstream </item>
+ <item> wostringstream </item>
+ <item> wstringstream </item>
+ <item> wfilebuf </item>
+ <item> wifstream </item>
+ <item> wofstream </item>
+ <item> wfstream </item>
+
+</list>
+
+
+<list name="std.exceptions">
+
+ <!-- std.exception -->
+
+ <item> exception </item>
+ <item> bad_exception </item>
+
+ <!-- std.new -->
+
+ <item> bad_alloc </item>
+
+ <!-- std.stdexcept -->
+
+ <item> logic_error </item>
+ <item> domain_error </item>
+ <item> invalid_argument </item>
+ <item> length_error </item>
+ <item> out_of_range </item>
+
+ <item> runtime_error </item>
+ <item> range_error </item>
+ <item> overflow_error </item>
+ <item> underflow_error </item>
+
+ <!-- std.typeinfo -->
+
+ <item> bad_cast </item>
+ <item> bad_typeid </item>
+
+</list>
+
+
+<list name="std.macro" >
+
+ <!-- std.complex -->
+
+ <item> __STD_COMPLEX </item>
+
+</list>
+
+
+
+<list name="std.metaprograming">
+
+ <!-- std.functional -->
+
+ <item> binary_function </item>
+ <item> binary_negate </item>
+ <item> binder1st </item>
+ <item> binder2nd </item>
+ <item> const_mem_fun_t </item>
+ <item> const_mem_fun_ref_t </item>
+ <item> const_mem_fun1_t </item>
+ <item> const_mem_fun1_ref_t </item>
+ <item> divides </item>
+ <item> equal_to </item>
+ <item> greater </item>
+ <item> greater_equal </item>
+ <item> less </item>
+ <item> less_equal </item>
+ <item> logical_and </item>
+ <item> logical_not </item>
+ <item> logical_or </item>
+ <item> mem_fun_t </item>
+ <item> mem_fun_ref_t </item>
+ <item> mem_fun1_t </item>
+ <item> mem_fun1_ref_t </item>
+ <item> minus </item>
+ <item> modulus </item>
+ <item> multiplies </item>
+ <item> negate </item>
+ <item> not_equal_to </item>
+ <item> plus </item>
+ <item> pointer_to_binary_function </item>
+ <item> pointer_to_unary_function </item>
+ <item> unary_function </item>
+ <item> unary_negate </item>
+ <item> bind1st </item>
+ <item> bind2nd </item>
+ <item> mem_fun </item>
+ <item> mem_fun_ref </item>
+ <item> not1 </item>
+ <item> not2 </item>
+ <item> ptr_fun </item>
+
+ <!-- std.limits -->
+
+ <item> numeric_limits </item>
+
+ <!-- std.iterator -->
+
+ <item> iterator_traits </item>
+
+ <!-- std.string -->
+
+ <item> char_traits </item>
+
+ <!-- std.typeinfo -->
+
+ <item> type_info </item>
+
+</list>
+
+<list name="std.object">
+
+ <!-- std.iostream -->
+
+ <item> cin </item>
+ <item> cout </item>
+ <item> cerr </item>
+ <item> clog </item>
+
+ <item> wcin </item>
+ <item> wcout </item>
+ <item> wcerr </item>
+ <item> wclog </item>
+
+ <!-- std.new -->
+
+ <item> nothrow </item>
+
+</list>
+
+
+<list name="std.tags">
+
+ <item> bidirectional_iterator_tag </item>
+ <item> forward_iterator_tag </item>
+ <item> input_iterator_tag </item>
+ <item> output_iterator_tag </item>
+ <item> random_access_iterator_tag </item>
+
+</list>
+
+<list name="std.containers">
+
+ <item> bit_set </item>
+ <item> deque </item>
+ <item> list </item>
+ <item> queue </item>
+ <item> set </item>
+ <item> multiset </item>
+ <item> slist </item>
+ <item> map </item>
+ <item> multimap </item>
+ <item> unordered_map </item>
+ <item> stack </item>
+ <item> vector </item>
+
+</list>
+
+
+
+<list name="std.ios_manipulators">
+
+ <item> boolalpha </item>
+ <item> dec </item>
+ <item> fixed </item>
+ <item> hex </item>
+ <item> internal </item>
+ <item> left </item>
+ <item> noboolalpha </item>
+ <item> noshowbase </item>
+ <item> noshowpoint </item>
+ <item> noshowpos </item>
+ <item> noskipws </item>
+ <item> nounitbuf </item>
+ <item> nouppercase </item>
+ <item> oct </item>
+ <item> right </item>
+ <item> scientific </item>
+ <item> showbase </item>
+ <item> showpoint </item>
+ <item> showpos </item>
+ <item> skipws </item>
+ <item> unitbuf </item>
+ <item> uppercase </item>
+
+</list>
+
+
+<contexts>
+
+ <context name="main" attribute="std.free.function">
+
+ <keyword attribute="std.free.function" context="#stay" String="std.free.function" />
+ <keyword attribute="std.template.classes" context="#stay" String="std.template.classes" />
+ <keyword attribute="std.classes" context="#stay" String="std.classes" />
+ <keyword attribute="std.exceptions" context="#stay" String="std.exceptions" />
+ <keyword attribute="std.macro" context="#stay" String="std.macro" />
+ <keyword attribute="std.metaprogramming" context="#stay" String="std.metaprogramming" />
+ <keyword attribute="std.object" context="#stay" String="std.object" />
+ <keyword attribute="std.tags" context="#stay" String="std.tags" />
+ <keyword attribute="std.containers" context="#stay" String="std.containers" />
+ <keyword attribute="std.ios_manipulators" context="#stay" String="std.ios_manipulators" />
+
+ </context>
+
+</contexts>
+
+<itemDatas>
+
+ <itemData name="std.free.function" defStyleNum="dsFunction"/>
+ <itemData name="std.template.classes" defStyleNum="dsDataType"/>
+ <itemData name="std.classes" defStyleNum="dsDataType"/>
+ <itemData name="std.exceptions" defStyleNum="dsDataType"/>
+ <itemData name="std.macro" defStyleNum="dsOthers"/>
+ <itemData name="std.metaprogramming" defStyleNum="dsFunction"/>
+ <itemData name="std.object" defStyleNum="dsDataType"/>
+ <itemData name="std.tags" defStyleNum="dsOthers"/>
+ <itemData name="std.containers" defStyleNum="dsDataType"/>
+ <itemData name="std.ios_manipulators" defStyleNum="dsFunction"/>
+
+ <!--
+ This is an extract from the official Kate page
+ It is leave here as a reference.
+
+ dsNormal used for normal text.
+ dsKeyword used for keywords.
+ dsDataType used for data types.
+ dsDecVal used for decimal values.
+ dsBaseN used for values with a base other than 10.
+ dsFloat used for float values.
+ dsChar used for a character.
+ dsString used for strings.
+ dsComment used for comments.
+ dsOthers used for 'other' things.
+ dsAlert used for warning messages.
+ dsFunction used for function calls.
+ dsRegionMarker used for region markers.
+ dsError used for error highlighting and wrong syntax.
+
+ -->
+
+</itemDatas>
+
+</highlighting>
+
+<general>
+
+<keywords casesensitive="1" />
+
+</general>
+
+</language>
+
+
+<!--
+
+Aknowelegments
+=================================================
+
+
+
+Version history
+=================================================
+
+[ 0.1.0 ] Initial beta.
+
+Known bugs
+=================================================
+
+-->
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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; URL=../../doc/html/quickbook.html">
+ </head>
+ <body>
+ Automatic redirection failed, click this
+ <a href="../../doc/html/quickbook.html">link</a>
+ <p>Copyright&nbsp;Eric Niebler 2005</p>
+ <p>Distributed under the Boost Software License, Version 1.0. (See accompanying file
+ <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at
+ <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>).
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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)
+-->
+<explicit-failures-markup>
+ <library name="quickbook">
+ <mark-unusable>
+ <toolset name="gcc*-3.*"/>
+ <toolset name="gcc*-4.0*"/>
+ <toolset name="gcc*-4.1*"/>
+ <toolset name="gcc*-4.2*"/>
+ <toolset name="gcc*-4.3*"/>
+ <toolset name="qcc-3.*"/>
+ <toolset name="qcc-4.0.*"/>
+ <toolset name="qcc-4.1.*"/>
+ <toolset name="qcc-4.2.*"/>
+ <toolset name="qcc-4.3.*"/>
+ <toolset name="msvc-7.1"/>
+ <toolset name="msvc-8.0"/>
+ <toolset name="msvc-9.0"/>
+ <note author="Daniel James" date="30 Dec 2017">
+ Unsupported compiler
+ </note>
+ </mark-unusable>
+ <mark-unusable>
+ <toolset name="*~c++98"/>
+ <toolset name="*~gnu98"/>
+ <toolset name="*~gnu++98"/>
+ <note author="Daniel James" date="29 Jan 2018">
+ C++11 mode (or later) required
+ </note>
+ </mark-unusable>
+ </library>
+</explicit-failures-markup>
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
+ : #<define>QUICKBOOK_NO_DATES
+ <define>BOOST_FILESYSTEM_NO_DEPRECATED
+ <toolset>msvc:<cxxflags>/wd4355
+ <toolset>msvc:<cxxflags>/wd4511
+ <toolset>msvc:<cxxflags>/wd4512
+ <toolset>msvc:<cxxflags>/wd4701
+ <toolset>msvc:<cxxflags>/wd4702
+ <toolset>msvc:<cxxflags>/wd4244
+ <toolset>msvc:<cxxflags>/wd4267
+ <toolset>msvc:<cxxflags>/wd4800
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <target-os>windows:<library>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 <functional>
+#include <map>
+#include <numeric>
+#include <set>
+#include <vector>
+#include <boost/algorithm/string/replace.hpp>
+#include <boost/filesystem/convenience.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/range/algorithm/replace.hpp>
+#include <boost/range/distance.hpp>
+#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 << "<anchor id=\"";
+ detail::print_string(anchor_id, tgt.get());
+ 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<std::string>(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 role=\"";
+ detail::print_string(
+ get_attribute_value(state, role), state.phrase.get());
+ state.phrase << "\">" << phrase.get_encoded() << "</phrase>";
+ }
+
+ void footnote_action(quickbook::state& state, value phrase)
+ {
+ write_anchors(state, state.phrase);
+
+ value_consumer values = phrase;
+ state.phrase << "<footnote id=\""
+ << state.document.add_id("f", id_category::numbered)
+ << "\"><para>" << values.consume().get_encoded()
+ << "</para></footnote>";
+ 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 << "<bridgehead renderas=\"sect" << level << "\"";
+ state.out << " id=\"";
+ state.out << state.document.add_id("h", id_category::numbered);
+ state.out << "\">";
+ state.out << "<phrase id=\"" << id << "\"/>";
+ state.out << "<link linkend=\"" << id << "\">";
+ state.out << str;
+ state.out << "</link>";
+ state.out << "</bridgehead>";
+ }
+ else {
+ state.out << "<bridgehead renderas=\"sect" << level << "\"";
+ if (!id.empty()) state.out << " id=\"" << id << "\"";
+ state.out << ">";
+ state.out << str;
+ state.out << "</bridgehead>";
+ }
+ }
+ }
+
+ 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 == '#') ? "<orderedlist>\n" : "<itemizedlist>\n");
+ in_list = true;
+ }
+
+ void state::end_list(char mark)
+ {
+ write_anchors(*this, out);
+ assert(mark == '*' || mark == '#');
+ out << ((mark == '#') ? "\n</orderedlist>" : "\n</itemizedlist>");
+
+ 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 << "<listitem>";
+ write_anchors(*this, phrase);
+ }
+
+ void state::end_list_item()
+ {
+ write_anchors(*this, phrase);
+ paragraph_action para(*this);
+ para();
+ out << "</listitem>";
+ }
+
+ 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 += "<co id=\"" + callout_id1 + "\" ";
+ code += "linkends=\"" + callout_id2 + "\" />";
+
+ 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 += "<calloutlist>";
+ 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 += "<callout arearefs=\"" + callout_id1 + "\" ";
+ block += "id=\"" + callout_id2 + "\">";
+ block += callout_value;
+ block += "</callout>";
+ }
+ block += "</calloutlist>";
+
+ 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 << "<listitem>";
+ state.out << item.get_encoded();
+ state.out << "</listitem>";
+ }
+
+ 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 <programlisting> tag
+ // otherwise PDF output starts code blocks with a blank line:
+ state.phrase << "<programlisting>";
+ syntax_highlight(first_, last_, state, source_mode, block);
+ state.phrase << "</programlisting>\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 << "<code>";
+ syntax_highlight(first_, last_, state, source_mode, block);
+ state.phrase << "</code>";
+ }
+ }
+
+ 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<std::string, value> 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("<svg");
+ b = 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 << "<inlinemediaobject>";
+
+ state.phrase << "<imageobject><imagedata";
+
+ QUICKBOOK_FOR (attribute_map::value_type const& attr, attributes) {
+ state.phrase << " " << attr.first << "=\"";
+ write_plain_text(state.phrase.get(), attr.second);
+ state.phrase << "\"";
+ }
+
+ state.phrase << "></imagedata></imageobject>";
+
+ // 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 << "<textobject><phrase>";
+ write_plain_text(state.phrase.get(), alt_text);
+ state.phrase << "</phrase></textobject>";
+ }
+
+ state.phrase << "</inlinemediaobject>";
+ }
+
+ 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<std::string> 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<string_iterator, string_iterator> 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<value>& args,
+ std::vector<std::string> 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<string_iterator, string_iterator> 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<bool, std::vector<std::string>::const_iterator> get_arguments(
+ std::vector<value> const& args,
+ std::vector<std::string> const& params,
+ template_scope const& scope,
+ string_iterator first,
+ quickbook::state& state)
+ {
+ std::vector<value>::const_iterator arg = args.begin();
+ std::vector<std::string>::const_iterator tpl = params.begin();
+ std::vector<std::string> 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<value> 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<std::string>::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<value> 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<value> 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 << "<variablelist>\n";
+
+ state.out << "<title>";
+ detail::print_string(title, state.out.get());
+ state.out << "</title>\n";
+
+ QUICKBOOK_FOR (value_consumer entry, values) {
+ state.out << "<varlistentry>";
+
+ if (entry.check()) {
+ state.out << "<term>";
+ state.out << entry.consume().get_encoded();
+ state.out << "</term>";
+ }
+
+ if (entry.check()) {
+ state.out << "<listitem>";
+ QUICKBOOK_FOR (value phrase, entry)
+ state.out << phrase.get_encoded();
+ state.out << "</listitem>";
+ }
+
+ state.out << "</varlistentry>\n";
+ }
+
+ state.out << "</variablelist>\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 << "<table frame=\"all\"";
+ if (!table_id.empty()) state.out << " id=\"" << table_id << "\"";
+ state.out << ">\n";
+ state.out << "<title>";
+ if (qbk_version_n < 106u) {
+ detail::print_string(title.get_quickbook(), state.out.get());
+ }
+ else {
+ state.out << title.get_encoded();
+ }
+ state.out << "</title>";
+ }
+ else {
+ state.out << "<informaltable frame=\"all\"";
+ if (!table_id.empty()) state.out << " id=\"" << table_id << "\"";
+ state.out << ">\n";
+ }
+
+ state.out << "<tgroup cols=\"" << span_count << "\">\n";
+
+ if (row_count > 1) {
+ state.out << "<thead>"
+ << "<row>";
+ QUICKBOOK_FOR (value cell, values.consume()) {
+ state.out << "<entry>" << cell.get_encoded() << "</entry>";
+ }
+ state.out << "</row>\n"
+ << "</thead>\n";
+ }
+
+ state.out << "<tbody>\n";
+
+ QUICKBOOK_FOR (value row, values) {
+ state.out << "<row>";
+ QUICKBOOK_FOR (value cell, row) {
+ state.out << "<entry>" << cell.get_encoded() << "</entry>";
+ }
+ state.out << "</row>\n";
+ }
+
+ values.finish();
+
+ state.out << "</tbody>\n"
+ << "</tgroup>\n";
+
+ if (has_title) {
+ state.out << "</table>\n";
+ }
+ else {
+ state.out << "</informaltable>\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<section id=\"" << full_id << "\">\n";
+
+ std::string title = content.get_encoded();
+
+ if (!title.empty()) {
+ state.out << "<title>";
+
+ 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 << "</title>\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 << "</section>";
+ 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<xi:include href=\"";
+ detail::print_string(
+ file_path_to_url(path.abstract_file_path), state.out.get());
+ state.out << "\" />\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<template_symbol> 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<quickbook_path> 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 <string>
+#include <vector>
+#include <boost/spirit/include/classic_parser.hpp>
+#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<quickbook_range>
+ {
+ explicit quickbook_range(unsigned lower_, unsigned upper_)
+ : lower(lower_), upper(upper_)
+ {
+ }
+
+ bool in_range() const;
+
+ template <typename ScannerT>
+ typename cl::parser_result<quickbook_range, ScannerT>::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<quickbook_strict>
+ {
+ explicit quickbook_strict(
+ quickbook::state& state_, bool positive_ = true)
+ : state(state_), positive(positive_)
+ {
+ }
+
+ bool is_strict_checking() const;
+
+ template <typename ScannerT>
+ typename cl::parser_result<quickbook_range, ScannerT>::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<template_symbol>& 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<std::string> 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 "&lt;"... 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<std::string> saved_anchors;
+ value::tag_type tag;
+ };
+
+ // member_action
+ //
+ // Action for calling a member function taking two parse iterators.
+
+ template <typename T> 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 <typename T, typename Arg1> 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 <typename T, typename Value> 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 <typename T, typename Value> 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 <cassert>
+#include <vector>
+#include <boost/algorithm/string/predicate.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/unordered_map.hpp>
+#include <boost/unordered_set.hpp>
+#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<string_view, id_info> ids_type;
+
+ typedef void (*node_parser)(html_gen&, xml_element*);
+ typedef boost::unordered_map<quickbook::string_view, node_parser>
+ 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<quickbook::string_view, docinfo_node_parser>
+ 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<xml_element*> footnotes;
+ boost::unordered_map<string_view, callout_data> callout_numbers;
+ boost::unordered_set<string_view> 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<std::string> copyrights;
+ std::vector<std::string> pubdates;
+ std::vector<std::string> legalnotices;
+ std::vector<std::string> authors;
+ std::vector<std::string> editors;
+ std::vector<std::string> 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<std::string>(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 += "<!DOCTYPE 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 += "<ul>";
+ for (chunk* it = x->children(); it; it = it->next()) {
+ auto link = gen.state.ids.find(it->id_);
+ gen.printer.html += "<li>";
+ if (link != gen.state.ids.end()) {
+ gen.printer.html += "<a href=\"";
+ gen.printer.html += encode_string(get_link_from_path(
+ gen, link->second.path(), page->path_));
+ gen.printer.html += "\">";
+ generate_toc_item_html(gen, it->title_.root());
+ gen.printer.html += "</a>";
+ }
+ else {
+ generate_toc_item_html(gen, it->title_.root());
+ }
+ if (it->children()) {
+ generate_toc_subtree(
+ gen, page, it,
+ it->contents_.root()->name_ == "section" &&
+ section_depth > 0
+ ? section_depth - 1
+ : section_depth);
+ }
+ gen.printer.html += "</li>";
+ }
+ gen.printer.html += "</ul>";
+ }
+
+ 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 += "<i>Untitled</i>";
+ }
+ }
+
+ 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 += "<br/>";
+ gen.printer.html += "<hr/>";
+ for (std::vector<xml_element*>::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 += "<div class=\"authorgroup\">\n";
+ QUICKBOOK_FOR (auto const& author, d.authors) {
+ gen.printer.html += "<h3 class=\"author\">";
+ gen.printer.html += author;
+ gen.printer.html += "</h3>\n";
+ }
+ QUICKBOOK_FOR (auto const& editor, d.editors) {
+ gen.printer.html += "<h3 class=\"editor\">";
+ gen.printer.html += editor;
+ gen.printer.html += "</h3>\n";
+ }
+ QUICKBOOK_FOR (auto const& collab, d.collabs) {
+ gen.printer.html += "<h3 class=\"collab\">";
+ gen.printer.html += collab;
+ gen.printer.html += "</h3>\n";
+ }
+ gen.printer.html += "</div>\n";
+ }
+
+ QUICKBOOK_FOR (auto const& copyright, d.copyrights) {
+ gen.printer.html += "<p class=\"copyright\">";
+ gen.printer.html += copyright;
+ gen.printer.html += "</p>";
+ }
+
+ QUICKBOOK_FOR (auto const& legalnotice, d.legalnotices) {
+ gen.printer.html += "<div class=\"legalnotice\">";
+ gen.printer.html += legalnotice;
+ gen.printer.html += "</div>";
+ }
+ }
+
+ 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<std::pair<xml_element*, xml_element*> >
+ 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<string_view, callout_data>::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<std::string>(data->second.number) +
+ ".png",
+ "(" + boost::lexical_cast<std::string>(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<string_view, callout_data>::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<std::string>(data->second.number) +
+ ".png",
+ "(" +
+ boost::lexical_cast<std::string>(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<std::string>(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<xml_element*> years;
+ std::vector<xml_element*> 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 <string>
+#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 <boost/spirit/include/classic_assign_actor.hpp>
+#include <boost/spirit/include/classic_clear_actor.hpp>
+#include <boost/spirit/include/classic_if.hpp>
+#include <boost/spirit/include/phoenix1_casts.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#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<scanner> 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_scoped_action> 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 <boost/algorithm/string/replace.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/unordered_set.hpp>
+
+namespace quickbook
+{
+ namespace detail
+ {
+ boost::unordered_set<std::string> chunk_types;
+ boost::unordered_set<std::string> 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<std::string>::const_iterator it =
+ chunk_types.begin();
+ it != chunk_types.end(); ++it) {
+ chunkinfo_types.insert(*it + "info");
+ }
+ }
+ } init_chunk;
+
+ struct chunk_builder : tree_builder<chunk>
+ {
+ int count;
+
+ chunk_builder() : count(0) {}
+
+ std::string next_path_name()
+ {
+ ++count;
+ std::string result = "page-";
+ result += boost::lexical_cast<std::string>(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<chunk>
+ {
+ 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> 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 <typename T> T& add(T*);
+
+ private:
+ detail::cleanup_node* first_;
+
+ cleanup& operator=(cleanup const&);
+ cleanup(cleanup const&);
+ };
+
+ namespace detail
+ {
+ template <typename T> void delete_impl(void* ptr)
+ {
+ delete static_cast<T*>(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 <typename T> T& cleanup::add(T* ptr)
+ {
+ detail::cleanup_node n(ptr, &detail::delete_impl<T>);
+ 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..f04882c81
--- /dev/null
+++ b/src/boost/tools/quickbook/src/code_snippet.cpp
@@ -0,0 +1,530 @@
+/*=============================================================================
+ 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 <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/spirit/include/classic_actor.hpp>
+#include <boost/spirit/include/classic_confix.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include "actions.hpp"
+#include "block_tags.hpp"
+#include "files.hpp"
+#include "state.hpp"
+#include "stream.hpp"
+#include "template_stack.hpp"
+#include "values.hpp"
+
+namespace quickbook
+{
+ namespace cl = boost::spirit::classic;
+
+ struct code_snippet_actions
+ {
+ code_snippet_actions(
+ std::vector<template_symbol>& 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<snippet_data> next;
+ };
+
+ void push_snippet_data(std::string const& id, string_iterator pos)
+ {
+ boost::shared_ptr<snippet_data> 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<snippet_data> pop_snippet_data()
+ {
+ boost::shared_ptr<snippet_data> 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_data> snippet_stack;
+ std::vector<template_symbol>& storage;
+ file_ptr source_file;
+ char const* const source_type;
+ int error_count;
+ };
+
+ struct python_code_snippet_grammar
+ : cl::grammar<python_code_snippet_grammar>
+ {
+ typedef code_snippet_actions actions_type;
+
+ python_code_snippet_grammar(actions_type& actions_) : actions(actions_)
+ {
+ }
+
+ template <typename Scanner> 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<Scanner> start_, identifier, code_elements, start_snippet,
+ end_snippet, escaped_comment, pass_thru_comment, ignore;
+
+ cl::rule<Scanner> const& start() const { return start_; }
+ };
+
+ actions_type& actions;
+ };
+
+ struct cpp_code_snippet_grammar : cl::grammar<cpp_code_snippet_grammar>
+ {
+ typedef code_snippet_actions actions_type;
+
+ cpp_code_snippet_grammar(actions_type& actions_) : actions(actions_) {}
+
+ template <typename Scanner> 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<Scanner> start_, identifier, code_elements, start_snippet,
+ end_snippet, escaped_comment, pass_thru_comment, ignore;
+
+ cl::rule<Scanner> const& start() const { return start_; }
+ };
+
+ actions_type& actions;
+ };
+
+ int load_snippets(
+ fs::path const& filename,
+ std::vector<template_symbol>& 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<string_iterator> 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_data> 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<std::string> 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 <boost/assert.hpp>
+
+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 <stack>
+#include <string>
+#include <boost/iostreams/device/back_inserter.hpp>
+#include <boost/iostreams/filtering_stream.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/ref.hpp>
+#include <boost/shared_ptr.hpp>
+
+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<std::string> buffer_ptr;
+ boost::shared_ptr<ostream> 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<string_stream> streams;
+ boost::reference_wrapper<string_stream> main;
+ boost::reference_wrapper<string_stream> top;
+ string_stream default_;
+ };
+
+ template <typename T>
+ 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 <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/operations.hpp>
+#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<glob_list::iterator, bool> 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<std::string> 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 <iosfwd>
+#include <map>
+#include <set>
+#include <boost/filesystem/path.hpp>
+
+namespace quickbook
+{
+ namespace fs = boost::filesystem;
+
+ struct dependency_tracker
+ {
+ private:
+ typedef std::map<fs::path, bool> dependency_list;
+ typedef std::map<fs::path, std::set<fs::path> > 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..d3c9ac4bc
--- /dev/null
+++ b/src/boost/tools/quickbook/src/doc_info_actions.cpp
@@ -0,0 +1,608 @@
+/*=============================================================================
+ 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 <sstream>
+#include <boost/algorithm/string/join.hpp>
+#include <boost/bind.hpp>
+#include <boost/filesystem/operations.hpp>
+#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"
+
+namespace quickbook
+{
+ struct doc_info_values
+ {
+ std::string doc_type;
+ value doc_title;
+ std::vector<value> escaped_attributes;
+ value qbk_version, compatibility_mode;
+ value id, dirname, last_revision, purpose;
+ std::vector<value> categories;
+ value lang, version;
+ std::vector<value> authors;
+ std::vector<value> copyrights;
+ value license;
+ std::vector<value> 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<std::string>* 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<std::string>* 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<value> consume_multiple_values(
+ value_consumer& c, value::tag_type tag)
+ {
+ std::vector<value> 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<std::string> 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<std::string> 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ << "<!DOCTYPE " << info.doc_type
+ << " PUBLIC \"-//Boost//DTD BoostBook XML V1.0//EN\"\n"
+ << " "
+ "\"http://www.boost.org/tools/boostbook/dtd/"
+ "boostbook.dtd\">\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 << " <authorgroup>\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 << " <author>\n"
+ << " <firstname>" << doc_info_output(first, 106)
+ << "</firstname>\n"
+ << " <surname>" << doc_info_output(surname, 106)
+ << "</surname>\n"
+ << " </author>\n";
+ }
+ }
+ tmp << " </authorgroup>\n";
+ }
+
+ QUICKBOOK_FOR (value_consumer copyright, info.copyrights) {
+ while (copyright.check()) {
+ tmp << "\n"
+ << " <copyright>\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>" << year_start << "</year>\n";
+ }
+
+ tmp << " <holder>"
+ << doc_info_output(
+ copyright.consume(doc_info_tags::copyright_name),
+ 106)
+ << "</holder>\n"
+ << " </copyright>\n"
+ << "\n";
+ }
+ }
+
+ if (!info.license.empty()) {
+ tmp << " <legalnotice id=\""
+ << state.document.add_id("legal", id_category::generated)
+ << "\">\n"
+ << " <para>\n"
+ << " " << doc_info_output(info.license, 103) << "\n"
+ << " </para>\n"
+ << " </legalnotice>\n"
+ << "\n";
+ }
+
+ if (!info.purpose.empty()) {
+ tmp << " <" << info.doc_type << "purpose>\n"
+ << " " << doc_info_output(info.purpose, 103) << " </"
+ << info.doc_type << "purpose>\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) << "\"></"
+ << info.doc_type << "category>\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 << " <biblioid class=\"" << class_.get_quickbook() << "\">"
+ << doc_info_output(value_, 106) << "</biblioid>"
+ << "\n";
+ biblioid.finish();
+ }
+
+ QUICKBOOK_FOR (value escaped, info.escaped_attributes) {
+ tmp << "<!--quickbook-escape-prefix-->" << escaped.get_quickbook()
+ << "<!--quickbook-escape-postfix-->";
+ }
+
+ 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 << " </" << info.doc_type << "info>\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 << "</section>";
+ state.document.end_section();
+ }
+ }
+
+ state.document.end_file();
+ if (!doc_type.empty()) state.out << "\n</" << doc_type << ">\n\n";
+ }
+
+ static void write_document_title(
+ collector& out, value const& title, value const& version)
+ {
+ if (!title.empty()) {
+ out << " <title>" << doc_info_output(title, 106);
+ if (!version.empty()) {
+ out << ' ' << doc_info_output(version, 106);
+ }
+ out << "</title>\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 <map>
+#include <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_loops.hpp>
+#include <boost/spirit/include/classic_numerics.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
+#include <boost/spirit/include/phoenix1_operators.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#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<scanner>* r)
+ : tag(t), rule(r)
+ {
+ }
+
+ value::tag_type tag;
+ cl::rule<scanner>* 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<scanner> 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<int, 10, 4, 4> doc_copyright_year;
+ cl::symbols<> doc_types;
+ cl::symbols<value::tag_type> doc_info_attributes;
+ cl::symbols<value::tag_type> doc_attributes;
+ std::map<value::tag_type, cl::rule<scanner>*> attribute_rules;
+ value::tag_type attribute_tag;
+ cl::rule<scanner> 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<int, 10, 1, 2> 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_scoped_action> to_value(state);
+ member_action_value<quickbook::state, source_mode_type>
+ change_source_mode(state, &state::change_source_mode);
+ member_action_fixed_value<quickbook::state, source_mode_type>
+ 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 <cctype>
+#include <boost/lexical_cast.hpp>
+#include <boost/make_shared.hpp>
+#include <boost/range/algorithm/count.hpp>
+#include "document_state_impl.hpp"
+#include "utils.hpp"
+
+namespace quickbook
+{
+ struct file_info
+ {
+ boost::shared_ptr<file_info> const parent;
+ boost::shared_ptr<doc_info> 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<file_info> 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<file_info> const& parent_,
+ boost::shared_ptr<doc_info> 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<section_info> 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<section_info> 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<section_info> 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<std::string> 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<std::string>(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<unsigned>(
+ std::string(value.begin() + 1, value.end()));
+
+ return &placeholders.at(index);
+ }
+
+ id_placeholder const* document_state_impl::get_id_placeholder(
+ boost::shared_ptr<section_info> 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<file_info> parent = current_file;
+ assert(parent || document_root);
+
+ boost::shared_ptr<doc_info> document =
+ document_root ? boost::make_shared<doc_info>() : 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<file_info>(
+ 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<section_info> 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<file_info>(
+ 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<section_info> 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<section_info> 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<section_info>(
+ 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 <string>
+#include <boost/scoped_ptr.hpp>
+#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<document_state_impl> 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 <deque>
+#include <string>
+#include <vector>
+#include <boost/shared_ptr.hpp>
+#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<file_info> current_file;
+ std::deque<id_placeholder> 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<section_info> 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<section_info> 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<std::string> const* = 0);
+ std::vector<std::string> 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<std::string> 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 <fstream>
+#include <iterator>
+#include <vector>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/range/algorithm/transform.hpp>
+#include <boost/range/algorithm/upper_bound.hpp>
+#include <boost/unordered_map.hpp>
+#include "for.hpp"
+
+namespace quickbook
+{
+ namespace
+ {
+ boost::unordered_map<fs::path, file_ptr> 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 <typename InputIterator, typename OutputIterator>
+ 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 <typename InputIterator, typename OutputIterator>
+ 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 <typename InputIterator, typename OutputIterator>
+ 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<fs::path, file_ptr>::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<char>(in), std::istream_iterator<char>(),
+ 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_file_section> 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<mapped_file_section>::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<mapped_file_section>::const_iterator find_section(
+ string_iterator pos) const
+ {
+ std::vector<mapped_file_section>::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_file> mapped_files;
+ }
+
+ struct mapped_file_builder_data
+ {
+ mapped_file_builder_data() { reset(); }
+ void reset() { new_file.reset(); }
+
+ boost::intrusive_ptr<mapped_file> 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<mapped_file_section>::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 <cassert>
+#include <iosfwd>
+#include <stdexcept>
+#include <string>
+#include <boost/filesystem/path.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include "string_view.hpp"
+
+namespace quickbook
+{
+
+ namespace fs = boost::filesystem;
+
+ struct file;
+ typedef boost::intrusive_ptr<file> 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 <boost/config.hpp>
+
+#if !defined(BOOST_NO_CXX11_RANGE_BASED_FOR)
+#define QUICKBOOK_FOR(x, y) for (x : y)
+#else
+#include <boost/foreach.hpp>
+#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 <boost/intrusive_ptr.hpp>
+
+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> 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 <cassert>
+
+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 <stdexcept>
+#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 <boost/spirit/include/classic_core.hpp>
+#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 <typename Scanner>
+ struct Scanner_must_be_the_quickbook_scanner_typedef;
+ template <> struct Scanner_must_be_the_quickbook_scanner_typedef<scanner>
+ {
+ };
+
+ struct grammar : public cl::grammar<grammar>
+ {
+ grammar(cl::rule<scanner> const& start_rule_, char const* /* name */)
+ : start_rule(start_rule_)
+ {
+ }
+
+ template <typename Scanner>
+ struct definition
+ : Scanner_must_be_the_quickbook_scanner_typedef<Scanner>
+ {
+ definition(grammar const& self) : start_rule(self.start_rule) {}
+ cl::rule<scanner> const& start() const { return start_rule; }
+ cl::rule<scanner> const& start_rule;
+ };
+
+ cl::rule<scanner> const& start_rule;
+ };
+
+ struct quickbook_grammar
+ {
+ public:
+ struct impl;
+
+ private:
+ boost::scoped_ptr<impl> 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 <boost/spirit/include/classic_symbols.hpp>
+#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<scanner>* 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<scanner>* rule;
+ value::tag_type tag;
+ unsigned int qbk_version;
+ };
+
+ struct quickbook_grammar::impl
+ {
+ quickbook::state& state;
+ cleanup cleanup_;
+
+ // Main Grammar
+ cl::rule<scanner> block_start;
+ cl::rule<scanner> phrase_start;
+ cl::rule<scanner> nested_phrase;
+ cl::rule<scanner> inline_phrase;
+ cl::rule<scanner> paragraph_phrase;
+ cl::rule<scanner> extended_phrase;
+ cl::rule<scanner> table_title_phrase;
+ cl::rule<scanner> inside_preformatted;
+ cl::rule<scanner> inside_paragraph;
+ cl::rule<scanner> command_line;
+ cl::rule<scanner> attribute_template_body;
+ cl::rule<scanner> attribute_value_1_7;
+ cl::rule<scanner> escape;
+ cl::rule<scanner> raw_escape;
+ cl::rule<scanner> skip_entity;
+
+ // Miscellaneous stuff
+ cl::rule<scanner> hard_space; // Either non-empty space, or
+ // empty and not followed by
+ // alphanumeric/_. Use to match the
+ // the end of an itendifier.
+ cl::rule<scanner> space; // Space/tab/newline/comment (possibly empty)
+ cl::rule<scanner> blank; // Space/tab/comment (possibly empty)
+ cl::rule<scanner> eol; // blank >> eol
+ cl::rule<scanner> phrase_end; // End of phrase text, context sensitive
+ cl::rule<scanner> comment;
+ cl::rule<scanner> line_comment;
+ cl::rule<scanner> macro_identifier;
+
+ // Element Symbols
+ cl::symbols<element_info> elements;
+
+ // Source mode
+ cl::symbols<source_mode_type> source_modes;
+
+ // Doc Info
+ cl::rule<scanner> 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 += "</";
+ printer.html.append(name.begin(), name.end());
+ 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 <string>
+#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 <cctype>
+#include <boost/lexical_cast.hpp>
+#include <boost/make_shared.hpp>
+#include <boost/range/algorithm/sort.hpp>
+#include <boost/unordered_map.hpp>
+#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<id_placeholder const*> 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<std::string>& generated_ids);
+
+ std::vector<std::string> generate_ids(
+ document_state_impl const& state, quickbook::string_view xml)
+ {
+ std::vector<std::string> 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<id_placeholder const*>::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<unsigned>& order;
+
+ placeholder_compare(std::vector<unsigned>& 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<unsigned>& order;
+ unsigned count;
+
+ get_placeholder_order_callback(
+ document_state_impl const& state_, std::vector<unsigned>& 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<unsigned> 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<std::string, id_placeholder const*>
+ chosen_id_map;
+ chosen_id_map chosen_ids;
+ std::vector<std::string>& generated_ids;
+
+ explicit generate_id_block_type(
+ std::vector<std::string>& 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<std::string>& 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<std::string> 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<std::string>(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<std::string> const* ids;
+ string_iterator source_pos;
+ std::string result;
+
+ replace_ids_callback(
+ document_state_impl const& state_,
+ std::vector<std::string> 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<std::string> 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 <boost/range/algorithm/find.hpp>
+#include <boost/range/algorithm/sort.hpp>
+#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, "<!--quickbook-escape-postfix-->");
+ 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 += "<link linkend=\"";
+ result.append(linkend.begin(), linkend.end());
+ result += "\">";
+ result.append(source.begin(), source.end());
+ result += "</link>";
+ }
+ 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 <cassert>
+#include <boost/filesystem.hpp>
+#include <boost/range/algorithm/replace.hpp>
+#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<quickbook_path>& 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<quickbook_path> include_search(
+ path_parameter const& parameter,
+ quickbook::state& state,
+ string_iterator pos)
+ {
+ std::set<quickbook_path> 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 <set>
+#include <string>
+#include <boost/filesystem/path.hpp>
+#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<quickbook_path> 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 <iterator>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/operators.hpp>
+#include <boost/range/iterator_range.hpp>
+#include "string_view.hpp"
+
+namespace quickbook
+{
+ template <typename Iterator>
+ struct lookback_iterator
+ : boost::forward_iterator_helper<
+ lookback_iterator<Iterator>,
+ typename boost::iterator_value<Iterator>::type,
+ typename boost::iterator_difference<Iterator>::type,
+ typename boost::iterator_pointer<Iterator>::type,
+ typename boost::iterator_reference<Iterator>::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<Iterator>::type operator*() const
+ {
+ return *base_;
+ }
+
+ Iterator base() const { return base_; }
+
+ typedef boost::iterator_range<std::reverse_iterator<Iterator> >
+ lookback_range;
+
+ lookback_range lookback() const
+ {
+ return lookback_range(base_, original_);
+ }
+
+ private:
+ Iterator original_;
+ Iterator base_;
+ };
+
+ typedef lookback_iterator<string_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 <boost/spirit/include/classic_attribute.hpp>
+#include <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_if.hpp>
+#include <boost/spirit/include/classic_lazy.hpp>
+#include <boost/spirit/include/classic_loops.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#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<scanner> 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<block_context_closure, element_info::context>
+ {
+ // Mask used to determine whether or not an element is a block
+ // element.
+ member1 is_block_mask;
+ };
+
+ cl::rule<scanner> simple_markup, simple_markup_end;
+
+ cl::rule<scanner> paragraph;
+ cl::rule<scanner> list;
+ cl::rule<scanner, block_context_closure::context_t>
+ syntactic_block_item;
+ cl::rule<scanner> common;
+ cl::rule<scanner> element;
+
+ // state
+ std::stack<list_stack_item> 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 <typename ResultT, typename ScannerT>
+ 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 <typename T, typename M>
+ 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 <typename T, typename M>
+ struct set_scoped_value : scoped_parser<set_scoped_value_impl<T, M> >
+ {
+ typedef set_scoped_value_impl<T, M> impl;
+
+ set_scoped_value(T& l, typename impl::member_ptr ptr)
+ : scoped_parser<impl>(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_scoped_action> to_value(state);
+ scoped_parser<scoped_paragraph> scope_paragraph(state);
+
+ quickbook_strict strict_mode(state);
+
+ // Local Actions
+ scoped_parser<process_element_impl> process_element(local);
+ in_list_impl in_list(local);
+
+ set_scoped_value<main_grammar_local, bool> scoped_no_eols(
+ local, &main_grammar_local::no_eols);
+ set_scoped_value<main_grammar_local, element_info::context>
+ scoped_context(local, &main_grammar_local::context);
+ set_scoped_value<main_grammar_local, bool> scoped_still_in_block(
+ local, &main_grammar_local::still_in_block);
+
+ member_action<main_grammar_local> check_indentation(
+ local, &main_grammar_local::check_indentation_impl);
+ member_action<main_grammar_local> check_code_block(
+ local, &main_grammar_local::check_code_block_impl);
+ member_action<main_grammar_local> start_blocks(
+ local, &main_grammar_local::start_blocks_impl);
+ member_action<main_grammar_local> start_nested_blocks(
+ local, &main_grammar_local::start_nested_blocks_impl);
+ member_action<main_grammar_local> 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_<int>(local.syntactic_block_item.is_block_mask) &
+ ph::static_cast_<int>(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 <typename Iterator> 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 <map>
+#include <ostream>
+#include "block_tags.hpp"
+#include "for.hpp"
+#include "phrase_tags.hpp"
+#include "quickbook.hpp"
+
+namespace quickbook
+{
+ namespace detail
+ {
+ std::map<value::tag_type, markup> markups;
+
+ void initialise_markups()
+ {
+ markup init_markups[] = {
+ {block_tags::paragraph, "<para>\n", "</para>\n"},
+ {block_tags::paragraph_in_list, "<simpara>\n", "</simpara>\n"},
+ {block_tags::blurb, "<sidebar role=\"blurb\">\n",
+ "</sidebar>\n"},
+ {block_tags::blockquote, "<blockquote>", "</blockquote>"},
+ {block_tags::preformatted, "<programlisting>",
+ "</programlisting>"},
+ {block_tags::warning, "<warning>", "</warning>"},
+ {block_tags::caution, "<caution>", "</caution>"},
+ {block_tags::important, "<important>", "</important>"},
+ {block_tags::note, "<note>", "</note>"},
+ {block_tags::tip, "<tip>", "</tip>"},
+ {block_tags::block, "", ""},
+ {block_tags::ordered_list, "<orderedlist>", "</orderedlist>"},
+ {block_tags::itemized_list, "<itemizedlist>",
+ "</itemizedlist>"},
+ {block_tags::hr, "<para/>", 0},
+ {phrase_tags::url, "<ulink url=\"", "</ulink>"},
+ {phrase_tags::link, "<link linkend=\"", "</link>"},
+ {phrase_tags::funcref, "<functionname alt=\"",
+ "</functionname>"},
+ {phrase_tags::classref, "<classname alt=\"", "</classname>"},
+ {phrase_tags::memberref, "<methodname alt=\"", "</methodname>"},
+ {phrase_tags::enumref, "<enumname alt=\"", "</enumname>"},
+ {phrase_tags::macroref, "<macroname alt=\"", "</macroname>"},
+ {phrase_tags::headerref, "<headername alt=\"", "</headername>"},
+ {phrase_tags::conceptref, "<conceptname alt=\"",
+ "</conceptname>"},
+ {phrase_tags::globalref, "<globalname alt=\"", "</globalname>"},
+ {phrase_tags::bold, "<emphasis role=\"bold\">", "</emphasis>"},
+ {phrase_tags::italic, "<emphasis>", "</emphasis>"},
+ {phrase_tags::underline, "<emphasis role=\"underline\">",
+ "</emphasis>"},
+ {phrase_tags::teletype, "<literal>", "</literal>"},
+ {phrase_tags::strikethrough,
+ "<emphasis role=\"strikethrough\">", "</emphasis>"},
+ {phrase_tags::quote, "<quote>", "</quote>"},
+ {phrase_tags::replaceable, "<replaceable>", "</replaceable>"},
+ {phrase_tags::escape, "<!--quickbook-escape-prefix-->",
+ "<!--quickbook-escape-postfix-->"},
+ {phrase_tags::break_mark, "<sbr/>\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 <iosfwd>
+#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 <iostream>
+#include <boost/program_options.hpp>
+#include "utils.hpp"
+
+#if QUICKBOOK_WIDE_PATHS || QUICKBOOK_WIDE_STREAMS
+#include <windows.h>
+#include <boost/scoped_array.hpp>
+#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<char> 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<wchar_t> 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 <stdexcept>
+#include <string>
+#include <boost/config.hpp>
+#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 <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_nil.hpp>
+#include <boost/spirit/include/phoenix1_binders.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#include <boost/spirit/include/phoenix1_tuples.hpp>
+#include "fwd.hpp"
+#include "iterator.hpp"
+
+namespace quickbook
+{
+ namespace cl = boost::spirit::classic;
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // scoped_parser<Impl>
+ //
+ // Impl is a struct with the methods:
+ //
+ // void start();
+ // void success(parse_iterator, parse_iterator);
+ // void failure();
+ // void cleanup();
+ //
+ ///////////////////////////////////////////////////////////////////////////
+
+ template <typename Impl, typename Arguments, typename ParserT>
+ struct scoped_parser_impl
+ : public cl::unary<
+ ParserT,
+ cl::parser<scoped_parser_impl<Impl, Arguments, ParserT> > >
+ {
+ typedef scoped_parser_impl<Impl, Arguments, ParserT> self_t;
+ typedef cl::unary<
+ ParserT,
+ cl::parser<scoped_parser_impl<Impl, Arguments, ParserT> > >
+ base_t;
+
+ template <typename ScannerT> 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 <typename Arg1> bool start(phoenix::tuple<Arg1> const& x)
+ {
+ in_progress_ =
+ phoenix::bind(&Impl::start)(phoenix::var(impl_), x[t0()])();
+ return in_progress_;
+ }
+
+ template <typename Arg1, typename Arg2>
+ bool start(phoenix::tuple<Arg1, Arg2> 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 ScannerT>
+ typename result<ScannerT>::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<ParserT, ScannerT>::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 <typename Impl, typename Arguments> struct scoped_parser_gen
+ {
+ explicit scoped_parser_gen(Impl impl, Arguments const& arguments)
+ : impl_(impl), arguments_(arguments)
+ {
+ }
+
+ template <typename ParserT>
+ scoped_parser_impl<
+ Impl,
+ Arguments,
+ typename cl::as_parser<ParserT>::type>
+ operator[](ParserT const& p) const
+ {
+ typedef cl::as_parser<ParserT> as_parser_t;
+ typedef typename as_parser_t::type parser_t;
+
+ return scoped_parser_impl<Impl, Arguments, parser_t>(
+ impl_, arguments_, p);
+ }
+
+ Impl impl_;
+ Arguments arguments_;
+ };
+
+ template <typename Impl> struct scoped_parser
+ {
+ scoped_parser(Impl const& impl) : impl_(impl) {}
+
+ scoped_parser_gen<Impl, phoenix::tuple<> > operator()() const
+ {
+ typedef phoenix::tuple<> tuple;
+ return scoped_parser_gen<Impl, tuple>(impl_, tuple());
+ }
+
+ template <typename Arg1>
+ scoped_parser_gen<Impl, phoenix::tuple<Arg1> > operator()(Arg1 x1) const
+ {
+ typedef phoenix::tuple<Arg1> tuple;
+ return scoped_parser_gen<Impl, tuple>(impl_, tuple(x1));
+ }
+
+ template <typename Arg1, typename Arg2>
+ scoped_parser_gen<Impl, phoenix::tuple<Arg1, Arg2> > operator()(
+ Arg1 x1, Arg2 x2) const
+ {
+ typedef phoenix::tuple<Arg1, Arg2> tuple;
+ return scoped_parser_gen<Impl, tuple>(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 <typename ParserT>
+ struct lookback_parser
+ : public cl::unary<ParserT, cl::parser<lookback_parser<ParserT> > >
+ {
+ typedef lookback_parser<ParserT> self_t;
+ typedef cl::unary<ParserT, cl::parser<lookback_parser<ParserT> > >
+ base_t;
+
+ template <typename ScannerT> struct result
+ {
+ typedef typename cl::parser_result<ParserT, ScannerT>::type type;
+ };
+
+ lookback_parser(ParserT const& p) : base_t(p) {}
+
+ template <typename ScannerT>
+ typename result<ScannerT>::type parse(ScannerT const& scan) const
+ {
+ typedef typename ScannerT::iterator_t::lookback_range::iterator
+ iterator_t;
+ typedef cl::scanner<iterator_t, typename ScannerT::policies_t>
+ 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 <typename ParserT>
+ lookback_parser<ParserT> operator[](ParserT const& p) const
+ {
+ return lookback_parser<ParserT>(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<u8_codepoint_parser>
+ {
+ typedef u8_codepoint_parser self_t;
+
+ template <typename Scanner> struct result
+ {
+ typedef cl::match<> type;
+ };
+
+ template <typename Scanner>
+ typename result<Scanner>::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 <cassert>
+#include <boost/filesystem/operations.hpp>
+#include <boost/range/algorithm/replace.hpp>
+#include "for.hpp"
+#include "glob.hpp"
+#include "include_paths.hpp"
+#include "state.hpp"
+#include "utils.hpp"
+
+#if QUICKBOOK_CYGWIN_PATHS
+#include <sys/cygwin.h>
+#include <boost/scoped_array.hpp>
+#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<fs::path> remove_dots_from_path(fs::path const& path)
+ {
+ assert(!path.has_root_directory() && !path.has_root_name());
+
+ std::vector<fs::path> 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<fs::path> base_parts = remove_dots_from_path(
+ absolute_base.relative_path()),
+ path_parts = remove_dots_from_path(
+ absolute_path.relative_path());
+
+ std::vector<fs::path>::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<char> 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<wchar_t*>(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<char> 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 <boost/filesystem/path.hpp>
+#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 <boost/spirit/include/classic_assign_actor.hpp>
+#include <boost/spirit/include/classic_clear_actor.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_if.hpp>
+#include <boost/spirit/include/phoenix1_casts.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#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<scanner> 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<cond_phrase_push> scoped_cond_phrase(state);
+ scoped_parser<to_value_scoped_action> 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..c40c5e24f
--- /dev/null
+++ b/src/boost/tools/quickbook/src/post_process.cpp
@@ -0,0 +1,452 @@
+/*=============================================================================
+ 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 <cctype>
+#include <set>
+#include <stack>
+#include <boost/bind.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/phoenix1_operators.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+
+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 &quot; 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<unsigned char>(ch))) {
+ // we can break spaces if they are not inside strings
+ if (!std::isspace(static_cast<unsigned char>(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<unsigned char>(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<unsigned char>(*(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<std::string> block_tags;
+ std::stack<std::string> 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_grammar(tidy_compiler& state_, int indent_, bool is_html_)
+ : state(state_), indent(indent_), is_html(is_html_)
+ {
+ }
+
+ template <typename Scanner> 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 - "</pre>")
+ >> "</pre"
+ >> cl::lexeme_d[">" >> *cl::space_p]
+ | cl::eps_p(!ph::var(self.is_html))
+ >> "<programlisting>"
+ >> *(cl::anychar_p - "</programlisting>")
+ >> "</programlisting"
+ >> 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("<!--quickbook-escape-prefix-->") >>
+ (*(cl::anychar_p - cl::str_p("<!--quickbook-escape-postfix-->")))
+ [
+ boost::bind(&tidy_grammar::do_escape, &self, _1, _2)
+ ]
+ >> cl::lexeme_d
+ [
+ cl::str_p("<!--quickbook-escape-postfix-->") >>
+ (*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::anychar_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<Scanner> const& start() { return tidy; }
+
+ cl::rule<Scanner> 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<iter_type> 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 <stdexcept>
+#include <string>
+
+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 <boost/algorithm/string/classification.hpp>
+#include <boost/algorithm/string/split.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/path.hpp>
+#include <boost/program_options.hpp>
+#include <boost/range/algorithm/replace.hpp>
+#include <boost/range/algorithm/transform.hpp>
+#include <boost/ref.hpp>
+#include <boost/version.hpp>
+#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 <iterator>
+#include <stdexcept>
+#include <vector>
+
+#if defined(_WIN32)
+#include <windows.h>
+#include <shellapi.h>
+#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<fs::path> include_path;
+ std::vector<std::string> 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<parse_iterator> 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<parse_iterator> 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<fs::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<int>(), "indent spaces")
+ ("linewidth", PO_VALUE<int>(), "line width")
+ ("input-file", PO_VALUE<command_line_string>(), "input file")
+ ("output-format", PO_VALUE<command_line_string>(), "boostbook, html, onehtml")
+ ("output-file", PO_VALUE<command_line_string>(), "output file (for boostbook or onehtml)")
+ ("output-dir", PO_VALUE<command_line_string>(), "output directory (for html)")
+ ("no-output", "don't write out the result")
+ ("output-deps", PO_VALUE<command_line_string>(), "output dependency file")
+ ("ms-errors", "use Microsoft Visual Studio style error & warn message format")
+ ("include-path,I", PO_VALUE< std::vector<command_line_string> >(), "include path")
+ ("define,D", PO_VALUE< std::vector<command_line_string> >(), "define macro")
+ ("image-location", PO_VALUE<command_line_string>(), "image location")
+ ;
+
+ html_desc.add_options()
+ ("boost-root-path", PO_VALUE<command_line_string>(), "boost root (file path or absolute URL)")
+ ("css-path", PO_VALUE<command_line_string>(), "css file (file path or absolute URL)")
+ ("graphics-path", PO_VALUE<command_line_string>(), "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<command_line_string>(),
+ "Generate xincludes as if generating for this target "
+ "directory.")
+ ("output-deps-format", PO_VALUE<command_line_string>(),
+ "Comma separated list of formatting options for output-deps, "
+ "options are: escaped, checked")
+ ("output-checked-locations", PO_VALUE<command_line_string>(),
+ "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<int>();
+
+ if (vm.count("linewidth"))
+ options.linewidth = vm["linewidth"].as<int>();
+
+ if (vm.count("output-format")) {
+ output_specified = true;
+ std::string format = quickbook::detail::command_line_to_utf8(
+ vm["output-format"].as<command_line_string>());
+ 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 = &lt;
+ 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::vector<command_line_string> >(),
+ 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::vector<command_line_string> >(),
+ 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<command_line_string>());
+
+ 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<command_line_string>());
+ }
+
+ if (vm.count("output-deps-format")) {
+ std::string format_flags =
+ quickbook::detail::command_line_to_utf8(
+ vm["output-deps-format"].as<command_line_string>());
+
+ std::vector<std::string> 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<command_line_string>());
+ }
+
+ if (vm.count("boost-root-path")) {
+ // TODO: Check that it's a directory?
+ options.html_ops.boost_root_path =
+ vm["boost-root-path"].as<command_line_string>();
+ }
+ // 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<command_line_string>();
+ }
+ 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<command_line_string>();
+ }
+ 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<command_line_string>());
+
+ 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<command_line_string>());
+
+ 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<command_line_string>());
+
+ // 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<command_line_string>());
+ }
+ 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 <string>
+#include <time.h>
+#include <vector>
+#include <boost/filesystem/path.hpp>
+#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<fs::path> include_path;
+ extern std::vector<std::string> 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 <cassert>
+
+namespace quickbook
+{
+
+ struct scoped_action_base
+ {
+ bool start() { return true; }
+ template <typename Iterator> void success(Iterator, Iterator) {}
+ void failure() {}
+ void cleanup() {}
+
+ template <typename ResultT, typename ScannerT>
+ 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 <typename Iterator>
+ 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 <typename Iterator>
+ 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 <typename Iterator>
+ void read_some_of(Iterator& it, Iterator end, char const* text)
+ {
+ while (it != end && find_char(text, *it))
+ ++it;
+ }
+
+ template <typename Iterator>
+ void read_to_one_of(Iterator& it, Iterator end, char const* text)
+ {
+ while (it != end && !find_char(text, *it))
+ ++it;
+ }
+
+ template <typename Iterator>
+ 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(&current_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<quickbook_grammar> 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 <map>
+#include <boost/scoped_ptr.hpp>
+#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<quickbook_grammar> grammar_;
+
+ public:
+ ///////////////////////////////////////////////////////////////////////////
+ // State
+ ///////////////////////////////////////////////////////////////////////////
+
+ typedef std::vector<std::string> 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<source_mode_info> 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<bool> 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 <fcntl.h>
+#include <io.h>
+#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 <iostream>
+#include <boost/filesystem/path.hpp>
+#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 <boost/functional/hash/hash_fwd.hpp>
+#include <boost/utility/string_view.hpp>
+
+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 <boost/intrusive_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/spirit/home/classic/symbols.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+namespace quickbook
+{
+
+ ///////////////////////////////////////////////////////////////////////////////
+ //
+ // tst class
+ //
+ // This it the Ternary Search Tree from
+ // <boost/spirit/home/classic/symbols/impl/tst.ipp> 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 <typename T, typename CharT> 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<tst_node> left;
+ boost::intrusive_ptr<tst_node> middle;
+ boost::intrusive_ptr<tst_node> right;
+ boost::scoped_ptr<T> data;
+ CharT value;
+
+ private:
+ tst_node& operator=(tst_node const&);
+ };
+
+ template <typename T, typename CharT>
+ void intrusive_ptr_add_ref(tst_node<T, CharT>* ptr)
+ {
+ ++ptr->reference_count;
+ }
+
+ template <typename T, typename CharT>
+ void intrusive_ptr_release(tst_node<T, CharT>* ptr)
+ {
+ if (--ptr->reference_count == 0) delete ptr;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename T, typename CharT> class tst
+ {
+ typedef tst_node<T, CharT> node_t;
+ typedef boost::intrusive_ptr<node_t> 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 <typename IteratorT>
+ 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<T> new_data(new T(data));
+ boost::swap((*np)->data, new_data);
+ return (*np)->data.get();
+ }
+
+ template <typename ScannerT>
+ 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<std::string, char, quickbook::tst<std::string, char> >
+ 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 <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_confix.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_loops.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
+#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 << "<phrase role=\"" << name << "\">";
+ while (first != last)
+ detail::print_char(*first++, state.phrase.get());
+ state.phrase << "</phrase>";
+ }
+
+ void syntax_highlight_actions::span_start(
+ parse_iterator first, parse_iterator last, char const* name)
+ {
+ state.phrase << "<phrase role=\"" << name << "\">";
+ 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 << "</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 << "<phrase role=\"error\">";
+ while (first != last)
+ detail::print_char(*first++, state.phrase.get());
+ state.phrase << "</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<cpp_highlight>
+ {
+ explicit cpp_highlight(syntax_highlight_actions& actions_)
+ : actions(actions_)
+ {
+ }
+
+ template <typename Scanner> struct definition
+ {
+ definition(cpp_highlight const& self)
+ : g(self.actions.state.grammar())
+ {
+ // clang-format off
+
+ member_action1<syntax_highlight_actions, char const*>
+ span(self.actions, &syntax_highlight_actions::span),
+ span_start(self.actions, &syntax_highlight_actions::span_start);
+ member_action<syntax_highlight_actions>
+ 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<syntax_highlight_actions, std::string const&>
+ 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<Scanner> 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<Scanner> 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<python_highlight>
+ {
+ explicit python_highlight(syntax_highlight_actions& actions_)
+ : actions(actions_)
+ {
+ }
+
+ template <typename Scanner> struct definition
+ {
+ definition(python_highlight const& self)
+ : g(self.actions.state.grammar())
+ {
+ // clang-format off
+
+ member_action1<syntax_highlight_actions, char const*>
+ span(self.actions, &syntax_highlight_actions::span),
+ span_start(self.actions, &syntax_highlight_actions::span_start);
+ member_action<syntax_highlight_actions>
+ 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<syntax_highlight_actions, std::string const&>
+ 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<Scanner> 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<Scanner> const& start() const { return program; }
+ };
+
+ syntax_highlight_actions& actions;
+ };
+
+ // Grammar for plain text (no actual highlighting)
+ struct teletype_highlight : public cl::grammar<teletype_highlight>
+ {
+ teletype_highlight(syntax_highlight_actions& actions_)
+ : actions(actions_)
+ {
+ }
+
+ template <typename Scanner> struct definition
+ {
+ definition(teletype_highlight const& self)
+ : g(self.actions.state.grammar())
+ {
+ member_action<syntax_highlight_actions> 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<Scanner> program, macro, escape;
+
+ quickbook_grammar& g;
+
+ cl::rule<Scanner> 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 <boost/swap.hpp>
+#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 <cassert>
+#include "files.hpp"
+
+#ifdef BOOST_MSVC
+#pragma warning(disable : 4355)
+#endif
+
+namespace quickbook
+{
+ template_symbol::template_symbol(
+ std::string const& identifier_,
+ std::vector<std::string> 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 <cassert>
+#include <deque>
+#include <string>
+#include <vector>
+#include <boost/assert.hpp>
+#include <boost/filesystem/path.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/spirit/include/classic_functor_parser.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
+#include <boost/tuple/tuple.hpp>
+#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<std::string> const& params,
+ value const& content,
+ template_scope const* parent = 0);
+
+ std::string identifier;
+ std::vector<std::string> params;
+ value content;
+
+ template_scope const* lexical_parent;
+ };
+
+ typedef boost::spirit::classic::symbols<template_symbol> 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<template_scope> deque;
+
+ struct parser
+ {
+ typedef boost::spirit::classic::nil_t result_t;
+
+ parser(template_stack& ts_) : ts(ts_) {}
+
+ template <typename Scanner>
+ 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<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 <cassert>
+
+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 <utility>
+
+namespace quickbook
+{
+ namespace detail
+ {
+ struct tree_node_base;
+ template <typename T> struct tree_node;
+ struct tree_base;
+ template <typename T> struct tree;
+ struct tree_builder_base;
+ template <typename T> 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 <typename T> struct tree_node : tree_node_base
+ {
+ T* parent() const { return static_cast<T*>(parent_); }
+ T* children() const { return static_cast<T*>(children_); }
+ T* next() const { return static_cast<T*>(next_); }
+ T* prev() const { return static_cast<T*>(prev_); }
+
+ void add_before(tree<T>&& x) { tree_node_base::add_before(&x); }
+ void add_after(tree<T>&& x) { tree_node_base::add_after(&x); }
+ void add_first_child(tree<T>&& x)
+ {
+ tree_node_base::add_first_child(&x);
+ }
+ void add_last_child(tree<T>&& x)
+ {
+ tree_node_base::add_last_child(&x);
+ }
+ };
+
+ template <typename Node> 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 <typename T> struct tree : tree_base
+ {
+ tree() {}
+ explicit tree(T* r) : tree_base(r) {}
+ tree(tree<T>&& x) : tree_base(std::move(x)) {}
+ ~tree() { delete_nodes(root()); }
+ tree& operator=(tree<T>&& x)
+ {
+ tree_base::operator=(std::move(x));
+ return *this;
+ }
+
+ tree extract(T* n)
+ {
+ return tree(static_cast<T*>(tree_base::extract(n)));
+ }
+ T* root() const { return static_cast<T*>(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 <typename T> struct tree_builder : tree_builder_base
+ {
+ public:
+ tree_builder() : tree_builder_base() {}
+ tree_builder(tree_builder<T>&& 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<T*>(parent_); }
+ T* current() const { return static_cast<T*>(current_); }
+ T* root() const { return static_cast<T*>(root_); }
+ tree<T> extract(T* x)
+ {
+ return tree<T>(static_cast<T*>(tree_builder_base::extract(x)));
+ }
+ tree<T> release()
+ {
+ return tree<T>(static_cast<T*>(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 <cctype>
+#include <cstring>
+#include <map>
+#include <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_numerics.hpp>
+#include <boost/spirit/include/phoenix1_binders.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+
+namespace quickbook
+{
+ namespace detail
+ {
+ namespace cl = boost::spirit::classic;
+ namespace ph = phoenix;
+
+ struct xml_decode_grammar : cl::grammar<xml_decode_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<char>(c);
+ }
+ else if (c < 0x800) {
+ char e[] = {static_cast<char>(0xc0 + (c >> 6)),
+ static_cast<char>(0x80 + (c & 0x3f)), '\0'};
+ result += e;
+ }
+ else if (c < 0x10000) {
+ char e[] = {static_cast<char>(0xe0 + (c >> 12)),
+ static_cast<char>(0x80 + ((c >> 6) & 0x3f)),
+ static_cast<char>(0x80 + (c & 0x3f)), '\0'};
+ result += e;
+ }
+ else if (c < 0x110000) {
+ char e[] = {static_cast<char>(0xf0 + (c >> 18)),
+ static_cast<char>(0x80 + ((c >> 12) & 0x3f)),
+ static_cast<char>(0x80 + ((c >> 6) & 0x3f)),
+ static_cast<char>(0x80 + (c & 0x3f)), '\0'};
+ result += e;
+ }
+ else {
+ result += "\xEF\xBF\xBD";
+ }
+ }
+
+ template <typename Scanner> 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<Scanner> const& start() { return xml_encoded; }
+ cl::rule<Scanner> 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 += "&lt;";
+ break;
+ case '>':
+ result += "&gt;";
+ break;
+ case '&':
+ result += "&amp;";
+ break;
+ case '"':
+ result += "&quot;";
+ break;
+ default:
+ result += *it;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ void print_char(char ch, std::ostream& out)
+ {
+ switch (ch) {
+ case '<':
+ out << "&lt;";
+ break;
+ case '>':
+ out << "&gt;";
+ break;
+ case '&':
+ out << "&amp;";
+ break;
+ case '"':
+ out << "&quot;";
+ break;
+ default:
+ out << ch;
+ break;
+ // note &apos; 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<unsigned char>(*i))) {
+ *i = '_';
+ }
+ else {
+ *i = static_cast<char>(
+ std::tolower(static_cast<unsigned char>(*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<unsigned char>(uri_param[n]) > 127 ||
+ (!std::isalnum(static_cast<unsigned char>(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 <ostream>
+#include <string>
+#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 <cassert>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/range/irange.hpp>
+
+#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<int> 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<int> 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 <boost/current_function.hpp>
+#include <boost/lexical_cast.hpp>
+#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<std::string>(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<value_builder> store(new value_builder);
+ swap(*store);
+ saved.swap(store);
+ }
+
+ void value_builder::restore()
+ {
+ boost::scoped_ptr<value_builder> 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 <cassert>
+#include <stdexcept>
+#include <string>
+#include <utility>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/operators.hpp>
+#include <boost/scoped_ptr.hpp>
+#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<value_builder> 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<value::iterator>::type,
+ boost::iterator_difference<value::iterator>::type,
+ boost::iterator_pointer<value::iterator>::type,
+ boost::iterator_reference<value::iterator>::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 <boost/spirit/include/phoenix1_functions.hpp>
+#include "parsers.hpp"
+#include "scoped.hpp"
+#include "values.hpp"
+
+#include <iostream>
+
+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<value_builder_save> save;
+ scoped_parser<value_builder_list> list;
+ ph::function<value_entry> entry;
+ ph::function<value_sort> 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 <list>
+#include <string>
+#include "string_view.hpp"
+#include "tree.hpp"
+
+namespace quickbook
+{
+ namespace detail
+ {
+ struct xml_element;
+ typedef tree<xml_element> xml_tree;
+ typedef tree_builder<xml_element> xml_tree_builder;
+ struct xml_parse_error;
+
+ struct xml_element : tree_node<xml_element>
+ {
+ enum element_type
+ {
+ element_node,
+ element_text,
+ element_html
+ } type_;
+ std::string name_;
+
+ private:
+ std::list<std::pair<std::string, std::string> > 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
+ <toolset>msvc:<debug-symbols>off
+ <cxxstd>98:<build>no
+ <cxxstd>03:<build>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 : : :
+ <quickbook-test-define>__macro__=*bold*
+ <quickbook-test-define>__empty__ ]
+ [ quickbook-error-test command_line_macro-1_1-invalid :
+ command_line_macro-1_1.quickbook :
+ <testing.arg>-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 : <testing.arg>--strict ]
+ [ quickbook-error-test mismatched_brackets2-1_1-strict-fail :
+ mismatched_brackets2-1_1.quickbook : <testing.arg>--strict ]
+ [ quickbook-error-test mismatched_brackets3-1_1-strict-fail :
+ mismatched_brackets3-1_1.quickbook : <testing.arg>--strict ]
+ [ quickbook-error-test mismatched_brackets1-1_7-strict-fail :
+ mismatched_brackets1-1_1.quickbook : <testing.arg>--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 : <testing.arg>--strict ]
+ [ quickbook-test section-1_5-strict :
+ section-1_5.quickbook : : <testing.arg>--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 :
+ <testing.arg>--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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Anchor Test</title>
+ <section id="anchor_test.anchors">
+ <title>Anchors</title>
+ <para>
+ <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
+ want to make sure they appear in the correct place. <anchor id="a3"/>
+ </para>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
+ <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor"/><link
+ linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor">This
+ heading shouldn't pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a4"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
+ <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor"/><link
+ linkend="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor">This
+ heading should pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a5"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
+ <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
+ this one</link>
+ </bridgehead>
+ <anchor id="a6"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
+ <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
+ this one</link>
+ </bridgehead>
+ <anchor id="a7"/>
+ <bridgehead renderas="sect3" id="anchors.finally_this">
+ Finally this
+ </bridgehead>
+ <anchor id="a8"/>
+ </section>
+ <section id="anchor_test.section_anchor">
+ <title><anchor id="a9"/>Section Anchor</title>
+ <section id="anchor_test.nested_section">
+ <title><anchor id="a10"/>Nested Section</title>
+ </section>
+ <anchor id="a11"/>
+ </section>
+ <section id="anchor_test.conditional_section_anchor">
+ <title><anchor id="a12"/>Conditional Section Anchor</title>
+ </section>
+ <section id="anchor_test.lists">
+ <title>Lists</title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <anchor id="a16"/>Nested Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="anchor_test.anchors_in_templates">
+ <title>Anchors in templates</title>
+ <para>
+ <anchor id="t1"/>Some text.
+ </para>
+ <para>
+ <anchor id="t2"/>Text content
+ </para>
+ </section>
+ <section id="anchor_test.anchors_in_syntax_highlighted_code">
+ <title>Anchors in syntax highlighted code</title>
+<programlisting><phrase role="keyword">int</phrase> <anchor id="s1"/><phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </section>
+ <section id="anchor_test.nested_anchors">
+ <title>Nested anchors</title>
+ <table frame="all" id="anchor_test.nested_anchors.t0">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table1"/>Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table2"/>Cell 2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 3<anchor id="table3"/>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Anchor Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#anchor_test.anchors">Anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.section_anchor"><span></span>Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.conditional_section_anchor"><span></span>Conditional
+ Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.lists">Lists</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_templates">Anchors in templates</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_syntax_highlighted_code">Anchors in syntax
+ highlighted code</a>
+ </li>
+ <li>
+ <a href="#anchor_test.nested_anchors">Nested anchors</a>
+ </li>
+ </ul>
+ </div>
+ <div id="anchor_test.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="anchor_test.anchors">
+ <p>
+ <span id="a1"></span>A paragraph containing several anchors. <span id="a2"></span>We
+ want to make sure they appear in the correct place. <span id="a3"></span>
+ </p>
+ <h3 id="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor">
+ This heading shouldn't pick up the previous anchor
+ </h3>
+ <span id="a4"></span>
+ <h3 id="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor">
+ This heading should pick up the previous anchor
+ </h3>
+ <span id="a5"></span>
+ <h3 id="anchor_test.anchors.and_this_one">
+ And this one
+ </h3>
+ <span id="a6"></span>
+ <h3 id="anchor_test.anchors.also_this_one">
+ Also this one
+ </h3>
+ <span id="a7"></span>
+ <h3 id="anchors.finally_this">
+ Finally this
+ </h3>
+ <span id="a8"></span>
+ </div>
+ </div>
+ <div id="anchor_test.section_anchor">
+ <h3>
+ <span id="a9"></span>Section Anchor
+ </h3>
+ <div id="anchor_test.section_anchor">
+ <span id="a11"></span>
+ </div>
+ <div id="anchor_test.nested_section">
+ <h3>
+ <span id="a10"></span>Nested Section
+ </h3>
+ <div id="anchor_test.nested_section">
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.conditional_section_anchor">
+ <h3>
+ <span id="a12"></span>Conditional Section Anchor
+ </h3>
+ <div id="anchor_test.conditional_section_anchor">
+ </div>
+ </div>
+ <div id="anchor_test.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="anchor_test.lists">
+ <span id="a14"></span>
+ <ul>
+ <li>
+ <div>
+ Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested List <span id="a15"></span>
+ <ul>
+ <li>
+ <div>
+ Nested Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ <span id="a16"></span>Nested Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_templates">
+ <h3>
+ Anchors in templates
+ </h3>
+ <div id="anchor_test.anchors_in_templates">
+ <p>
+ <span id="t1"></span>Some text.
+ </p>
+ <p>
+ <span id="t2"></span>Text content
+ </p>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_syntax_highlighted_code">
+ <h3>
+ Anchors in syntax highlighted code
+ </h3>
+ <div id="anchor_test.anchors_in_syntax_highlighted_code">
+<pre class="programlisting"><span class="keyword">int</span> <span id="s1"></span><span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </div>
+ </div>
+ <div id="anchor_test.nested_anchors">
+ <h3>
+ Nested anchors
+ </h3>
+ <div id="anchor_test.nested_anchors">
+ <div id="anchor_test.nested_anchors.t0" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <span id="table1"></span>Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span id="table2"></span>Cell 2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 3<span id="table3"></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Anchor Test</title>
+ <section id="anchor_test.anchors">
+ <title><link linkend="anchor_test.anchors">Anchors</link></title>
+ <para>
+ <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
+ want to make sure they appear in the correct place. <anchor id="a3"/>
+ </para>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
+ <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t"/><link linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">This
+ heading shouldn't pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a4"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
+ <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_"/><link linkend="anchor_test.anchors.this_heading_should_pick_up_the_">This
+ heading should pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a5"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
+ <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
+ this one</link>
+ </bridgehead>
+ <anchor id="a6"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
+ <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
+ this one</link>
+ </bridgehead>
+ <anchor id="a7"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h4">
+ <phrase id="anchor_test.anchors.finally_this"/><link linkend="anchor_test.anchors.finally_this">Finally
+ this</link>
+ </bridgehead>
+ <anchor id="a8"/>
+ </section>
+ <section id="anchor_test.section_anchor">
+ <title><anchor id="a9"/><link linkend="anchor_test.section_anchor">Section Anchor</link></title>
+ <section id="anchor_test.section_anchor.nested_section">
+ <title><anchor id="a10"/><link linkend="anchor_test.section_anchor.nested_section">Nested
+ Section</link></title>
+ </section>
+ <anchor id="a11"/>
+ </section>
+ <section id="anchor_test.conditional_section_anchor">
+ <title><anchor id="a12"/><link linkend="anchor_test.conditional_section_anchor">Conditional
+ Section Anchor</link></title>
+ </section>
+ <section id="anchor_test.lists">
+ <title><link linkend="anchor_test.lists">Lists</link></title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <anchor id="a16"/>Nested Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="anchor_test.anchors_in_templates">
+ <title><link linkend="anchor_test.anchors_in_templates">Anchors in templates</link></title>
+ <para>
+ <anchor id="t1"/>Some text.
+ </para>
+ <para>
+ <anchor id="t2"/>Text content
+ </para>
+ </section>
+ <section id="anchor_test.anchors_in_syntax_highlighted_co">
+ <title><link linkend="anchor_test.anchors_in_syntax_highlighted_co">Anchors in
+ syntax highlighted code</link></title>
+<programlisting><phrase role="keyword">int</phrase> <anchor id="s1"/><phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </section>
+ <section id="anchor_test.nested_anchors">
+ <title><link linkend="anchor_test.nested_anchors">Nested anchors</link></title>
+ <table frame="all" id="anchor_test.nested_anchors.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table1"/>Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table2"/>Cell 2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 3<anchor id="table3"/>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="anchor_test.anchors_with_escapes">
+ <title><link linkend="anchor_test.anchors_with_escapes">Anchors with escapes</link></title>
+ <anchor id="[oddid]"/>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Anchor Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#anchor_test.anchors">Anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.section_anchor"><span></span>Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.conditional_section_anchor"><span></span>Conditional
+ Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.lists">Lists</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_templates">Anchors in templates</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_syntax_highlighted_co">Anchors in syntax
+ highlighted code</a>
+ </li>
+ <li>
+ <a href="#anchor_test.nested_anchors">Nested anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_with_escapes">Anchors with escapes</a>
+ </li>
+ </ul>
+ </div>
+ <div id="anchor_test.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="anchor_test.anchors">
+ <p>
+ <span id="a1"></span>A paragraph containing several anchors. <span id="a2"></span>We
+ want to make sure they appear in the correct place. <span id="a3"></span>
+ </p>
+ <h3 id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">
+ This heading shouldn't pick up the previous anchor
+ </h3>
+ <span id="a4"></span>
+ <h3 id="anchor_test.anchors.this_heading_should_pick_up_the_">
+ This heading should pick up the previous anchor
+ </h3>
+ <span id="a5"></span>
+ <h3 id="anchor_test.anchors.and_this_one">
+ And this one
+ </h3>
+ <span id="a6"></span>
+ <h3 id="anchor_test.anchors.also_this_one">
+ Also this one
+ </h3>
+ <span id="a7"></span>
+ <h3 id="anchor_test.anchors.finally_this">
+ Finally this
+ </h3>
+ <span id="a8"></span>
+ </div>
+ </div>
+ <div id="anchor_test.section_anchor">
+ <h3>
+ <span id="a9"></span>Section Anchor
+ </h3>
+ <div id="anchor_test.section_anchor">
+ <span id="a11"></span>
+ </div>
+ <div id="anchor_test.section_anchor.nested_section">
+ <h3>
+ <span id="a10"></span>Nested Section
+ </h3>
+ <div id="anchor_test.section_anchor.nested_section">
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.conditional_section_anchor">
+ <h3>
+ <span id="a12"></span>Conditional Section Anchor
+ </h3>
+ <div id="anchor_test.conditional_section_anchor">
+ </div>
+ </div>
+ <div id="anchor_test.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="anchor_test.lists">
+ <span id="a14"></span>
+ <ul>
+ <li>
+ <div>
+ Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested List <span id="a15"></span>
+ <ul>
+ <li>
+ <div>
+ Nested Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ <span id="a16"></span>Nested Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_templates">
+ <h3>
+ Anchors in templates
+ </h3>
+ <div id="anchor_test.anchors_in_templates">
+ <p>
+ <span id="t1"></span>Some text.
+ </p>
+ <p>
+ <span id="t2"></span>Text content
+ </p>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+ <h3>
+ Anchors in syntax highlighted code
+ </h3>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+<pre class="programlisting"><span class="keyword">int</span> <span id="s1"></span><span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </div>
+ </div>
+ <div id="anchor_test.nested_anchors">
+ <h3>
+ Nested anchors
+ </h3>
+ <div id="anchor_test.nested_anchors">
+ <div id="anchor_test.nested_anchors.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <span id="table1"></span>Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span id="table2"></span>Cell 2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 3<span id="table3"></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_with_escapes">
+ <h3>
+ Anchors with escapes
+ </h3>
+ <div id="anchor_test.anchors_with_escapes">
+ <span id="[oddid]"></span>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Anchor Test</title>
+ <section id="anchor_test.anchors">
+ <title><link linkend="anchor_test.anchors">Anchors</link></title>
+ <para>
+ <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
+ want to make sure they appear in the correct place. <anchor id="a3"/>
+ </para>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
+ <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t"/><link linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">This
+ heading shouldn't pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a4"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
+ <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_"/><link linkend="anchor_test.anchors.this_heading_should_pick_up_the_">This
+ heading should pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a5"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
+ <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
+ this one</link>
+ </bridgehead>
+ <anchor id="a6"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
+ <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
+ this one</link>
+ </bridgehead>
+ <anchor id="a7"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h4">
+ <phrase id="anchor_test.anchors.finally_this"/><link linkend="anchor_test.anchors.finally_this">Finally
+ this</link>
+ </bridgehead>
+ <anchor id="a8"/>
+ </section>
+ <section id="anchor_test.section_anchor">
+ <title><anchor id="a9"/><link linkend="anchor_test.section_anchor">Section Anchor</link></title>
+ <section id="anchor_test.section_anchor.nested_section">
+ <title><anchor id="a10"/><link linkend="anchor_test.section_anchor.nested_section">Nested
+ Section</link></title>
+ </section>
+ <anchor id="a11"/>
+ </section>
+ <section id="anchor_test.conditional_section_anchor">
+ <title><anchor id="a12"/><link linkend="anchor_test.conditional_section_anchor">Conditional
+ Section Anchor</link></title>
+ </section>
+ <section id="anchor_test.lists">
+ <title><link linkend="anchor_test.lists">Lists</link></title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <anchor id="a16"/>Nested Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="anchor_test.anchors_in_templates">
+ <title><link linkend="anchor_test.anchors_in_templates">Anchors in templates</link></title>
+ <para>
+ <anchor id="t1"/>Some text.
+ </para>
+ <para>
+ <anchor id="t2"/>Text content
+ </para>
+ </section>
+ <section id="anchor_test.anchors_in_syntax_highlighted_co">
+ <title><link linkend="anchor_test.anchors_in_syntax_highlighted_co">Anchors in
+ syntax highlighted code</link></title>
+<programlisting><phrase role="keyword">int</phrase> <anchor id="s1"/><phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </section>
+ <section id="anchor_test.nested_anchors">
+ <title><link linkend="anchor_test.nested_anchors">Nested anchors</link></title>
+ <table frame="all" id="anchor_test.nested_anchors.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table1"/>Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table2"/>Cell 2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 3<anchor id="table3"/>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="anchor_test.templates">
+ <title><link linkend="anchor_test.templates">Anchors with templates</link></title>
+ <anchor id="anchor1"/><anchor id="anchor2"/><anchor id="x1y"/><anchor id="x12y"/>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Anchor Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#anchor_test.anchors">Anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.section_anchor"><span></span>Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.conditional_section_anchor"><span></span>Conditional
+ Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.lists">Lists</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_templates">Anchors in templates</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_syntax_highlighted_co">Anchors in syntax
+ highlighted code</a>
+ </li>
+ <li>
+ <a href="#anchor_test.nested_anchors">Nested anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.templates">Anchors with templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="anchor_test.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="anchor_test.anchors">
+ <p>
+ <span id="a1"></span>A paragraph containing several anchors. <span id="a2"></span>We
+ want to make sure they appear in the correct place. <span id="a3"></span>
+ </p>
+ <h3 id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">
+ This heading shouldn't pick up the previous anchor
+ </h3>
+ <span id="a4"></span>
+ <h3 id="anchor_test.anchors.this_heading_should_pick_up_the_">
+ This heading should pick up the previous anchor
+ </h3>
+ <span id="a5"></span>
+ <h3 id="anchor_test.anchors.and_this_one">
+ And this one
+ </h3>
+ <span id="a6"></span>
+ <h3 id="anchor_test.anchors.also_this_one">
+ Also this one
+ </h3>
+ <span id="a7"></span>
+ <h3 id="anchor_test.anchors.finally_this">
+ Finally this
+ </h3>
+ <span id="a8"></span>
+ </div>
+ </div>
+ <div id="anchor_test.section_anchor">
+ <h3>
+ <span id="a9"></span>Section Anchor
+ </h3>
+ <div id="anchor_test.section_anchor">
+ <span id="a11"></span>
+ </div>
+ <div id="anchor_test.section_anchor.nested_section">
+ <h3>
+ <span id="a10"></span>Nested Section
+ </h3>
+ <div id="anchor_test.section_anchor.nested_section">
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.conditional_section_anchor">
+ <h3>
+ <span id="a12"></span>Conditional Section Anchor
+ </h3>
+ <div id="anchor_test.conditional_section_anchor">
+ </div>
+ </div>
+ <div id="anchor_test.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="anchor_test.lists">
+ <span id="a14"></span>
+ <ul>
+ <li>
+ <div>
+ Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested List <span id="a15"></span>
+ <ul>
+ <li>
+ <div>
+ Nested Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ <span id="a16"></span>Nested Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_templates">
+ <h3>
+ Anchors in templates
+ </h3>
+ <div id="anchor_test.anchors_in_templates">
+ <p>
+ <span id="t1"></span>Some text.
+ </p>
+ <p>
+ <span id="t2"></span>Text content
+ </p>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+ <h3>
+ Anchors in syntax highlighted code
+ </h3>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+<pre class="programlisting"><span class="keyword">int</span> <span id="s1"></span><span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </div>
+ </div>
+ <div id="anchor_test.nested_anchors">
+ <h3>
+ Nested anchors
+ </h3>
+ <div id="anchor_test.nested_anchors">
+ <div id="anchor_test.nested_anchors.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <span id="table1"></span>Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span id="table2"></span>Cell 2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 3<span id="table3"></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.templates">
+ <h3>
+ Anchors with templates
+ </h3>
+ <div id="anchor_test.templates">
+ <span id="anchor1"></span><span id="anchor2"></span><span id="x1y"></span><span
+ id="x12y"></span>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="various_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Various blocks</title>
+ <bridgehead renderas="sect2" id="various_blocks.h0">
+ <phrase id="various_blocks.blockquotes"/><link linkend="various_blocks.blockquotes">Blockquotes</link>
+ </bridgehead>
+ <para>
+ Here's a blockquote:
+ </para>
+ <blockquote>
+ <para>
+ Blockquote.
+ </para>
+ </blockquote>
+ <para>
+ And another:
+ </para>
+ <blockquote>
+ <para>
+ Blockquote first paragraph.
+ </para>
+ <para>
+ Blockquote second paragraph.
+ </para>
+ </blockquote>
+ <bridgehead renderas="sect2" id="various_blocks.h1">
+ <phrase id="various_blocks.admonitions"/><link linkend="various_blocks.admonitions">Admonitions</link>
+ </bridgehead>
+ <warning>
+ <para>
+ Warning
+ </para>
+ </warning>
+ <caution>
+ <para>
+ Caution
+ </para>
+ </caution>
+ <important>
+ <para>
+ Important
+ </para>
+ </important>
+ <note>
+ <para>
+ Note
+ </para>
+ </note>
+ <tip>
+ <para>
+ Tip
+ </para>
+ </tip>
+ <warning>
+ <para>
+ Warning first paragraph.
+ </para>
+ <para>
+ Warning second paragraph.
+ </para>
+ </warning>
+ <bridgehead renderas="sect2" id="various_blocks.h2">
+ <phrase id="various_blocks.blurb"/><link linkend="various_blocks.blurb">Blurb</link>
+ </bridgehead>
+ <sidebar role="blurb">
+ <para>
+ Blurb
+ </para>
+ </sidebar>
+ <bridgehead renderas="sect2" id="various_blocks.h3">
+ <phrase id="various_blocks.inline_blocks"/><link linkend="various_blocks.inline_blocks">Inline
+ blocks</link>
+ </bridgehead>
+ <blockquote>
+ <para>
+ Blockquote containing a footnote<footnote id="various_blocks.f0">
+ <para>
+ Here it is!
+ </para>
+ </footnote>.
+ </para>
+ </blockquote>
+ <para>
+ [tipping point]
+ </para>
+ <para>
+ Multiple paragraphs because of the inline blocks.
+ </para>
+ <warning>
+ <para>
+ Warning
+ </para>
+ </warning>
+ <para>
+ This line should appear as a separate paragraph.
+ </para>
+ <warning>
+ <para>
+ Warning
+ </para>
+ </warning>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list item because it's preceded by block markup.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Various blocks
+ </h3>
+ <h2 id="various_blocks.blockquotes">
+ Blockquotes
+ </h2>
+ <p>
+ Here's a blockquote:
+ </p>
+ <blockquote>
+ <p>
+ Blockquote.
+ </p>
+ </blockquote>
+ <p>
+ And another:
+ </p>
+ <blockquote>
+ <p>
+ Blockquote first paragraph.
+ </p>
+ <p>
+ Blockquote second paragraph.
+ </p>
+ </blockquote>
+ <h2 id="various_blocks.admonitions">
+ Admonitions
+ </h2>
+ <div class="warning">
+ <p>
+ Warning
+ </p>
+ </div>
+ <div class="caution">
+ <p>
+ Caution
+ </p>
+ </div>
+ <div class="important">
+ <p>
+ Important
+ </p>
+ </div>
+ <div class="note">
+ <p>
+ Note
+ </p>
+ </div>
+ <div class="tip">
+ <p>
+ Tip
+ </p>
+ </div>
+ <div class="warning">
+ <p>
+ Warning first paragraph.
+ </p>
+ <p>
+ Warning second paragraph.
+ </p>
+ </div>
+ <h2 id="various_blocks.blurb">
+ Blurb
+ </h2>
+ <div class="blurb">
+ <p>
+ Blurb
+ </p>
+ </div>
+ <h2 id="various_blocks.inline_blocks">
+ Inline blocks
+ </h2>
+ <blockquote>
+ <p>
+ Blockquote containing a footnote<a id="various_blocks.f0" href="#footnote-1"><sup
+ class="footnote">[1]</sup></a>.
+ </p>
+ </blockquote>
+ <p>
+ [tipping point]
+ </p>
+ <p>
+ Multiple paragraphs because of the inline blocks.
+ </p>
+ <div class="warning">
+ <p>
+ Warning
+ </p>
+ </div>
+ <p>
+ This line should appear as a separate paragraph.
+ </p>
+ <div class="warning">
+ <p>
+ Warning
+ </p>
+ </div>
+ <ul>
+ <li>
+ <div>
+ This should be a list item because it's preceded by block markup.
+ </div>
+ </li>
+ </ul>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#various_blocks.f0"><sup>[1]</sup></a> Here it is!
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="callout_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Callout Tests</title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c0" id="callout_tests.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c2" id="callout_tests.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c4" id="callout_tests.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c6" id="callout_tests.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c8" id="callout_tests.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c10" id="callout_tests.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c12" id="callout_tests.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c14" id="callout_tests.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c16" id="callout_tests.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <section id="callout_tests.test_section">
+ <title><link linkend="callout_tests.test_section">Try callouts in a section</link></title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c10" id="callout_tests.test_section.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c12" id="callout_tests.test_section.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c16" id="callout_tests.test_section.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Callout Tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#callout_tests.test_section">Try callouts in a section</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c1">
+ <a href="#callout_tests.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c3">
+ <a href="#callout_tests.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c5">
+ <a href="#callout_tests.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c7">
+ <a href="#callout_tests.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c9">
+ <a href="#callout_tests.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.c11">
+ <a href="#callout_tests.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c13">
+ <a href="#callout_tests.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+<pre class="programlisting"><a href="#callout_tests.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c17">(2)</a>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c15">
+ <a href="#callout_tests.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c17">
+ <a href="#callout_tests.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <div id="callout_tests.test_section">
+ <h3>
+ Try callouts in a section
+ </h3>
+ <div id="callout_tests.test_section">
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c1">
+ <a href="#callout_tests.test_section.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c3">
+ <a href="#callout_tests.test_section.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c5">
+ <a href="#callout_tests.test_section.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c7">
+ <a href="#callout_tests.test_section.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.test_section.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c9">
+ <a href="#callout_tests.test_section.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c11">
+ <a href="#callout_tests.test_section.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c13">
+ <a href="#callout_tests.test_section.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+<pre class="programlisting"><a href="#callout_tests.test_section.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c17">(2)</a>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c15">
+ <a href="#callout_tests.test_section.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c17">
+ <a href="#callout_tests.test_section.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="callout_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Callout Tests</title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c0" id="callout_tests.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c2" id="callout_tests.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c4" id="callout_tests.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c6" id="callout_tests.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c8" id="callout_tests.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c10" id="callout_tests.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c12" id="callout_tests.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c14" id="callout_tests.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c16" id="callout_tests.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <section id="callout_tests.test_section">
+ <title><link linkend="callout_tests.test_section">Try callouts in a section</link></title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c10" id="callout_tests.test_section.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c12" id="callout_tests.test_section.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c16" id="callout_tests.test_section.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ </section>
+ <section id="callout_tests.blocks">
+ <title><link linkend="callout_tests.blocks">Callouts in code blocks</link></title>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.blocks.c0" linkends="callout_tests.blocks.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.blocks.c0" id="callout_tests.blocks.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.blocks.c2" linkends="callout_tests.blocks.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.blocks.c2" id="callout_tests.blocks.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ <code><phrase role="comment">/*&lt; This shouldn't be a callout &gt;*/</phrase></code>
+ </para>
+ <para>Silly test<co linkends="silly-callout"/></para>
+<calloutlist><callout id="silly-callout"><para>silly</para></callout></calloutlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Callout Tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#callout_tests.test_section">Try callouts in a section</a>
+ </li>
+ <li>
+ <a href="#callout_tests.blocks">Callouts in code blocks</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c1">
+ <a href="#callout_tests.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c3">
+ <a href="#callout_tests.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c5">
+ <a href="#callout_tests.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c7">
+ <a href="#callout_tests.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c9">
+ <a href="#callout_tests.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.c11">
+ <a href="#callout_tests.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c13">
+ <a href="#callout_tests.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+<pre class="programlisting"><a href="#callout_tests.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c17">(2)</a>
+</pre>
+ <div>
+ <div id="callout_tests.c15">
+ <a href="#callout_tests.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c17">
+ <a href="#callout_tests.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <div id="callout_tests.test_section">
+ <h3>
+ Try callouts in a section
+ </h3>
+ <div id="callout_tests.test_section">
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c1">
+ <a href="#callout_tests.test_section.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c3">
+ <a href="#callout_tests.test_section.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c5">
+ <a href="#callout_tests.test_section.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c7">
+ <a href="#callout_tests.test_section.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.test_section.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c9">
+ <a href="#callout_tests.test_section.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c11">
+ <a href="#callout_tests.test_section.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c13">
+ <a href="#callout_tests.test_section.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+<pre class="programlisting"><a href="#callout_tests.test_section.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c17">(2)</a>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c15">
+ <a href="#callout_tests.test_section.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c17">
+ <a href="#callout_tests.test_section.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="callout_tests.blocks">
+ <h3>
+ Callouts in code blocks
+ </h3>
+ <div id="callout_tests.blocks">
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.blocks.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.blocks.c1">
+ <a href="#callout_tests.blocks.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.blocks.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.blocks.c3">
+ <a href="#callout_tests.blocks.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ <code><span class="comment">/*&lt; This shouldn't be a callout &gt;*/</span></code>
+ </p>
+ <p>
+ Silly test<a href="#silly-callout">(1)</a>
+ </p>
+ <div>
+ <div id="silly-callout">
+ (1)
+ <p>
+ silly
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
+}
+```
+
+`/*< This shouldn't be a callout >*/`
+
+[block'''
+<para>Silly test<co linkends="silly-callout"/></para>
+<calloutlist><callout id="silly-callout"><para>silly</para></callout></calloutlist>
+''']
+
+[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<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
+}
+
+//]
+
+//[ example3
+
+int roll_die() {
+ /*<< [important test]
+ >>*/
+ boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
+}
+
+//]
+
+//[ example4
+
+int roll_die() {
+ /*<< callout 1 >>*/
+ boost::variate_generator<boost::mt19937&, boost::uniform_int<> > 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="code_block" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Code Block</title>
+ <section id="code_block.test_1">
+ <title>Test 1</title>
+ <para>
+ A code block with proper indentation ;-)
+ </para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="code_block.test_2">
+ <title>Test 2</title>
+ <para>
+ A code block with proper indentation ;-)
+ </para>
+ <para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ </section>
+ <section id="code_block.test_3">
+ <title>Test 3</title>
+ <para>
+<programlisting><phrase role="keyword">print</phrase> <phrase role="string">&quot;\xfabln\xeck&quot;</phrase>
+</programlisting>
+ </para>
+ </section>
+ <section id="code_block.test_4">
+ <title>Test 4</title>
+ <para>
+ This isn't valid C++ but I think we should accept it;
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\xfabln\xeck&quot;</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+</programlisting>
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Code Block
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#code_block.test_1">Test 1</a>
+ </li>
+ <li>
+ <a href="#code_block.test_2">Test 2</a>
+ </li>
+ <li>
+ <a href="#code_block.test_3">Test 3</a>
+ </li>
+ <li>
+ <a href="#code_block.test_4">Test 4</a>
+ </li>
+ </ul>
+ </div>
+ <div id="code_block.test_1">
+ <h3>
+ Test 1
+ </h3>
+ <div id="code_block.test_1">
+ <p>
+ A code block with proper indentation ;-)
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </div>
+ </div>
+ <div id="code_block.test_2">
+ <h3>
+ Test 2
+ </h3>
+ <div id="code_block.test_2">
+ <p>
+ A code block with proper indentation ;-)
+ </p>
+ <p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ <div id="code_block.test_3">
+ <h3>
+ Test 3
+ </h3>
+ <div id="code_block.test_3">
+ <p>
+<pre class="programlisting"><span class="keyword">print</span> <span class="string">&quot;\xfabln\xeck&quot;</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ <div id="code_block.test_4">
+ <h3>
+ Test 4
+ </h3>
+ <div id="code_block.test_4">
+ <p>
+ This isn't valid C++ but I think we should accept it;
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">&lt;&lt;</span><span class="string">&quot;\xfabln\xeck&quot;</span><span class="special">&lt;&lt;</span><span class="string">&quot;\n&quot;</span><span class="special">;</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+
+[endsect]
+
+[section Test 2]
+
+A code block with proper indentation ;-)
+
+``
+ #include <iostream>
+
+ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="indented_code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Indented code blocks</title>
+ <para>
+ In a paragraph. Still in a paragraph.
+ </para>
+<programlisting>In a code block.
+</programlisting>
+ <para>
+ Back in a paragraph.
+ </para>
+<programlisting> Code block line 1.
+Code block line 2.
+ Code block line 3.
+</programlisting>
+ <para>
+ Paragraph.
+ </para>
+<programlisting>Code block with no trailing blank lines.
+</programlisting>
+ <para>
+ Paragraph.
+ </para>
+ <bridgehead renderas="sect2" id="indented_code_blocks.h0">
+ <phrase id="indented_code_blocks.code_blocks_separated_by_comment"/><link linkend="indented_code_blocks.code_blocks_separated_by_comment">Code
+ blocks separated by comment</link>
+ </bridgehead>
+<programlisting>First code block.
+</programlisting>
+<programlisting>Second code block.
+[/ Comment in second code block]
+Still second code block.
+[/ Comment trailing second code block]
+</programlisting>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Indented code blocks
+ </h3>
+ <p>
+ In a paragraph. Still in a paragraph.
+ </p>
+<pre class="programlisting">In a code block.
+</pre>
+ <p>
+ Back in a paragraph.
+ </p>
+<pre class="programlisting"> Code block line 1.
+Code block line 2.
+ Code block line 3.
+</pre>
+ <p>
+ Paragraph.
+ </p>
+<pre class="programlisting">Code block with no trailing blank lines.
+</pre>
+ <p>
+ Paragraph.
+ </p>
+ <h2 id="indented_code_blocks.code_blocks_separated_by_comment">
+ Code blocks separated by comment
+ </h2>
+<pre class="programlisting">First code block.
+</pre>
+<pre class="programlisting">Second code block.
+[/ Comment in second code block]
+Still second code block.
+[/ Comment trailing second code block]
+</pre>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c___code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ Code Blocks</title>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">some_header</phrase><phrase role="special">&gt;</phrase>
+ <phrase role="preprocessor">#include</phrase> <phrase role="string">&quot;another_header.hpp&quot;</phrase>
+<phrase role="preprocessor"># define</phrase> <phrase role="identifier">A_MACRO</phrase> <phrase role="identifier">value</phrase>
+<phrase role="preprocessor">#define</phrase> <phrase role="identifier">stringize</phrase><phrase role="special">(</phrase><phrase role="identifier">hello</phrase><phrase role="special">)</phrase> <phrase role="special">#</phrase><phrase role="identifier">hello</phrase>
+<phrase role="comment">// No escape</phrase>
+<phrase role="comment">/* No escape */</phrase>
+<phrase role="comment">/* No escape
+ * with newlines
+ */</phrase>
+<phrase role="comment">// In Header: &lt;<ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink>&gt;</phrase>
+<phrase role="comment">/* In Header: &lt;<ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink>&gt; */</phrase>
+<phrase role="comment">/* Multiple escapes: <emphasis>italic</emphasis>
+ * <emphasis role="underline">underline</emphasis><emphasis role="bold">bold</emphasis>
+ */</phrase>
+<phrase role="comment">/* Token pasting: */</phrase> <phrase role="identifier">a</phrase><phrase role="special">##</phrase><phrase role="identifier">b</phrase>
+</programlisting>
+ <para>
+ A badly formed comment:
+ </para>
+<programlisting><phrase role="comment">/* Oh dear
+</phrase></programlisting>
+ <para>
+ A badly formed comment with an escape:
+ </para>
+<programlisting><phrase role="comment">/* Oh dear <emphasis role="bold">bold</emphasis>
+</phrase></programlisting>
+ <para>
+ Just some code:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="keyword">constexpr</phrase> <phrase role="keyword">char32_t</phrase> <phrase role="identifier">x</phrase> <phrase role="special">=</phrase> <phrase role="char">'a'</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">auto</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">x</phrase> <phrase role="special">-</phrase> <phrase role="char">' '</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ Code Blocks
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">some_header</span><span class="special">&gt;</span>
+ <span class="preprocessor">#include</span> <span class="string">&quot;another_header.hpp&quot;</span>
+<span class="preprocessor"># define</span> <span class="identifier">A_MACRO</span> <span class="identifier">value</span>
+<span class="preprocessor">#define</span> <span class="identifier">stringize</span><span class="special">(</span><span class="identifier">hello</span><span class="special">)</span> <span class="special">#</span><span class="identifier">hello</span>
+<span class="comment">// No escape</span>
+<span class="comment">/* No escape */</span>
+<span class="comment">/* No escape
+ * with newlines
+ */</span>
+<span class="comment">// In Header: &lt;<a href="http://www.boost.org/doc/libs/release/boost/optional/optional.hpp">boost/optional/optional.hpp</a>&gt;</span>
+<span class="comment">/* In Header: &lt;<a href="http://www.boost.org/doc/libs/release/boost/optional/optional.hpp">boost/optional/optional.hpp</a>&gt; */</span>
+<span class="comment">/* Multiple escapes: <span class="emphasis"><em>italic</em></span>
+ * <span class="underline">underline</span><span class="bold"><strong>bold</strong></span>
+ */</span>
+<span class="comment">/* Token pasting: */</span> <span class="identifier">a</span><span class="special">##</span><span class="identifier">b</span>
+</pre>
+ <p>
+ A badly formed comment:
+ </p>
+<pre class="programlisting"><span class="comment">/* Oh dear
+</span></pre>
+ <p>
+ A badly formed comment with an escape:
+ </p>
+<pre class="programlisting"><span class="comment">/* Oh dear <span class="bold"><strong>bold</strong></span>
+</span></pre>
+ <p>
+ Just some code:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">constexpr</span> <span class="keyword">char32_t</span> <span class="identifier">x</span> <span class="special">=</span> <span class="char">'a'</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="keyword">auto</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">x</span> <span class="special">-</span> <span class="char">' '</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </body>
+</html>
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 <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:/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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="python_code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Python Code Blocks</title>
+<programlisting><phrase role="comment"># No escape</phrase>
+<phrase role="comment"># Escape: <emphasis role="bold">bold</emphasis></phrase>
+<phrase role="comment"># Escape: <emphasis role="underline">underline</emphasis><emphasis>italic</emphasis></phrase>
+</programlisting>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Python Code Blocks
+ </h3>
+<pre class="programlisting"><span class="comment"># No escape</span>
+<span class="comment"># Escape: <span class="bold"><strong>bold</strong></span></span>
+<span class="comment"># Escape: <span class="underline">underline</span><span class="emphasis"><em>italic</em></span></span>
+</pre>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="code_snippets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Code Snippets</title>
+ <section id="code_snippets.a_code_snippet">
+ <title>A code snippet</title>
+ <para>
+ Code snippets inlined in text, as in <code><phrase role="keyword">namespace</phrase>
+ <phrase role="identifier">quickbook</phrase> <phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">value</phrase>
+ <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase></code>, should be properly formatted and
+ not glued to the surrounding text.
+ </para>
+ <para>
+ There shoud be no spacees around (<code><phrase role="keyword">this</phrase></code>),
+ and spaces around <code><phrase role="keyword">this</phrase></code> code.
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Code Snippets
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#code_snippets.a_code_snippet">A code snippet</a>
+ </li>
+ </ul>
+ </div>
+ <div id="code_snippets.a_code_snippet">
+ <h3>
+ A code snippet
+ </h3>
+ <div id="code_snippets.a_code_snippet">
+ <p>
+ Code snippets inlined in text, as in <code><span class="keyword">namespace</span>
+ <span class="identifier">quickbook</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">const</span>
+ <span class="keyword">int</span> <span class="identifier">value</span>
+ <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+ <span class="special">}</span></code>, should be properly formatted and
+ not glued to the surrounding text.
+ </p>
+ <p>
+ There shoud be no spacees around (<code><span class="keyword">this</span></code>),
+ and spaces around <code><span class="keyword">this</span></code> code.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="code_block_teletype_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Code Block Teletype 1</title>
+ <section id="code_block_teletype_1.a_code_block">
+ <title><link linkend="code_block_teletype_1.a_code_block">A code block</link></title>
+<programlisting>Just some plain text.
+With some <emphasis role="bold">quickbook</emphasis> thrown in?
+</programlisting>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Code Block Teletype 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#code_block_teletype_1.a_code_block">A code block</a>
+ </li>
+ </ul>
+ </div>
+ <div id="code_block_teletype_1.a_code_block">
+ <h3>
+ A code block
+ </h3>
+ <div id="code_block_teletype_1.a_code_block">
+<pre class="programlisting">Just some plain text.
+With some <span class="bold"><strong>quickbook</strong></span> thrown in?
+</pre>
+ </div>
+ </div>
+ </body>
+</html>
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 : : <testing.arg>--expect-errors ]
+ [ quickbook-error-test error1 ]
+ [ quickbook-error-test error2 ]
+
+ [ quickbook-error-test
+ non_existent_output :
+ basic-1_6.quickbook :
+ <testing.arg>--output-file=non-existent/basic.xml ]
+ [ quickbook-error-test
+ output_nested_in_file :
+ basic-1_6.quickbook :
+ <testing.arg>--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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="command_line_macro" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Command Line Macro</title>
+ <para>
+ <emphasis role="bold">bold</emphasis>
+ </para>
+ <para>
+ empty is defined
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Command Line Macro
+ </h3>
+ <p>
+ <span class="bold"><strong>bold</strong></span>
+ </p>
+ <p>
+ empty is defined
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="coniditional_phrase_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Coniditional Phrase Test</title>
+ <para>
+ This should show
+ </para>
+ <para>
+ The should be no space inserted.
+ </para>
+ <para>
+ <emphasis role="bold">Bold text</emphasis>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Coniditional Phrase Test
+ </h3>
+ <p>
+ This should show
+ </p>
+ <p>
+ The should be no space inserted.
+ </p>
+ <p>
+ <span class="bold"><strong>Bold text</strong></span>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="coniditional_phrase_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Coniditional Phrase Test</title>
+ <para>
+ This should show
+ </para>
+ <para>
+ But this should show
+ </para>
+ <para>
+ Weird macro is defined
+ </para>
+ <para>
+ The should be no space inserted.
+ </para>
+ <para>
+ <emphasis role="bold">Bold text</emphasis>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Coniditional Phrase Test
+ </h3>
+ <p>
+ This should show
+ </p>
+ <p>
+ But this should show
+ </p>
+ <p>
+ Weird macro is defined
+ </p>
+ <p>
+ The should be no space inserted.
+ </p>
+ <p>
+ <span class="bold"><strong>Bold text</strong></span>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE appendix PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<appendix id="document_information_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Document Information 4</title>
+ <appendixinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ </authorgroup>
+ </appendixinfo>
+</appendix>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Document Information 4
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<chapter id="document_information_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Document Information 4</title>
+ <chapterinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ <author>
+ <firstname>John</firstname> <surname>Coe</surname>
+ </author>
+ </authorgroup>
+ </chapterinfo>
+</chapter>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Document Information 4
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ <h3 class="author">
+ Jane Doe
+ </h3>
+ <h3 class="author">
+ John Coe
+ </h3>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="copyright_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Copyright Test</title>
+ <articleinfo>
+ <copyright>
+ <year>1963</year> <year>1964</year> <year>1965</year> <holder>Jane Doe</holder>
+ </copyright>
+ <copyright>
+ <year>2018</year> <holder>Joe Blow, John Coe</holder>
+ </copyright>
+ <copyright>
+ <year>1977</year> <year>1985</year> <holder>Someone else</holder>
+ </copyright>
+ </articleinfo>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Copyright Test
+ </h3>
+ <p class="copyright">
+ 1963, 1964, 1965 Jane Doe
+ </p>
+ <p class="copyright">
+ 2018 Joe Blow, John Coe
+ </p>
+ <p class="copyright">
+ 1977, 1985 Someone else
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="thing2" name="Duplicates 1.1" dirname="thing2" last-revision="Tomorrow"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2018</year> <holder>Joe Blow</holder>
+ </copyright>
+ <copyright>
+ <year>1963</year> <holder>Jane Doe</holder>
+ </copyright>
+ <legalnotice id="thing2.legal">
+ <para>
+ Public Domain
+ </para>
+ </legalnotice>
+ <librarypurpose>
+ Another Duplicate
+ </librarypurpose>
+ <librarycategory name="category:Category 1"></librarycategory> <librarycategory
+ name="category:Category 2"></librarycategory>
+ </libraryinfo>
+ <title>Duplicates 1.1 2</title>
+ <para>
+ Content
+ </para>
+</library>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Duplicates 1.1 2
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ <h3 class="author">
+ Jane Doe
+ </h3>
+ </div>
+ <p class="copyright">
+ 2018 Joe Blow
+ </p>
+ <p class="copyright">
+ 1963 Jane Doe
+ </p>
+ <div class="legalnotice">
+ <p>
+ Public Domain
+ </p>
+ </div>
+ <p>
+ Content
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="thing2" lang="de" dirname="thing2" last-revision="Tomorrow" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Duplicates 1.5 2</title>
+ <articleinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2018</year> <holder>Joe Blow</holder>
+ </copyright>
+ <copyright>
+ <year>1963</year> <holder>Jane Doe</holder>
+ </copyright>
+ <legalnotice id="thing2.legal">
+ <para>
+ Public Domain
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ Another Duplicate
+ </articlepurpose>
+ <articlecategory name="category:Category 1"></articlecategory> <articlecategory
+ name="category:Category 2"></articlecategory> <biblioid class="uri">http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook</biblioid>
+ <biblioid class="isbn">0-937383-18-X</biblioid>
+ </articleinfo>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Duplicates 1.5 2
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ <h3 class="author">
+ Jane Doe
+ </h3>
+ </div>
+ <p class="copyright">
+ 2018 Joe Blow
+ </p>
+ <p class="copyright">
+ 1963 Jane Doe
+ </p>
+ <div class="legalnotice">
+ <p>
+ Public Domain
+ </p>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="empty_attributes" name="Empty Attributes" dirname="empty_attributes"
+last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname></firstname> <surname></surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2011</year> <holder></holder>
+ </copyright>
+ </libraryinfo>
+ <title>Empty Attributes</title>
+ <para>
+ <literal>biblioid</literal> and <literal>source-mode</literal> can't be empty.
+ </para>
+</library>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Empty Attributes
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ </h3>
+ </div>
+ <p class="copyright">
+ 2011
+ </p>
+ <p>
+ <tt>biblioid</tt> and <tt>source-mode</tt> can't be empty.
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <section id=".test">
+ <title>Test</title>
+ <para>
+ Hello
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <div id=".test">
+ <h3>
+ Test
+ </h3>
+ <div id=".test">
+ <p>
+ Hello
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <section id=".test">
+ <title><link linkend=".test">Test</link></title>
+ <para>
+ Hello
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <div id=".test">
+ <h3>
+ Test
+ </h3>
+ <div id=".test">
+ <p>
+ Hello
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="doc0" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="karel_vom__xe1___x10d_ka_and_tom__xe1___x161__martin__xed_k" name="Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k"
+dirname="karel_vom__xe1___x10d_ka_and_tom__xe1___x161__martin__xed_k" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname>Matti</firstname> <surname>Meik&#xE4;l&#xE4;inen</surname>
+ </author>
+ <author>
+ <firstname>Pero</firstname> <surname>Peri&#x107;</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2010</year> <holder>Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir</holder>
+ </copyright>
+ <librarypurpose>
+ Inline code test: <code>1 + 2</code>
+ </librarypurpose>
+ <librarycategory name="category:tests"></librarycategory> <librarycategory name="category:irrelevance"></librarycategory>
+ <biblioid class="uri">http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook</biblioid>
+ <biblioid class="isbn">0-937383-18-X</biblioid>
+ </libraryinfo>
+ <title>Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k</title>
+</library>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Matti Meik&#xE4;l&#xE4;inen
+ </h3>
+ <h3 class="author">
+ Pero Peri&#x107;
+ </h3>
+ </div>
+ <p class="copyright">
+ 2010 Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir
+ </p>
+ </body>
+</html>
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&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k
+[quickbook 1.5]
+[authors [Meik&#xE4;l&#xE4;inen, Matti],[Peri&#x107;, Pero]]
+[copyright 2010 Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="karel_vom_u00e1_u010dka_and_tom_" lang="en" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k</title>
+ <articleinfo>
+ <authorgroup>
+ <author>
+ <firstname>Matti</firstname> <surname>Meik&#xE4;l&#xE4;inen</surname>
+ </author>
+ <author>
+ <firstname>Pero</firstname> <surname>Peri&#x107;</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2010</year> <holder>Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir</holder>
+ </copyright>
+ <articlepurpose>
+ Inline code test: <code>1 + 2</code>
+ </articlepurpose>
+ <articlecategory name="category:tests"></articlecategory> <articlecategory name="category:irrelevance"></articlecategory>
+ <biblioid class="uri">http://www.boost.org/tools/quickbook/test/doc-info-1.quickbook</biblioid>
+ </articleinfo>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Matti Meik&#xE4;l&#xE4;inen
+ </h3>
+ <h3 class="author">
+ Pero Peri&#x107;
+ </h3>
+ </div>
+ <p class="copyright">
+ 2010 Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="escaped_name" name="Escaped name" dirname="escaped_name" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <copyright>
+ <year>1325</year> <holder>John Doe</holder>
+ </copyright>
+ <librarycategory name="category:test"></librarycategory> <author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author>
+ </libraryinfo>
+ <title>Escaped name</title>
+</library>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Escaped name
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ John Doe
+ </h3>
+ </div>
+ <p class="copyright">
+ 1325 John Doe
+ </p>
+ </body>
+</html>
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]
+'''<author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author>'''
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="multiple_escaped_attributes" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Multiple escaped attributes</title>
+ <articleinfo>
+ <author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author><orgname>Acme Corporation</orgname></articleinfo>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Multiple escaped attributes
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ John Doe
+ </h3>
+ </div>
+ </body>
+</html>
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]
+'''<author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author>'''
+'''<orgname>Acme Corporation</orgname>'''
+]
+
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="missing_id_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Missing Id test</title>
+ <section id="missing_id_test.missing_id_test_1">
+ <title><link linkend="missing_id_test.missing_id_test_1">Missing Id test 1</link></title>
+ </section>
+ <section id="missing_id_test.no_docinfo_test_1">
+ <title><link linkend="missing_id_test.no_docinfo_test_1">No docinfo test 1</link></title>
+ </section>
+ <section id="missing_id_test.missing_id_test_2">
+ <title><link linkend="missing_id_test.missing_id_test_2">Missing Id test 2</link></title>
+ </section>
+ <section id="docinfo_no_id.docinfo_no_id_1">
+ <title><link linkend="docinfo_no_id.docinfo_no_id_1">Docinfo no id 1</link></title>
+ </section>
+ <section id="missing_id_test.missing_id_test_3">
+ <title><link linkend="missing_id_test.missing_id_test_3">Missing Id test 3</link></title>
+ </section>
+ <section id="docinfo_no_id.no_docinfo_test_1">
+ <title><link linkend="docinfo_no_id.no_docinfo_test_1">No docinfo test 1</link></title>
+ </section>
+ <section id="missing_id_test.missing_id_test_4">
+ <title><link linkend="missing_id_test.missing_id_test_4">Missing Id test 4</link></title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Missing Id test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#missing_id_test.missing_id_test_1">Missing Id test 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.no_docinfo_test_1">No docinfo test 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.missing_id_test_2">Missing Id test 2</a>
+ </li>
+ <li>
+ <a href="#docinfo_no_id.docinfo_no_id_1">Docinfo no id 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.missing_id_test_3">Missing Id test 3</a>
+ </li>
+ <li>
+ <a href="#docinfo_no_id.no_docinfo_test_1">No docinfo test 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.missing_id_test_4">Missing Id test 4</a>
+ </li>
+ </ul>
+ </div>
+ <div id="missing_id_test.missing_id_test_1">
+ <h3>
+ Missing Id test 1
+ </h3>
+ <div id="missing_id_test.missing_id_test_1">
+ </div>
+ </div>
+ <div id="missing_id_test.no_docinfo_test_1">
+ <h3>
+ No docinfo test 1
+ </h3>
+ <div id="missing_id_test.no_docinfo_test_1">
+ </div>
+ </div>
+ <div id="missing_id_test.missing_id_test_2">
+ <h3>
+ Missing Id test 2
+ </h3>
+ <div id="missing_id_test.missing_id_test_2">
+ </div>
+ </div>
+ <div id="docinfo_no_id.docinfo_no_id_1">
+ <h3>
+ Docinfo no id 1
+ </h3>
+ <div id="docinfo_no_id.docinfo_no_id_1">
+ </div>
+ </div>
+ <div id="missing_id_test.missing_id_test_3">
+ <h3>
+ Missing Id test 3
+ </h3>
+ <div id="missing_id_test.missing_id_test_3">
+ </div>
+ </div>
+ <div id="docinfo_no_id.no_docinfo_test_1">
+ <h3>
+ No docinfo test 1
+ </h3>
+ <div id="docinfo_no_id.no_docinfo_test_1">
+ </div>
+ </div>
+ <div id="missing_id_test.missing_id_test_4">
+ <h3>
+ Missing Id test 4
+ </h3>
+ <div id="missing_id_test.missing_id_test_4">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macro_shouldn_t_expand____date__" last-revision="__DATE__" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macro shouldn't expand: __DATE__</title>
+ <articleinfo>
+ <articlepurpose>
+ Unfortunately this does expand: 2000-Dec-20, but I'm not fixing it, as I don't
+ think it'll cause any real problems.
+ </articlepurpose>
+ </articleinfo>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macro shouldn't expand: __DATE__
+ </h3>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="testing_date_date" last-revision="2000-Dec-20" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Testing date: 2000-Dec-20</title>
+ <chapter id="testing_macro_date_nested_macro" last-revision="5 May 2013" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Testing macro date: 5 May 2013</title>
+ </chapter>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Testing date: 2000-Dec-20
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#testing_macro_date_nested_macro">Testing macro date: 5 May 2013</a>
+ </li>
+ </ul>
+ </div>
+ <div id="testing_macro_date_nested_macro">
+ <h3>
+ Testing macro date: 5 May 2013
+ </h3>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c___test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ test</title>
+ <articleinfo>
+ <legalnotice id="c___test.legal">
+ <para>
+ <code><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase
+ role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase>
+ <phrase role="keyword">print</phrase> <phrase role="string">&quot;Hello&quot;</phrase></code>
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
+ </articlepurpose>
+ </articleinfo>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ test
+ </h3>
+ <div class="legalnotice">
+ <p>
+ <code><span class="keyword">def</span> <span class="identifier">foo</span><span
+ class="special">(</span><span class="identifier">x</span><span class="special">):</span>
+ <span class="keyword">print</span> <span class="string">&quot;Hello&quot;</span></code>
+ </p>
+ </div>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">(</span><span class="identifier">x</span><span class="special">):</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c___test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ test</title>
+ <articleinfo>
+ <legalnotice id="c___test.legal">
+ <para>
+ <code><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase
+ role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase>
+ <phrase role="keyword">print</phrase> <phrase role="string">&quot;Hello&quot;</phrase></code>
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <code>This shouldn't be highlighted</code>
+ </articlepurpose>
+ </articleinfo>
+ <para>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase></programlisting>
+ </para>
+ <para>
+<programlisting>This shouldn't be highlighted</programlisting>
+ </para>
+ <para>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ test
+ </h3>
+ <div class="legalnotice">
+ <p>
+ <code><span class="keyword">def</span> <span class="identifier">foo</span><span
+ class="special">(</span><span class="identifier">x</span><span class="special">):</span>
+ <span class="keyword">print</span> <span class="string">&quot;Hello&quot;</span></code>
+ </p>
+ </div>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">(</span><span class="identifier">x</span><span class="special">):</span></pre>
+ </p>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted</pre>
+ </p>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ test</title>
+ <articleinfo>
+ <legalnotice id="c_test.legal">
+ <para>
+ <code><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase
+ role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase>
+ <phrase role="keyword">print</phrase> <phrase role="string">&quot;Hello&quot;</phrase></code>
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <code>This shouldn't be highlighted</code>
+ </articlepurpose>
+ </articleinfo>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ <article id="c___source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ source mode include</title>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ </article>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ <article id="python_source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Python source mode include</title>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase></programlisting>
+ </para>
+ </article>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ <article id="teletype_source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Teletype source mode include</title>
+ <para>
+<programlisting>This shouldn't be highlighted</programlisting>
+ </para>
+ </article>
+<programlisting>This shouldn't be highlighted.</programlisting>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ test
+ </h3>
+ <div class="legalnotice">
+ <p>
+ <code><span class="keyword">def</span> <span class="identifier">foo</span><span
+ class="special">(</span><span class="identifier">x</span><span class="special">):</span>
+ <span class="keyword">print</span> <span class="string">&quot;Hello&quot;</span></code>
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#c___source_mode_include">C++ source mode include</a>
+ </li>
+ <li>
+ <a href="#python_source_mode_include">Python source mode include</a>
+ </li>
+ <li>
+ <a href="#teletype_source_mode_include">Teletype source mode include</a>
+ </li>
+ </ul>
+ </div>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+ <div id="c___source_mode_include">
+ <h3>
+ C++ source mode include
+ </h3>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ </div>
+ <div id="python_source_mode_include">
+ <h3>
+ Python source mode include
+ </h3>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span></pre>
+ </p>
+ </div>
+ <div id="teletype_source_mode_include">
+ <h3>
+ Teletype source mode include
+ </h3>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted</pre>
+ </p>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="trailing_space_____" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Trailing Space</title>
+ <section id="trailing_space_____.body">
+ <title>Body</title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Trailing Space
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#trailing_space_____.body">Body</a>
+ </li>
+ </ul>
+ </div>
+ <div id="trailing_space_____.body">
+ <h3>
+ Body
+ </h3>
+ <div id="trailing_space_____.body">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="trailing_space" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Trailing Space</title>
+ <section id="trailing_space.body">
+ <title><link linkend="trailing_space.body">Body</link></title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Trailing Space
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#trailing_space.body">Body</a>
+ </li>
+ </ul>
+ </div>
+ <div id="trailing_space.body">
+ <h3>
+ Body
+ </h3>
+ <div id="trailing_space.body">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="1_5_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.5 Elements</title>
+ <para>
+ [ordered_list [item1][item2]]
+ </para>
+ <para>
+ [itemized_list [item1][item2]]
+ </para>
+ <para>
+ [block<simplesect><title>A <emphasis role="bold">simplesect</emphasis>!</title>]
+ </para>
+ <para>
+ [block</simplesect>]
+ </para>
+</article>
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'''<simplesect><title>'''A *simplesect*!'''</title>''']
+
+[block'''</simplesect>'''] \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="1_6_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.6 Elements</title>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ item1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ item2
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ item1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ item2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Check that <emphasis role="bold">bold text</emphasis> isn't confused with
+ a list.
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <simplesect><title>A <emphasis role="bold">simplesect</emphasis>!</title></simplesect>
+
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ 1.6 Elements
+ </h3>
+ <ol>
+ <li>
+ <div>
+ item1
+ </div>
+ </li>
+ <li>
+ <div>
+ item2
+ </div>
+ </li>
+ </ol>
+ <ul>
+ <li>
+ <div>
+ item1
+ </div>
+ </li>
+ <li>
+ <div>
+ item2
+ </div>
+ </li>
+ </ul>
+ <ol>
+ <li>
+ <div>
+ Check that <span class="bold"><strong>bold text</strong></span> isn't confused
+ with a list.
+ </div>
+ </li>
+ </ol>
+ <h3>
+ A <span class="bold"><strong>simplesect</strong></span>!
+ </h3>
+ </body>
+</html>
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'''<simplesect><title>'''A *simplesect*!'''</title>''']
+
+[block'''</simplesect>''']
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
--- /dev/null
+++ b/src/boost/tools/quickbook/test/empty-inc.quickbook
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="escape" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Escape</title>
+ <section id="escape.escape">
+ <title>Escape</title>
+ <para>
+ <emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+ </para>
+ <para>
+ This letter &#x3B1; should have a space either side of it.
+ </para>
+ <para>
+ These should be properly encoded: &gt; &lt; &quot;
+ </para>
+ <para>
+ This <link linkend="$0">link</link> shouldn't be changed.
+ </para>
+ <para>
+ Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+ </para>
+ <para>
+ <emphasis>This will be escaped</emphasis>
+ </para>
+ <para>
+ \[ generates [. \] generates ].
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Escape
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#escape.escape">Escape</a>
+ </li>
+ </ul>
+ </div>
+ <div id="escape.escape">
+ <h3>
+ Escape
+ </h3>
+ <div id="escape.escape">
+ <p>
+ <span class="emphasis"><em>Da do do do. Da da da da. That's all I have
+ to say to you.</em></span>
+ </p>
+ <p>
+ This letter &#x3B1; should have a space either side of it.
+ </p>
+ <p>
+ These should be properly encoded: &gt; &lt; &quot;
+ </p>
+ <p>
+ This <a>link</a> shouldn't be changed.
+ </p>
+ <p>
+ Some other problematic links: <a>one</a>, <a>two</a>, <a>three</a>.
+ </p>
+ <p>
+ <span class="emphasis"><em>This will be escaped</em></span>
+ </p>
+ <p>
+ \[ generates [. \] generates ].
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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]
+
+'''
+<emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+'''
+
+This letter '''&#x3B1;''' 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 linkend="$0">link</link> shouldn't be changed.'''
+
+'''
+Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+'''
+
+[template escapedtemplate <emphasis>This will be escaped</emphasis>]
+
+[`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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="escape" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Escape</title>
+ <section id="escape.escape">
+ <title><link linkend="escape.escape">Escape</link></title>
+ <para>
+ <emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+ </para>
+ <para>
+ This letter &#x3B1; should have a space either side of it.
+ </para>
+ <para>
+ These should be properly encoded: &gt; &lt; &quot;
+ </para>
+ <para>
+ This <link linkend="$0">link</link> shouldn't be changed.
+ </para>
+ <para>
+ Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+ </para>
+ <para>
+ <emphasis>This will be escaped</emphasis>
+ </para>
+ <para>
+ \[ generates [. \] generates ].
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Escape
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#escape.escape">Escape</a>
+ </li>
+ </ul>
+ </div>
+ <div id="escape.escape">
+ <h3>
+ Escape
+ </h3>
+ <div id="escape.escape">
+ <p>
+ <span class="emphasis"><em>Da do do do. Da da da da. That's all I have
+ to say to you.</em></span>
+ </p>
+ <p>
+ This letter &#x3B1; should have a space either side of it.
+ </p>
+ <p>
+ These should be properly encoded: &gt; &lt; &quot;
+ </p>
+ <p>
+ This <a>link</a> shouldn't be changed.
+ </p>
+ <p>
+ Some other problematic links: <a>one</a>, <a>two</a>, <a>three</a>.
+ </p>
+ <p>
+ <span class="emphasis"><em>This will be escaped</em></span>
+ </p>
+ <p>
+ \[ generates [. \] generates ].
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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]
+
+'''
+<emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+'''
+
+This letter '''&#x3B1;''' 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 linkend="$0">link</link> shouldn't be changed.'''
+
+'''
+Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+'''
+
+[template escapedtemplate <emphasis>This will be escaped</emphasis>]
+
+[`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]
+]
+
+'''<emphasis>something</emphasis> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="footnotes" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Footnotes</title>
+ <section id="footnotes.first">
+ <title><link linkend="footnotes.first">First Section</link></title>
+ <para>
+ Some<footnote id="footnotes.first.f0">
+ <para>
+ First footnote
+ </para>
+ </footnote> normal<footnote id="footnotes.first.f1">
+ <para>
+ Second footnote
+ </para>
+ </footnote> footnotes<footnote id="footnotes.first.f2">
+ <para>
+ Third footnote
+ </para>
+ </footnote>.
+ </para>
+ </section>
+ <section id="footnotes.second">
+ <title><link linkend="footnotes.second">Second Section</link></title>
+ <para>
+ Some<footnote id="f1"><para>Boostbook footnote</para></footnote>
+boostbook<footnote><para>Footnote without id</para></footnote>
+footnotes<footnote><para>Another footnote without an id</para></footnote>.
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Footnotes
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#footnotes.first">First Section</a>
+ </li>
+ <li>
+ <a href="#footnotes.second">Second Section</a>
+ </li>
+ </ul>
+ </div>
+ <div id="footnotes.first">
+ <h3>
+ First Section
+ </h3>
+ <div id="footnotes.first">
+ <p>
+ Some<a id="footnotes.first.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ normal<a id="footnotes.first.f1" href="#footnote-2"><sup class="footnote">[2]</sup></a>
+ footnotes<a id="footnotes.first.f2" href="#footnote-3"><sup class="footnote">[3]</sup></a>.
+ </p>
+ </div>
+ </div>
+ <div id="footnotes.second">
+ <h3>
+ Second Section
+ </h3>
+ <div id="footnotes.second">
+ <p>
+ Some<a id="f1" href="#footnote-4"><sup class="footnote">[4]</sup></a> boostbook<a
+ id="footnote-6" href="#footnote-5"><sup class="footnote">[5]</sup></a>
+ footnotes<a id="footnote-8" href="#footnote-7"><sup class="footnote">[6]</sup></a>.
+ </p>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#footnotes.first.f0"><sup>[1]</sup></a> First footnote
+ </p>
+ </div>
+ <div id="footnote-2" class="footnote">
+ <p>
+ <a href="#footnotes.first.f1"><sup>[2]</sup></a> Second footnote
+ </p>
+ </div>
+ <div id="footnote-3" class="footnote">
+ <p>
+ <a href="#footnotes.first.f2"><sup>[3]</sup></a> Third footnote
+ </p>
+ </div>
+ <div id="footnote-4" class="footnote">
+ <p>
+ <a href="#f1"><sup>[4]</sup></a> Boostbook footnote
+ </p>
+ </div>
+ <div id="footnote-5" class="footnote">
+ <p>
+ <a href="#footnote-6"><sup>[5]</sup></a> Footnote without id
+ </p>
+ </div>
+ <div id="footnote-7" class="footnote">
+ <p>
+ <a href="#footnote-8"><sup>[6]</sup></a> Another footnote without an id
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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'''<footnote id="f1"><para>Boostbook footnote</para></footnote>'''
+boostbook'''<footnote><para>Footnote without id</para></footnote>'''
+footnotes'''<footnote><para>Another footnote without an id</para></footnote>'''.
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.1</title>
+ <bridgehead renderas="sect2" id="heading_test_1_1.h0">
+ <phrase id="heading_test_1_1.generic_header"/><link linkend="heading_test_1_1.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id=".level_1">
+ Level 1
+ </bridgehead>
+ <bridgehead renderas="sect2" id=".level_2">
+ Level 2
+ </bridgehead>
+ <bridgehead renderas="sect3" id=".level_3">
+ Level 3
+ </bridgehead>
+ <bridgehead renderas="sect4" id=".level_4">
+ Level 4
+ </bridgehead>
+ <bridgehead renderas="sect5" id=".level_5">
+ Level 5
+ </bridgehead>
+ <bridgehead renderas="sect6" id=".level_6">
+ Level 6
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._emphasis_role__bold__bold__emphasis_">
+ <emphasis role="bold">Bold</emphasis>
+ </bridgehead>
+ <bridgehead renderas="sect1" id=".comment">
+ Comment
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._notanid">
+ :notanid
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._also_not_an_id">
+ :also not an id
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._anchor_id__anchor___anchor_heading">
+ <anchor id="anchor"/>Anchor heading
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._link_linkend__anchor__link_heading__link_">
+ <link linkend="anchor">Link heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id=".h1">
+ H1
+ </bridgehead>
+ <section id="heading_test_1_1.s1">
+ <title>S1</title>
+ <bridgehead renderas="sect2" id="s1.h2">
+ H2
+ </bridgehead>
+ <section id="heading_test_1_1.s2">
+ <title>S2</title>
+ <bridgehead renderas="sect3" id="s2.h3">
+ H3
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_1.s1.h0">
+ <phrase id="heading_test_1_1.s1.h4"/><link linkend="heading_test_1_1.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_1.s3">
+ <title>S3</title>
+ <bridgehead renderas="sect3" id="s3.h5">
+ H5
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_1.s1.h1">
+ <phrase id="heading_test_1_1.s1.h6"/><link linkend="heading_test_1_1.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="s3.h7">
+ H7
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_1.s1">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_1.generic_header">
+ Generic header
+ </h2>
+ <h1 id=".level_1">
+ Level 1
+ </h1>
+ <h2 id=".level_2">
+ Level 2
+ </h2>
+ <h3 id=".level_3">
+ Level 3
+ </h3>
+ <h4 id=".level_4">
+ Level 4
+ </h4>
+ <h5 id=".level_5">
+ Level 5
+ </h5>
+ <h6 id=".level_6">
+ Level 6
+ </h6>
+ <h1 id="._emphasis_role__bold__bold__emphasis_">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id=".comment">
+ Comment
+ </h1>
+ <h1 id="._notanid">
+ :notanid
+ </h1>
+ <h1 id="._also_not_an_id">
+ :also not an id
+ </h1>
+ <h1 id="._anchor_id__anchor___anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="._link_linkend__anchor__link_heading__link_">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h1 id=".h1">
+ H1
+ </h1>
+ <h1 id="s3.h7">
+ H7
+ </h1>
+ <div id="heading_test_1_1.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_1.s1">
+ <h2 id="s1.h2">
+ H2
+ </h2>
+ <h3 id="heading_test_1_1.s1.h4">
+ H4
+ </h3>
+ <h3 id="heading_test_1_1.s1.h6">
+ H6
+ </h3>
+ </div>
+ <div id="heading_test_1_1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_1.s2">
+ <h3 id="s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_1.s3">
+ <h3 id="s3.h5">
+ H5
+ </h3>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="header" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Header</title>
+ <bridgehead renderas="sect2" id="header.h0">
+ <phrase id="header.header_test"/><link linkend="header.header_test">Header Test</link>
+ </bridgehead>
+ <para>
+ Testing headers without sections.
+ </para>
+ <bridgehead renderas="sect2" id="header.h1">
+ <phrase id="header._not_an_id"/><link linkend="header._not_an_id">:Not an Id</link>
+ </bridgehead>
+ <para>
+ Paragraph.
+ </para>
+ <bridgehead renderas="sect3" id="header.h2">
+ <phrase id="header._not_an_id_again"/><link linkend="header._not_an_id_again">:Not
+ an Id again</link>
+ </bridgehead>
+ <para>
+ Paragraph.
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Header
+ </h3>
+ <h2 id="header.header_test">
+ Header Test
+ </h2>
+ <p>
+ Testing headers without sections.
+ </p>
+ <h2 id="header._not_an_id">
+ :Not an Id
+ </h2>
+ <p>
+ Paragraph.
+ </p>
+ <h3 id="header._not_an_id_again">
+ :Not an Id again
+ </h3>
+ <p>
+ Paragraph.
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.5</title>
+ <bridgehead renderas="sect2" id="heading_test_1_5.h0">
+ <phrase id="heading_test_1_5.generic_header"/><link linkend="heading_test_1_5.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h2">
+ <phrase id="heading_test_1_5.level_1"/><link linkend="heading_test_1_5.level_1">Level
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_5.h3">
+ <phrase id="heading_test_1_5.level_2"/><link linkend="heading_test_1_5.level_2">Level
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="heading_test_1_5.h4">
+ <phrase id="heading_test_1_5.level_3"/><link linkend="heading_test_1_5.level_3">Level
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="heading_test_1_5.h5">
+ <phrase id="heading_test_1_5.level_4"/><link linkend="heading_test_1_5.level_4">Level
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="heading_test_1_5.h6">
+ <phrase id="heading_test_1_5.level_5"/><link linkend="heading_test_1_5.level_5">Level
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="heading_test_1_5.h8">
+ <phrase id="heading_test_1_5.level_6"/><link linkend="heading_test_1_5.level_6">Level
+ 6</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h9">
+ <phrase id="heading_test_1_5._emphasis_role__bold__bold__emphasis_"/><link linkend="heading_test_1_5._emphasis_role__bold__bold__emphasis_"><emphasis
+ role="bold">Bold</emphasis></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h10">
+ <phrase id="heading_test_1_5.comment"/><link linkend="heading_test_1_5.comment">Comment</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h11">
+ <phrase id="heading_test_1_5._notanid"/><link linkend="heading_test_1_5._notanid">:notanid</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h12">
+ <phrase id="heading_test_1_5._also_not_an_id"/><link linkend="heading_test_1_5._also_not_an_id">:also
+ not an id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h13">
+ <phrase id="heading_test_1_5._anchor_id__anchor___anchor_heading"/><link linkend="heading_test_1_5._anchor_id__anchor___anchor_heading"><anchor
+ id="anchor"/>Anchor heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h14">
+ <phrase id="heading_test_1_5._link_linkend__anchor__link_heading__link_"/><link
+ linkend="heading_test_1_5._link_linkend__anchor__link_heading__link_"><link linkend="anchor">Link
+ heading</link></link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_5.h15">
+ <phrase id="heading_test_1_5.h1"/><link linkend="heading_test_1_5.h1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_5.s1">
+ <title><link linkend="heading_test_1_5.s1">S1</link></title>
+ <bridgehead renderas="sect2" id="heading_test_1_5.s1.h0">
+ <phrase id="heading_test_1_5.s1.h2"/><link linkend="heading_test_1_5.s1.h2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_5.s1.s2">
+ <title><link linkend="heading_test_1_5.s1.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_5.s1.s2.h0">
+ <phrase id="heading_test_1_5.s1.s2.h3"/><link linkend="heading_test_1_5.s1.s2.h3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_5.s1.h1">
+ <phrase id="heading_test_1_5.s1.h4"/><link linkend="heading_test_1_5.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_5.s1.s3">
+ <title><link linkend="heading_test_1_5.s1.s3">S3</link></title>
+ <bridgehead renderas="sect4" id="heading_test_1_5.s1.s3.h0">
+ <phrase id="heading_test_1_5.s1.s3.h5"/><link linkend="heading_test_1_5.s1.s3.h5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_5.s1.h3">
+ <phrase id="heading_test_1_5.s1.h6"/><link linkend="heading_test_1_5.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h16">
+ <phrase id="heading_test_1_5.h7"/><link linkend="heading_test_1_5.h7">H7</link>
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_5.s1">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_5.generic_header">
+ Generic header
+ </h2>
+ <h1 id="heading_test_1_5.level_1">
+ Level 1
+ </h1>
+ <h2 id="heading_test_1_5.level_2">
+ Level 2
+ </h2>
+ <h3 id="heading_test_1_5.level_3">
+ Level 3
+ </h3>
+ <h4 id="heading_test_1_5.level_4">
+ Level 4
+ </h4>
+ <h5 id="heading_test_1_5.level_5">
+ Level 5
+ </h5>
+ <h6 id="heading_test_1_5.level_6">
+ Level 6
+ </h6>
+ <h1 id="heading_test_1_5._emphasis_role__bold__bold__emphasis_">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id="heading_test_1_5.comment">
+ Comment
+ </h1>
+ <h1 id="heading_test_1_5._notanid">
+ :notanid
+ </h1>
+ <h1 id="heading_test_1_5._also_not_an_id">
+ :also not an id
+ </h1>
+ <h1 id="heading_test_1_5._anchor_id__anchor___anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="heading_test_1_5._link_linkend__anchor__link_heading__link_">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h2 id="heading_test_1_5.h1">
+ H1
+ </h2>
+ <h1 id="heading_test_1_5.h7">
+ H7
+ </h1>
+ <div id="heading_test_1_5.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_5.s1">
+ <h2 id="heading_test_1_5.s1.h2">
+ H2
+ </h2>
+ <h2 id="heading_test_1_5.s1.h4">
+ H4
+ </h2>
+ <h2 id="heading_test_1_5.s1.h6">
+ H6
+ </h2>
+ </div>
+ <div id="heading_test_1_5.s1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_5.s1.s2">
+ <h3 id="heading_test_1_5.s1.s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_5.s1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_5.s1.s3">
+ <h4 id="heading_test_1_5.s1.s3.h5">
+ H5
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.6</title>
+ <bridgehead renderas="sect2" id="heading_test_1_6.h0">
+ <phrase id="heading_test_1_6.generic_header"/><link linkend="heading_test_1_6.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h2">
+ <phrase id="heading_test_1_6.level_1"/><link linkend="heading_test_1_6.level_1">Level
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_6.h3">
+ <phrase id="heading_test_1_6.level_2"/><link linkend="heading_test_1_6.level_2">Level
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="heading_test_1_6.h4">
+ <phrase id="heading_test_1_6.level_3"/><link linkend="heading_test_1_6.level_3">Level
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="heading_test_1_6.h5">
+ <phrase id="heading_test_1_6.level_4"/><link linkend="heading_test_1_6.level_4">Level
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="heading_test_1_6.h6">
+ <phrase id="heading_test_1_6.level_5"/><link linkend="heading_test_1_6.level_5">Level
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="heading_test_1_6.h8">
+ <phrase id="heading_test_1_6.level_6"/><link linkend="heading_test_1_6.level_6">Level
+ 6</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h9">
+ <phrase id="heading_test_1_6.bold"/><link linkend="heading_test_1_6.bold"><emphasis
+ role="bold">Bold</emphasis></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h10">
+ <phrase id="heading_test_1_6.comment"/><link linkend="heading_test_1_6.comment">Comment</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h11">
+ <phrase id="heading_test_1_6.anchor_anchor_heading"/><link linkend="heading_test_1_6.anchor_anchor_heading"><anchor
+ id="anchor"/>Anchor heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h12">
+ <phrase id="heading_test_1_6.link_anchor_link_heading"/><link linkend="heading_test_1_6.link_anchor_link_heading"><link
+ linkend="anchor">Link heading</link></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h13">
+ <phrase id="heading_test_1_6.h1"/><link linkend="heading_test_1_6.h1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1">
+ <title><link linkend="heading_test_1_6.s1">S1</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1.h0">
+ <phrase id="heading_test_1_6.s1.h2"/><link linkend="heading_test_1_6.s1.h2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1.s2">
+ <title><link linkend="heading_test_1_6.s1.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1.s2.h0">
+ <phrase id="heading_test_1_6.s1.s2.h3"/><link linkend="heading_test_1_6.s1.s2.h3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1.h1">
+ <phrase id="heading_test_1_6.s1.h4"/><link linkend="heading_test_1_6.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1.s3">
+ <title><link linkend="heading_test_1_6.s1.s3">S3</link></title>
+ <bridgehead renderas="sect4" id="heading_test_1_6.s1.s3.h0">
+ <phrase id="heading_test_1_6.s1.s3.h5"/><link linkend="heading_test_1_6.s1.s3.h5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1.h3">
+ <phrase id="heading_test_1_6.s1.h6"/><link linkend="heading_test_1_6.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h14">
+ <phrase id="heading_test_1_6.h7"/><link linkend="heading_test_1_6.h7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h15">
+ <phrase id="heading_test_1_6.a1"/><link linkend="heading_test_1_6.a1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1_0">
+ <title><link linkend="heading_test_1_6.s1_0">S1</link></title>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1_0.h0">
+ <phrase id="heading_test_1_6.s1_0.a2"/><link linkend="heading_test_1_6.s1_0.a2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1_0.s2">
+ <title><link linkend="heading_test_1_6.s1_0.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1_0.s2.h0">
+ <phrase id="heading_test_1_6.s1_0.s2.a3"/><link linkend="heading_test_1_6.s1_0.s2.a3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1_0.h1">
+ <phrase id="heading_test_1_6.s1_0.a4"/><link linkend="heading_test_1_6.s1_0.a4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1_0.s3">
+ <title><link linkend="heading_test_1_6.s1_0.s3">S3</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1_0.s3.h0">
+ <phrase id="heading_test_1_6.s1_0.s3.a5"/><link linkend="heading_test_1_6.s1_0.s3.a5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1_0.h2">
+ <phrase id="heading_test_1_6.s1_0.a6"/><link linkend="heading_test_1_6.s1_0.a6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h16">
+ <phrase id="heading_test_1_6.a7"/><link linkend="heading_test_1_6.a7">H7</link>
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_6.s1">S1</a>
+ </li>
+ <li>
+ <a href="#heading_test_1_6.s1_0">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_6.generic_header">
+ Generic header
+ </h2>
+ <h1 id="heading_test_1_6.level_1">
+ Level 1
+ </h1>
+ <h2 id="heading_test_1_6.level_2">
+ Level 2
+ </h2>
+ <h3 id="heading_test_1_6.level_3">
+ Level 3
+ </h3>
+ <h4 id="heading_test_1_6.level_4">
+ Level 4
+ </h4>
+ <h5 id="heading_test_1_6.level_5">
+ Level 5
+ </h5>
+ <h6 id="heading_test_1_6.level_6">
+ Level 6
+ </h6>
+ <h1 id="heading_test_1_6.bold">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id="heading_test_1_6.comment">
+ Comment
+ </h1>
+ <h1 id="heading_test_1_6.anchor_anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="heading_test_1_6.link_anchor_link_heading">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h1 id="heading_test_1_6.h1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_6.h7">
+ H7
+ </h1>
+ <h1 id="heading_test_1_6.a1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_6.a7">
+ H7
+ </h1>
+ <div id="heading_test_1_6.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_6.s1">
+ <h3 id="heading_test_1_6.s1.h2">
+ H2
+ </h3>
+ <h2 id="heading_test_1_6.s1.h4">
+ H4
+ </h2>
+ <h2 id="heading_test_1_6.s1.h6">
+ H6
+ </h2>
+ </div>
+ <div id="heading_test_1_6.s1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_6.s1.s2">
+ <h3 id="heading_test_1_6.s1.s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_6.s1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_6.s1.s3">
+ <h4 id="heading_test_1_6.s1.s3.h5">
+ H5
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="heading_test_1_6.s1_0">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_6.s1_0">
+ <h2 id="heading_test_1_6.s1_0.a2">
+ H2
+ </h2>
+ <h2 id="heading_test_1_6.s1_0.a4">
+ H4
+ </h2>
+ <h3 id="heading_test_1_6.s1_0.a6">
+ H6
+ </h3>
+ </div>
+ <div id="heading_test_1_6.s1_0.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_6.s1_0.s2">
+ <h3 id="heading_test_1_6.s1_0.s2.a3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_6.s1_0.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_6.s1_0.s3">
+ <h3 id="heading_test_1_6.s1_0.s3.a5">
+ H5
+ </h3>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.7</title>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h0">
+ <phrase id="heading_test_1_7.generic_header"/><link linkend="heading_test_1_7.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h2">
+ <phrase id="heading_test_1_7.level_1"/><link linkend="heading_test_1_7.level_1">Level
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h3">
+ <phrase id="heading_test_1_7.level_2"/><link linkend="heading_test_1_7.level_2">Level
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="heading_test_1_7.h4">
+ <phrase id="heading_test_1_7.level_3"/><link linkend="heading_test_1_7.level_3">Level
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="heading_test_1_7.h5">
+ <phrase id="heading_test_1_7.level_4"/><link linkend="heading_test_1_7.level_4">Level
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="heading_test_1_7.h6">
+ <phrase id="heading_test_1_7.level_5"/><link linkend="heading_test_1_7.level_5">Level
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="heading_test_1_7.h8">
+ <phrase id="heading_test_1_7.level_6"/><link linkend="heading_test_1_7.level_6">Level
+ 6</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h9">
+ <phrase id="heading_test_1_7.bold"/><link linkend="heading_test_1_7.bold"><emphasis
+ role="bold">Bold</emphasis></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h10">
+ <phrase id="heading_test_1_7.comment"/><link linkend="heading_test_1_7.comment">Comment</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h11">
+ <phrase id="heading_test_1_7.anchor_anchor_heading"/><link linkend="heading_test_1_7.anchor_anchor_heading"><anchor
+ id="anchor"/>Anchor heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h12">
+ <phrase id="heading_test_1_7.link_anchor_link_heading"/><link linkend="heading_test_1_7.link_anchor_link_heading"><link
+ linkend="anchor">Link heading</link></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h13">
+ <phrase id="heading_test_1_7.h1"/><link linkend="heading_test_1_7.h1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1">
+ <title><link linkend="heading_test_1_7.s1">S1</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1.h0">
+ <phrase id="heading_test_1_7.s1.h2"/><link linkend="heading_test_1_7.s1.h2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1.s2">
+ <title><link linkend="heading_test_1_7.s1.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1.s2.h0">
+ <phrase id="heading_test_1_7.s1.s2.h3"/><link linkend="heading_test_1_7.s1.s2.h3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1.h1">
+ <phrase id="heading_test_1_7.s1.h4"/><link linkend="heading_test_1_7.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1.s3">
+ <title><link linkend="heading_test_1_7.s1.s3">S3</link></title>
+ <bridgehead renderas="sect4" id="heading_test_1_7.s1.s3.h0">
+ <phrase id="heading_test_1_7.s1.s3.h5"/><link linkend="heading_test_1_7.s1.s3.h5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1.h3">
+ <phrase id="heading_test_1_7.s1.h6"/><link linkend="heading_test_1_7.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h14">
+ <phrase id="heading_test_1_7.h7"/><link linkend="heading_test_1_7.h7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h15">
+ <phrase id="heading_test_1_7.a1"/><link linkend="heading_test_1_7.a1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0">
+ <title><link linkend="heading_test_1_7.s1_0">S1</link></title>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1_0.h0">
+ <phrase id="heading_test_1_7.s1_0.a2"/><link linkend="heading_test_1_7.s1_0.a2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0.s2">
+ <title><link linkend="heading_test_1_7.s1_0.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.s2.h0">
+ <phrase id="heading_test_1_7.s1_0.s2.a3"/><link linkend="heading_test_1_7.s1_0.s2.a3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1_0.h1">
+ <phrase id="heading_test_1_7.s1_0.a4"/><link linkend="heading_test_1_7.s1_0.a4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0.s3">
+ <title><link linkend="heading_test_1_7.s1_0.s3">S3</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.s3.h0">
+ <phrase id="heading_test_1_7.s1_0.s3.a5"/><link linkend="heading_test_1_7.s1_0.s3.a5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.h2">
+ <phrase id="heading_test_1_7.s1_0.a6"/><link linkend="heading_test_1_7.s1_0.a6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h16">
+ <phrase id="heading_test_1_7.a7"/><link linkend="heading_test_1_7.a7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h17">
+ <phrase id="heading_test_1_7.abc-2"/><link linkend="heading_test_1_7.abc-2">Template
+ Id</link>
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_7.s1">S1</a>
+ </li>
+ <li>
+ <a href="#heading_test_1_7.s1_0">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_7.generic_header">
+ Generic header
+ </h2>
+ <h1 id="heading_test_1_7.level_1">
+ Level 1
+ </h1>
+ <h2 id="heading_test_1_7.level_2">
+ Level 2
+ </h2>
+ <h3 id="heading_test_1_7.level_3">
+ Level 3
+ </h3>
+ <h4 id="heading_test_1_7.level_4">
+ Level 4
+ </h4>
+ <h5 id="heading_test_1_7.level_5">
+ Level 5
+ </h5>
+ <h6 id="heading_test_1_7.level_6">
+ Level 6
+ </h6>
+ <h1 id="heading_test_1_7.bold">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id="heading_test_1_7.comment">
+ Comment
+ </h1>
+ <h1 id="heading_test_1_7.anchor_anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="heading_test_1_7.link_anchor_link_heading">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h1 id="heading_test_1_7.h1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_7.h7">
+ H7
+ </h1>
+ <h1 id="heading_test_1_7.a1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_7.a7">
+ H7
+ </h1>
+ <h2 id="heading_test_1_7.abc-2">
+ Template Id
+ </h2>
+ <div id="heading_test_1_7.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_7.s1">
+ <h3 id="heading_test_1_7.s1.h2">
+ H2
+ </h3>
+ <h2 id="heading_test_1_7.s1.h4">
+ H4
+ </h2>
+ <h2 id="heading_test_1_7.s1.h6">
+ H6
+ </h2>
+ </div>
+ <div id="heading_test_1_7.s1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_7.s1.s2">
+ <h3 id="heading_test_1_7.s1.s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_7.s1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_7.s1.s3">
+ <h4 id="heading_test_1_7.s1.s3.h5">
+ H5
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="heading_test_1_7.s1_0">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_7.s1_0">
+ <h2 id="heading_test_1_7.s1_0.a2">
+ H2
+ </h2>
+ <h2 id="heading_test_1_7.s1_0.a4">
+ H4
+ </h2>
+ <h3 id="heading_test_1_7.s1_0.a6">
+ H6
+ </h3>
+ </div>
+ <div id="heading_test_1_7.s1_0.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_7.s1_0.s2">
+ <h3 id="heading_test_1_7.s1_0.s2.a3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_7.s1_0.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_7.s1_0.s3">
+ <h3 id="heading_test_1_7.s1_0.s3.a5">
+ H5
+ </h3>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="horizontal_rule" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Horizontal Rule</title>
+ <para/>
+ <para>
+ This should be displayed.
+ </para>
+ <para/>
+ <para/>
+ <para>
+ * This shouldn't be a list
+ </para>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <para/>
+ <para/>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Horizontal Rule
+ </h3>
+ <p>
+ </p>
+ <p>
+ This should be displayed.
+ </p>
+ <p>
+ </p>
+ <p>
+ </p>
+ <p>
+ * This shouldn't be a list
+ </p>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <p>
+ </p>
+ <p>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="horizontal_rule" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Horizontal Rule</title>
+ <para/>
+ <para>
+ This should be displayed.
+ </para>
+ <para/>
+ <para/>
+ <para>
+ * This shouldn't be a list
+ </para>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <para>
+ <emphasis role="bold">This should be displayed. Maybe that's wrong?</emphasis>
+ </para>
+ <para/>
+ <para>
+ Odd way to get text displayed.
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Horizontal Rule
+ </h3>
+ <p>
+ </p>
+ <p>
+ This should be displayed.
+ </p>
+ <p>
+ </p>
+ <p>
+ </p>
+ <p>
+ * This shouldn't be a list
+ </p>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <p>
+ <span class="bold"><strong>This should be displayed. Maybe that's wrong?</strong></span>
+ </p>
+ <p>
+ </p>
+ <p>
+ Odd way to get text displayed.
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ x="0.00000000"
+ y="0.00000000"
+ id="svg6221"
+ width="745.60706"
+ height="513.25690"
+ sodipodi:version="0.32"
+ inkscape:version="0.42"
+ sodipodi:docname="Open_Clipart_Library_logo.svg">
+ <sodipodi:namedview
+ inkscape:cy="893.36713"
+ inkscape:cx="305.25953"
+ inkscape:zoom="0.86831670"
+ inkscape:window-height="913"
+ inkscape:window-width="1272"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:window-x="0"
+ inkscape:window-y="30"
+ inkscape:current-layer="svg6221" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Open Clip Art Logo</dc:title>
+ <dc:date>10-01-2004</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Andreas Nilsson</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <cc:license
+ rdf:resource="http://web.resource.org/cc/PublicDomain" />
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>Jon Phillips, Tobias Jakobs</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:description>This is one version of the official Open Clip Art Library logo.</dc:description>
+ <dc:subject>logo, open clip art library logo, logotype</dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://web.resource.org/cc/PublicDomain">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3" />
+ <path
+ d="M 405.82430,48.494855 C 396.10958,45.870336 386.13966,51.583653 383.51514,61.298370 L 298.15838,376.92441 C 295.53385,386.63914 301.24717,396.41506 310.96188,399.03957 L 626.58791,484.39635 C 636.30255,487.02086 646.27253,481.30755 648.89705,471.59283 L 734.25375,155.96679 C 735.49097,151.38725 734.71475,146.85751 732.70181,142.96928 L 732.70181,142.77528 L 732.50782,142.38730 L 732.50782,142.19331 C 732.46276,142.11490 732.36008,142.07704 732.31383,141.99931 L 717.76438,111.93045 L 651.80695,114.84034 L 405.82430,48.494855 z "
+ style="fill:#000000;fill-opacity:0.20000000;fill-rule:evenodd;stroke:none;stroke-width:1.6789947;stroke-miterlimit:4.0000000;stroke-opacity:0.20000000"
+ id="rect6080" />
+ <rect
+ width="363.28452"
+ height="363.28452"
+ rx="2.9260478"
+ ry="2.9260478"
+ x="363.42282"
+ y="-78.837021"
+ transform="matrix(0.965391,0.260807,-0.260807,0.965391,0.000000,0.000000)"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:7.7597070;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect911" />
+ <rect
+ width="288.49521"
+ height="288.49521"
+ rx="2.3236644"
+ ry="2.3236644"
+ x="398.72931"
+ y="-39.355053"
+ transform="matrix(0.965391,0.260807,-0.260807,0.965391,0.000000,0.000000)"
+ style="fill:#f3e533;fill-opacity:1.0000000;fill-rule:evenodd;stroke-width:0.79413080pt"
+ id="rect912" />
+ <path
+ d="M 552.48969,32.227283 L 486.13725,53.566475 L 486.71922,53.760468 L 235.30476,53.760468 C 225.24184,53.760468 217.26344,61.738811 217.26344,71.801785 L 217.26344,398.87339 C 217.26344,408.93643 225.24178,416.91471 235.30476,416.91471 L 562.37636,416.91471 C 572.43940,416.91471 580.41768,408.93637 580.41768,398.87339 L 580.41768,71.801785 C 580.41768,66.612962 578.25806,62.108236 574.79189,58.804276 L 552.48969,32.227283 z "
+ style="fill:#000000;fill-opacity:0.20000000;fill-rule:evenodd;stroke:none;stroke-width:1.6789950;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect6079" />
+ <rect
+ width="363.28418"
+ height="363.28418"
+ rx="2.9260466"
+ ry="2.9260466"
+ x="192.47523"
+ y="30.531385"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:7.7597060;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect913" />
+ <rect
+ width="288.49512"
+ height="288.49512"
+ rx="2.3236635"
+ ry="2.3236635"
+ x="227.78207"
+ y="70.013809"
+ style="fill:#ff7f00;fill-rule:evenodd;stroke-width:0.79413080pt"
+ id="rect914" />
+ <path
+ d="M 348.20848,28.541423 L 291.17463,66.563983 L 305.14211,68.115925 L 55.667554,157.15854 C 46.188236,160.53570 41.232826,170.76437 44.609974,180.24367 L 138.89040,445.04365 L 132.29465,444.84966 L 128.02682,485.39411 L 163.52746,498.58561 L 163.91546,498.58561 C 168.05181,500.44490 172.88654,501.00342 177.49494,499.36159 L 485.55528,389.56176 C 495.03452,386.18460 499.79600,375.76200 496.41886,366.28264 L 386.81301,58.416291 C 385.25785,54.051177 382.02384,50.975478 378.27734,48.910652 L 348.20848,28.541423 z "
+ style="fill:#000000;fill-opacity:0.20000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500002;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect6078" />
+ <rect
+ width="363.28326"
+ height="363.28326"
+ rx="2.9260383"
+ ry="2.9260383"
+ x="-41.716114"
+ y="142.20343"
+ transform="matrix(0.942003,-0.335604,0.335604,0.942003,0.000000,0.000000)"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:7.7596951;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect915" />
+ <rect
+ width="288.49469"
+ height="288.49469"
+ rx="2.3236592"
+ ry="2.3236592"
+ x="-6.4090877"
+ y="181.68738"
+ transform="matrix(0.942003,-0.335604,0.335604,0.942003,0.000000,0.000000)"
+ style="fill:#bf0000;fill-rule:evenodd;stroke-width:0.79413080pt"
+ id="rect916" />
+</svg>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="identifiers_in_quickbook_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Identifiers in quickbook 1.5</title>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h0">
+ <phrase id="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_"/><link
+ linkend="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_">Test
+ heading with <code><phrase role="identifier">code</phrase></code></link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h1">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10_0"/><link linkend="identifiers_in_quickbook_1_5.identifier_10_0">Identifier
+ 10</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h2">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10_1"/><link linkend="identifiers_in_quickbook_1_5.identifier_10_1">Identifier
+ 10</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10_2">
+ <title>Identifier 10</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h3">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h4">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h5">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.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</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h6">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h7">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h8">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h9">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h10">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h11">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h12">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.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</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h13">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h14">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h15">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h16">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h17">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h18">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h19">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h20">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h21">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h22">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h23">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h24">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h25">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h26">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h27">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h28">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h29">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h30">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h31">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h32">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h33">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h34">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h35">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h36">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h37">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h38">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h39">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h40">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h41">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.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</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h42">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h43">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h44">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h45">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h46">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h47">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h48">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h49">
+ <phrase id="identifiers_in_quickbook_1_5.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_5.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h50">
+ <phrase id="identifiers_in_quickbook_1_5.a0"/><link linkend="identifiers_in_quickbook_1_5.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h51">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h52">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h53">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h54">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h55">
+ <phrase id="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization"/><link
+ linkend="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h56">
+ <phrase id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0"/><link
+ linkend="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h57">
+ <phrase id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1"/><link
+ linkend="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <section id="identifiers_in_quickbook_1_5.identifier_10">
+ <title><link linkend="identifiers_in_quickbook_1_5.identifier_10">Identifier
+ 10</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h0">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.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</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h1">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h2">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.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</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h4">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h5">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h6">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h7">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h8">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h9">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h10">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.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</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h11">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h12">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h13">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h14">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h15">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h16">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h17">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h18">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h19">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h20">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h21">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h22">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h23">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h24">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h25">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h26">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h27">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h28">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h29">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h30">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h31">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h32">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h33">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h34">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h35">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h36">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h37">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h38">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h39">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.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</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h40">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h41">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h42">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h43">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h44">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h45">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h46">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h47">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h48">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.a0"/><link linkend="identifiers_in_quickbook_1_5.identifier_10.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h49">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h50">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h51">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h52">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h53">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h54">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h55">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10.h3">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10.h3_0">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="identifiers_in_quickbook_1_5.punctuation___stuff">
+ <title><link linkend="identifiers_in_quickbook_1_5.punctuation___stuff">Punctuation
+ &amp; stuff</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.punctuation___stuff.h0">
+ <phrase id="identifiers_in_quickbook_1_5.punctuation___stuff.a___b"/><link
+ linkend="identifiers_in_quickbook_1_5.punctuation___stuff.a___b">A + B</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.punctuation___stuff.h1">
+ <phrase id="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0"/><link linkend="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0">A
+ + B</link>
+ </bridgehead>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Identifiers in quickbook 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#identifiers_in_quickbook_1_5.identifier_10">Identifier 10</a>
+ </li>
+ <li>
+ <a href="#identifiers_in_quickbook_1_5.punctuation___stuff">Punctuation
+ &amp; stuff</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_">
+ Test heading with <code><span class="identifier">code</span></code>
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.identifier_10_0">
+ Identifier 10
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.identifier_10_1">
+ Identifier 10
+ </h2>
+ <div id="identifiers_in_quickbook_1_5.identifier_10_2" class="table">
+ <table>
+ <caption>Identifier 10</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.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
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.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
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.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
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.a0">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <div id="identifiers_in_quickbook_1_5.identifier_10">
+ <h3>
+ Identifier 10
+ </h3>
+ <div id="identifiers_in_quickbook_1_5.identifier_10">
+ <h3 id="identifiers_in_quickbook_1_5.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
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.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
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.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
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.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
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.a0">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <div id="identifiers_in_quickbook_1_5.identifier_10.h3" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="identifiers_in_quickbook_1_5.identifier_10.h3_0" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="identifiers_in_quickbook_1_5.punctuation___stuff">
+ <h3>
+ Punctuation &amp; stuff
+ </h3>
+ <div id="identifiers_in_quickbook_1_5.punctuation___stuff">
+ <h3 id="identifiers_in_quickbook_1_5.punctuation___stuff.a___b">
+ A + B
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0">
+ A + B
+ </h3>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="identifiers_in_quickbook_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Identifiers in quickbook 1.6</title>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h0">
+ <phrase id="identifiers_in_quickbook_1_6.test_heading_with_code"/><link linkend="identifiers_in_quickbook_1_6.test_heading_with_code">Test
+ heading with <code><phrase role="identifier">code</phrase></code></link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h1">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10_0"/><link linkend="identifiers_in_quickbook_1_6.identifier_10_0">Identifier
+ 10</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h2">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10_1"/><link linkend="identifiers_in_quickbook_1_6.identifier_10_1">Identifier
+ 10</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10_2">
+ <title>Identifier 10</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h3">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_du"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_du">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h4">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h5">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h6">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h7">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h8">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h9">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h10">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h11">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h12">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h13">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h14">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h15">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h16">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h17">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h18">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h19">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h20">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h21">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h22">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h23">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h24">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h25">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h26">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h27">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h28">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h29">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h30">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h31">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h32">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h33">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h34">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h35">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h36">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h37">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h38">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h39">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h40">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h41">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h42">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h43">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h44">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_32"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_32">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h45">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h46">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h47">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_33"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_33">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h48">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_34"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_34">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h49">
+ <phrase id="identifiers_in_quickbook_1_6.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_6.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h50">
+ <phrase id="identifiers_in_quickbook_1_6.a0"/><link linkend="identifiers_in_quickbook_1_6.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h51">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h52">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h53">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h54">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h55">
+ <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_te"/><link
+ linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_te">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h56">
+ <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0"/><link
+ linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h57">
+ <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1"/><link
+ linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <section id="identifiers_in_quickbook_1_6.identifier_10">
+ <title><link linkend="identifiers_in_quickbook_1_6.identifier_10">Identifier
+ 10</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h0">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_du"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_du">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h1">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h2">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h4">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h5">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h6">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h7">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h8">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h9">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h10">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h11">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h12">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h13">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h14">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h15">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h16">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h17">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h18">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h19">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h20">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h21">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h22">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h23">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h24">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h25">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h26">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h27">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h28">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h29">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h30">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h31">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h32">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h33">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h34">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h35">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h36">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h37">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h38">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h39">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h40">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h41">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h42">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_32"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_32">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h43">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h44">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h45">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_33"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_33">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h46">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_34"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_34">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h47">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h48">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.a0"/><link linkend="identifiers_in_quickbook_1_6.identifier_10.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h49">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h50">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h51">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h52">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h53">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_te"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_te">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h54">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h55">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10.h3">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10.h3_0">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="identifiers_in_quickbook_1_6.punctuation_stuff">
+ <title><link linkend="identifiers_in_quickbook_1_6.punctuation_stuff">Punctuation
+ &amp; stuff</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.punctuation_stuff.h0">
+ <phrase id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b"/><link linkend="identifiers_in_quickbook_1_6.punctuation_stuff.a_b">A
+ + B</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.punctuation_stuff.h1">
+ <phrase id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b0"/><link linkend="identifiers_in_quickbook_1_6.punctuation_stuff.a_b0">A
+ + B</link>
+ </bridgehead>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Identifiers in quickbook 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#identifiers_in_quickbook_1_6.identifier_10">Identifier 10</a>
+ </li>
+ <li>
+ <a href="#identifiers_in_quickbook_1_6.punctuation_stuff">Punctuation &amp;
+ stuff</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_6.test_heading_with_code">
+ Test heading with <code><span class="identifier">code</span></code>
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.identifier_10_0">
+ Identifier 10
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.identifier_10_1">
+ Identifier 10
+ </h2>
+ <div id="identifiers_in_quickbook_1_6.identifier_10_2" class="table">
+ <table>
+ <caption>Identifier 10</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_du">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_32">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_33">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_34">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.a0">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_te">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <div id="identifiers_in_quickbook_1_6.identifier_10">
+ <h3>
+ Identifier 10
+ </h3>
+ <div id="identifiers_in_quickbook_1_6.identifier_10">
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_du">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_32">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_33">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_34">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.a0">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_te">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <div id="identifiers_in_quickbook_1_6.identifier_10.h3" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="identifiers_in_quickbook_1_6.identifier_10.h3_0" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="identifiers_in_quickbook_1_6.punctuation_stuff">
+ <h3>
+ Punctuation &amp; stuff
+ </h3>
+ <div id="identifiers_in_quickbook_1_6.punctuation_stuff">
+ <h3 id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b">
+ A + B
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b0">
+ A + B
+ </h3>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="images_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Images 1.5</title>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test this</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test&amp;this.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test&amp;this</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foobie foobie foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo &amp; bar</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>comment</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Images 1.5
+ </h3>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test&amp;this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="images_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Images 1.6</title>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test&amp;this.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foobie foobie foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo &amp; bar</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo[]</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>comment</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="boost:/boost.png"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="boost:boost.png" height="10cm"
+ width="10cm"></imagedata></imageobject></inlinemediaobject>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Images 1.6
+ </h3>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test&amp;this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="http://www.boost.org/doc/libs/release/boost.png"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="http://www.boost.org/doc/libs/release/boost.png"
+ alt="[]"/></span>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <section id="include_test_sub_document.test">
+ <title><link linkend="include_test_sub_document.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ Just trying including in a conditional macro.
+ </para>
+ <section id="foo2.test">
+ <title><link linkend="foo2.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ With some text around it.
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_test_sub_document.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo2.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Just trying including in a conditional macro.
+ </p>
+ <p>
+ With some text around it.
+ </p>
+ <div id="include_test_sub_document.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include_test_sub_document.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo2.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo2.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <section id="include-test.test">
+ <title><link linkend="include-test.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ Just trying including in a conditional macro.
+ </para>
+ <section id="foo2.test">
+ <title><link linkend="foo2.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ With some text around it.
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include-test.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo2.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Just trying including in a conditional macro.
+ </p>
+ <p>
+ With some text around it.
+ </p>
+ <div id="include-test.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include-test.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo2.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo2.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <section id="include-test.test">
+ <title><link linkend="include-test.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo0.test">
+ <title><link linkend="foo0.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ Just trying including in a conditional macro.
+ </para>
+ <section id="foo2.test">
+ <title><link linkend="foo2.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ With some text around it.
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include-test.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo0.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo2.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Just trying including in a conditional macro.
+ </p>
+ <p>
+ With some text around it.
+ </p>
+ <div id="include-test.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include-test.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo0.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo0.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo2.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo2.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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
+ <toolset>msvc:<debug-symbols>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 : : : <quickbook-test-include>sub ]
+ [ quickbook-test filename_path-1_7 : : : <quickbook-test-include>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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="import" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Import</title>
+ <para>
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ This is the Python <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
+ function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase>
+ <phrase role="comment"># return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase>
+</programlisting>
+ </para>
+ <para>
+ This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">class</phrase> <phrase role="identifier">x</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">public</phrase><phrase role="special">:</phrase>
+
+ <co id="import.c0" linkends="import.c1" /><phrase role="identifier">x</phrase><phrase role="special">()</phrase> <phrase role="special">:</phrase> <phrase role="identifier">n</phrase><phrase role="special">(</phrase><phrase role="number">0</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c2" linkends="import.c3" /><phrase role="special">~</phrase><phrase role="identifier">x</phrase><phrase role="special">()</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c4" linkends="import.c5" /><phrase role="keyword">int</phrase> <phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">n</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c6" linkends="import.c7" /><phrase role="keyword">void</phrase> <phrase role="identifier">set</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase> <phrase role="identifier">n_</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">n</phrase> <phrase role="special">=</phrase> <phrase role="identifier">n_</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="import.c0" id="import.c1">
+ <para>
+ Constructor
+ </para>
+ </callout>
+ <callout arearefs="import.c2" id="import.c3">
+ <para>
+ Destructor
+ </para>
+ </callout>
+ <callout arearefs="import.c4" id="import.c5">
+ <para>
+ Get the <code><phrase role="identifier">n</phrase></code> member variable
+ </para>
+ </callout>
+ <callout arearefs="import.c6" id="import.c7">
+ <para>
+ Set the <code><phrase role="identifier">n</phrase></code> member variable
+ </para>
+ </callout>
+ </calloutlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Import
+ </h3>
+ <p>
+ This is the <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+ This is the Python <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span>
+ <span class="comment"># return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span>
+</pre>
+ </p>
+ <p>
+ This is the C <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">char</span><span class="special">*</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">x</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+
+ <a href="#import.c1">(1)</a><span class="identifier">x</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">n</span><span class="special">(</span><span class="number">0</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <a href="#import.c3">(2)</a><span class="special">~</span><span class="identifier">x</span><span class="special">()</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <a href="#import.c5">(3)</a><span class="keyword">int</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">n</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <a href="#import.c7">(4)</a><span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n_</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">n_</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+ </p>
+ <div>
+ <div id="import.c1">
+ <a href="#import.c0">(1)</a>
+ <p>
+ Constructor
+ </p>
+ </div>
+ <div id="import.c3">
+ <a href="#import.c2">(2)</a>
+ <p>
+ Destructor
+ </p>
+ </div>
+ <div id="import.c5">
+ <a href="#import.c4">(3)</a>
+ <p>
+ Get the <code><span class="identifier">n</span></code> member variable
+ </p>
+ </div>
+ <div id="import.c7">
+ <a href="#import.c6">(4)</a>
+ <p>
+ Set the <code><span class="identifier">n</span></code> member variable
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <para>
+ This should appear when <literal>stub.c</literal> is included.
+ </para>
+ <para>
+ This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+<programlisting><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ This should appear when <literal>stub.py</literal> is included.
+ </para>
+ <para>
+ This should appear when <literal>stub.cpp</literal> is included.
+ </para>
+ <para>
+ [foo]
+ </para>
+ <para>
+ [foo_py]
+ </para>
+ <para>
+ [foo_c]
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include
+ </h3>
+ <p>
+ This should appear when <tt>stub.c</tt> is included.
+ </p>
+ <p>
+ This is the C <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+<pre class="programlisting"><span class="keyword">char</span><span class="special">*</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ This should appear when <tt>stub.py</tt> is included.
+ </p>
+ <p>
+ This should appear when <tt>stub.cpp</tt> is included.
+ </p>
+ <p>
+ [foo]
+ </p>
+ <p>
+ [foo_py]
+ </p>
+ <p>
+ [foo_c]
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="compatibility" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test Compatibility Mode</title>
+ <section id="compatibility.collision">
+ <title>Outer</title>
+ <section id="test_compatibility_mode.inner">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h0">
+ <phrase id="test_compatibility_mode.collision.inner.header"/><link linkend="test_compatibility_mode.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h1">
+ <phrase id="test_compatibility_mode.collision.inner.x1"/><link linkend="test_compatibility_mode.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h2">
+ <phrase id="test_compatibility_mode.collision.inner.x2"/><link linkend="test_compatibility_mode.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.t0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.x">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision0">
+ <title>Include compatibility 1.1</title>
+ <section id="test_compatibility_mode.inner0">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h3">
+ <phrase id="test_compatibility_mode.collision.inner.header0"/><link linkend="test_compatibility_mode.collision.inner.header0">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1_0">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h4">
+ <phrase id="test_compatibility_mode.collision.inner.x1_0"/><link linkend="test_compatibility_mode.collision.inner.x1_0">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h5">
+ <phrase id="test_compatibility_mode.collision.inner.x2_0"/><link linkend="test_compatibility_mode.collision.inner.x2_0">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid0">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.t1">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x0">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.x0">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision1">
+ <title>Include compatibility 1.5</title>
+ <section id="test_compatibility_mode.collision.inner">
+ <title><link linkend="test_compatibility_mode.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h6">
+ <phrase id="test_compatibility_mode.collision.inner.header1"/><link linkend="test_compatibility_mode.collision.inner.header1">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h7">
+ <phrase id="test_compatibility_mode.collision.inner.heading1"/><link linkend="test_compatibility_mode.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h8">
+ <phrase id="test_compatibility_mode.collision.inner.x1_1"/><link linkend="test_compatibility_mode.collision.inner.x1_1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h9">
+ <phrase id="test_compatibility_mode.collision.inner.x2_1"/><link linkend="test_compatibility_mode.collision.inner.x2_1">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid1">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x3">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.collision.x">
+ <title><link linkend="test_compatibility_mode.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision2">
+ <title>Include compatibility 1.6</title>
+ <section id="compatibility.collision.inner">
+ <title><link linkend="compatibility.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h0">
+ <phrase id="compatibility.collision.inner.header"/><link linkend="compatibility.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h1">
+ <phrase id="compatibility.collision.inner.heading1"/><link linkend="compatibility.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h2">
+ <phrase id="compatibility.collision.inner.x1"/><link linkend="compatibility.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h3">
+ <phrase id="compatibility.collision.inner.x2"/><link linkend="compatibility.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision.x">
+ <title><link linkend="compatibility.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test Compatibility Mode
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#compatibility.collision">Outer</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision0">Include compatibility 1.1</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision1">Include compatibility 1.5</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision2">Include compatibility 1.6</a>
+ </li>
+ </ul>
+ </div>
+ <div id="compatibility.collision">
+ <h3>
+ Outer
+ </h3>
+ <div id="compatibility.collision">
+ </div>
+ <div id="test_compatibility_mode.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.t0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0">
+ <h3>
+ Include compatibility 1.1
+ </h3>
+ <div id="compatibility.collision0">
+ </div>
+ <div id="test_compatibility_mode.inner0">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.inner0">
+ <h4 id="test_compatibility_mode.collision.inner.header0">
+ Header
+ </h4>
+ <h1 id="inner.heading1_0">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_0">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_0">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid0" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.t1" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x0" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.x0">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.x0">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1">
+ <h3>
+ Include compatibility 1.5
+ </h3>
+ <div id="compatibility.collision1">
+ </div>
+ <div id="test_compatibility_mode.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.collision.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header1">
+ Header
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_1">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid1" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x3" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.collision.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2">
+ <h3>
+ Include compatibility 1.6
+ </h3>
+ <div id="compatibility.collision2">
+ </div>
+ <div id="compatibility.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision.inner">
+ <h4 id="compatibility.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision.x">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="compatibility" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test Compatibility Mode</title>
+ <section id="compatibility.collision">
+ <title><link linkend="compatibility.collision">Outer</link></title>
+ <section id="test_compatibility_mode.collision.inner">
+ <title><link linkend="test_compatibility_mode.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h0">
+ <phrase id="test_compatibility_mode.collision.inner.header"/><link linkend="test_compatibility_mode.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h1">
+ <phrase id="test_compatibility_mode.collision.inner.heading1"/><link linkend="test_compatibility_mode.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h2">
+ <phrase id="test_compatibility_mode.collision.inner.x1"/><link linkend="test_compatibility_mode.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h3">
+ <phrase id="test_compatibility_mode.collision.inner.x2"/><link linkend="test_compatibility_mode.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.collision.x">
+ <title><link linkend="test_compatibility_mode.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision0">
+ <title><link linkend="compatibility.collision0">Include compatibility 1.1</link></title>
+ <section id="test_compatibility_mode.inner">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h4">
+ <phrase id="test_compatibility_mode.collision.inner.header0"/><link linkend="test_compatibility_mode.collision.inner.header0">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h5">
+ <phrase id="test_compatibility_mode.collision.inner.x1_0"/><link linkend="test_compatibility_mode.collision.inner.x1_0">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h6">
+ <phrase id="test_compatibility_mode.collision.inner.x2_0"/><link linkend="test_compatibility_mode.collision.inner.x2_0">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid0">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.t0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x0">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.x">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision1">
+ <title><link linkend="compatibility.collision1">Include compatibility 1.5</link></title>
+ <section id="test_compatibility_mode.collision.inner0">
+ <title><link linkend="test_compatibility_mode.collision.inner0">Inner</link></title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h7">
+ <phrase id="test_compatibility_mode.collision.inner.header1"/><link linkend="test_compatibility_mode.collision.inner.header1">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h8">
+ <phrase id="test_compatibility_mode.collision.inner.heading1_0"/><link linkend="test_compatibility_mode.collision.inner.heading1_0">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h9">
+ <phrase id="test_compatibility_mode.collision.inner.x1_1"/><link linkend="test_compatibility_mode.collision.inner.x1_1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h10">
+ <phrase id="test_compatibility_mode.collision.inner.x2_1"/><link linkend="test_compatibility_mode.collision.inner.x2_1">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid1">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.with_title0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x3">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.collision.x0">
+ <title><link linkend="test_compatibility_mode.collision.x0">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision2">
+ <title><link linkend="compatibility.collision2">Include compatibility 1.6</link></title>
+ <section id="compatibility.collision.inner">
+ <title><link linkend="compatibility.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h0">
+ <phrase id="compatibility.collision.inner.header"/><link linkend="compatibility.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h1">
+ <phrase id="compatibility.collision.inner.heading1"/><link linkend="compatibility.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h2">
+ <phrase id="compatibility.collision.inner.x1"/><link linkend="compatibility.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h3">
+ <phrase id="compatibility.collision.inner.x2"/><link linkend="compatibility.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision.x">
+ <title><link linkend="compatibility.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test Compatibility Mode
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#compatibility.collision">Outer</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision0">Include compatibility 1.1</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision1">Include compatibility 1.5</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision2">Include compatibility 1.6</a>
+ </li>
+ </ul>
+ </div>
+ <div id="compatibility.collision">
+ <h3>
+ Outer
+ </h3>
+ <div id="compatibility.collision">
+ </div>
+ <div id="test_compatibility_mode.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.collision.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.collision.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0">
+ <h3>
+ Include compatibility 1.1
+ </h3>
+ <div id="compatibility.collision0">
+ </div>
+ <div id="test_compatibility_mode.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header0">
+ Header
+ </h4>
+ <h1 id="inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_0">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_0">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid0" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.t0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x0" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1">
+ <h3>
+ Include compatibility 1.5
+ </h3>
+ <div id="compatibility.collision1">
+ </div>
+ <div id="test_compatibility_mode.collision.inner0">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.collision.inner0">
+ <h4 id="test_compatibility_mode.collision.inner.header1">
+ Header
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.heading1_0">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_1">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid1" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.with_title0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x3" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.collision.x0">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.collision.x0">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2">
+ <h3>
+ Include compatibility 1.6
+ </h3>
+ <div id="compatibility.collision2">
+ </div>
+ <div id="compatibility.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision.inner">
+ <h4 id="compatibility.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision.x">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="compatibility" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test Compatibility Mode</title>
+ <section id="compatibility.collision">
+ <title><link linkend="compatibility.collision">Outer</link></title>
+ <section id="compatibility.collision.inner">
+ <title><link linkend="compatibility.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h0">
+ <phrase id="compatibility.collision.inner.header"/><link linkend="compatibility.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h1">
+ <phrase id="compatibility.collision.inner.heading1"/><link linkend="compatibility.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h2">
+ <phrase id="compatibility.collision.inner.x1"/><link linkend="compatibility.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h3">
+ <phrase id="compatibility.collision.inner.x2"/><link linkend="compatibility.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision.x">
+ <title><link linkend="compatibility.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision0">
+ <title><link linkend="compatibility.collision0">Include compatibility 1.1</link></title>
+ <section id="compatibility.collision0.inner">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="compatibility.collision0.inner.h0">
+ <phrase id="compatibility.collision0.inner.header"/><link linkend="compatibility.collision0.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision0.inner.h1">
+ <phrase id="compatibility.collision0.inner.x1"/><link linkend="compatibility.collision0.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision0.inner.h2">
+ <phrase id="compatibility.collision0.inner.x2"/><link linkend="compatibility.collision0.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision0.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision0.inner.t0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision0.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision0.x">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision1">
+ <title><link linkend="compatibility.collision1">Include compatibility 1.5</link></title>
+ <section id="compatibility.collision1.inner">
+ <title><link linkend="compatibility.collision1.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision1.inner.h0">
+ <phrase id="compatibility.collision1.inner.header"/><link linkend="compatibility.collision1.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision1.inner.h1">
+ <phrase id="compatibility.collision1.inner.heading1"/><link linkend="compatibility.collision1.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision1.inner.h2">
+ <phrase id="compatibility.collision1.inner.x1"/><link linkend="compatibility.collision1.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision1.inner.h3">
+ <phrase id="compatibility.collision1.inner.x2"/><link linkend="compatibility.collision1.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision1.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision1.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision1.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision1.x">
+ <title><link linkend="compatibility.collision1.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision2">
+ <title><link linkend="compatibility.collision2">Include compatibility 1.6</link></title>
+ <section id="compatibility.collision2.inner">
+ <title><link linkend="compatibility.collision2.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision2.inner.h0">
+ <phrase id="compatibility.collision2.inner.header"/><link linkend="compatibility.collision2.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision2.inner.h1">
+ <phrase id="compatibility.collision2.inner.heading1"/><link linkend="compatibility.collision2.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision2.inner.h2">
+ <phrase id="compatibility.collision2.inner.x1"/><link linkend="compatibility.collision2.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision2.inner.h3">
+ <phrase id="compatibility.collision2.inner.x2"/><link linkend="compatibility.collision2.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision2.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision2.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision2.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision2.x">
+ <title><link linkend="compatibility.collision2.x">Inner with id</link></title>
+ </section>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test Compatibility Mode
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#compatibility.collision">Outer</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision0">Include compatibility 1.1</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision1">Include compatibility 1.5</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision2">Include compatibility 1.6</a>
+ </li>
+ </ul>
+ </div>
+ <div id="compatibility.collision">
+ <h3>
+ Outer
+ </h3>
+ <div id="compatibility.collision">
+ </div>
+ <div id="compatibility.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision.inner">
+ <h4 id="compatibility.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0">
+ <h3>
+ Include compatibility 1.1
+ </h3>
+ <div id="compatibility.collision0">
+ </div>
+ <div id="compatibility.collision0.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision0.inner">
+ <h4 id="compatibility.collision0.inner.header">
+ Header
+ </h4>
+ <h1 id="inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision0.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision0.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision0.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision0.inner.t0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision0.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision0.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1">
+ <h3>
+ Include compatibility 1.5
+ </h3>
+ <div id="compatibility.collision1">
+ </div>
+ <div id="compatibility.collision1.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision1.inner">
+ <h4 id="compatibility.collision1.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision1.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision1.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision1.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision1.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision1.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision1.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision1.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2">
+ <h3>
+ Include compatibility 1.6
+ </h3>
+ <div id="compatibility.collision2">
+ </div>
+ <div id="compatibility.collision2.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision2.inner">
+ <h4 id="compatibility.collision2.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision2.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision2.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision2.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision2.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision2.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision2.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision2.x">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="doc_title_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Doc Title 1</title>
+ <bridgehead renderas="sect2" id="doc_title_1.h0">
+ <phrase id="doc_title_1.a1"/><link linkend="doc_title_1.a1">a1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h1">
+ <phrase id="doc_title_1.inc1"/><link linkend="doc_title_1.inc1">inc1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h2">
+ <phrase id="doc_title_1.a2"/><link linkend="doc_title_1.a2">a2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h0">
+ <phrase id="doc_title_1_inc2.inc2"/><link linkend="doc_title_1_inc2.inc2">inc2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h3">
+ <phrase id="doc_title_1.a3"/><link linkend="doc_title_1.a3">a3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h1">
+ <phrase id="doc_title_1_inc2.inc3"/><link linkend="doc_title_1_inc2.inc3">inc3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h4">
+ <phrase id="doc_title_1.a4"/><link linkend="doc_title_1.a4">a4</link>
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Doc Title 1
+ </h3>
+ <h2 id="doc_title_1.a1">
+ a1
+ </h2>
+ <h2 id="doc_title_1.inc1">
+ inc1
+ </h2>
+ <h2 id="doc_title_1.a2">
+ a2
+ </h2>
+ <h2 id="doc_title_1_inc2.inc2">
+ inc2
+ </h2>
+ <h2 id="doc_title_1.a3">
+ a3
+ </h2>
+ <h2 id="doc_title_1_inc2.inc3">
+ inc3
+ </h2>
+ <h2 id="doc_title_1.a4">
+ a4
+ </h2>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="doc-title" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Doc Title 1a</title>
+ <bridgehead renderas="sect2" id="doc-title.h0">
+ <phrase id="doc-title.a1"/><link linkend="doc-title.a1">a1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1a.h0">
+ <phrase id="doc_title_1a.inc1"/><link linkend="doc_title_1a.inc1">inc1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc-title.h1">
+ <phrase id="doc-title.a2"/><link linkend="doc-title.a2">a2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h0">
+ <phrase id="doc_title_1_inc2.inc2"/><link linkend="doc_title_1_inc2.inc2">inc2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc-title.h2">
+ <phrase id="doc-title.a3"/><link linkend="doc-title.a3">a3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h1">
+ <phrase id="doc_title_1_inc2.inc3"/><link linkend="doc_title_1_inc2.inc3">inc3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc-title.h3">
+ <phrase id="doc-title.a4"/><link linkend="doc-title.a4">a4</link>
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Doc Title 1a
+ </h3>
+ <h2 id="doc-title.a1">
+ a1
+ </h2>
+ <h2 id="doc_title_1a.inc1">
+ inc1
+ </h2>
+ <h2 id="doc-title.a2">
+ a2
+ </h2>
+ <h2 id="doc_title_1_inc2.inc2">
+ inc2
+ </h2>
+ <h2 id="doc-title.a3">
+ a3
+ </h2>
+ <h2 id="doc_title_1_inc2.inc3">
+ inc3
+ </h2>
+ <h2 id="doc-title.a4">
+ a4
+ </h2>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename Test</title>
+ <para>
+ filename-1_7.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h0">
+ <phrase id="filename_test.test_1"/><link linkend="filename_test.test_1">Test
+ 1</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h1">
+ <phrase id="filename_test.test_2"/><link linkend="filename_test.test_2">Test
+ 2</link>
+ </bridgehead>
+ <para>
+ filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h2">
+ <phrase id="filename_test.test_3"/><link linkend="filename_test.test_3">Test
+ 3</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h3">
+ <phrase id="filename_test.test_4"/><link linkend="filename_test.test_4">Test
+ 4</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename Test
+ </h3>
+ <p>
+ filename-1_7.quickbook
+ </p>
+ <h2 id="filename_test.test_1">
+ Test 1
+ </h2>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ <h2 id="filename_test.test_2">
+ Test 2
+ </h2>
+ <p>
+ filename_include2.quickbook
+ </p>
+ <h2 id="filename_test.test_3">
+ Test 3
+ </h2>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ <h2 id="filename_test.test_4">
+ Test 4
+ </h2>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test_with_include_path" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename test with include path</title>
+ <para>
+ filename-path.quickbook
+ </para>
+ <para>
+ filename_include1.quickbook
+ </para>
+ <para>
+ ../filename_include2.quickbook
+ </para>
+ <para>
+ filename_include2.quickbook
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename test with include path
+ </h3>
+ <p>
+ filename-path.quickbook
+ </p>
+ <p>
+ filename_include1.quickbook
+ </p>
+ <p>
+ ../filename_include2.quickbook
+ </p>
+ <p>
+ filename_include2.quickbook
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename Test</title>
+ <para>
+ filename.quickbook
+ </para>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <para>
+ filename_include2.quickbook
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename Test
+ </h3>
+ <p>
+ filename.quickbook
+ </p>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ <p>
+ filename_include2.quickbook
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test_with_include_path" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename test with include path</title>
+ <para>
+ filename_path-1_7.quickbook
+ </para>
+ <para>
+ filename_include1.quickbook
+ </para>
+ <para>
+ ../filename_include2.quickbook
+ </para>
+ <para>
+ filename_include2.quickbook
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename test with include path
+ </h3>
+ <p>
+ filename_path-1_7.quickbook
+ </p>
+ <p>
+ filename_include1.quickbook
+ </p>
+ <p>
+ ../filename_include2.quickbook
+ </p>
+ <p>
+ filename_include2.quickbook
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="glob_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Glob Test</title>
+ <section id="glob_test.t1_0">
+ <title><link linkend="glob_test.t1_0">Test 1.0</link></title>
+ </section>
+ <section id="glob_test.t1_1">
+ <title><link linkend="glob_test.t1_1">Test 1.1</link></title>
+ <para>
+ A
+ </para>
+ </section>
+ <section id="glob_test.t1_2">
+ <title><link linkend="glob_test.t1_2">Test 1.2</link></title>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t1_3">
+ <title><link linkend="glob_test.t1_3">Test 1.3</link></title>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t2_1">
+ <title><link linkend="glob_test.t2_1">Test 2.1</link></title>
+ <para>
+ A
+ </para>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t2_2">
+ <title><link linkend="glob_test.t2_2">Test 2.2</link></title>
+ <para>
+ B
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Glob Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#glob_test.t1_0">Test 1.0</a>
+ </li>
+ <li>
+ <a href="#glob_test.t1_1">Test 1.1</a>
+ </li>
+ <li>
+ <a href="#glob_test.t1_2">Test 1.2</a>
+ </li>
+ <li>
+ <a href="#glob_test.t1_3">Test 1.3</a>
+ </li>
+ <li>
+ <a href="#glob_test.t2_1">Test 2.1</a>
+ </li>
+ <li>
+ <a href="#glob_test.t2_2">Test 2.2</a>
+ </li>
+ </ul>
+ </div>
+ <div id="glob_test.t1_0">
+ <h3>
+ Test 1.0
+ </h3>
+ <div id="glob_test.t1_0">
+ </div>
+ </div>
+ <div id="glob_test.t1_1">
+ <h3>
+ Test 1.1
+ </h3>
+ <div id="glob_test.t1_1">
+ <p>
+ A
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t1_2">
+ <h3>
+ Test 1.2
+ </h3>
+ <div id="glob_test.t1_2">
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t1_3">
+ <h3>
+ Test 1.3
+ </h3>
+ <div id="glob_test.t1_3">
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t2_1">
+ <h3>
+ Test 2.1
+ </h3>
+ <div id="glob_test.t2_1">
+ <p>
+ A
+ </p>
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t2_2">
+ <h3>
+ Test 2.2
+ </h3>
+ <div id="glob_test.t2_2">
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="import-1.6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Import Quickbook Test</title>
+ <para>
+ Macro 1: import-basic-inc1.quickbook Template 1: import-basic-1.6.quickbook
+ </para>
+ <para>
+ Macro 2: import-basic-inc2.quickbook Template 2: import-basic-1.6.quickbook
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Import Quickbook Test
+ </h3>
+ <p>
+ Macro 1: import-basic-inc1.quickbook Template 1: import-basic-1.6.quickbook
+ </p>
+ <p>
+ Macro 2: import-basic-inc2.quickbook Template 2: import-basic-1.6.quickbook
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_in_section_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section 1.5</title>
+ <section id="include_in_section_1_5.container">
+ <title><link linkend="include_in_section_1_5.container">Container</link></title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container.h0">
+ <phrase id="include_in_section_include_1.container.test1"/><link linkend="include_in_section_include_1.container.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.container.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container.inner.h0">
+ <phrase id="include_in_section_include_1.container.inner.test2"/><link linkend="include_in_section_include_1.container.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_1.container.inner.h1">
+ <phrase id="include_in_section_include_1.container.inner.simple_include"/><link
+ linkend="include_in_section_include_1.container.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="section_include.container.h0">
+ <phrase id="section_include.container.test1"/><link linkend="section_include.container.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.container.inner">
+ <bridgehead renderas="sect1" id="section_include.container.inner.h0">
+ <phrase id="section_include.container.inner.test2"/><link linkend="section_include.container.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_2.container.inner.h0">
+ <phrase id="include_in_section_include_2.container.inner.simple_include"/><link
+ linkend="include_in_section_include_2.container.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </section>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.h0">
+ <phrase id="include_in_section_include_1.test1"/><link linkend="include_in_section_include_1.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.inner.h0">
+ <phrase id="include_in_section_include_1.inner.test2"/><link linkend="include_in_section_include_1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1.inner.h1">
+ <phrase id="include_in_section_include_1.inner.simple_include"/><link linkend="include_in_section_include_1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="section_include.h0">
+ <phrase id="section_include.test1"/><link linkend="section_include.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.inner">
+ <bridgehead renderas="sect1" id="section_include.inner.h0">
+ <phrase id="section_include.inner.test2"/><link linkend="section_include.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_2.inner.h0">
+ <phrase id="include_in_section_include_2.inner.simple_include"/><link linkend="include_in_section_include_2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <section id="include_in_section_1_5.container2">
+ <title><link linkend="include_in_section_1_5.container2">Container2</link></title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container2.h0">
+ <phrase id="include_in_section_include_1.container2.test1"/><link linkend="include_in_section_include_1.container2.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.container2.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container2.inner.h0">
+ <phrase id="include_in_section_include_1.container2.inner.test2"/><link linkend="include_in_section_include_1.container2.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_1.container2.inner.h1">
+ <phrase id="include_in_section_include_1.container2.inner.simple_include"/><link
+ linkend="include_in_section_include_1.container2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="section_include.container2.h0">
+ <phrase id="section_include.container2.test1"/><link linkend="section_include.container2.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.container2.inner">
+ <bridgehead renderas="sect1" id="section_include.container2.inner.h0">
+ <phrase id="section_include.container2.inner.test2"/><link linkend="section_include.container2.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_2.container2.inner.h0">
+ <phrase id="include_in_section_include_2.container2.inner.simple_include"/><link
+ linkend="include_in_section_include_2.container2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include in section 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_1_5.container">Container</a>
+ </li>
+ <li>
+ <a href="#include_in_section_include_1.inner"><i>Untitled</i></a>
+ </li>
+ <li>
+ <a href="#section_include.inner"><i>Untitled</i></a>
+ </li>
+ <li>
+ <a href="#include_in_section_1_5.container2">Container2</a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1.test1">
+ Test1
+ </h1>
+ <h1 id="section_include.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_1_5.container">
+ <h3>
+ Container
+ </h3>
+ <div id="include_in_section_1_5.container">
+ <h1 id="include_in_section_include_1.container.test1">
+ Test1
+ </h1>
+ <h1 id="section_include.container.test1">
+ Test1
+ </h1>
+ </div>
+ <div id="include_in_section_include_1.container.inner">
+ <div id="include_in_section_include_1.container.inner">
+ <h1 id="include_in_section_include_1.container.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_1.container.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ <div id="section_include.container.inner">
+ <div id="section_include.container.inner">
+ <h1 id="section_include.container.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_2.container.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="include_in_section_include_1.inner">
+ <div id="include_in_section_include_1.inner">
+ <h1 id="include_in_section_include_1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ <div id="section_include.inner">
+ <div id="section_include.inner">
+ <h1 id="section_include.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_2.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ <div id="include_in_section_1_5.container2">
+ <h3>
+ Container2
+ </h3>
+ <div id="include_in_section_1_5.container2">
+ <h1 id="include_in_section_include_1.container2.test1">
+ Test1
+ </h1>
+ <h1 id="section_include.container2.test1">
+ Test1
+ </h1>
+ </div>
+ <div id="include_in_section_include_1.container2.inner">
+ <div id="include_in_section_include_1.container2.inner">
+ <h1 id="include_in_section_include_1.container2.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_1.container2.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ <div id="section_include.container2.inner">
+ <div id="section_include.container2.inner">
+ <h1 id="section_include.container2.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_2.container2.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_in_section_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section 1.6</title>
+ <section id="include_in_section_1_6.container">
+ <title><link linkend="include_in_section_1_6.container">Container</link></title>
+ <article id="include_in_section_include_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 1</title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.h0">
+ <phrase id="include_in_section_include_1.test1"/><link linkend="include_in_section_include_1.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.inner.h0">
+ <phrase id="include_in_section_include_1.inner.test2"/><link linkend="include_in_section_include_1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1.inner.h1">
+ <phrase id="include_in_section_include_1.inner.simple_include"/><link linkend="include_in_section_include_1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <article id="section_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 2</title>
+ <bridgehead renderas="sect1" id="section_include.h0">
+ <phrase id="section_include.test1"/><link linkend="section_include.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.inner">
+ <bridgehead renderas="sect1" id="section_include.inner.h0">
+ <phrase id="section_include.inner.test2"/><link linkend="section_include.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="section_include.inner.h1">
+ <phrase id="section_include.inner.simple_include"/><link linkend="section_include.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ </section>
+ <article id="include_in_section_include_1_0" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 1</title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1_0.h0">
+ <phrase id="include_in_section_include_1_0.test1"/><link linkend="include_in_section_include_1_0.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1_0.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1_0.inner.h0">
+ <phrase id="include_in_section_include_1_0.inner.test2"/><link linkend="include_in_section_include_1_0.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1_0.inner.h1">
+ <phrase id="include_in_section_include_1_0.inner.simple_include"/><link linkend="include_in_section_include_1_0.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <article id="section_include0" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 2</title>
+ <bridgehead renderas="sect1" id="section_include0.h0">
+ <phrase id="section_include0.test1"/><link linkend="section_include0.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include0.inner">
+ <bridgehead renderas="sect1" id="section_include0.inner.h0">
+ <phrase id="section_include0.inner.test2"/><link linkend="section_include0.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="section_include0.inner.h1">
+ <phrase id="section_include0.inner.simple_include"/><link linkend="section_include0.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <section id="include_in_section_1_6.container2">
+ <title><link linkend="include_in_section_1_6.container2">Container2</link></title>
+ <article id="include_in_section_include_1_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 1</title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1_1.h0">
+ <phrase id="include_in_section_include_1_1.test1"/><link linkend="include_in_section_include_1_1.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1_1.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1_1.inner.h0">
+ <phrase id="include_in_section_include_1_1.inner.test2"/><link linkend="include_in_section_include_1_1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1_1.inner.h1">
+ <phrase id="include_in_section_include_1_1.inner.simple_include"/><link
+ linkend="include_in_section_include_1_1.inner.simple_include">Simple include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <article id="section_include1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 2</title>
+ <bridgehead renderas="sect1" id="section_include1.h0">
+ <phrase id="section_include1.test1"/><link linkend="section_include1.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include1.inner">
+ <bridgehead renderas="sect1" id="section_include1.inner.h0">
+ <phrase id="section_include1.inner.test2"/><link linkend="section_include1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="section_include1.inner.h1">
+ <phrase id="section_include1.inner.simple_include"/><link linkend="section_include1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include in section 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_1_6.container">Container</a>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1">Include in section include
+ 1</a>
+ </li>
+ <li>
+ <a href="#section_include">Include in section include 2</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#include_in_section_include_1_0">Include in section include 1</a>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#section_include0">Include in section include 2</a>
+ <ul>
+ <li>
+ <a href="#section_include0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#include_in_section_1_6.container2">Container2</a>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_1">Include in section include
+ 1</a>
+ </li>
+ <li>
+ <a href="#section_include1">Include in section include 2</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <div id="include_in_section_1_6.container">
+ <h3>
+ Container
+ </h3>
+ <div id="include_in_section_1_6.container">
+ </div>
+ <div id="include_in_section_include_1">
+ <h3>
+ Include in section include 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_include_1.inner">
+ <div id="include_in_section_include_1.inner">
+ <h1 id="include_in_section_include_1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="section_include">
+ <h3>
+ Include in section include 2
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_include.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="section_include.test1">
+ Test1
+ </h1>
+ <div id="section_include.inner">
+ <div id="section_include.inner">
+ <h1 id="section_include.inner.test2">
+ Test2
+ </h1>
+ <h3 id="section_include.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="include_in_section_include_1_0">
+ <h3>
+ Include in section include 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1_0.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_include_1_0.inner">
+ <div id="include_in_section_include_1_0.inner">
+ <h1 id="include_in_section_include_1_0.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1_0.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="section_include0">
+ <h3>
+ Include in section include 2
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_include0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="section_include0.test1">
+ Test1
+ </h1>
+ <div id="section_include0.inner">
+ <div id="section_include0.inner">
+ <h1 id="section_include0.inner.test2">
+ Test2
+ </h1>
+ <h3 id="section_include0.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="include_in_section_1_6.container2">
+ <h3>
+ Container2
+ </h3>
+ <div id="include_in_section_1_6.container2">
+ </div>
+ <div id="include_in_section_include_1_1">
+ <h3>
+ Include in section include 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_1.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1_1.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_include_1_1.inner">
+ <div id="include_in_section_include_1_1.inner">
+ <h1 id="include_in_section_include_1_1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1_1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="section_include1">
+ <h3>
+ Include in section include 2
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_include1.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="section_include1.test1">
+ Test1
+ </h1>
+ <div id="section_include1.inner">
+ <div id="section_include1.inner">
+ <h1 id="section_include1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="section_include1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_id_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Id Test</title>
+ <bridgehead renderas="sect2" id="a.h0">
+ <phrase id="a.simple_include"/><link linkend="a.simple_include">Simple include</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="b.h0">
+ <phrase id="b.simple_include"/><link linkend="b.simple_include">Simple include</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="c.h0">
+ <phrase id="c.title__no_id"/><link linkend="c.title__no_id">Title, no id</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="d.h0">
+ <phrase id="d.title__no_id"/><link linkend="d.title__no_id">Title, no id</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="with-id.h0">
+ <phrase id="with-id.title_with_id"/><link linkend="with-id.title_with_id">Title
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="with-id.h1">
+ <phrase id="with-id.title_with_id0"/><link linkend="with-id.title_with_id0">Title
+ with id</link>
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Id Test
+ </h3>
+ <h2 id="a.simple_include">
+ Simple include
+ </h2>
+ <h2 id="b.simple_include">
+ Simple include
+ </h2>
+ <h2 id="c.title__no_id">
+ Title, no id
+ </h2>
+ <h2 id="d.title__no_id">
+ Title, no id
+ </h2>
+ <h2 id="with-id.title_with_id">
+ Title with id
+ </h2>
+ <h2 id="with-id.title_with_id0">
+ Title with id
+ </h2>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_id_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Id Test</title>
+ <bridgehead renderas="sect2" id="a.h0">
+ <phrase id="a.simple_include"/><link linkend="a.simple_include">Simple include</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="b.h0">
+ <phrase id="b.simple_include"/><link linkend="b.simple_include">Simple include</link>
+ </bridgehead>
+ <article id="c" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include without id</title>
+ <bridgehead renderas="sect2" id="c.h0">
+ <phrase id="c.title__no_id"/><link linkend="c.title__no_id">Title, no id</link>
+ </bridgehead>
+ </article>
+ <article id="d" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include without id</title>
+ <bridgehead renderas="sect2" id="d.h0">
+ <phrase id="d.title__no_id"/><link linkend="d.title__no_id">Title, no id</link>
+ </bridgehead>
+ </article>
+ <article id="e" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include with id</title>
+ <bridgehead renderas="sect2" id="e.h0">
+ <phrase id="e.title_with_id"/><link linkend="e.title_with_id">Title with id</link>
+ </bridgehead>
+ </article>
+ <article id="f" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include with id</title>
+ <bridgehead renderas="sect2" id="f.h0">
+ <phrase id="f.title_with_id"/><link linkend="f.title_with_id">Title with id</link>
+ </bridgehead>
+ </article>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Id Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#c">Include without id</a>
+ </li>
+ <li>
+ <a href="#d">Include without id</a>
+ </li>
+ <li>
+ <a href="#e">Include with id</a>
+ </li>
+ <li>
+ <a href="#f">Include with id</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="a.simple_include">
+ Simple include
+ </h2>
+ <h2 id="b.simple_include">
+ Simple include
+ </h2>
+ <div id="c">
+ <h3>
+ Include without id
+ </h3>
+ <h2 id="c.title__no_id">
+ Title, no id
+ </h2>
+ </div>
+ <div id="d">
+ <h3>
+ Include without id
+ </h3>
+ <h2 id="d.title__no_id">
+ Title, no id
+ </h2>
+ </div>
+ <div id="e">
+ <h3>
+ Include with id
+ </h3>
+ <h2 id="e.title_with_id">
+ Title with id
+ </h2>
+ </div>
+ <div id="f">
+ <h3>
+ Include with id
+ </h3>
+ <h2 id="f.title_with_id">
+ Title with id
+ </h2>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unbalanced" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test include ids with unbalanced sections</title>
+ <section id="include1.inc1">
+ <title><link linkend="include1.inc1">Include 1</link></title>
+ <bridgehead renderas="sect3" id="include1.inc1.h0">
+ <phrase id="include1.inc1.inc1_1"/><link linkend="include1.inc1.inc1_1">Heading
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include1a.h0">
+ <phrase id="include1a.inc1a_1"/><link linkend="include1a.inc1a_1">Heading 1</link>
+ </bridgehead>
+ <section id="include1a.inc1a">
+ <title><link linkend="include1a.inc1a">Include 1a</link></title>
+ <bridgehead renderas="sect4" id="include1a.inc1a.h0">
+ <phrase id="include1a.inc1a.inc1a_2"/><link linkend="include1a.inc1a.inc1a_2">Heading
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include1a.inc1a.h1">
+ <phrase id="include1a.inc1a.inc1_2"/><link linkend="include1a.inc1a.inc1_2">Heading
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include1a.inc1a.h2">
+ <phrase id="include1a.inc1a.x1"/><link linkend="include1a.inc1a.x1">X1</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="include1.inc1.h1">
+ <phrase id="include1.inc1.x2"/><link linkend="include1.inc1.x2">X2</link>
+ </bridgehead>
+ </section>
+ <section id="unbalanced.sect1">
+ <title><link linkend="unbalanced.sect1">Section 1</link></title>
+ <bridgehead renderas="sect3" id="unbalanced.sect1.h0">
+ <phrase id="unbalanced.sect1.x1"/><link linkend="unbalanced.sect1.x1">X1</link>
+ </bridgehead>
+ <section id="unbalanced.sect1.sect2">
+ <title><link linkend="unbalanced.sect1.sect2">Section 2</link></title>
+ <bridgehead renderas="sect4" id="unbalanced.sect1.sect2.h0">
+ <phrase id="unbalanced.sect1.sect2.x2"/><link linkend="unbalanced.sect1.sect2.x2">X2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include2.h0">
+ <phrase id="include2.inc2_1"/><link linkend="include2.inc2_1">Heading 1</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="include2.h1">
+ <phrase id="include2.inc2_2"/><link linkend="include2.inc2_2">Heading 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include2a.h0">
+ <phrase id="include2a.inc2a_1"/><link linkend="include2a.inc2a_1">Heading 1</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="include2a.h1">
+ <phrase id="include2a.inc2a_2"/><link linkend="include2a.inc2a_2">Heading 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="include2.h2">
+ <phrase id="include2.inc2_3"/><link linkend="include2.inc2_3">Heading 3</link>
+ </bridgehead>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test include ids with unbalanced sections
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include1.inc1">Include 1</a>
+ </li>
+ <li>
+ <a href="#unbalanced.sect1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="include2a.inc2a_2">
+ Heading 2
+ </h2>
+ <h2 id="include2.inc2_3">
+ Heading 3
+ </h2>
+ <div id="include1.inc1">
+ <h3>
+ Include 1
+ </h3>
+ <div id="include1.inc1">
+ <h3 id="include1.inc1.inc1_1">
+ Heading 1
+ </h3>
+ <h3 id="include1a.inc1a_1">
+ Heading 1
+ </h3>
+ <h3 id="include1.inc1.x2">
+ X2
+ </h3>
+ </div>
+ <div id="include1a.inc1a">
+ <h3>
+ Include 1a
+ </h3>
+ <div id="include1a.inc1a">
+ <h4 id="include1a.inc1a.inc1a_2">
+ Heading 2
+ </h4>
+ <h4 id="include1a.inc1a.inc1_2">
+ Heading 2
+ </h4>
+ <h4 id="include1a.inc1a.x1">
+ X1
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="unbalanced.sect1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="unbalanced.sect1">
+ <h3 id="unbalanced.sect1.x1">
+ X1
+ </h3>
+ <h3 id="include2.inc2_2">
+ Heading 2
+ </h3>
+ <h3 id="include2a.inc2a_1">
+ Heading 1
+ </h3>
+ </div>
+ <div id="unbalanced.sect1.sect2">
+ <h3>
+ Section 2
+ </h3>
+ <div id="unbalanced.sect1.sect2">
+ <h4 id="unbalanced.sect1.sect2.x2">
+ X2
+ </h4>
+ <h4 id="include2.inc2_1">
+ Heading 1
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macros_test_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macros Test 1.5</title>
+ <para>
+ Foo:macros-inc1.quickbook
+ </para>
+ <para>
+ Defined conditional phrase.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ __foo__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Defined template:macros-1.5.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ __defined_macro__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [not_defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="underline">_not_defined_macro__</emphasis>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macros Test 1.5
+ </h3>
+ <p>
+ Foo:macros-inc1.quickbook
+ </p>
+ <p>
+ Defined conditional phrase.
+ </p>
+ <ul>
+ <li>
+ <div>
+ __foo__
+ </div>
+ </li>
+ <li>
+ <div>
+ Defined template:macros-1.5.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ __defined_macro__
+ </div>
+ </li>
+ <li>
+ <div>
+ [not_defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="underline">_not_defined_macro__</span>
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macros_test_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macros Test 1.6</title>
+ <para>
+ Foo:macros-inc1.quickbook
+ </para>
+ <para>
+ Defined conditional phrase.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ __foo__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ __defined_macro__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [not_defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="underline">_not_defined_macro__</emphasis>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Foo:macros-inc1.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Defined template:macros-1.6.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Defined macro:macros-inc1.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [not_defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="underline">_not_defined_macro__</emphasis>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macros Test 1.6
+ </h3>
+ <p>
+ Foo:macros-inc1.quickbook
+ </p>
+ <p>
+ Defined conditional phrase.
+ </p>
+ <ul>
+ <li>
+ <div>
+ __foo__
+ </div>
+ </li>
+ <li>
+ <div>
+ [defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ __defined_macro__
+ </div>
+ </li>
+ <li>
+ <div>
+ [not_defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="underline">_not_defined_macro__</span>
+ </div>
+ </li>
+ </ul>
+ <ul>
+ <li>
+ <div>
+ Foo:macros-inc1.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ Defined template:macros-1.6.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ Defined macro:macros-inc1.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ [not_defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="underline">_not_defined_macro__</span>
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="nested_compatibility_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Nested Compatibility Test</title>
+ <section id="nested_compatibility_test.duplicate_name">
+ <title><link linkend="nested_compatibility_test.duplicate_name">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name.nested">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name.nested0">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested0">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested0.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name0">
+ <title><link linkend="nested_compatibility_test.duplicate_name0">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name.nested1">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested1">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested.h1">
+ <phrase id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5_0"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5_0">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name.nested2">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested2">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested2.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested2.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested2.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Nested Compatibility Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name">Duplicate Name</a>
+ </li>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name0">Duplicate Name</a>
+ </li>
+ </ul>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h4 id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h4 id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested1">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested1">
+ <h4 id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5_0">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested2">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested2">
+ <h4 id="nested_compatibility_test.duplicate_name.nested2.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="nested_compatibility_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Nested Compatibility Test</title>
+ <section id="nested_compatibility_test.duplicate_name">
+ <title><link linkend="nested_compatibility_test.duplicate_name">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name.nested">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name.nested0">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested0">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested0.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name0">
+ <title><link linkend="nested_compatibility_test.duplicate_name0">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name0.nested">
+ <title><link linkend="nested_compatibility_test.duplicate_name0.nested">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name0.nested.h0">
+ <phrase id="nested_compatibility_test.duplicate_name0.nested.nested_heading_1_5"/><link
+ linkend="nested_compatibility_test.duplicate_name0.nested.nested_heading_1_5">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name0.nested0">
+ <title><link linkend="nested_compatibility_test.duplicate_name0.nested0">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name0.nested0.h0">
+ <phrase id="nested_compatibility_test.duplicate_name0.nested0.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name0.nested0.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Nested Compatibility Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name">Duplicate Name</a>
+ </li>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name0">Duplicate Name</a>
+ </li>
+ </ul>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h4 id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h4 id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0.nested">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0.nested">
+ <h4 id="nested_compatibility_test.duplicate_name0.nested.nested_heading_1_5">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0.nested0">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0.nested0">
+ <h4 id="nested_compatibility_test.duplicate_name0.nested0.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_section_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Section Test</title>
+ <section id="include_section_test.mulitple_file_section">
+ <title><link linkend="include_section_test.mulitple_file_section">Mulitple file
+ section</link></title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Section Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_section_test.mulitple_file_section">Mulitple file section</a>
+ </li>
+ </ul>
+ </div>
+ <div id="include_section_test.mulitple_file_section">
+ <h3>
+ Mulitple file section
+ </h3>
+ <div id="include_section_test.mulitple_file_section">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_section_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Section Test</title>
+ <section id="include_section_test.mulitple_file_section">
+ <title><link linkend="include_section_test.mulitple_file_section">Mulitple file
+ section</link></title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Section Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_section_test.mulitple_file_section">Mulitple file section</a>
+ </li>
+ </ul>
+ </div>
+ <div id="include_section_test.mulitple_file_section">
+ <h3>
+ Mulitple file section
+ </h3>
+ <div id="include_section_test.mulitple_file_section">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="souce_mode_include_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Souce Mode Include</title>
+<programlisting>void main() {}</programlisting>
+<programlisting>void main() {}
+</programlisting>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Souce Mode Include
+ </h3>
+<pre class="programlisting">void main() {}</pre>
+<pre class="programlisting">void main() {}
+</pre>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="souce_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Souce Mode Include</title>
+ <article id="source_include_with_no_source_mode" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Source include with no source-mode</title>
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </article>
+<programlisting>void main() {}
+</programlisting>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Souce Mode Include
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#source_include_with_no_source_mode">Source include with no source-mode</a>
+ </li>
+ </ul>
+ </div>
+<pre class="programlisting">void main() {}
+</pre>
+ <div id="source_include_with_no_source_mode">
+ <h3>
+ Source include with no source-mode
+ </h3>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_include_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template include test</title>
+ <bridgehead renderas="sect2" id="template_include_test.h0">
+ <phrase id="template_include_test.simple_include"/><link linkend="template_include_test.simple_include">Simple
+ include</link>
+ </bridgehead>
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template include test
+ </h3>
+ <h2 id="template_include_test.simple_include">
+ Simple include
+ </h2>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="templates_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Templates 1.5</title>
+ <para>
+ Inline:templates-inc1.quickbook
+ </para>
+ <para>
+ Foo:templates-1.5.quickbook
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Templates 1.5
+ </h3>
+ <p>
+ Inline:templates-inc1.quickbook
+ </p>
+ <p>
+ Foo:templates-1.5.quickbook
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="templates_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Templates 1.6</title>
+ <para>
+ Inline:templates-inc1.quickbook
+ </para>
+ <para>
+ [foo]
+ </para>
+ <para>
+ Foo:templates-1.6.quickbook
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Templates 1.6
+ </h3>
+ <p>
+ Inline:templates-inc1.quickbook
+ </p>
+ <p>
+ [foo]
+ </p>
+ <p>
+ Foo:templates-1.6.quickbook
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <article id="include-sub" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test Sub Document</title>
+ </article>
+ <section id="include-test.test">
+ <title><link linkend="include-test.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include-sub">Include Test Sub Document</a>
+ </li>
+ <li>
+ <a href="#include-test.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <div id="include-sub">
+ <h3>
+ Include Test Sub Document
+ </h3>
+ </div>
+ <div id="include-test.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include-test.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="link_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Link tests</title>
+ <section id="link_tests.different_types_of_links">
+ <title>Different types of links</title>
+ <para>
+ <ulink url="http://www.boost.org/">http://www.boost.org/</ulink> <ulink url="http://www.boost.org/">Boost</ulink>
+ <link linkend="link-id">link-id</link> <link linkend="link-id">Link Text</link>
+ <anchor id="link-id"/><functionname alt="foo">foo</functionname> <functionname
+ alt="foo">link text</functionname> <classname alt="foo">foo</classname> <classname
+ alt="foo">link text</classname> <methodname alt="foo">foo</methodname> <methodname
+ alt="foo">link text</methodname> <enumname alt="foo">foo</enumname> <enumname
+ alt="foo">link text</enumname> <macroname alt="foo">foo</macroname> <macroname
+ alt="foo">link text</macroname> <headername alt="foo">foo</headername> <headername
+ alt="foo">link text</headername> <conceptname alt="foo">foo</conceptname>
+ <conceptname alt="foo">link text</conceptname> <globalname alt="foo">foo</globalname>
+ <globalname alt="foo">link text</globalname>
+ </para>
+ <para>
+ <link linkend="link">description</link>
+ </para>
+ </section>
+ <section id="link_tests.side_by_side_links">
+ <title>Side-by-side links</title>
+ <para>
+ <link linkend="x">x</link> and <link linkend="y">y</link> are two distinct
+ links, which should be separated by whitespace when they appear together as
+ in <link linkend="x">x</link> <link linkend="y">y</link>. Also in <link linkend="x">x</link>
+ <link linkend="y">y</link>, and in <link linkend="x">x</link> <link linkend="y">y</link>
+ as well.
+ </para>
+ </section>
+ <section id="link_tests.escaping_links">
+ <title>Escaping links</title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Link tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#link_tests.different_types_of_links">Different types of links</a>
+ </li>
+ <li>
+ <a href="#link_tests.side_by_side_links">Side-by-side links</a>
+ </li>
+ <li>
+ <a href="#link_tests.escaping_links">Escaping links</a>
+ </li>
+ </ul>
+ </div>
+ <div id="link_tests.different_types_of_links">
+ <h3>
+ Different types of links
+ </h3>
+ <div id="link_tests.different_types_of_links">
+ <p>
+ <a href="http://www.boost.org/">http://www.boost.org/</a> <a href="http://www.boost.org/">Boost</a>
+ <a href="#link-id">link-id</a> <a href="#link-id">Link Text</a> <span id="link-id"></span>foo
+ link text <code>foo</code> <code>link text</code> foo link text foo link
+ text foo link text foo link text foo link text foo link text
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.side_by_side_links">
+ <h3>
+ Side-by-side links
+ </h3>
+ <div id="link_tests.side_by_side_links">
+ <p>
+ <a>x</a> and <a>y</a> are two distinct links, which should be separated
+ by whitespace when they appear together as in <a>x</a> <a>y</a>. Also in
+ <a>x</a> <a>y</a>, and in <a>x</a> <a>y</a> as well.
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.escaping_links">
+ <h3>
+ Escaping links
+ </h3>
+ <div id="link_tests.escaping_links">
+ <ul>
+ <li>
+ <div>
+ <a href="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="link_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Link tests</title>
+ <section id="link_tests.different_types_of_links">
+ <title><link linkend="link_tests.different_types_of_links">Different types of
+ links</link></title>
+ <para>
+ <ulink url="http://www.boost.org/">http://www.boost.org/</ulink> <ulink url="http://www.boost.org/">Boost</ulink>
+ <link linkend="link-id">link-id</link> <link linkend="link-id">Link Text</link>
+ <anchor id="link-id"/><functionname alt="foo">foo</functionname> <functionname
+ alt="foo">link text</functionname> <classname alt="foo">foo</classname> <classname
+ alt="foo">link text</classname> <methodname alt="foo">foo</methodname> <methodname
+ alt="foo">link text</methodname> <enumname alt="foo">foo</enumname> <enumname
+ alt="foo">link text</enumname> <macroname alt="foo">foo</macroname> <macroname
+ alt="foo">link text</macroname> <headername alt="foo">foo</headername> <headername
+ alt="foo">link text</headername> <conceptname alt="foo">foo</conceptname>
+ <conceptname alt="foo">link text</conceptname> <globalname alt="foo">foo</globalname>
+ <globalname alt="foo">link text</globalname>
+ </para>
+ <para>
+ <link linkend="link">description</link>
+ </para>
+ <para>
+ <link linkend="link[Hello]">description</link>
+ </para>
+ </section>
+ <section id="link_tests.side_by_side_links">
+ <title><link linkend="link_tests.side_by_side_links">Side-by-side links</link></title>
+ <para>
+ <link linkend="x">x</link> and <link linkend="y">y</link> are two distinct
+ links, which should be separated by whitespace when they appear together as
+ in <link linkend="x">x</link> <link linkend="y">y</link>. Also in <link linkend="x">x</link>
+ <link linkend="y">y</link>, and in <link linkend="x">x</link> <link linkend="y">y</link>
+ as well.
+ </para>
+ </section>
+ <section id="link_tests.escaping_links">
+ <title><link linkend="link_tests.escaping_links">Escaping links</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Link tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#link_tests.different_types_of_links">Different types of links</a>
+ </li>
+ <li>
+ <a href="#link_tests.side_by_side_links">Side-by-side links</a>
+ </li>
+ <li>
+ <a href="#link_tests.escaping_links">Escaping links</a>
+ </li>
+ </ul>
+ </div>
+ <div id="link_tests.different_types_of_links">
+ <h3>
+ Different types of links
+ </h3>
+ <div id="link_tests.different_types_of_links">
+ <p>
+ <a href="http://www.boost.org/">http://www.boost.org/</a> <a href="http://www.boost.org/">Boost</a>
+ <a href="#link-id">link-id</a> <a href="#link-id">Link Text</a> <span id="link-id"></span>foo
+ link text <code>foo</code> <code>link text</code> foo link text foo link
+ text foo link text foo link text foo link text foo link text
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.side_by_side_links">
+ <h3>
+ Side-by-side links
+ </h3>
+ <div id="link_tests.side_by_side_links">
+ <p>
+ <a>x</a> and <a>y</a> are two distinct links, which should be separated
+ by whitespace when they appear together as in <a>x</a> <a>y</a>. Also in
+ <a>x</a> <a>y</a>, and in <a>x</a> <a>y</a> as well.
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.escaping_links">
+ <h3>
+ Escaping links
+ </h3>
+ <div id="link_tests.escaping_links">
+ <ul>
+ <li>
+ <div>
+ <a href="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="link_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Link tests</title>
+ <section id="link_tests.different_types_of_links">
+ <title><link linkend="link_tests.different_types_of_links">Different types of
+ links</link></title>
+ <para>
+ <ulink url="http://www.boost.org/">http://www.boost.org/</ulink> <ulink url="http://www.boost.org/">Boost</ulink>
+ <link linkend="link-id">link-id</link> <link linkend="link-id">Link Text</link>
+ <anchor id="link-id"/><functionname alt="foo">foo</functionname> <functionname
+ alt="foo">link text</functionname> <classname alt="foo">foo</classname> <classname
+ alt="foo">link text</classname> <methodname alt="foo">foo</methodname> <methodname
+ alt="foo">link text</methodname> <enumname alt="foo">foo</enumname> <enumname
+ alt="foo">link text</enumname> <macroname alt="foo">foo</macroname> <macroname
+ alt="foo">link text</macroname> <headername alt="foo">foo</headername> <headername
+ alt="foo">link text</headername> <conceptname alt="foo">foo</conceptname>
+ <conceptname alt="foo">link text</conceptname> <globalname alt="foo">foo</globalname>
+ <globalname alt="foo">link text</globalname>
+ </para>
+ <para>
+ <link linkend="link">description</link>
+ </para>
+ </section>
+ <section id="link_tests.side_by_side_links">
+ <title><link linkend="link_tests.side_by_side_links">Side-by-side links</link></title>
+ <para>
+ <link linkend="x">x</link> and <link linkend="y">y</link> are two distinct
+ links, which should be separated by whitespace when they appear together as
+ in <link linkend="x">x</link> <link linkend="y">y</link>. Also in <link linkend="x">x</link>
+ <link linkend="y">y</link>, and in <link linkend="x">x</link> <link linkend="y">y</link>
+ as well.
+ </para>
+ </section>
+ <section id="link_tests.templates_is_links">
+ <title><link linkend="link_tests.templates_is_links">Templates is links....</link></title>
+ <para>
+ <link linkend="blah.x2">Templated link?</link>
+ </para>
+ <para>
+ <link linkend="something-one-two">something-one-two</link> <link linkend="something-one-two">something-one-two</link>
+ <link linkend="something-one-two">something-one-two</link>
+ </para>
+ </section>
+ <section id="link_tests.escaping_links">
+ <title><link linkend="link_tests.escaping_links">Escaping links</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Link tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#link_tests.different_types_of_links">Different types of links</a>
+ </li>
+ <li>
+ <a href="#link_tests.side_by_side_links">Side-by-side links</a>
+ </li>
+ <li>
+ <a href="#link_tests.templates_is_links">Templates is links....</a>
+ </li>
+ <li>
+ <a href="#link_tests.escaping_links">Escaping links</a>
+ </li>
+ </ul>
+ </div>
+ <div id="link_tests.different_types_of_links">
+ <h3>
+ Different types of links
+ </h3>
+ <div id="link_tests.different_types_of_links">
+ <p>
+ <a href="http://www.boost.org/">http://www.boost.org/</a> <a href="http://www.boost.org/">Boost</a>
+ <a href="#link-id">link-id</a> <a href="#link-id">Link Text</a> <span id="link-id"></span>foo
+ link text <code>foo</code> <code>link text</code> foo link text foo link
+ text foo link text foo link text foo link text foo link text
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.side_by_side_links">
+ <h3>
+ Side-by-side links
+ </h3>
+ <div id="link_tests.side_by_side_links">
+ <p>
+ <a>x</a> and <a>y</a> are two distinct links, which should be separated
+ by whitespace when they appear together as in <a>x</a> <a>y</a>. Also in
+ <a>x</a> <a>y</a>, and in <a>x</a> <a>y</a> as well.
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.templates_is_links">
+ <h3>
+ Templates is links....
+ </h3>
+ <div id="link_tests.templates_is_links">
+ <p>
+ <a>Templated link?</a>
+ </p>
+ <p>
+ <a>something-one-two</a> <a>something-one-two</a> <a>something-one-two</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.escaping_links">
+ <h3>
+ Escaping links
+ </h3>
+ <div id="link_tests.escaping_links">
+ <ul>
+ <li>
+ <div>
+ <a href="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>List Test</title>
+ <para>
+ Simple list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Simple list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Two level list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Two level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ E
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <orderedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Inconsistent Indentation:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B4
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B5
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B6
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Markup in list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <quote>Quoted</quote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <footnote id="list_test.f0">
+ <para>
+ Footnote
+ </para>
+ </footnote>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 1:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A4
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 2:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.list_immediately_following_markup">
+ <title><link linkend="list_test.list_immediately_following_markup">List immediately
+ following markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="list_test.list_immediately_following_markup_2">
+ <title><link linkend="list_test.list_immediately_following_markup_2">List immediately
+ following markup 2</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One [section Nested section]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two [endsect]
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ List Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#list_test.list_immediately_following_markup">List immediately
+ following markup</a>
+ </li>
+ <li>
+ <a href="#list_test.list_immediately_following_markup_2">List immediately
+ following markup 2</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Simple list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ <p>
+ Simple list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ol>
+ <p>
+ Two level list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Two level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ E
+ </div>
+ </li>
+ <li>
+ <div>
+ F
+ <ul>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ol>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ol>
+ <p>
+ Inconsistent Indentation:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ </li>
+ <li>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ <li>
+ <div>
+ B4
+ </div>
+ </li>
+ <li>
+ <div>
+ B5
+ <ul>
+ <li>
+ <div>
+ C3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B6
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ </ul>
+ <p>
+ Markup in list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <q>Quoted</q>
+ </div>
+ </li>
+ <li>
+ <div>
+ <a id="list_test.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 1:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ <li>
+ <div>
+ A4
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 2:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <div id="list_test.list_immediately_following_markup">
+ <h3>
+ List immediately following markup
+ </h3>
+ <div id="list_test.list_immediately_following_markup">
+ <ul>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="list_test.list_immediately_following_markup_2">
+ <h3>
+ List immediately following markup 2
+ </h3>
+ <div id="list_test.list_immediately_following_markup_2">
+ <ul>
+ <li>
+ <div>
+ One [section Nested section]
+ </div>
+ </li>
+ <li>
+ <div>
+ Two [endsect]
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#list_test.f0"><sup>[1]</sup></a> Footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>List Test</title>
+ <para>
+ Simple list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Simple list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Two level list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Two level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ E
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <orderedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Inconsistent Indentation:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B4
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B5
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B6
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Markup in list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <quote>Quoted</quote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <footnote id="list_test.f0">
+ <para>
+ Footnote
+ </para>
+ </footnote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <simpara>
+ Some text.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [section Doesn't expand] Blah, blah. [endsect]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraph cheat 1.
+ </simpara>
+ <simpara>
+ Paragraph cheat 2.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraph cheat 3.
+ </simpara>
+ <simpara>
+ Paragraph cheat 4.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 1:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A4
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 2:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.list_immediately_following_marku">
+ <title><link linkend="list_test.list_immediately_following_marku">List immediately
+ following markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="list_test.list_immediately_following_mark0">
+ <title><link linkend="list_test.list_immediately_following_mark0">List immediately
+ following markup 2</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One [section Nested section]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two [endsect]
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ List Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#list_test.list_immediately_following_marku">List immediately
+ following markup</a>
+ </li>
+ <li>
+ <a href="#list_test.list_immediately_following_mark0">List immediately
+ following markup 2</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Simple list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ <p>
+ Simple list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ol>
+ <p>
+ Two level list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Two level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ E
+ </div>
+ </li>
+ <li>
+ <div>
+ F
+ <ul>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ol>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ol>
+ <p>
+ Inconsistent Indentation:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ </li>
+ <li>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ <li>
+ <div>
+ B4
+ </div>
+ </li>
+ <li>
+ <div>
+ B5
+ <ul>
+ <li>
+ <div>
+ C3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B6
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ </ul>
+ <p>
+ Markup in list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <q>Quoted</q>
+ </div>
+ </li>
+ <li>
+ <div>
+ <a id="list_test.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ </div>
+ </li>
+ <li>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div>
+ Some text.
+ </div>
+ </li>
+ <li>
+ <div>
+ [section Doesn't expand] Blah, blah. [endsect]
+ </div>
+ </li>
+ <li>
+ <div>
+ Paragraph cheat 1.
+ </div>
+ <div>
+ Paragraph cheat 2.
+ </div>
+ </li>
+ <li>
+ <div>
+ Paragraph cheat 3.
+ </div>
+ <div>
+ Paragraph cheat 4.
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 1:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ <li>
+ <div>
+ A4
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 2:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <div id="list_test.list_immediately_following_marku">
+ <h3>
+ List immediately following markup
+ </h3>
+ <div id="list_test.list_immediately_following_marku">
+ <ul>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="list_test.list_immediately_following_mark0">
+ <h3>
+ List immediately following markup 2
+ </h3>
+ <div id="list_test.list_immediately_following_mark0">
+ <ul>
+ <li>
+ <div>
+ One [section Nested section]
+ </div>
+ </li>
+ <li>
+ <div>
+ Two [endsect]
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#list_test.f0"><sup>[1]</sup></a> Footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>List Test</title>
+ <para>
+ Simple list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Simple list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Two level list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Two level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ E
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <orderedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Inconsistent Indentation:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B4
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B5
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B6
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Markup in list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <quote>Quoted</quote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <footnote id="list_test.f0">
+ <para>
+ Footnote
+ </para>
+ </footnote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <bridgehead renderas="sect2" id="list_test.h0">
+ <phrase id="list_test.the_heading_for_a_list_item"/><link linkend="list_test.the_heading_for_a_list_item">The
+ heading for a list item</link>
+ </bridgehead>
+ <simpara>
+ The content of the list item.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 1:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A4
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 2:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.paragraphs_in_list_items">
+ <title><link linkend="list_test.paragraphs_in_list_items">Paragraphs in list
+ items</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ E1
+ </simpara>
+ <simpara>
+ E2
+ </simpara>
+ <simpara>
+ E3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ <simpara>
+ D2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="list_test.indented_code_blocks_in_lists">
+ <title><link linkend="list_test.indented_code_blocks_in_lists">Indented code
+ blocks in lists</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+<programlisting><phrase role="identifier">B</phrase>
+</programlisting>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+<programlisting><phrase role="identifier">E</phrase>
+</programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ List Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#list_test.paragraphs_in_list_items">Paragraphs in list items</a>
+ </li>
+ <li>
+ <a href="#list_test.indented_code_blocks_in_lists">Indented code blocks
+ in lists</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Simple list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ <p>
+ Simple list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ol>
+ <p>
+ Two level list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Two level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ E
+ </div>
+ </li>
+ <li>
+ <div>
+ F
+ <ul>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ol>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ol>
+ <p>
+ Inconsistent Indentation:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ </li>
+ <li>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ <li>
+ <div>
+ B4
+ </div>
+ </li>
+ <li>
+ <div>
+ B5
+ <ul>
+ <li>
+ <div>
+ C3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B6
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ </ul>
+ <p>
+ Markup in list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <q>Quoted</q>
+ </div>
+ </li>
+ <li>
+ <div>
+ <a id="list_test.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ </div>
+ </li>
+ <li>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </li>
+ <li>
+ <h2 id="list_test.the_heading_for_a_list_item">
+ The heading for a list item
+ </h2>
+ <div>
+ The content of the list item.
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 1:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ <li>
+ <div>
+ A4
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 2:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <div id="list_test.paragraphs_in_list_items">
+ <h3>
+ Paragraphs in list items
+ </h3>
+ <div id="list_test.paragraphs_in_list_items">
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ B1
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ D1
+ <ul>
+ <li>
+ <div>
+ E1
+ </div>
+ <div>
+ E2
+ </div>
+ <div>
+ E3
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div>
+ D2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="list_test.indented_code_blocks_in_lists">
+ <h3>
+ Indented code blocks in lists
+ </h3>
+ <div id="list_test.indented_code_blocks_in_lists">
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+<pre class="programlisting"><span class="identifier">B</span>
+</pre>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+<pre class="programlisting"><span class="identifier">E</span>
+</pre>
+ </li>
+ <li>
+ <div>
+ F
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#list_test.f0"><sup>[1]</sup></a> Footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macro_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macro Test</title>
+ <para>
+ 1
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ two
+ </para>
+ <para>
+ 1
+ </para>
+ <para>
+ 1
+ </para>
+ <para>
+ 1
+ </para>
+ <para>
+ 1 2
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macro Test
+ </h3>
+ <p>
+ 1
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ two
+ </p>
+ <p>
+ 1
+ </p>
+ <p>
+ 1
+ </p>
+ <p>
+ 1
+ </p>
+ <p>
+ 1 2
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macro_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macro Test</title>
+ <para>
+ 1
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ two
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ 3
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ [1] \m2
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macro Test
+ </h3>
+ <p>
+ 1
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ two
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ 3
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ [1] \m2
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mismatched brackets</title>
+ <para>
+ [foo
+ </para>
+ <para>
+ Eek
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mismatched brackets
+ </h3>
+ <p>
+ [foo
+ </p>
+ <p>
+ Eek
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mismatched brackets</title>
+ <para>
+ [foo Eek
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mismatched brackets
+ </h3>
+ <p>
+ [foo Eek
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mismatched brackets</title>
+ <section id="mismatched_brackets.something">
+ <title>Something</title>
+ </section>
+ <para>
+ ]
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mismatched brackets
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#mismatched_brackets.something">Something</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ ]
+ </p>
+ <div id="mismatched_brackets.something">
+ <h3>
+ Something
+ </h3>
+ <div id="mismatched_brackets.something">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="test_newlines" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test newlines</title>
+ <para>
+ Line 1<sbr/> Line 2
+ </para>
+ <blockquote>
+ <para>
+ <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
+ <emphasis>-- Old adage</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ Line 1<sbr/> Line 2
+ </para>
+ <blockquote>
+ <para>
+ <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
+ <emphasis>-- Old adage</emphasis>
+ </para>
+ </blockquote>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test newlines
+ </h3>
+ <p>
+ Line 1<br/> Line 2
+ </p>
+ <blockquote>
+ <p>
+ <q>It is better to be approximately right than exactly wrong.</q><br/> <span
+ class="emphasis"><em>-- Old adage</em></span>
+ </p>
+ </blockquote>
+ <p>
+ Line 1<br/> Line 2
+ </p>
+ <blockquote>
+ <p>
+ <q>It is better to be approximately right than exactly wrong.</q><br/> <span
+ class="emphasis"><em>-- Old adage</em></span>
+ </p>
+ </blockquote>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="paragraph_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Paragraph Test</title>
+ <section id="paragraph_test.some_paragraphs">
+ <title><link linkend="paragraph_test.some_paragraphs">Some Paragraphs</link></title>
+ <para>
+ Shouldn't be a code block.
+ </para>
+ <para>
+ <emphasis role="bold">Should be bold</emphasis>.
+ </para>
+ <para>
+ Should be a single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Lots of newlines round this paragraph.
+ </para>
+ <para>
+ Last paragraph.
+ </para>
+ </section>
+ <section id="paragraph_test.inside___breaking_comment__blocks">
+ <title><link linkend="paragraph_test.inside___breaking_comment__blocks">Inside
+ blocks</link></title>
+ <variablelist>
+ <title></title>
+ <varlistentry>
+ <term>Paragraphs</term>
+ <listitem>
+ <para>
+ Shouldn't be a code block.
+ </para>
+ <para>
+ <emphasis role="bold">Should be bold</emphasis>.
+ </para>
+ <para>
+ Should be a single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Lots of newlines round this paragraph.
+ </para>
+ <para>
+ Last paragraph.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Paragraph Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#paragraph_test.some_paragraphs">Some Paragraphs</a>
+ </li>
+ <li>
+ <a href="#paragraph_test.inside___breaking_comment__blocks">Inside blocks</a>
+ </li>
+ </ul>
+ </div>
+ <div id="paragraph_test.some_paragraphs">
+ <h3>
+ Some Paragraphs
+ </h3>
+ <div id="paragraph_test.some_paragraphs">
+ <p>
+ Shouldn't be a code block.
+ </p>
+ <p>
+ <span class="bold"><strong>Should be bold</strong></span>.
+ </p>
+ <p>
+ Should be a single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Lots of newlines round this paragraph.
+ </p>
+ <p>
+ Last paragraph.
+ </p>
+ </div>
+ </div>
+ <div id="paragraph_test.inside___breaking_comment__blocks">
+ <h3>
+ Inside blocks
+ </h3>
+ <div id="paragraph_test.inside___breaking_comment__blocks">
+ <dl>
+ <dt>
+ Paragraphs
+ </dt>
+ <dd>
+ <p>
+ Shouldn't be a code block.
+ </p>
+ <p>
+ <span class="bold"><strong>Should be bold</strong></span>.
+ </p>
+ <p>
+ Should be a single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Lots of newlines round this paragraph.
+ </p>
+ <p>
+ Last paragraph.
+ </p>
+ </dd>
+ </dl>
+ </div>
+ </div>
+ </body>
+</html>
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: '''<!--quickbook-escape-postfix--><>'''
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="preformatted" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Preformatted</title>
+ <section id="preformatted.preformatted">
+ <title>Preformatted</title>
+ <para>
+ Here's the ubiquitous <emphasis>Hello World</emphasis> program in C++.
+ </para>
+<programlisting>#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</programlisting>
+ <para>
+ 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 <code><phrase role="identifier">main</phrase></code>,
+ on line 3.
+ </para>
+ <para>
+ Here's a one line function definitition:
+ </para>
+<programlisting>void something(); </programlisting>
+ <para>
+ .
+ </para>
+ <para>
+ And some indented code:
+ </para>
+<programlisting>void go()
+ {
+ }
+</programlisting>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Preformatted
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#preformatted.preformatted">Preformatted</a>
+ </li>
+ </ul>
+ </div>
+ <div id="preformatted.preformatted">
+ <h3>
+ Preformatted
+ </h3>
+ <div id="preformatted.preformatted">
+ <p>
+ Here's the ubiquitous <span class="emphasis"><em>Hello World</em></span>
+ program in C++.
+ </p>
+<pre class="programlisting">#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</pre>
+ <p>
+ 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 <code><span class="identifier">main</span></code>,
+ on line 3.
+ </p>
+ <p>
+ Here's a one line function definitition:
+ </p>
+<pre class="programlisting">void something(); </pre>
+ <p>
+ .
+ </p>
+ <p>
+ And some indented code:
+ </p>
+<pre class="programlisting">void go()
+ {
+ }
+</pre>
+ </div>
+ </div>
+ </body>
+</html>
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 <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: [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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="preformatted" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Preformatted</title>
+ <section id="preformatted.preformatted">
+ <title><link linkend="preformatted.preformatted">Preformatted</link></title>
+ <para>
+ Here's the ubiquitous <emphasis>Hello World</emphasis> program in C++.
+ </para>
+<programlisting>#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</programlisting>
+ <para>
+ 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 <code><phrase role="identifier">main</phrase></code>,
+ on line 3.
+ </para>
+ <para>
+ Here's a one line function definitition:
+ </para>
+<programlisting>void something(); </programlisting>
+ <para>
+ .
+ </para>
+ <para>
+ And some indented code:
+ </para>
+<programlisting> void go()
+ {
+ }
+</programlisting>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Preformatted
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#preformatted.preformatted">Preformatted</a>
+ </li>
+ </ul>
+ </div>
+ <div id="preformatted.preformatted">
+ <h3>
+ Preformatted
+ </h3>
+ <div id="preformatted.preformatted">
+ <p>
+ Here's the ubiquitous <span class="emphasis"><em>Hello World</em></span>
+ program in C++.
+ </p>
+<pre class="programlisting">#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</pre>
+ <p>
+ 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 <code><span class="identifier">main</span></code>,
+ on line 3.
+ </p>
+ <p>
+ Here's a one line function definitition:
+ </p>
+<pre class="programlisting">void something(); </pre>
+ <p>
+ .
+ </p>
+ <p>
+ And some indented code:
+ </p>
+<pre class="programlisting"> void go()
+ {
+ }
+</pre>
+ </div>
+ </div>
+ </body>
+</html>
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 <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: [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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_test_article" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+ <articleinfo>
+ <copyright>
+ <year>2016</year> <holder>Daniel James</holder>
+ </copyright>
+ <legalnotice id="simple_test_article.legal">
+ <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>
+ </articleinfo>
+ <section id="simple_test_article.one">
+ <title><link linkend="simple_test_article.one">One</link></title>
+ <bridgehead renderas="sect1" id="simple_test_article.one.h0">
+ <phrase id="simple_test_article.one.a"/><link linkend="simple_test_article.one.a">A</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <bridgehead renderas="sect3" id="simple_test_article.one.h1">
+ <phrase id="simple_test_article.one.b"/><link linkend="simple_test_article.one.b">B</link>
+ </bridgehead>
+ </section>
+</article>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_test_article" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+ <articleinfo>
+ <copyright>
+ <year>2016</year> <holder>Daniel James</holder>
+ </copyright>
+ <legalnotice id="simple_test_article.legal">
+ <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>
+ </articleinfo>
+ <section id="simple_test_article.one">
+ <title><link linkend="simple_test_article.one">One</link></title>
+ <bridgehead renderas="sect1" id="simple_test_article.one.h0">
+ <phrase id="simple_test_article.one.a"/><link linkend="simple_test_article.one.a">A</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <bridgehead renderas="sect3" id="simple_test_article.one.h1">
+ <phrase id="simple_test_article.one.b"/><link linkend="simple_test_article.one.b">B</link>
+ </bridgehead>
+ </section>
+</article>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article
+ id="simple_test_article"
+ last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+
+
+ <articleinfo>
+
+ <copyright>
+ <year>2016</year>
+ <holder>Daniel James</holder>
+ </copyright>
+
+ <legalnotice id="simple_test_article.legal">
+ <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>
+
+ </articleinfo>
+
+
+<section id="simple_test_article.one">
+<title><link linkend="simple_test_article.one">One</link></title>
+<bridgehead renderas="sect1" id="simple_test_article.one.h0"><phrase id="simple_test_article.one.a"/><link linkend="simple_test_article.one.a">A</link></bridgehead><para>
+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.</para>
+<bridgehead renderas="sect3" id="simple_test_article.one.h1"><phrase id="simple_test_article.one.b"/><link linkend="simple_test_article.one.b">B</link></bridgehead></section>
+</article>
+
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_test_article" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+ <articleinfo>
+ <copyright>
+ <year>2016</year> <holder>Daniel James</holder>
+ </copyright>
+ <legalnotice id="simple_test_article.legal">
+ <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>
+ </articleinfo>
+ <section id="simple_test_article.one">
+ <title>One</title>
+ <bridgehead renderas="sect1" id="simple_test_article.one.a">
+ A
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <bridgehead renderas="sect3" id="simple_test_article.one.b">
+ B
+ </bridgehead>
+ </section>
+</article>
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 <quickbook-test-define> : : free ;
+feature.feature <quickbook-test-include> : : free path ;
+feature.feature <quickbook-xinclude-base> : : 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)
+ <location-prefix>$(target-name).test
+ <quickbook-testing.quickbook-command>$(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)
+ <location-prefix>$(target-name).test2
+ <testing.input-file>$(reference-output)
+ <testing.input-file>$(target-name).boostbook
+ <preserve-test-targets>on
+ ] ;
+
+ local t1-html =
+ [ targets.create-typed-target QUICKBOOK_HTML_OUTPUT
+ : $(project)
+ : $(target-name).html
+ : $(input)
+ : $(requirements)
+ <location-prefix>$(target-name).test-html
+ <quickbook-testing.quickbook-command>$(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)
+ <location-prefix>$(target-name).test-html
+ <testing.input-file>$(reference-output-html)
+ <testing.input-file>$(target-name).html
+ <preserve-test-targets>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)
+ <testing.input-file>$(input)
+ <preserve-test-targets>on
+ <dependency>$(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)
+ <testing.input-file>$(input)
+ <testing.arg>--expect-errors
+ <preserve-test-targets>on
+ <dependency>$(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 <quickbook-testing.quickbook-command> ;
+toolset.flags quickbook-testing.process-quickbook QB-DEFINES <quickbook-test-define> ;
+toolset.flags quickbook-testing.process-quickbook XINCLUDE <quickbook-xinclude-base> ;
+toolset.flags quickbook-testing.process-quickbook INCLUDES <quickbook-test-include> ;
+toolset.flags quickbook-testing.process-quickbook-html quickbook-command <quickbook-testing.quickbook-command> ;
+toolset.flags quickbook-testing.process-quickbook-html QB-DEFINES <quickbook-test-define> ;
+toolset.flags quickbook-testing.process-quickbook-html XINCLUDE <quickbook-xinclude-base> ;
+toolset.flags quickbook-testing.process-quickbook-html INCLUDES <quickbook-test-include> ;
+
+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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Quickbook 1.4</title>
+ <articleinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joel</firstname> <surname>de Guzman</surname>
+ </author>
+ <author>
+ <firstname>Eric</firstname> <surname>Niebler</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2002</year> <year>2004</year> <year>2006</year> <holder>Joel de Guzman,
+ Eric Niebler</holder>
+ </copyright>
+ <legalnotice id="quickbook.legal">
+ <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>
+ <articlepurpose>
+ <emphasis>WikiWiki</emphasis> style documentation tool
+ </articlepurpose>
+ </articleinfo>
+ <section id="quickbook.intro">
+ <title><link linkend="quickbook.intro">Introduction</link></title>
+ <blockquote>
+ <para>
+ <emphasis role="bold"><emphasis><quote>Why program by hand in five days what
+ you can spend five years of your life automating?</quote></emphasis></emphasis>
+ </para>
+ <para>
+ -- Terrence Parr, author ANTLR/PCCTS
+ </para>
+ </blockquote>
+ <para>
+ Well, QuickBook started as a weekend hack. It was originally intended to be
+ a sample application using <ulink url="http://spirit.sourceforge.net">Spirit</ulink>.
+ What is it? What you are viewing now, this documentation, is autogenerated
+ by QuickBook. These files were generated from one master:
+ </para>
+ <blockquote>
+ <para>
+ <ulink url="../quickbook.qbk">quickbook.qbk</ulink>
+ </para>
+ </blockquote>
+ <para>
+ 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
+ <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ instead of HTML. The <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ documentation format is an extension of <ulink url="http://www.docbook.org/">DocBook</ulink>,
+ an SGML or XML based format for describing documentation.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ Features include:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ xml, to generate HTML, PostScript and PDF
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ simple markup to link to Doxygen-generated entities
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ macro system for simple text substitution
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ simple markup for italics, bold, preformatted, blurbs, code samples, tables,
+ URLs, anchors, images, etc.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ automatic syntax coloring of code samples
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ CSS support
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="quickbook.change_log">
+ <title><link linkend="quickbook.change_log">Change Log</link></title>
+ <bridgehead renderas="sect3" id="quickbook.change_log.h0">
+ <phrase id="quickbook.change_log.version_1_3"/><link linkend="quickbook.change_log.version_1_3">Version
+ 1.3</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Quickbook file inclusion [include].
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Better xml output (pretty layout). Check out the generated XML.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Regression testing facility: to make sure your document will always be
+ compatible (full backward compatibility) regardless of changes to QuickBook.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Code cleanup and refactoring.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow phrase markup in the doc-info.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preformatted code blocks via ``code`` (double ticks) allows code in tables
+ and lists, for example.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Better (intuitive) paragraph termination. Some markups may terminate a
+ paragraph. Example:
+<programlisting><phrase role="special">[</phrase><phrase role="identifier">section</phrase> <phrase role="identifier">x</phrase><phrase role="special">]</phrase>
+<phrase role="identifier">blah</phrase><phrase role="special">...</phrase>
+<phrase role="special">[</phrase><phrase role="identifier">endsect</phrase><phrase role="special">]</phrase></programlisting>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Fully qualified section and headers. Subsection names are concatenated
+ to the ID to avoid clashing. Example: <code><phrase role="identifier">doc_name</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">sect_name</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">sub_sect_name</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">sub_sub_sect_name</phrase></code>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Better &amp;nbsp; and whitespace handling in code snippets.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [xinclude] fixes up the relative path to the target XML file when input_directory
+ is not the same as the output_directory.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow untitled tables.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow phrase markups in section titles.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow escaping back to QuickBook from code, code blocks and inline code.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Footnotes, with the [footnote This is the footnote] syntax.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Post-processor bug fix for escaped XML code that it does not recognize.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Replaceable, with the [~replacement] syntax.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Generic Headers
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Code changes to allow full recursion (i.e. Collectors and push/pop functions)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Various code cleanup/maintenance
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Templates!
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [conceptref] for referencing BoostBook &lt;concept&gt; entities.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow escape of spaces. The escaped space is removed from the output. Syntax:
+ <code><phrase role="special">\</phrase> </code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested comments are now allowed.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Quickbook blocks can nest inside comments.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="quickbook.syntax.block.import">Import</link> facility.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Callouts on imported code
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Simple markups can now span a whole block.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>, <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
+ may now contain paragraphs.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
+ and <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
+ role="special">]</phrase></code> are now deprecated.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="quickbook.syntax">
+ <title><link linkend="quickbook.syntax">Syntax Summary</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <section id="quickbook.syntax.comments">
+ <title><link linkend="quickbook.syntax.comments">Comments</link></title>
+ <para>
+ Can be placed anywhere.
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[/ comment (no output generated) ]<!--quickbook-escape-postfix-->
+</programlisting>
+<programlisting><!--quickbook-escape-prefix-->[/ comments can be nested [/ some more here] ]<!--quickbook-escape-postfix-->
+</programlisting>
+<programlisting><!--quickbook-escape-prefix-->[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]<!--quickbook-escape-postfix-->
+</programlisting>
+ </section>
+ <section id="quickbook.syntax.phrase">
+ <title><link linkend="quickbook.syntax.phrase">Phrase Level Elements</link></title>
+ <section id="quickbook.syntax.phrase.font_styles">
+ <title><link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link></title>
+<programlisting><!--quickbook-escape-prefix-->['italic], [*bold], [_underline], [^teletype], [-strikethrough]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis
+ role="underline">underline</emphasis>, <literal>teletype</literal>, <emphasis
+ role="strikethrough">strikethrough</emphasis>
+ </para>
+ <para>
+ Like all non-terminal phrase level elements, this can of course be nested:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[*['bold-italic]]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <emphasis role="bold"><emphasis>bold-italic</emphasis></emphasis>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.replaceable">
+ <title><link linkend="quickbook.syntax.phrase.replaceable">Replaceable</link></title>
+ <para>
+ When you want content that may or must be replaced by the user, use the
+ syntax:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[~replacement]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This will generate:
+ </para>
+ <para>
+ <replaceable>replacement</replaceable>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.quotations">
+ <title><link linkend="quickbook.syntax.phrase.quotations">Quotations</link></title>
+<programlisting><!--quickbook-escape-prefix-->["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <quote>A question that sometimes drives me hazy: am I or are the others
+ crazy?</quote>--Einstein
+ </para>
+ <para>
+ Note the proper left and right quote marks. Also, while you can simply
+ use ordinary quote marks like &quot;quoted&quot;, our quotation, above,
+ will generate correct DocBook quotations (e.g. &lt;quote&gt;quoted&lt;/quote&gt;).
+ </para>
+ <para>
+ Like all phrase elements, quotations may be nested. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->["Here's the rule for bargains: ["Do other men, for they would do you.] That's
+the true business precept.]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <quote>Here's the rule for bargains: <quote>Do other men, for they would
+ do you.</quote> That's the true business precept.</quote>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.simple_formatting">
+ <title><link linkend="quickbook.syntax.phrase.simple_formatting">Simple formatting</link></title>
+ <para>
+ Simple markup for formatting text, common in many applications, is now
+ supported:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->/italic/, *bold*, _underline_, =teletype=
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis
+ role="underline">underline</emphasis>, <literal>teletype</literal>
+ </para>
+ <para>
+ Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives
+ are much stricter<footnote id="quickbook.syntax.phrase.simple_formatting.f0">
+ <para>
+ Thanks to David Barrett, author of <ulink url="http://quinthar.com/qwikiwiki/index.php?page=Home">Qwiki</ulink>,
+ for sharing these samples and teaching me these obscure formatting rules.
+ I wasn't sure at all if <ulink url="http://spirit.sourceforge.net">Spirit</ulink>,
+ being more or less a formal EBNF parser, can handle the context sensitivity
+ and ambiguity.
+ </para>
+ </footnote>.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Simple markups cannot nest. You can combine a simple markup with a
+ nestable markup.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Simple markups cannot contain any other form of quickbook markup.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A non-space character must follow the leading markup
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A non-space character must precede the trailing markup
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A space or a punctuation must follow the trailing markup
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 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: ']'.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A line starting with the star will be interpreted as an unordered list.
+ See <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link>.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <table frame="all" id="quickbook.syntax.phrase.simple_formatting.t0">
+ <title>More Formatting Samples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Markup
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <literal>*Bold*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">Bold</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*Is bold*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">Is bold</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>* Not bold* *Not bold * * Not bold *</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ * Not bold* *Not bold * * Not bold *
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>This*Isn't*Bold (no bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ This*Isn't*Bold (no bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>(*Bold Inside*) (parenthesis not bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ (<emphasis role="bold">Bold Inside</emphasis>) (parenthesis not
+ bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*(Bold Outside)* (parenthesis bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">(Bold Outside)</emphasis> (parenthesis
+ bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>3*4*5 = 60 (no bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 3*4*5 = 60 (no bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>3 * 4 * 5 = 60 (no bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 3 * 4 * 5 = 60 (no bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>3 *4* 5 = 60 (4 is bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 3 <emphasis role="bold">4</emphasis> 5 = 60 (4 is bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*This is bold* this is not *but this is*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">This is bold</emphasis> this is not <emphasis
+ role="bold">but this is</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*This is bold*.</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">This is bold</emphasis>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*B*. (bold B)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">B</emphasis>. (bold B)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>['*Bold-Italic*]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis><emphasis role="bold">Bold-Italic</emphasis></emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*side-by*/-side/</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">side-by</emphasis><emphasis>-side</emphasis>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ As mentioned, simple markups cannot go past a single block. The text from
+ &quot;have&quot; to &quot;full&quot; in the following paragraph will be
+ rendered as bold:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->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.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Baa baa black sheep, <emphasis role="bold">have you any wool? Yes sir,
+ yes sir, three bags full!</emphasis> One for the master, one for the dame,
+ And one for the little boy who lives down the lane.
+ </para>
+ <para>
+ But in the following paragraph, bold is not applied:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->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.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.inline_code">
+ <title><link linkend="quickbook.syntax.phrase.inline_code">Inline code</link></title>
+ <para>
+ Inlining code in paragraphs is quite common when writing C++ documentation.
+ We provide a very simple markup for this. For example, this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->This text has inlined code `int main() { return 0; }` in it.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ This text has inlined code <code><phrase role="keyword">int</phrase> <phrase
+ role="identifier">main</phrase><phrase role="special">()</phrase> <phrase
+ role="special">{</phrase> <phrase role="keyword">return</phrase> <phrase
+ role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">}</phrase></code>
+ in it. The code will be syntax highlighted.
+ </para>
+ <note>
+ <para>
+ We simply enclose the code with the tick: <literal>"`"</literal>, not the
+ single quote: <code><phrase role="string">&quot;'&quot;</phrase></code>.
+ Note too that <literal>`some code`</literal> is preferred over <literal>[^some code]</literal>.
+ </para>
+ </note>
+ </section>
+ <section id="quickbook.syntax.phrase.code_blocks">
+ <title><link linkend="quickbook.syntax.phrase.code_blocks">Code blocks</link></title>
+ <para>
+ Preformatted code simply starts with a space or a tab (See <link linkend="quickbook.syntax.block.code">Code</link>).
+ However, such a simple syntax cannot be used as phrase elements in lists
+ (See <link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</link> and <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link>), tables (See <link linkend="quickbook.syntax.block.tables">Tables</link>),
+ etc. Inline code (see above) can. The problem is, inline code does not
+ allow formatting with newlines, spaces, and tabs. These are lost.
+ </para>
+ <para>
+ 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:
+ </para>
+<programlisting>``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+``
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.source_mode">
+ <title><link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link></title>
+ <para>
+ 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 <link linkend="quickbook.syntax.block.document">Document</link>
+ section.
+ </para>
+ <para>
+ To change the source mode, use the <literal>[source-mode]</literal> markup,
+ where <literal>source-mode</literal> is one of the supported modes. For
+ example, this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->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`.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ Python's <code><phrase role="keyword">import</phrase></code> is rather
+ like C++'s <code><phrase role="preprocessor">#include</phrase></code>.
+ A C++ comment <code><phrase role="comment">// looks like this</phrase></code>
+ whereas a Python comment <code><phrase role="comment">#looks like this</phrase></code>.
+ </para>
+ <table frame="all" id="quickbook.syntax.phrase.source_mode.t0">
+ <title>Supported Source Modes</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Mode
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Source Mode Markup
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ C++
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[c++]</literal>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Python
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[python]</literal>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <note>
+ <para>
+ The source mode strings are lowercase.
+ </para>
+ </note>
+ </section>
+ <section id="quickbook.syntax.phrase.line_break">
+ <title><link linkend="quickbook.syntax.phrase.line_break">line-break</link></title>
+<programlisting><!--quickbook-escape-prefix-->[br]
+<!--quickbook-escape-postfix--></programlisting>
+ <warning>
+ <para>
+ <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
+ role="special">]</phrase></code> is now deprecated. <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>,
+ <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
+ may now contain paragraphs.
+ </para>
+ </warning>
+ </section>
+ <section id="quickbook.syntax.phrase.anchors">
+ <title><link linkend="quickbook.syntax.phrase.anchors">Anchors</link></title>
+<programlisting><!--quickbook-escape-prefix-->[#named_anchor]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ A named anchor is a hook that can be referenced by a link elsewhere in
+ the document. You can then reference an anchor with <literal>[link named_anchor
+Some link text]</literal>.
+ See <link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link>,
+ <link linkend="quickbook.syntax.block.section">Section</link> and <link
+ linkend="quickbook.syntax.block.headings">Heading</link>.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.links">
+ <title><link linkend="quickbook.syntax.phrase.links">Links</link></title>
+<programlisting><!--quickbook-escape-prefix-->[@http://www.boost.org this is [*boost's] website....]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <ulink url="http://www.boost.org">this is <emphasis role="bold">boost's</emphasis>
+ website....</ulink>
+ </para>
+ <para>
+ URL links where the link text is the link itself is common. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->see http://spirit.sourceforge.net/
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ so, when the text is absent in a link markup, the URL is assumed. Example:
+ </para>
+<programlisting>see <!--quickbook-escape-prefix-->[@http://spirit.sourceforge.net/]<!--quickbook-escape-postfix-->
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ see <ulink url="http://spirit.sourceforge.net/">http://spirit.sourceforge.net/</ulink>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.anchor_links">
+ <title><link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link></title>
+ <para>
+ You can link within a document using:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link section_id.normalized_header_text The link text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ See sections <link linkend="quickbook.syntax.block.section">Section</link>
+ and <link linkend="quickbook.syntax.block.headings">Heading</link> for
+ more info.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.refentry_links">
+ <title><link linkend="quickbook.syntax.phrase.refentry_links">refentry links</link></title>
+ <para>
+ In addition, you can link internally to an XML refentry like:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link xml.refentry The link text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This gets converted into <literal>&lt;link linkend=&quot;xml.refentry&quot;&gt;The
+ link text&lt;/link&gt;</literal>.
+ </para>
+ <para>
+ Like URLs, the link text is optional. If this is not present, the link
+ text will automatically be the refentry. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link xml.refentry]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This gets converted into <literal>&lt;link linkend=&quot;xml.refentry&quot;&gt;xml.refentry&lt;/link&gt;</literal>.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.code_links">
+ <title><link linkend="quickbook.syntax.phrase.code_links">Code Links</link></title>
+ <para>
+ If you want to link to a function, class, member, enum, concept or header
+ in the reference section, you can use:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[classref boost::bar::baz]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ would have &quot;boost::bar::baz&quot; as the link text.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.escape">
+ <title><link linkend="quickbook.syntax.phrase.escape">Escape</link></title>
+ <para>
+ The escape mark-up is used when we don't want to do any processing.
+ </para>
+<programlisting>'''
+escape (no processing/formatting)
+'''
+</programlisting>
+ <para>
+ Escaping allows us to pass XML markup to <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ or <ulink url="http://www.docbook.org/">DocBook</ulink>. For example:
+ </para>
+<programlisting>'''
+&lt;emphasis role=&quot;bold&quot;&gt;This is direct XML markup&lt;/emphasis&gt;
+'''
+</programlisting>
+ <para>
+ <emphasis role="bold">This is direct XML markup</emphasis>
+ </para>
+ <important>
+ <para>
+ Be careful when using the escape. The text must conform to <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>/<ulink
+ url="http://www.docbook.org/">DocBook</ulink> syntax.
+ </para>
+ </important>
+ </section>
+ <section id="quickbook.syntax.phrase.single_char_escape">
+ <title><link linkend="quickbook.syntax.phrase.single_char_escape">Single
+ char escape</link></title>
+ <para>
+ 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 <code><phrase
+ role="special">[</phrase></code> and <code><phrase role="special">]</phrase></code>.
+ For example, how do you escape the triple quote? Simple: <literal>\'\'\'</literal>
+ </para>
+ <para>
+ <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
+ has a special meaning. It is used to generate line breaks.
+ </para>
+ <warning>
+ <para>
+ <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
+ and <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
+ role="special">]</phrase></code> are now deprecated. <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>,
+ <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
+ may now contain paragraphs.
+ </para>
+ </warning>
+ <para>
+ The escaped space: <code><phrase role="special">\</phrase> </code> also
+ has a special meaning. The escaped space is removed from the output.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.images">
+ <title><link linkend="quickbook.syntax.phrase.images">Images</link></title>
+<programlisting><!--quickbook-escape-prefix-->[$image.jpg]
+<!--quickbook-escape-postfix--></programlisting>
+ </section>
+ <section id="quickbook.syntax.phrase.footnotes">
+ <title><link linkend="quickbook.syntax.phrase.footnotes">Footnotes</link></title>
+ <para>
+ As of version 1.3, QuickBook supports footnotes. Just put the text of the
+ footnote in a <code><phrase role="special">[</phrase><phrase role="identifier">footnote</phrase><phrase
+ role="special">]</phrase></code> block, and the text will be put at the
+ bottom of the current page. For example, this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[footnote A sample footnote]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate this<footnote id="quickbook.syntax.phrase.footnotes.f0">
+ <para>
+ A sample footnote
+ </para>
+ </footnote>.
+ </para>
+ <section id="quickbook.syntax.phrase.footnotes.macro_expansion">
+ <title><link linkend="quickbook.syntax.phrase.footnotes.macro_expansion">Macro
+ Expansion</link></title>
+<programlisting><!--quickbook-escape-prefix-->__a_macro_identifier__
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ See <link linkend="quickbook.syntax.block.macros">Macros</link> for details.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.footnotes.template_expansion">
+ <title><link linkend="quickbook.syntax.phrase.footnotes.template_expansion">Template
+ Expansion</link></title>
+<programlisting><!--quickbook-escape-prefix-->[a_template_identifier]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ See <link linkend="quickbook.syntax.block.templates">Templates</link>
+ for details.
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="quickbook.syntax.block">
+ <title><link linkend="quickbook.syntax.block">Block Level Elements</link></title>
+ <section id="quickbook.syntax.block.document">
+ <title><link linkend="quickbook.syntax.block.document">Document</link></title>
+ <para>
+ Every document must begin with a Document Info section, which should look
+ like this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Where document-type is one of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ book
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ article
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ library
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ chapter
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ part
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ appendix
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ preface
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ qandadiv
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ qandaset
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ reference
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ set
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ quickbook 1.3 declares the version of quickbook the document is written
+ for. In its absence, version 1.1 is assumed.
+ </para>
+ <para>
+ <literal>version</literal>, <literal>id</literal>, <literal>dirname</literal>,
+ <literal>copyright</literal>, <literal>purpose</literal>, <literal>category</literal>,
+ <literal>authors</literal>, <literal>license</literal>, <literal>last-revision</literal>
+ and <literal>source-mode</literal> are optional information.
+ </para>
+ <para>
+ <literal>source-type</literal> is a lowercase string setting the initial
+ <link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link>.
+ If the <literal>source-mode</literal> field is omitted, a default value
+ of <literal>c++</literal> will be used.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.section">
+ <title><link linkend="quickbook.syntax.block.section">Section</link></title>
+ <para>
+ Starting a new section is accomplished with:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[section:id The Section Title]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ where <emphasis>id</emphasis> is optional. id will be the filename of the
+ generated section. If it is not present, &quot;The Section Title&quot;
+ will be normalized and become the id. Valid characters are <literal>a-Z</literal>,
+ <literal>A-Z</literal>, <literal>0-9</literal> and <literal>_</literal>.
+ All non-valid characters are converted to underscore and all upper-case
+ are converted to lower case. Thus: &quot;The Section Title&quot; will be
+ normalized to &quot;the_section_title&quot;.
+ </para>
+ <para>
+ End a section with:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[endsect]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Sections can nest, and that results in a hierarchy in the table of contents.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.xinclude">
+ <title><link linkend="quickbook.syntax.block.xinclude">xinclude</link></title>
+ <para>
+ You can include another XML file with:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[xinclude file.xml]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This is useful when file.xml has been generated by Doxygen and contains
+ your reference section.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.paragraphs">
+ <title><link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link></title>
+ <para>
+ 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.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.lists">
+ <title><link linkend="quickbook.syntax.block.lists">Lists</link></title>
+ <section id="quickbook.syntax.block.lists.ordered_lists">
+ <title><link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</link></title>
+<programlisting># One
+# Two
+# Three
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.list_hierarchies">
+ <title><link linkend="quickbook.syntax.block.lists.list_hierarchies">List
+ Hierarchies</link></title>
+ <para>
+ List hierarchies are supported. Example:
+ </para>
+<programlisting># One
+# Two
+# Three
+ # Three.a
+ # Three.b
+ # Three.c
+# Four
+ # Four.a
+ # Four.a.i
+ # Four.a.ii
+# Five
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Three.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.b
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.c
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Fourth
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Four.a
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Four.a.i
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Four.a.ii
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Five
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.long_list_lines">
+ <title><link linkend="quickbook.syntax.block.lists.long_list_lines">Long
+ List Lines</link></title>
+ <para>
+ Long lines will be wrapped appropriately. Example:
+ </para>
+<programlisting># 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.
+</programlisting>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A short item.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A short item.
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.unordered_lists">
+ <title><link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link></title>
+<programlisting><!--quickbook-escape-prefix-->* First
+* Second
+* Third
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ First
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Second
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Third
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.mixed_lists">
+ <title><link linkend="quickbook.syntax.block.lists.mixed_lists">Mixed lists</link></title>
+ <para>
+ Mixed lists (ordered and unordered) are supported. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix--># One
+# Two
+# Three
+ * Three.a
+ * Three.b
+ * Three.c
+# Four
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Three.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.b
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.c
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Four
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ And...
+ </para>
+<programlisting><!--quickbook-escape-prefix--># 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
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ 1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 1.a
+ <orderedlist>
+ <listitem>
+ <simpara>
+ 1.a.1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 1.a.2
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 1.b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 2.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2.b
+ <orderedlist>
+ <listitem>
+ <simpara>
+ 2.b.1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2.b.2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 2.b.2.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2.b.2.b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ </section>
+ <section id="quickbook.syntax.block.code">
+ <title><link linkend="quickbook.syntax.block.code">Code</link></title>
+ <para>
+ Preformatted code starts with a space or a tab. The code will be syntax
+ highlighted according to the current <link linkend="quickbook.syntax.phrase.source_mode">Source
+ Mode</link>:
+ </para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// Sample code</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+<programlisting><phrase role="keyword">import</phrase> <phrase role="identifier">cgi</phrase>
+
+<phrase role="keyword">def</phrase> <phrase role="identifier">cookForHtml</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">):</phrase>
+ <phrase role="string">'''&quot;Cooks&quot; the input text for HTML.'''</phrase>
+
+ <phrase role="keyword">return</phrase> <phrase role="identifier">cgi</phrase><phrase role="special">.</phrase><phrase role="identifier">escape</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">)</phrase>
+</programlisting>
+ <para>
+ Macros that are already defined are expanded in source code. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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__;
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Generates:
+ </para>
+<programlisting><phrase role="keyword">using</phrase> <ulink url="http://www.boost.org/libs/libraries.htm">boost</ulink><phrase role="special">::</phrase><ulink url="http://www.boost.org/doc/html/array/reference.html">array</ulink><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="quickbook.syntax.block.escape_back">
+ <title><link linkend="quickbook.syntax.block.escape_back">Escaping Back To
+ QuickBook</link></title>
+ <para>
+ 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 <emphasis>escape-back</emphasis> delimiter. In C++
+ and Python, the delimiter is the double tick (back-quote): &quot;``&quot;
+ and &quot;``&quot;. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
+{
+}
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Will generate:
+ </para>
+<programlisting><phrase role="keyword">void</phrase> <ulink url="http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz">foo</ulink><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ When escaping from code to QuickBook, only phrase level markups are allowed.
+ Block level markups like lists, tables etc. are not allowed.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.preformatted">
+ <title><link linkend="quickbook.syntax.block.preformatted">Preformatted</link></title>
+ <para>
+ Sometimes, you don't want some preformatted text to be parsed as C++. In
+ such cases, use the <literal>[pre ... ]</literal> markup block.
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[pre
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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:
+ </para>
+<programlisting>Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text
+
+ Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text
+
+ Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text
+
+</programlisting>
+ <para>
+ Notice that unlike Code, phrase markup such as font style is still permitted
+ inside <literal>pre</literal> blocks.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.blockquote">
+ <title><link linkend="quickbook.syntax.block.blockquote">Blockquote</link></title>
+<programlisting><!--quickbook-escape-prefix-->[:sometext...]<!--quickbook-escape-postfix-->
+</programlisting>
+ <blockquote>
+ <para>
+ Indents the paragraph. This applies to one paragraph only.
+ </para>
+ </blockquote>
+ </section>
+ <section id="quickbook.syntax.block.admonitions">
+ <title><link linkend="quickbook.syntax.block.admonitions">Admonitions</link></title>
+<programlisting><!--quickbook-escape-prefix-->[note This is a note]
+[tip This is a tip]
+[important This is important]
+[caution This is a caution]
+[warning This is a warning]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ generates <ulink url="http://www.docbook.org/">DocBook</ulink> admonitions:
+ </para>
+ <note>
+ <para>
+ This is a note
+ </para>
+ </note>
+ <tip>
+ <para>
+ This is a tip
+ </para>
+ </tip>
+ <important>
+ <para>
+ This is important
+ </para>
+ </important>
+ <caution>
+ <para>
+ This is a caution
+ </para>
+ </caution>
+ <warning>
+ <para>
+ This is a warning
+ </para>
+ </warning>
+ <para>
+ These are the only admonitions supported by <ulink url="http://www.docbook.org/">DocBook</ulink>.
+ So, for example <literal>[information This is some information]</literal>
+ is unlikely to produce the desired effect.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.headings">
+ <title><link linkend="quickbook.syntax.block.headings">Headings</link></title>
+<programlisting><!--quickbook-escape-prefix-->[h1 Heading 1]
+[h2 Heading 2]
+[h3 Heading 3]
+[h4 Heading 4]
+[h5 Heading 5]
+[h6 Heading 6]
+<!--quickbook-escape-postfix--></programlisting>
+ <bridgehead renderas="sect1" id="quickbook.syntax.block.headings.h0">
+ <phrase id="quickbook.syntax.block.headings.heading_1"/><link linkend="quickbook.syntax.block.headings.heading_1">Heading
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="quickbook.syntax.block.headings.h1">
+ <phrase id="quickbook.syntax.block.headings.heading_2"/><link linkend="quickbook.syntax.block.headings.heading_2">Heading
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="quickbook.syntax.block.headings.h2">
+ <phrase id="quickbook.syntax.block.headings.heading_3"/><link linkend="quickbook.syntax.block.headings.heading_3">Heading
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="quickbook.syntax.block.headings.h3">
+ <phrase id="quickbook.syntax.block.headings.heading_4"/><link linkend="quickbook.syntax.block.headings.heading_4">Heading
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.headings.h4">
+ <phrase id="quickbook.syntax.block.headings.heading_5"/><link linkend="quickbook.syntax.block.headings.heading_5">Heading
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="quickbook.syntax.block.headings.h5">
+ <phrase id="quickbook.syntax.block.headings.heading_6"/><link linkend="quickbook.syntax.block.headings.heading_6">Heading
+ 6</link>
+ </bridgehead>
+ <para>
+ Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized
+ names with <literal>name=&quot;section_id.normalized_header_text&quot;</literal>
+ (i.e. valid characters are <literal>a-z</literal>, <literal>A-Z</literal>,
+ <literal>0-9</literal> and <literal>_</literal>. 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 <literal>section_2.heading_1</literal>).
+ You can use:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link section_id.normalized_header_text The link text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ to link to them. See <link linkend="quickbook.syntax.phrase.anchor_links">Anchor
+ links</link> and <link linkend="quickbook.syntax.block.section">Section</link>
+ for more info.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.generic_heading">
+ <title><link linkend="quickbook.syntax.block.generic_heading">Generic Heading</link></title>
+ <para>
+ In cases when you don't want to care about the heading level (1 to 6),
+ you can use the <emphasis>Generic Heading</emphasis>:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[heading Heading]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ The <emphasis>Generic Heading</emphasis> 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 <emphasis>h2</emphasis>.
+ </para>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[section A]
+[h2 X]
+[h2 Y]
+[h2 Z]
+[endsect]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[section A]
+[heading X]
+[heading Y]
+[heading Z]
+[endsect]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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 <emphasis>section</emphasis> and <emphasis>heading</emphasis>, you
+ have all you need. <emphasis>h1</emphasis>..<emphasis>h6</emphasis> becomes
+ redundant. <emphasis>h1</emphasis>..<emphasis>h6</emphasis> might be deprecated
+ in the future.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.macros">
+ <title><link linkend="quickbook.syntax.block.macros">Macros</link></title>
+<programlisting><!--quickbook-escape-prefix-->[def macro_identifier some text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1]]
+sf_logo
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Now everywhere the sf_logo is placed, the picture will be inlined.
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1"></imagedata></imageobject>
+ <textobject>
+ <phrase>sflogo</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <tip>
+ <para>
+ 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. <literal>__spirit__</literal>). The reason is to avoid unwanted
+ macro replacement.
+ </para>
+ </tip>
+ <para>
+ Links (URLS) and images are good candidates for macros. <emphasis role="bold">1</emphasis>)
+ 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. <emphasis role="bold">2</emphasis>)
+ The syntax is not pretty. It's easier to read and write, e.g. <literal>__spirit__</literal>
+ than <literal>[@http://spirit.sourceforge.net Spirit]</literal>.
+ </para>
+ <para>
+ Some more examples:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[def :-) [$theme/smiley.png]]
+[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ (See <link linkend="quickbook.syntax.phrase.images">Images</link> and
+ <link linkend="quickbook.syntax.phrase.links">Links</link>)
+ </para>
+ <para>
+ Invoking these macros:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->Hi __spirit__ :-)
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate this:
+ </para>
+ <para>
+ Hi <ulink url="http://spirit.sourceforge.net">Spirit</ulink> <inlinemediaobject><imageobject><imagedata
+ fileref="images/smiley.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>smiley</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.predefined_macros">
+ <title><link linkend="quickbook.syntax.block.predefined_macros">Predefined
+ Macros</link></title>
+ <para>
+ Quickbook has some predefined macros that you can already use.
+ </para>
+ <table frame="all" id="quickbook.syntax.block.predefined_macros.t0">
+ <title>Predefined Macros</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Macro
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Meaning
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Example
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ __DATE__
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Today's date
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2000-Dec-20
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ __TIME__
+ </para>
+ </entry>
+ <entry>
+ <para>
+ The current time
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 12:00:00 PM
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ __FILENAME__
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Quickbook source filename
+ </para>
+ </entry>
+ <entry>
+ <para>
+ quickbook_manual-1_4.quickbook
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="quickbook.syntax.block.templates">
+ <title><link linkend="quickbook.syntax.block.templates">Templates</link></title>
+ <para>
+ 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).
+ </para>
+ <para>
+ Example template:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template person[name age what]
+
+Hi, my name is [name]. I am [age] years old. I am a [what].
+
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h0">
+ <phrase id="quickbook.syntax.block.templates.template_identifier"/><link
+ linkend="quickbook.syntax.block.templates.template_identifier">Template
+ Identifier</link>
+ </bridgehead>
+ <para>
+ Template identifiers can either consist of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A single character punctuation (a non-alphanumeric printable character)
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h1">
+ <phrase id="quickbook.syntax.block.templates.formal_template_arguments"/><link
+ linkend="quickbook.syntax.block.templates.formal_template_arguments">Formal
+ Template Arguments</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <para>
+ A template formal argument temporarily hides a template of the same name
+ at the point where the <link linkend="quickbook.syntax.block.templates.template_expansion">template
+ is expanded</link>. Note that the body of the <literal>person</literal>
+ template above refers to <literal>name</literal> <literal>age</literal>
+ and <literal>what</literal> as <literal>[name]</literal> <literal>[age]</literal>
+ and <literal>[what]</literal>. <literal>name</literal> <literal>age</literal>
+ and <literal>what</literal> are actually templates that exist in the duration
+ of the template call.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h2">
+ <phrase id="quickbook.syntax.block.templates.template_body"/><link linkend="quickbook.syntax.block.templates.template_body">Template
+ Body</link>
+ </bridgehead>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template sample[arg1 arg2...argN] replacement text... ]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Block templates are of the form:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template sample[arg1 arg2...argN]
+replacement text...
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h3">
+ <phrase id="quickbook.syntax.block.templates.template_expansion"/><link
+ linkend="quickbook.syntax.block.templates.template_expansion">Template
+ Expansion</link>
+ </bridgehead>
+ <para>
+ You expand a template this way:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template_identifier arg1..arg2..arg3]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ At template expansion, you supply the actual arguments. The template will
+ be expanded with your supplied arguments. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[person James Bond..39..Spy]
+[person Santa Clause..87..Big Red Fatso]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Which will expand to:
+ </para>
+ <para>
+ Hi, my name is James Bond. I am 39 years old. I am a Spy.
+ </para>
+ <para>
+ Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
+ </para>
+ <caution>
+ <para>
+ 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.
+ </para>
+ </caution>
+ <para>
+ Each actual argument can be a word, a text fragment or just about any
+ <link linkend="quickbook.syntax.phrase">QuickBook phrase</link>. Arguments
+ are separated by the double dot <literal>&quot;..&quot;</literal> and terminated
+ by the close parenthesis.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h4">
+ <phrase id="quickbook.syntax.block.templates.nullary_templates"/><link
+ linkend="quickbook.syntax.block.templates.nullary_templates">Nullary Templates</link>
+ </bridgehead>
+ <para>
+ Nullary templates look and act like simple macros. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template alpha[]&apos;&apos;&apos;&amp;#945;&apos;&apos;&apos;]
+[template beta[]&apos;&apos;&apos;&amp;#946;&apos;&apos;&apos;]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Expanding:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->Some squigles...[*[alpha][beta]]<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We have:
+ </para>
+ <para>
+ Some squiggles...<emphasis role="bold">&#945;&#946;</emphasis>
+ </para>
+ <para>
+ The difference with macros are
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ The explicit <link linkend="quickbook.syntax.block.templates.template_expansion">template
+ expansion syntax</link>. 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 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.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The empty brackets after the template identifier (<literal>alpha[]</literal>)
+ indicates no arguments. If the template body does not look like a template
+ argument list, we can elide the empty brackets. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template aristotle_quote Aristotle: [*['Education is the best provision
+for the journey to old age.]]]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Expanding:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->Here's a quote from [aristotle_quote].
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We have:
+ </para>
+ <para>
+ Here's a quote from Aristotle: <emphasis role="bold"><emphasis>Education
+ is the best provision for the journey to old age.</emphasis></emphasis>.
+ </para>
+ <para>
+ The disadvantage is that you can't avoid the space between the template
+ identifier, <code><phrase role="identifier">aristotle_quote</phrase></code>,
+ and the template body &quot;Aristotle...&quot;. This space will be part
+ of the template body. If that space is unwanted, use empty brackets or
+ use the space escape: &quot;<code><phrase role="special">\</phrase> </code>&quot;.
+ Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template tag\ _tag]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Then expanding:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->`struct` x[tag];
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We have:
+ </para>
+ <para>
+ <code><phrase role="keyword">struct</phrase></code> x_tag;
+ </para>
+ <para>
+ You have a couple of ways to do it. I personally prefer the explicit empty
+ brackets, though.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h5">
+ <phrase id="quickbook.syntax.block.templates.simple_arguments"/><link linkend="quickbook.syntax.block.templates.simple_arguments">Simple
+ Arguments</link>
+ </bridgehead>
+ <para>
+ As mentioned, arguments are separated by the double dot <literal>&quot;..&quot;</literal>.
+ If there are less arguments passed than expected, QuickBook attempts to
+ break the last argument into two or more arguments following this logic:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Break the last argument into two, at the first space found (<literal>'',
+ '\n', \t' or '\r'</literal>).
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Repeat until there are enough arguments or if there are no more spaces
+ found (in which case, an error is reported).
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ For example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template simple[a b c d] [a][b][c][d]]
+[simple w x y z]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will produce:
+ </para>
+ <para>
+ wxyz
+ </para>
+ <para>
+ &quot;w x y z&quot; is initially treated as a single argument because we
+ didn't supply any <literal>&quot;..&quot;</literal> separators. However,
+ since <literal>simple</literal> expects 4 arguments, &quot;w x y z&quot;
+ is broken down iteratively (applying the logic above) until we have &quot;w&quot;,
+ &quot;x&quot;, &quot;y&quot; and &quot;z&quot;.
+ </para>
+ <para>
+ QuickBook only tries to get the arguments it needs. For example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[simple w x y z trail]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will produce:
+ </para>
+ <para>
+ wxyz trail
+ </para>
+ <para>
+ The arguments being: &quot;w&quot;, &quot;x&quot;, &quot;y&quot; and &quot;z
+ trail&quot;.
+ </para>
+ <para>
+ It should be obvious now that for simple arguments with no spaces, we can
+ get by without separating the arguments with <literal>&quot;..&quot;</literal>
+ separators. It is possible to combine <literal>&quot;..&quot;</literal>
+ separators with the argument passing simplification presented above. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[simple what do you think ..m a n?]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will produce:
+ </para>
+ <para>
+ what do you think man?
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h6">
+ <phrase id="quickbook.syntax.block.templates.punctuation_templates"/><link
+ linkend="quickbook.syntax.block.templates.punctuation_templates">Punctuation
+ Templates</link>
+ </bridgehead>
+ <para>
+ 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 linkend="quickbook.syntax.block.templates.template_identifier">template
+ identifiers</link>. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template ![bar] <!--quickbook-escape-postfix-->&lt;hey&gt;<!--quickbook-escape-prefix-->[bar]<!--quickbook-escape-postfix-->&lt;/hey&gt;<!--quickbook-escape-prefix-->]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Now, expanding this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[!baz]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We will have:
+ </para>
+<programlisting>&lt;hey&gt;baz&lt;/hey&gt;
+</programlisting>
+ </section>
+ <section id="quickbook.syntax.block.blurbs">
+ <title><link linkend="quickbook.syntax.block.blurbs">Blurbs</link></title>
+<programlisting><!--quickbook-escape-prefix-->[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++.
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate this:
+ </para>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>smiley</phrase>
+ </textobject>
+ </inlinemediaobject> <emphasis role="bold">An eye catching advertisement
+ or note...</emphasis>
+ </para>
+ <para>
+ <ulink url="http://spirit.sourceforge.net">Spirit</ulink> 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++.
+ </para>
+ </sidebar>
+ <note>
+ <para>
+ Prefer <link linkend="quickbook.syntax.block.admonitions">admonitions</link>
+ wherever appropriate.
+ </para>
+ </note>
+ </section>
+ <section id="quickbook.syntax.block.tables">
+ <title><link linkend="quickbook.syntax.block.tables">Tables</link></title>
+<programlisting><!--quickbook-escape-prefix-->[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]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <table frame="all" id="quickbook.syntax.block.tables.t0">
+ <title>A Simple Table</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Heading 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Heading 3
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ R0-C0
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R0-C1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R0-C2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ R2-C0
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R2-C1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R2-C2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ R3-C0
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R3-C1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R3-C2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ The table title is optional. The first row of the table is automatically
+ treated as the table header; that is, it is wrapped in <literal>&lt;thead&gt;...&lt;/thead&gt;</literal>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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]
+ ]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ and thus:
+ </para>
+ <table frame="all" id="quickbook.syntax.block.tables.t1">
+ <title>Table with fat cells</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Heading 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 0, Col 0: a small cell
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 0, Col 1: a big fat cell with paragraphs
+ </para>
+ <para>
+ Boost provides free peer-reviewed portable C++ source libraries.
+ </para>
+ <para>
+ 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.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Row 1, Col 0: a small cell
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1, Col 1: a small cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ Here's how to have preformatted blocks of code in a table cell:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[table Table with code
+ [[Comment] [Code]]
+ [
+ [My first program]
+ [<!--quickbook-escape-postfix-->``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+ ``<!--quickbook-escape-prefix-->]
+ ]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <table frame="all" id="quickbook.syntax.block.tables.t2">
+ <title>Table with code</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Comment
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Code
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ My first program
+ </para>
+ </entry>
+ <entry>
+ <para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="quickbook.syntax.block.variable_lists">
+ <title><link linkend="quickbook.syntax.block.variable_lists">Variable Lists</link></title>
+<programlisting><!--quickbook-escape-prefix-->[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]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <variablelist>
+ <title>A Variable List</title>
+ <varlistentry>
+ <term>term 1</term>
+ <listitem>
+ <para>
+ The definition of term 1
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>term 2</term>
+ <listitem>
+ <para>
+ The definition of term 2
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>term 3</term>
+ <listitem>
+ <para>
+ The definition of term 3
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The rules for variable lists are the same as for tables, except that only
+ 2 &quot;columns&quot; are allowed. The first column contains the terms,
+ and the second column contains the definitions. Those familiar with HTML
+ will recognize this as a &quot;definition list&quot;.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.include">
+ <title><link linkend="quickbook.syntax.block.include">Include</link></title>
+ <para>
+ You can include one QuickBook file from another. The syntax is simply:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[include someother.qbk]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ The included file will be processed as if it had been cut and pasted into
+ the current document, with the following exceptions:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ The __FILENAME__ predefined macro will reflect the name of the file currently being
+ processed.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Any macros defined in the included file are scoped to that file.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <literal>[include]</literal> 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 (&quot;someother&quot;, in the example
+ above). You can specify the id like this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[include:someid someother.qbk]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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 &quot;Intro&quot;,
+ the named anchor for that section will be &quot;someid.intro&quot;, and
+ you can link to it with <literal>[link someid.intro The Intro]</literal>.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.import">
+ <title><link linkend="quickbook.syntax.block.import">Import</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ QuickBook's import facility provides a nice solution.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h0">
+ <phrase id="quickbook.syntax.block.import.example"/><link linkend="quickbook.syntax.block.import.example">Example</link>
+ </bridgehead>
+ <para>
+ You can effortlessly import code snippets from source code into your QuickBook.
+ The following illustrates how this is done:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[import ../test/stub.cpp]
+[foo]
+[bar]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ The first line:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[import ../test/stub.cpp]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ collects specially marked-up code snippets from <ulink url="../../test/stub.cpp">stub.cpp</ulink>
+ and places them in your QuickBook file as virtual templates. Each of the
+ specially marked-up code snippets has a name (e.g. <code><phrase role="identifier">foo</phrase></code>
+ and <code><phrase role="identifier">bar</phrase></code> 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[foo]
+[bar]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ And the result is:
+ </para>
+ <para>
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ This is the <emphasis role="bold"><emphasis>bar</emphasis></emphasis> function
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">bar</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, bar man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;bar&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ Some trailing text here
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h1">
+ <phrase id="quickbook.syntax.block.import.code_snippet_markup"/><link linkend="quickbook.syntax.block.import.code_snippet_markup">Code
+ Snippet Markup</link>
+ </bridgehead>
+ <para>
+ Note how the code snippets in <ulink url="../../test/stub.cpp">stub.cpp</ulink>
+ get marked up. We use distinguishable comments following the form:
+ </para>
+<programlisting><phrase role="comment">//[id</phrase>
+<phrase role="identifier">some</phrase> <phrase role="identifier">code</phrase> <phrase role="identifier">here</phrase>
+<phrase role="comment">//]</phrase>
+</programlisting>
+ <para>
+ The first comment line above initiates a named code-snippet. This prefix
+ will not be visible in quickbook. The entire code-snippet in between <code><phrase
+ role="comment">//[id</phrase></code> and <code><phrase role="comment">//]</phrase></code>
+ will be inserted as a template in quickbook with name <emphasis><emphasis>id</emphasis></emphasis>.
+ The comment <code><phrase role="comment">//]</phrase></code> ends a code-snippet
+ This too will not be visible in quickbook.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h2">
+ <phrase id="quickbook.syntax.block.import.special_comments"/><link linkend="quickbook.syntax.block.import.special_comments">Special
+ Comments</link>
+ </bridgehead>
+ <para>
+ Special comments of the form:
+ </para>
+<programlisting><phrase role="comment">//` some [*quickbook] markup here</phrase>
+</programlisting>
+ <para>
+ and:
+ </para>
+<programlisting><phrase role="comment">/*` some [*quickbook] markup here */</phrase>
+</programlisting>
+ <para>
+ will be parsed by QuickBook. This can contain quickbook <emphasis>blocks</emphasis>
+ (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.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h3">
+ <phrase id="quickbook.syntax.block.import.callouts"/><link linkend="quickbook.syntax.block.import.callouts">Callouts</link>
+ </bridgehead>
+ <para>
+ Special comments of the form:
+ </para>
+<programlisting><phrase role="comment">/*&lt; some [*quickbook] markup here &gt;*/</phrase>
+</programlisting>
+ <para>
+ will be regarded as callouts. These will be collected, numbered and rendered
+ as a &quot;callout bug&quot; (a small icon with a number). After the whole
+ snippet is parsed, the callout list is generated. See <ulink url="http://www.docbook.org/tdg/en/html/callout.html">Callouts</ulink>
+ for details. Example:
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo_bar</phrase><phrase role="special">()</phrase> <co id="quickbook.syntax.block.import.c0" linkends="quickbook.syntax.block.import.c1" />
+<phrase role="special">{</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo-bar&quot;</phrase><phrase role="special">;</phrase> <co id="quickbook.syntax.block.import.c2" linkends="quickbook.syntax.block.import.c3" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="quickbook.syntax.block.import.c0" id="quickbook.syntax.block.import.c1">
+ <para>
+ The <emphasis>Mythical</emphasis> FooBar. See <ulink url="http://en.wikipedia.org/wiki/Foobar">Foobar
+ for details</ulink>
+ </para>
+ </callout>
+ <callout arearefs="quickbook.syntax.block.import.c2" id="quickbook.syntax.block.import.c3">
+ <para>
+ return 'em, foo-bar man!
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Checkout <ulink url="../../test/stub.cpp">stub.cpp</ulink> to see the actual
+ code.
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="quickbook.install">
+ <title><link linkend="quickbook.install">Installation and configuration</link></title>
+ <para>
+ This section provides some guidelines on how to install and configure BoostBook
+ and Quickbook under several operating systems.
+ </para>
+ <para>
+ 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 <code><phrase role="identifier">bin</phrase></code>
+ and <code><phrase role="identifier">bin</phrase><phrase role="special">.</phrase><phrase
+ role="identifier">v2</phrase></code> directories generated by the build before
+ trying again. Otherwise your configuration fixes will not take any effect.
+ </para>
+ <section id="quickbook.install.windows">
+ <title><link linkend="quickbook.install.windows">Windows 2000, XP, 2003, Vista</link></title>
+ <blockquote>
+ <para>
+ <emphasis>Section contributed by Julio M. Merino Vidal</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ 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.
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ First of all you need to have a copy of <code><phrase role="identifier">xsltproc</phrase></code>
+ for Windows. There are many ways to get this tool, but to keep things
+ simple, use the <ulink url="http://www.zlatkovic.com/pub/libxml/">binary
+ packages</ulink> made by Igor Zlatkovic. At the very least, you need
+ to download the following packages: <code><phrase role="identifier">iconv</phrase></code>,
+ <code><phrase role="identifier">zlib</phrase></code>, <code><phrase role="identifier">libxml2</phrase></code>
+ and <code><phrase role="identifier">libxslt</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Unpack all these packages in the same directory so that you get unique
+ <code><phrase role="identifier">bin</phrase></code>, <code><phrase role="identifier">include</phrase></code>
+ and <code><phrase role="identifier">lib</phrase></code> directories within
+ the hierarchy. These instructions use <code><phrase role="identifier">C</phrase><phrase
+ role="special">:\</phrase><phrase role="identifier">Users</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">example</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">Documents</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">boost</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">xml</phrase></code>
+ as the root for all files.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ From the command line, go to the <code><phrase role="identifier">bin</phrase></code>
+ directory and launch <code><phrase role="identifier">xsltproc</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">exe</phrase></code>
+ to ensure it works. You should get usage information on screen.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Download <ulink url="http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip">Docbook
+ XML 4.2</ulink> and unpack it in the same directory used above. That
+ is: <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
+ role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">example</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xml</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Download the latest <ulink url="http://sourceforge.net/project/showfiles.php?group_id=21935&amp;package_id=16608">Docbook
+ XSL</ulink> version and unpack it, again in the same directory used before.
+ To make things easier, rename the directory created during the extraction
+ to <code><phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xsl</phrase></code> (bypassing the version name):
+ <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
+ role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">example</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xsl</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Add the following to your <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>
+ file, which should live in your home directory (<code><phrase role="special">%</phrase><phrase
+ role="identifier">HOMEDRIVE</phrase><phrase role="special">%%</phrase><phrase
+ role="identifier">HOMEPATH</phrase><phrase role="special">%</phrase></code>).
+ You must already have it somewhere or otherwise you could not be building
+ Boost (i.e. missing tools configuration).
+ </simpara>
+ </listitem>
+ </orderedlist>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">xsltproc</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/bin/xsltproc.exe&quot;</phrase>
+ <phrase role="special">;</phrase>
+
+<phrase role="identifier">using</phrase> <phrase role="identifier">boostbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xsl&quot;</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xml&quot;</phrase>
+ <phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ 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:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Go to Quickbook's source directory (<code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">tools</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">quickbook</phrase></code>).
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
+ <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Copy the resulting <code><phrase role="identifier">quickbook</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">exe</phrase></code>
+ binary (located under the <code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">bin</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">v2</phrase></code>
+ hierarchy) to a safe place. Following our previous example, you can install
+ it into: <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
+ role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">example</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">bin</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Add the following to your <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>
+ file:
+ </simpara>
+ </listitem>
+ </orderedlist>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">quickbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/bin/quickbook.exe&quot;</phrase>
+ <phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="quickbook.install.linux">
+ <title><link linkend="quickbook.install.linux">Debian, Ubuntu</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ First install the <code><phrase role="identifier">bjam</phrase></code>,
+ <code><phrase role="identifier">xsltproc</phrase></code>, <code><phrase role="identifier">docbook</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">xsl</phrase></code> and
+ <code><phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xml</phrase></code> packages. For example, using <code><phrase
+ role="identifier">apt</phrase><phrase role="special">-</phrase><phrase role="identifier">get</phrase></code>:
+ </para>
+<programlisting><phrase role="identifier">sudo</phrase> <phrase role="identifier">apt</phrase><phrase role="special">-</phrase><phrase role="identifier">get</phrase> <phrase role="identifier">install</phrase> <phrase role="identifier">xsltprc</phrase> <phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase role="identifier">xsl</phrase> <phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase role="identifier">xml</phrase>
+</programlisting>
+ <para>
+ If you're planning on building boost's documentation, you'll also need to
+ install the <code><phrase role="identifier">doxygen</phrase></code> package
+ as well.
+ </para>
+ <para>
+ Next, we need to configure Boost Build to compile BoostBook files. Add the
+ following to your <code><phrase role="identifier">user</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">config</phrase><phrase role="special">.</phrase><phrase
+ role="identifier">jam</phrase></code> 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 <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>, see
+ the <ulink url="http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html">Boost
+ Build documentation</ulink>.
+ </para>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">xsltproc</phrase> <phrase role="special">;</phrase>
+
+<phrase role="identifier">using</phrase> <phrase role="identifier">boostbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">share</phrase><phrase role="special">/</phrase><phrase role="identifier">xml</phrase><phrase role="special">/</phrase><phrase role="identifier">docbook</phrase><phrase role="special">/</phrase><phrase role="identifier">stylesheet</phrase><phrase role="special">/</phrase><phrase role="identifier">nwalsh</phrase>
+ <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">share</phrase><phrase role="special">/</phrase><phrase role="identifier">xml</phrase><phrase role="special">/</phrase><phrase role="identifier">docbook</phrase><phrase role="special">/</phrase><phrase role="identifier">schema</phrase><phrase role="special">/</phrase><phrase role="identifier">dtd</phrase><phrase role="special">/</phrase><phrase role="number">4.2</phrase>
+ <phrase role="special">;</phrase>
+
+<phrase role="comment"># Remove this line if you're not using doxygen</phrase>
+<phrase role="identifier">using</phrase> <phrase role="identifier">doxygen</phrase> <phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ 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:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Go to Quickbook's source directory (<code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">tools</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">quickbook</phrase></code>).
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
+ <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Copy the resulting <code><phrase role="identifier">quickbook</phrase></code>
+ binary (located under the <code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">bin</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">v2</phrase></code>
+ hierarchy) to a safe place. The traditional location is <code><phrase
+ role="special">/</phrase><phrase role="identifier">usr</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">local</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">bin</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Add the following to your <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>
+ file, using the full path of the quickbook executable:
+ </simpara>
+ </listitem>
+ </orderedlist>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">quickbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">local</phrase><phrase role="special">/</phrase><phrase role="identifier">bin</phrase><phrase role="special">/</phrase><phrase role="identifier">quickbook</phrase>
+ <phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="quickbook.editors">
+ <title><link linkend="quickbook.editors">Editor Support</link></title>
+ <para>
+ 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.
+ </para>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>note</phrase>
+ </textobject>
+ </inlinemediaobject> You may submit your settings, tips, and suggestions to
+ the authors, or through the <ulink url="https://lists.sourceforge.net/lists/listinfo/boost-">docs
+ Boost Docs mailing list</ulink>.
+ </para>
+ </sidebar>
+ <section id="quickbook.editors.scite">
+ <title><link linkend="quickbook.editors.scite">Scintilla Text Editor</link></title>
+ <blockquote>
+ <para>
+ <emphasis>Section contributed by Dean Michael Berris</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ The Scintilla Text Editor (SciTE) is a free source code editor for Win32
+ and X. It uses the SCIntilla source code editing component.
+ </para>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>tip</phrase>
+ </textobject>
+ </inlinemediaobject> SciTE can be downloaded from <ulink url="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html</ulink>
+ </para>
+ </sidebar>
+ <para>
+ You can use the following settings to highlight quickbook tags when editing
+ quickbook files.
+ </para>
+<programlisting><!--quickbook-escape-prefix-->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=]
+<!--quickbook-escape-postfix--></programlisting>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>note</phrase>
+ </textobject>
+ </inlinemediaobject> Thanks to Rene Rivera for the above SciTE settings.
+ </para>
+ </sidebar>
+ </section>
+ </section>
+ <section id="quickbook.faq">
+ <title><link linkend="quickbook.faq">Frequently Asked Questions</link></title>
+ <bridgehead renderas="sect3" id="quickbook.faq.h0">
+ <phrase id="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_"/><link
+ linkend="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_">Can
+ I use QuickBook for non-Boost documentation?</link>
+ </bridgehead>
+ <para>
+ QuickBook can be used for non-Boost documentation with a little extra work.
+ </para>
+ <blockquote>
+ <para>
+ <emphasis>Faq contributed by Michael Marcin</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ 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.
+ </para>
+ <para>
+ For example:
+ </para>
+<programlisting>using quickbook ;
+
+xml my_doc : my_doc.qbk ;
+
+boostbook standalone
+ :
+ my_doc
+ :
+ &lt;xsl:param&gt;boost.image.src=images/my_project_logo.png
+ &lt;xsl:param&gt;boost.image.alt=&quot;\&quot;My Project\&quot;&quot;
+ &lt;xsl:param&gt;boost.image.w=100
+ &lt;xsl:param&gt;boost.image.h=50
+ &lt;xsl:param&gt;nav.layout=none
+ ;
+</programlisting>
+ </section>
+ <section id="quickbook.ref">
+ <title><link linkend="quickbook.ref">Quick Reference</link></title>
+ <para>
+ [cpp]
+ </para>
+ <table frame="all" id="quickbook.ref.t0">
+ <title>Syntax Compendium</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ To do this...
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Use this...
+ </para>
+ </entry>
+ <entry>
+ <para>
+ See this...
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ comment
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[/ some comment]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.comments">Comments</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>italics</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>['italics] or /italics/</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis role="bold">bold</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[*bold] or *bold*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis role="underline">underline</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[_underline] or _underline_</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>teletype</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[^teletype] or =teletype=</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis role="strikethrough">strikethrough</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[-strikethrough]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <replaceable>replaceable</replaceable>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[~replaceable]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.replaceable">Replaceble</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ source mode
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[c++]</literal> or <literal>[python]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ inline code
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>`int main();`</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.inline_code">Inline code</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ code block
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>``int main();``</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.code">Code</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ code escape
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>``from c++ to QuickBook``</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.escape_back">Escaping Back
+ To QuickBook</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ line break
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[br] or \n</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.line_break">line-break</link>
+ <emphasis role="bold">DEPRECATED</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ anchor
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[#anchor]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.anchors">Anchors</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[@http://www.boost.org Boost]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.links">Links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ anchor link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[link section.anchor Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ refentry link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[link xml.refentry Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.refentry_links">refentry links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ function link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[funcref fully::qualified::function_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ class link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[classref fully::qualified::class_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ member link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[memberref fully::qualified::member_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ enum link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[enumref fully::qualified::enum_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ macro link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[macroref MACRO_NAME Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ concept link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[conceptref ConceptName Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ header link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[headerref path/to/header.hpp Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ escape
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>'''escaped text (no processing/formatting)'''</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.escape">Escape</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ single char escape
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>\c</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.single_char_escape">Single
+ char escape</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ images
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[$image.jpg]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.images">Images</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ begin section
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[section The Section Title]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.section">Section</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ end section
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[endsect]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.section">Section</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ paragraph
+ </para>
+ </entry>
+ <entry>
+ <para>
+ No markup. Paragraphs start left-flushed and are terminated by two
+ or more newlines.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ ordered list
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix--># one
+# two
+# three
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ unordered list
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix-->* one
+* two
+* three
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ code
+ </para>
+ </entry>
+ <entry>
+ <para>
+ No markup. Preformatted code starts with a space or a tab.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.code">Code</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ preformatted
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[pre preformatted]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.preformatted">Preformatted</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ block quote
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[:sometext...]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.blockquote">Blockquote</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h1 Heading 1]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h2 Heading 2]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 3
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h3 Heading 3]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 4
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h4 Heading 4]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 5
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h5 Heading 5]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 6
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h6 Heading 6]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ macro
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[def macro_identifier some text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.macros">Macros</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ template
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[template[a b] [a] body [b]]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.templates">Templates</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ blurb
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[blurb advertisement or note...]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ admonition
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[warning Warning text...]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ table
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix-->[table Title
+[[a][b][c]]
+[[a][b][c]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.tables">Tables</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ variablelist
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix-->[variablelist Title
+[[a][b]]
+[[a][b]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.variable_lists">Variable Lists</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ include
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[include someother.qbk]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.include">Include</link>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Quickbook 1.4
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joel de Guzman
+ </h3>
+ <h3 class="author">
+ Eric Niebler
+ </h3>
+ </div>
+ <p class="copyright">
+ 2002, 2004, 2006 Joel de Guzman, Eric Niebler
+ </p>
+ <div class="legalnotice">
+ <p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#quickbook.intro">Introduction</a>
+ </li>
+ <li>
+ <a href="#quickbook.change_log">Change Log</a>
+ </li>
+ <li>
+ <a href="#quickbook.syntax">Syntax Summary</a>
+ </li>
+ <li>
+ <a href="#quickbook.install">Installation and configuration</a>
+ </li>
+ <li>
+ <a href="#quickbook.editors">Editor Support</a>
+ </li>
+ <li>
+ <a href="#quickbook.faq">Frequently Asked Questions</a>
+ </li>
+ <li>
+ <a href="#quickbook.ref">Quick Reference</a>
+ </li>
+ </ul>
+ </div>
+ <div id="quickbook.intro">
+ <h3>
+ Introduction
+ </h3>
+ <div id="quickbook.intro">
+ <blockquote>
+ <p>
+ <span class="bold"><strong><span class="emphasis"><em><q>Why program
+ by hand in five days what you can spend five years of your life automating?</q></em></span></strong></span>
+ </p>
+ <p>
+ -- Terrence Parr, author ANTLR/PCCTS
+ </p>
+ </blockquote>
+ <p>
+ Well, QuickBook started as a weekend hack. It was originally intended to
+ be a sample application using <a href="http://spirit.sourceforge.net">Spirit</a>.
+ What is it? What you are viewing now, this documentation, is autogenerated
+ by QuickBook. These files were generated from one master:
+ </p>
+ <blockquote>
+ <p>
+ <a href="../quickbook.qbk">quickbook.qbk</a>
+ </p>
+ </blockquote>
+ <p>
+ 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 <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ instead of HTML. The <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ documentation format is an extension of <a href="http://www.docbook.org/">DocBook</a>,
+ an SGML or XML based format for describing documentation.
+ </p>
+ <p>
+ 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.
+ </p>
+ <p>
+ Features include:
+ </p>
+ <ul>
+ <li>
+ <div>
+ generate <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ xml, to generate HTML, PostScript and PDF
+ </div>
+ </li>
+ <li>
+ <div>
+ simple markup to link to Doxygen-generated entities
+ </div>
+ </li>
+ <li>
+ <div>
+ macro system for simple text substitution
+ </div>
+ </li>
+ <li>
+ <div>
+ simple markup for italics, bold, preformatted, blurbs, code samples,
+ tables, URLs, anchors, images, etc.
+ </div>
+ </li>
+ <li>
+ <div>
+ automatic syntax coloring of code samples
+ </div>
+ </li>
+ <li>
+ <div>
+ CSS support
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="quickbook.change_log">
+ <h3>
+ Change Log
+ </h3>
+ <div id="quickbook.change_log">
+ <h3 id="quickbook.change_log.version_1_3">
+ Version 1.3
+ </h3>
+ <ul>
+ <li>
+ <div>
+ Quickbook file inclusion [include].
+ </div>
+ </li>
+ <li>
+ <div>
+ Better xml output (pretty layout). Check out the generated XML.
+ </div>
+ </li>
+ <li>
+ <div>
+ Regression testing facility: to make sure your document will always
+ be compatible (full backward compatibility) regardless of changes to
+ QuickBook.
+ </div>
+ </li>
+ <li>
+ <div>
+ Code cleanup and refactoring.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow phrase markup in the doc-info.
+ </div>
+ </li>
+ <li>
+ <div>
+ Preformatted code blocks via ``code`` (double ticks) allows code in
+ tables and lists, for example.
+ </div>
+ </li>
+ <li>
+ <div>
+ 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.
+ </div>
+ </li>
+ <li>
+ <div>
+ Better (intuitive) paragraph termination. Some markups may terminate
+ a paragraph. Example:
+<pre class="programlisting"><span class="special">[</span><span class="identifier">section</span> <span class="identifier">x</span><span class="special">]</span>
+<span class="identifier">blah</span><span class="special">...</span>
+<span class="special">[</span><span class="identifier">endsect</span><span class="special">]</span></pre>
+ </div>
+ </li>
+ <li>
+ <div>
+ Fully qualified section and headers. Subsection names are concatenated
+ to the ID to avoid clashing. Example: <code><span class="identifier">doc_name</span><span
+ class="special">.</span><span class="identifier">sect_name</span><span
+ class="special">.</span><span class="identifier">sub_sect_name</span><span
+ class="special">.</span><span class="identifier">sub_sub_sect_name</span></code>
+ </div>
+ </li>
+ <li>
+ <div>
+ Better &amp;nbsp; and whitespace handling in code snippets.
+ </div>
+ </li>
+ <li>
+ <div>
+ [xinclude] fixes up the relative path to the target XML file when input_directory
+ is not the same as the output_directory.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow untitled tables.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow phrase markups in section titles.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow escaping back to QuickBook from code, code blocks and inline
+ code.
+ </div>
+ </li>
+ <li>
+ <div>
+ Footnotes, with the [footnote This is the footnote] syntax.
+ </div>
+ </li>
+ <li>
+ <div>
+ Post-processor bug fix for escaped XML code that it does not recognize.
+ </div>
+ </li>
+ <li>
+ <div>
+ Replaceable, with the [~replacement] syntax.
+ </div>
+ </li>
+ <li>
+ <div>
+ Generic Headers
+ </div>
+ </li>
+ <li>
+ <div>
+ Code changes to allow full recursion (i.e. Collectors and push/pop
+ functions)
+ </div>
+ </li>
+ <li>
+ <div>
+ Various code cleanup/maintenance
+ </div>
+ </li>
+ <li>
+ <div>
+ Templates!
+ </div>
+ </li>
+ <li>
+ <div>
+ [conceptref] for referencing BoostBook &lt;concept&gt; entities.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow escape of spaces. The escaped space is removed from the output.
+ Syntax: <code><span class="special">\</span> </code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested comments are now allowed.
+ </div>
+ </li>
+ <li>
+ <div>
+ Quickbook blocks can nest inside comments.
+ </div>
+ </li>
+ <li>
+ <div>
+ <a href="#quickbook.syntax.block.import">Import</a> facility.
+ </div>
+ </li>
+ <li>
+ <div>
+ Callouts on imported code
+ </div>
+ </li>
+ <li>
+ <div>
+ Simple markups can now span a whole block.
+ </div>
+ </li>
+ <li>
+ <div>
+ <a href="#quickbook.syntax.block.blurbs">Blurbs</a>, <a href="#quickbook.syntax.block.admonitions">Admonitions</a>
+ and table cells (see <a href="#quickbook.syntax.block.tables">Tables</a>)
+ may now contain paragraphs.
+ </div>
+ </li>
+ <li>
+ <div>
+ <code><span class="special">\</span><span class="identifier">n</span></code>
+ and <code><span class="special">[</span><span class="identifier">br</span><span
+ class="special">]</span></code> are now deprecated.
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="quickbook.syntax">
+ <h3>
+ Syntax Summary
+ </h3>
+ <div id="quickbook.syntax">
+ <p>
+ 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.
+ </p>
+ <p>
+ 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.
+ </p>
+ </div>
+ <div id="quickbook.syntax.comments">
+ <h3>
+ Comments
+ </h3>
+ <div id="quickbook.syntax.comments">
+ <p>
+ Can be placed anywhere.
+ </p>
+<pre class="programlisting">[/ comment (no output generated) ]
+</pre>
+<pre class="programlisting">[/ comments can be nested [/ some more here] ]
+</pre>
+<pre class="programlisting">[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase">
+ <h3>
+ Phrase Level Elements
+ </h3>
+ <div id="quickbook.syntax.phrase">
+ </div>
+ <div id="quickbook.syntax.phrase.font_styles">
+ <h3>
+ Font Styles
+ </h3>
+ <div id="quickbook.syntax.phrase.font_styles">
+<pre class="programlisting">['italic], [*bold], [_underline], [^teletype], [-strikethrough]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <span class="emphasis"><em>italic</em></span>, <span class="bold"><strong>bold</strong></span>,
+ <span class="underline">underline</span>, <tt>teletype</tt>, <span
+ class="strikethrough">strikethrough</span>
+ </p>
+ <p>
+ Like all non-terminal phrase level elements, this can of course be
+ nested:
+ </p>
+<pre class="programlisting">[*['bold-italic]]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <span class="bold"><strong><span class="emphasis"><em>bold-italic</em></span></strong></span>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.replaceable">
+ <h3>
+ Replaceable
+ </h3>
+ <div id="quickbook.syntax.phrase.replaceable">
+ <p>
+ When you want content that may or must be replaced by the user, use
+ the syntax:
+ </p>
+<pre class="programlisting">[~replacement]
+</pre>
+ <p>
+ This will generate:
+ </p>
+ <p>
+ <em class="replaceable">replacement</em>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.quotations">
+ <h3>
+ Quotations
+ </h3>
+ <div id="quickbook.syntax.phrase.quotations">
+<pre class="programlisting">["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <q>A question that sometimes drives me hazy: am I or are the others
+ crazy?</q>--Einstein
+ </p>
+ <p>
+ Note the proper left and right quote marks. Also, while you can simply
+ use ordinary quote marks like &quot;quoted&quot;, our quotation, above,
+ will generate correct DocBook quotations (e.g. &lt;quote&gt;quoted&lt;/quote&gt;).
+ </p>
+ <p>
+ Like all phrase elements, quotations may be nested. Example:
+ </p>
+<pre class="programlisting">["Here's the rule for bargains: ["Do other men, for they would do you.] That's
+the true business precept.]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <q>Here's the rule for bargains: <q>Do other men, for they would do
+ you.</q> That's the true business precept.</q>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.simple_formatting">
+ <h3>
+ Simple formatting
+ </h3>
+ <div id="quickbook.syntax.phrase.simple_formatting">
+ <p>
+ Simple markup for formatting text, common in many applications, is
+ now supported:
+ </p>
+<pre class="programlisting">/italic/, *bold*, _underline_, =teletype=
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <span class="emphasis"><em>italic</em></span>, <span class="bold"><strong>bold</strong></span>,
+ <span class="underline">underline</span>, <tt>teletype</tt>
+ </p>
+ <p>
+ Unlike QuickBook's standard formatting scheme, the rules for simpler
+ alternatives are much stricter<a id="quickbook.syntax.phrase.simple_formatting.f0"
+ href="#footnote-1"><sup class="footnote">[1]</sup></a>.
+ </p>
+ <ul>
+ <li>
+ <div>
+ Simple markups cannot nest. You can combine a simple markup with
+ a nestable markup.
+ </div>
+ </li>
+ <li>
+ <div>
+ Simple markups cannot contain any other form of quickbook markup.
+ </div>
+ </li>
+ <li>
+ <div>
+ A non-space character must follow the leading markup
+ </div>
+ </li>
+ <li>
+ <div>
+ A non-space character must precede the trailing markup
+ </div>
+ </li>
+ <li>
+ <div>
+ A space or a punctuation must follow the trailing markup
+ </div>
+ </li>
+ <li>
+ <div>
+ 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: ']'.
+ </div>
+ </li>
+ <li>
+ <div>
+ A line starting with the star will be interpreted as an unordered
+ list. See <a href="#quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</a>.
+ </div>
+ </li>
+ </ul>
+ <div id="quickbook.syntax.phrase.simple_formatting.t0" class="table">
+ <table>
+ <caption>More Formatting Samples</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Markup
+ </p>
+ </th>
+ <th>
+ <p>
+ Result
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <tt>*Bold*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>Bold</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*Is bold*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>Is bold</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>* Not bold* *Not bold * * Not bold *</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ * Not bold* *Not bold * * Not bold *
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>This*Isn't*Bold (no bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ This*Isn't*Bold (no bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>(*Bold Inside*) (parenthesis not bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ (<span class="bold"><strong>Bold Inside</strong></span>)
+ (parenthesis not bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*(Bold Outside)* (parenthesis bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>(Bold Outside)</strong></span>
+ (parenthesis bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>3*4*5 = 60 (no bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ 3*4*5 = 60 (no bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>3 * 4 * 5 = 60 (no bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ 3 * 4 * 5 = 60 (no bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>3 *4* 5 = 60 (4 is bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ 3 <span class="bold"><strong>4</strong></span> 5 = 60 (4
+ is bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*This is bold* this is not *but this is*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>This is bold</strong></span> this
+ is not <span class="bold"><strong>but this is</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*This is bold*.</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>This is bold</strong></span>.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*B*. (bold B)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>B</strong></span>. (bold B)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>['*Bold-Italic*]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="emphasis"><em><span class="bold"><strong>Bold-Italic</strong></span></em></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*side-by*/-side/</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>side-by</strong></span><span class="emphasis"><em>-side</em></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ As mentioned, simple markups cannot go past a single block. The text
+ from &quot;have&quot; to &quot;full&quot; in the following paragraph
+ will be rendered as bold:
+ </p>
+<pre class="programlisting">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.
+</pre>
+ <p>
+ Baa baa black sheep, <span class="bold"><strong>have you any wool?
+ Yes sir, yes sir, three bags full!</strong></span> One for the master,
+ one for the dame, And one for the little boy who lives down the lane.
+ </p>
+ <p>
+ But in the following paragraph, bold is not applied:
+ </p>
+<pre class="programlisting">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.
+</pre>
+ <p>
+ 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.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.inline_code">
+ <h3>
+ Inline code
+ </h3>
+ <div id="quickbook.syntax.phrase.inline_code">
+ <p>
+ Inlining code in paragraphs is quite common when writing C++ documentation.
+ We provide a very simple markup for this. For example, this:
+ </p>
+<pre class="programlisting">This text has inlined code `int main() { return 0; }` in it.
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ This text has inlined code <code><span class="keyword">int</span>
+ <span class="identifier">main</span><span class="special">()</span>
+ <span class="special">{</span> <span class="keyword">return</span>
+ <span class="number">0</span><span class="special">;</span> <span class="special">}</span></code>
+ in it. The code will be syntax highlighted.
+ </p>
+ <div class="note">
+ <p>
+ We simply enclose the code with the tick: <tt>"`"</tt>, not the single
+ quote: <code><span class="string">&quot;'&quot;</span></code>. Note
+ too that <tt>`some code`</tt> is preferred over <tt>[^some code]</tt>.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.code_blocks">
+ <h3>
+ Code blocks
+ </h3>
+ <div id="quickbook.syntax.phrase.code_blocks">
+ <p>
+ Preformatted code simply starts with a space or a tab (See <a href="#quickbook.syntax.block.code">Code</a>).
+ However, such a simple syntax cannot be used as phrase elements in
+ lists (See <a href="#quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</a> and <a href="#quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</a>), tables (See <a href="#quickbook.syntax.block.tables">Tables</a>),
+ etc. Inline code (see above) can. The problem is, inline code does
+ not allow formatting with newlines, spaces, and tabs. These are lost.
+ </p>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+``
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.source_mode">
+ <h3>
+ Source Mode
+ </h3>
+ <div id="quickbook.syntax.phrase.source_mode">
+ <p>
+ 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 <a href="#quickbook.syntax.block.document">Document</a>
+ section.
+ </p>
+ <p>
+ To change the source mode, use the <tt>[source-mode]</tt> markup, where
+ <tt>source-mode</tt> is one of the supported modes. For example, this:
+ </p>
+<pre class="programlisting">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`.
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ Python's <code><span class="keyword">import</span></code> is rather
+ like C++'s <code><span class="preprocessor">#include</span></code>.
+ A C++ comment <code><span class="comment">// looks like this</span></code>
+ whereas a Python comment <code><span class="comment">#looks like this</span></code>.
+ </p>
+ <div id="quickbook.syntax.phrase.source_mode.t0" class="table">
+ <table>
+ <caption>Supported Source Modes</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Mode
+ </p>
+ </th>
+ <th>
+ <p>
+ Source Mode Markup
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ C++
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[c++]</tt>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Python
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[python]</tt>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="note">
+ <p>
+ The source mode strings are lowercase.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.line_break">
+ <h3>
+ line-break
+ </h3>
+ <div id="quickbook.syntax.phrase.line_break">
+<pre class="programlisting">[br]
+</pre>
+ <div class="warning">
+ <p>
+ <code><span class="special">[</span><span class="identifier">br</span><span
+ class="special">]</span></code> is now deprecated. <a href="#quickbook.syntax.block.blurbs">Blurbs</a>,
+ <a href="#quickbook.syntax.block.admonitions">Admonitions</a> and
+ table cells (see <a href="#quickbook.syntax.block.tables">Tables</a>)
+ may now contain paragraphs.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="quickbook.syntax.phrase.anchors">
+<pre class="programlisting">[#named_anchor]
+</pre>
+ <p>
+ A named anchor is a hook that can be referenced by a link elsewhere
+ in the document. You can then reference an anchor with <tt>[link named_anchor
+ Some link text]</tt>. See <a href="#quickbook.syntax.phrase.anchor_links">Anchor
+ links</a>, <a href="#quickbook.syntax.block.section">Section</a> and
+ <a href="#quickbook.syntax.block.headings">Heading</a>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.links">
+ <h3>
+ Links
+ </h3>
+ <div id="quickbook.syntax.phrase.links">
+<pre class="programlisting">[@http://www.boost.org this is [*boost's] website....]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <a href="http://www.boost.org">this is <span class="bold"><strong>boost's</strong></span>
+ website....</a>
+ </p>
+ <p>
+ URL links where the link text is the link itself is common. Example:
+ </p>
+<pre class="programlisting">see http://spirit.sourceforge.net/
+</pre>
+ <p>
+ so, when the text is absent in a link markup, the URL is assumed. Example:
+ </p>
+<pre class="programlisting">see [@http://spirit.sourceforge.net/]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ see <a href="http://spirit.sourceforge.net/">http://spirit.sourceforge.net/</a>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.anchor_links">
+ <h3>
+ Anchor links
+ </h3>
+ <div id="quickbook.syntax.phrase.anchor_links">
+ <p>
+ You can link within a document using:
+ </p>
+<pre class="programlisting">[link section_id.normalized_header_text The link text]
+</pre>
+ <p>
+ See sections <a href="#quickbook.syntax.block.section">Section</a>
+ and <a href="#quickbook.syntax.block.headings">Heading</a> for more
+ info.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.refentry_links">
+ <h3>
+ refentry links
+ </h3>
+ <div id="quickbook.syntax.phrase.refentry_links">
+ <p>
+ In addition, you can link internally to an XML refentry like:
+ </p>
+<pre class="programlisting">[link xml.refentry The link text]
+</pre>
+ <p>
+ This gets converted into <tt>&lt;link linkend=&quot;xml.refentry&quot;&gt;The
+ link text&lt;/link&gt;</tt>.
+ </p>
+ <p>
+ Like URLs, the link text is optional. If this is not present, the link
+ text will automatically be the refentry. Example:
+ </p>
+<pre class="programlisting">[link xml.refentry]
+</pre>
+ <p>
+ This gets converted into <tt>&lt;link linkend=&quot;xml.refentry&quot;&gt;xml.refentry&lt;/link&gt;</tt>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.code_links">
+ <h3>
+ Code Links
+ </h3>
+ <div id="quickbook.syntax.phrase.code_links">
+ <p>
+ If you want to link to a function, class, member, enum, concept or
+ header in the reference section, you can use:
+ </p>
+<pre class="programlisting">[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]
+</pre>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[classref boost::bar::baz]
+</pre>
+ <p>
+ would have &quot;boost::bar::baz&quot; as the link text.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.escape">
+ <h3>
+ Escape
+ </h3>
+ <div id="quickbook.syntax.phrase.escape">
+ <p>
+ The escape mark-up is used when we don't want to do any processing.
+ </p>
+<pre class="programlisting">'''
+escape (no processing/formatting)
+'''
+</pre>
+ <p>
+ Escaping allows us to pass XML markup to <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ or <a href="http://www.docbook.org/">DocBook</a>. For example:
+ </p>
+<pre class="programlisting">'''
+&lt;emphasis role=&quot;bold&quot;&gt;This is direct XML markup&lt;/emphasis&gt;
+'''
+</pre>
+ <p>
+ <span class="bold"><strong>This is direct XML markup</strong></span>
+ </p>
+ <div class="important">
+ <p>
+ Be careful when using the escape. The text must conform to <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>/<a
+ href="http://www.docbook.org/">DocBook</a> syntax.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.single_char_escape">
+ <h3>
+ Single char escape
+ </h3>
+ <div id="quickbook.syntax.phrase.single_char_escape">
+ <p>
+ 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 <code><span class="special">[</span></code> and <code><span
+ class="special">]</span></code>. For example, how do you escape the
+ triple quote? Simple: <tt>\'\'\'</tt>
+ </p>
+ <p>
+ <code><span class="special">\</span><span class="identifier">n</span></code>
+ has a special meaning. It is used to generate line breaks.
+ </p>
+ <div class="warning">
+ <p>
+ <code><span class="special">\</span><span class="identifier">n</span></code>
+ and <code><span class="special">[</span><span class="identifier">br</span><span
+ class="special">]</span></code> are now deprecated. <a href="#quickbook.syntax.block.blurbs">Blurbs</a>,
+ <a href="#quickbook.syntax.block.admonitions">Admonitions</a> and
+ table cells (see <a href="#quickbook.syntax.block.tables">Tables</a>)
+ may now contain paragraphs.
+ </p>
+ </div>
+ <p>
+ The escaped space: <code><span class="special">\</span> </code> also
+ has a special meaning. The escaped space is removed from the output.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.images">
+ <h3>
+ Images
+ </h3>
+ <div id="quickbook.syntax.phrase.images">
+<pre class="programlisting">[$image.jpg]
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.footnotes">
+ <h3>
+ Footnotes
+ </h3>
+ <div id="quickbook.syntax.phrase.footnotes">
+ <p>
+ As of version 1.3, QuickBook supports footnotes. Just put the text
+ of the footnote in a <code><span class="special">[</span><span class="identifier">footnote</span><span
+ class="special">]</span></code> block, and the text will be put at
+ the bottom of the current page. For example, this:
+ </p>
+<pre class="programlisting">[footnote A sample footnote]
+</pre>
+ <p>
+ will generate this<a id="quickbook.syntax.phrase.footnotes.f0" href="#footnote-2"><sup
+ class="footnote">[2]</sup></a>.
+ </p>
+ </div>
+ <div id="quickbook.syntax.phrase.footnotes.macro_expansion">
+ <h3>
+ Macro Expansion
+ </h3>
+ <div id="quickbook.syntax.phrase.footnotes.macro_expansion">
+<pre class="programlisting">__a_macro_identifier__
+</pre>
+ <p>
+ See <a href="#quickbook.syntax.block.macros">Macros</a> for details.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.footnotes.template_expansion">
+ <h3>
+ Template Expansion
+ </h3>
+ <div id="quickbook.syntax.phrase.footnotes.template_expansion">
+<pre class="programlisting">[a_template_identifier]
+</pre>
+ <p>
+ See <a href="#quickbook.syntax.block.templates">Templates</a> for
+ details.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block">
+ <h3>
+ Block Level Elements
+ </h3>
+ <div id="quickbook.syntax.block">
+ </div>
+ <div id="quickbook.syntax.block.document">
+ <h3>
+ Document
+ </h3>
+ <div id="quickbook.syntax.block.document">
+ <p>
+ Every document must begin with a Document Info section, which should
+ look like this:
+ </p>
+<pre class="programlisting">[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]
+]
+</pre>
+ <p>
+ Where document-type is one of:
+ </p>
+ <ul>
+ <li>
+ <div>
+ book
+ </div>
+ </li>
+ <li>
+ <div>
+ article
+ </div>
+ </li>
+ <li>
+ <div>
+ library
+ </div>
+ </li>
+ <li>
+ <div>
+ chapter
+ </div>
+ </li>
+ <li>
+ <div>
+ part
+ </div>
+ </li>
+ <li>
+ <div>
+ appendix
+ </div>
+ </li>
+ <li>
+ <div>
+ preface
+ </div>
+ </li>
+ <li>
+ <div>
+ qandadiv
+ </div>
+ </li>
+ <li>
+ <div>
+ qandaset
+ </div>
+ </li>
+ <li>
+ <div>
+ reference
+ </div>
+ </li>
+ <li>
+ <div>
+ set
+ </div>
+ </li>
+ </ul>
+ <p>
+ quickbook 1.3 declares the version of quickbook the document is written
+ for. In its absence, version 1.1 is assumed.
+ </p>
+ <p>
+ <tt>version</tt>, <tt>id</tt>, <tt>dirname</tt>, <tt>copyright</tt>,
+ <tt>purpose</tt>, <tt>category</tt>, <tt>authors</tt>, <tt>license</tt>,
+ <tt>last-revision</tt> and <tt>source-mode</tt> are optional information.
+ </p>
+ <p>
+ <tt>source-type</tt> is a lowercase string setting the initial <a href="#quickbook.syntax.phrase.source_mode">Source
+ Mode</a>. If the <tt>source-mode</tt> field is omitted, a default value
+ of <tt>c++</tt> will be used.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.section">
+ <h3>
+ Section
+ </h3>
+ <div id="quickbook.syntax.block.section">
+ <p>
+ Starting a new section is accomplished with:
+ </p>
+<pre class="programlisting">[section:id The Section Title]
+</pre>
+ <p>
+ where <span class="emphasis"><em>id</em></span> is optional. id will
+ be the filename of the generated section. If it is not present, &quot;The
+ Section Title&quot; will be normalized and become the id. Valid characters
+ are <tt>a-Z</tt>, <tt>A-Z</tt>, <tt>0-9</tt> and <tt>_</tt>. All non-valid
+ characters are converted to underscore and all upper-case are converted
+ to lower case. Thus: &quot;The Section Title&quot; will be normalized
+ to &quot;the_section_title&quot;.
+ </p>
+ <p>
+ End a section with:
+ </p>
+<pre class="programlisting">[endsect]
+</pre>
+ <p>
+ Sections can nest, and that results in a hierarchy in the table of
+ contents.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.xinclude">
+ <h3>
+ xinclude
+ </h3>
+ <div id="quickbook.syntax.block.xinclude">
+ <p>
+ You can include another XML file with:
+ </p>
+<pre class="programlisting">[xinclude file.xml]
+</pre>
+ <p>
+ This is useful when file.xml has been generated by Doxygen and contains
+ your reference section.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.paragraphs">
+ <h3>
+ Paragraphs
+ </h3>
+ <div id="quickbook.syntax.block.paragraphs">
+ <p>
+ 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.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="quickbook.syntax.block.lists">
+ </div>
+ <div id="quickbook.syntax.block.lists.ordered_lists">
+ <h3>
+ Ordered lists
+ </h3>
+ <div id="quickbook.syntax.block.lists.ordered_lists">
+<pre class="programlisting"># One
+# Two
+# Three
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.list_hierarchies">
+ <h3>
+ List Hierarchies
+ </h3>
+ <div id="quickbook.syntax.block.lists.list_hierarchies">
+ <p>
+ List hierarchies are supported. Example:
+ </p>
+<pre class="programlisting"># One
+# Two
+# Three
+ # Three.a
+ # Three.b
+ # Three.c
+# Four
+ # Four.a
+ # Four.a.i
+ # Four.a.ii
+# Five
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ <ol>
+ <li>
+ <div>
+ Three.a
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.b
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.c
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ <li>
+ <div>
+ Fourth
+ <ol>
+ <li>
+ <div>
+ Four.a
+ <ol>
+ <li>
+ <div>
+ Four.a.i
+ </div>
+ </li>
+ <li>
+ <div>
+ Four.a.ii
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ <li>
+ <div>
+ Five
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.long_list_lines">
+ <h3>
+ Long List Lines
+ </h3>
+ <div id="quickbook.syntax.block.lists.long_list_lines">
+ <p>
+ Long lines will be wrapped appropriately. Example:
+ </p>
+<pre class="programlisting"># 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.
+</pre>
+ <ol>
+ <li>
+ <div>
+ A short item.
+ </div>
+ </li>
+ <li>
+ <div>
+ 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.
+ </div>
+ </li>
+ <li>
+ <div>
+ A short item.
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.unordered_lists">
+ <h3>
+ Unordered lists
+ </h3>
+ <div id="quickbook.syntax.block.lists.unordered_lists">
+<pre class="programlisting">* First
+* Second
+* Third
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ul>
+ <li>
+ <div>
+ First
+ </div>
+ </li>
+ <li>
+ <div>
+ Second
+ </div>
+ </li>
+ <li>
+ <div>
+ Third
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.mixed_lists">
+ <h3>
+ Mixed lists
+ </h3>
+ <div id="quickbook.syntax.block.lists.mixed_lists">
+ <p>
+ Mixed lists (ordered and unordered) are supported. Example:
+ </p>
+<pre class="programlisting"># One
+# Two
+# Three
+ * Three.a
+ * Three.b
+ * Three.c
+# Four
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ <ul>
+ <li>
+ <div>
+ Three.a
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.b
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.c
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Four
+ </div>
+ </li>
+ </ol>
+ <p>
+ And...
+ </p>
+<pre class="programlisting"># 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
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ 1
+ <ul>
+ <li>
+ <div>
+ 1.a
+ <ol>
+ <li>
+ <div>
+ 1.a.1
+ </div>
+ </li>
+ <li>
+ <div>
+ 1.a.2
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ <li>
+ <div>
+ 1.b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ 2
+ <ul>
+ <li>
+ <div>
+ 2.a
+ </div>
+ </li>
+ <li>
+ <div>
+ 2.b
+ <ol>
+ <li>
+ <div>
+ 2.b.1
+ </div>
+ </li>
+ <li>
+ <div>
+ 2.b.2
+ <ul>
+ <li>
+ <div>
+ 2.b.2.a
+ </div>
+ </li>
+ <li>
+ <div>
+ 2.b.2.b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.code">
+ <h3>
+ Code
+ </h3>
+ <div id="quickbook.syntax.block.code">
+ <p>
+ Preformatted code starts with a space or a tab. The code will be syntax
+ highlighted according to the current <a href="#quickbook.syntax.phrase.source_mode">Source
+ Mode</a>:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// Sample code</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World\n&quot;</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<pre class="programlisting"><span class="keyword">import</span> <span class="identifier">cgi</span>
+
+<span class="keyword">def</span> <span class="identifier">cookForHtml</span><span class="special">(</span><span class="identifier">text</span><span class="special">):</span>
+ <span class="string">'''&quot;Cooks&quot; the input text for HTML.'''</span>
+
+ <span class="keyword">return</span> <span class="identifier">cgi</span><span class="special">.</span><span class="identifier">escape</span><span class="special">(</span><span class="identifier">text</span><span class="special">)</span>
+</pre>
+ <p>
+ Macros that are already defined are expanded in source code. Example:
+ </p>
+<pre class="programlisting">[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__;
+</pre>
+ <p>
+ Generates:
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <a href="http://www.boost.org/libs/libraries.htm">boost</a><span class="special">::</span><a href="http://www.boost.org/doc/html/array/reference.html">array</a><span class="special">;</span>
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.escape_back">
+ <h3>
+ Escaping Back To QuickBook
+ </h3>
+ <div id="quickbook.syntax.block.escape_back">
+ <p>
+ 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 <span class="emphasis"><em>escape-back</em></span>
+ delimiter. In C++ and Python, the delimiter is the double tick (back-quote):
+ &quot;``&quot; and &quot;``&quot;. Example:
+ </p>
+<pre class="programlisting">void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
+{
+}
+</pre>
+ <p>
+ Will generate:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <a href="http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz">foo</a><span class="special">()</span>
+<span class="special">{</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ When escaping from code to QuickBook, only phrase level markups are
+ allowed. Block level markups like lists, tables etc. are not allowed.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.preformatted">
+ <h3>
+ Preformatted
+ </h3>
+ <div id="quickbook.syntax.block.preformatted">
+ <p>
+ Sometimes, you don't want some preformatted text to be parsed as C++.
+ In such cases, use the <tt>[pre ... ]</tt> markup block.
+ </p>
+<pre class="programlisting">[pre
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+]
+</pre>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+
+ Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+
+ Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+
+</pre>
+ <p>
+ Notice that unlike Code, phrase markup such as font style is still
+ permitted inside <tt>pre</tt> blocks.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.blockquote">
+ <h3>
+ Blockquote
+ </h3>
+ <div id="quickbook.syntax.block.blockquote">
+<pre class="programlisting">[:sometext...]
+</pre>
+ <blockquote>
+ <p>
+ Indents the paragraph. This applies to one paragraph only.
+ </p>
+ </blockquote>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.admonitions">
+ <h3>
+ Admonitions
+ </h3>
+ <div id="quickbook.syntax.block.admonitions">
+<pre class="programlisting">[note This is a note]
+[tip This is a tip]
+[important This is important]
+[caution This is a caution]
+[warning This is a warning]
+</pre>
+ <p>
+ generates <a href="http://www.docbook.org/">DocBook</a> admonitions:
+ </p>
+ <div class="note">
+ <p>
+ This is a note
+ </p>
+ </div>
+ <div class="tip">
+ <p>
+ This is a tip
+ </p>
+ </div>
+ <div class="important">
+ <p>
+ This is important
+ </p>
+ </div>
+ <div class="caution">
+ <p>
+ This is a caution
+ </p>
+ </div>
+ <div class="warning">
+ <p>
+ This is a warning
+ </p>
+ </div>
+ <p>
+ These are the only admonitions supported by <a href="http://www.docbook.org/">DocBook</a>.
+ So, for example <tt>[information This is some information]</tt> is
+ unlikely to produce the desired effect.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.headings">
+ <h3>
+ Headings
+ </h3>
+ <div id="quickbook.syntax.block.headings">
+<pre class="programlisting">[h1 Heading 1]
+[h2 Heading 2]
+[h3 Heading 3]
+[h4 Heading 4]
+[h5 Heading 5]
+[h6 Heading 6]
+</pre>
+ <h1 id="quickbook.syntax.block.headings.heading_1">
+ Heading 1
+ </h1>
+ <h2 id="quickbook.syntax.block.headings.heading_2">
+ Heading 2
+ </h2>
+ <h3 id="quickbook.syntax.block.headings.heading_3">
+ Heading 3
+ </h3>
+ <h4 id="quickbook.syntax.block.headings.heading_4">
+ Heading 4
+ </h4>
+ <h5 id="quickbook.syntax.block.headings.heading_5">
+ Heading 5
+ </h5>
+ <h6 id="quickbook.syntax.block.headings.heading_6">
+ Heading 6
+ </h6>
+ <p>
+ Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized
+ names with <tt>name=&quot;section_id.normalized_header_text&quot;</tt>
+ (i.e. valid characters are <tt>a-z</tt>, <tt>A-Z</tt>, <tt>0-9</tt>
+ and <tt>_</tt>. 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 <tt>section_2.heading_1</tt>).
+ You can use:
+ </p>
+<pre class="programlisting">[link section_id.normalized_header_text The link text]
+</pre>
+ <p>
+ to link to them. See <a href="#quickbook.syntax.phrase.anchor_links">Anchor
+ links</a> and <a href="#quickbook.syntax.block.section">Section</a>
+ for more info.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.generic_heading">
+ <h3>
+ Generic Heading
+ </h3>
+ <div id="quickbook.syntax.block.generic_heading">
+ <p>
+ In cases when you don't want to care about the heading level (1 to
+ 6), you can use the <span class="emphasis"><em>Generic Heading</em></span>:
+ </p>
+<pre class="programlisting">[heading Heading]
+</pre>
+ <p>
+ The <span class="emphasis"><em>Generic Heading</em></span> 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
+ <span class="emphasis"><em>h2</em></span>.
+ </p>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[section A]
+[h2 X]
+[h2 Y]
+[h2 Z]
+[endsect]
+</pre>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[section A]
+[heading X]
+[heading Y]
+[heading Z]
+[endsect]
+</pre>
+ <p>
+ 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 <span class="emphasis"><em>section</em></span> and <span
+ class="emphasis"><em>heading</em></span>, you have all you need. <span
+ class="emphasis"><em>h1</em></span>..<span class="emphasis"><em>h6</em></span>
+ becomes redundant. <span class="emphasis"><em>h1</em></span>..<span
+ class="emphasis"><em>h6</em></span> might be deprecated in the future.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.macros">
+ <h3>
+ Macros
+ </h3>
+ <div id="quickbook.syntax.block.macros">
+<pre class="programlisting">[def macro_identifier some text]
+</pre>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1]]
+sf_logo
+</pre>
+ <p>
+ Now everywhere the sf_logo is placed, the picture will be inlined.
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1"
+ alt="[]"/></span>
+ </p>
+ <div class="tip">
+ <p>
+ 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. <tt>__spirit__</tt>). The reason is
+ to avoid unwanted macro replacement.
+ </p>
+ </div>
+ <p>
+ Links (URLS) and images are good candidates for macros. <span class="bold"><strong>1</strong></span>)
+ 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.
+ <span class="bold"><strong>2</strong></span>) The syntax is not pretty.
+ It's easier to read and write, e.g. <tt>__spirit__</tt> than <tt>[@http://spirit.sourceforge.net
+ Spirit]</tt>.
+ </p>
+ <p>
+ Some more examples:
+ </p>
+<pre class="programlisting">[def :-) [$theme/smiley.png]]
+[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
+</pre>
+ <p>
+ (See <a href="#quickbook.syntax.phrase.images">Images</a> and <a href="#quickbook.syntax.phrase.links">Links</a>)
+ </p>
+ <p>
+ Invoking these macros:
+ </p>
+<pre class="programlisting">Hi __spirit__ :-)
+</pre>
+ <p>
+ will generate this:
+ </p>
+ <p>
+ Hi <a href="http://spirit.sourceforge.net">Spirit</a> <span class="inlinemediaobject"><img
+ src="images/smiley.png" alt="[]"/></span>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.predefined_macros">
+ <h3>
+ Predefined Macros
+ </h3>
+ <div id="quickbook.syntax.block.predefined_macros">
+ <p>
+ Quickbook has some predefined macros that you can already use.
+ </p>
+ <div id="quickbook.syntax.block.predefined_macros.t0" class="table">
+ <table>
+ <caption>Predefined Macros</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Macro
+ </p>
+ </th>
+ <th>
+ <p>
+ Meaning
+ </p>
+ </th>
+ <th>
+ <p>
+ Example
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ __DATE__
+ </p>
+ </td>
+ <td>
+ <p>
+ Today's date
+ </p>
+ </td>
+ <td>
+ <p>
+ 2000-Dec-20
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ __TIME__
+ </p>
+ </td>
+ <td>
+ <p>
+ The current time
+ </p>
+ </td>
+ <td>
+ <p>
+ 12:00:00 PM
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ __FILENAME__
+ </p>
+ </td>
+ <td>
+ <p>
+ Quickbook source filename
+ </p>
+ </td>
+ <td>
+ <p>
+ quickbook_manual-1_4.quickbook
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="quickbook.syntax.block.templates">
+ <p>
+ 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).
+ </p>
+ <p>
+ Example template:
+ </p>
+<pre class="programlisting">[template person[name age what]
+
+Hi, my name is [name]. I am [age] years old. I am a [what].
+
+]
+</pre>
+ <h5 id="quickbook.syntax.block.templates.template_identifier">
+ Template Identifier
+ </h5>
+ <p>
+ Template identifiers can either consist of:
+ </p>
+ <ul>
+ <li>
+ <div>
+ 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.
+ </div>
+ </li>
+ <li>
+ <div>
+ A single character punctuation (a non-alphanumeric printable character)
+ </div>
+ </li>
+ </ul>
+ <h5 id="quickbook.syntax.block.templates.formal_template_arguments">
+ Formal Template Arguments
+ </h5>
+ <p>
+ 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.
+ </p>
+ <p>
+ A template formal argument temporarily hides a template of the same
+ name at the point where the <a href="#quickbook.syntax.block.templates.template_expansion">template
+ is expanded</a>. Note that the body of the <tt>person</tt> template
+ above refers to <tt>name</tt> <tt>age</tt> and <tt>what</tt> as <tt>[name]</tt>
+ <tt>[age]</tt> and <tt>[what]</tt>. <tt>name</tt> <tt>age</tt> and
+ <tt>what</tt> are actually templates that exist in the duration of
+ the template call.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.template_body">
+ Template Body
+ </h5>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[template sample[arg1 arg2...argN] replacement text... ]
+</pre>
+ <p>
+ Block templates are of the form:
+ </p>
+<pre class="programlisting">[template sample[arg1 arg2...argN]
+replacement text...
+]
+</pre>
+ <p>
+ 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.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.template_expansion">
+ Template Expansion
+ </h5>
+ <p>
+ You expand a template this way:
+ </p>
+<pre class="programlisting">[template_identifier arg1..arg2..arg3]
+</pre>
+ <p>
+ At template expansion, you supply the actual arguments. The template
+ will be expanded with your supplied arguments. Example:
+ </p>
+<pre class="programlisting">[person James Bond..39..Spy]
+[person Santa Clause..87..Big Red Fatso]
+</pre>
+ <p>
+ Which will expand to:
+ </p>
+ <p>
+ Hi, my name is James Bond. I am 39 years old. I am a Spy.
+ </p>
+ <p>
+ Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
+ </p>
+ <div class="caution">
+ <p>
+ 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.
+ </p>
+ </div>
+ <p>
+ Each actual argument can be a word, a text fragment or just about any
+ <a href="#quickbook.syntax.phrase">QuickBook phrase</a>. Arguments
+ are separated by the double dot <tt>&quot;..&quot;</tt> and terminated
+ by the close parenthesis.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.nullary_templates">
+ Nullary Templates
+ </h5>
+ <p>
+ Nullary templates look and act like simple macros. Example:
+ </p>
+<pre class="programlisting">[template alpha[]&apos;&apos;&apos;&amp;#945;&apos;&apos;&apos;]
+[template beta[]&apos;&apos;&apos;&amp;#946;&apos;&apos;&apos;]
+</pre>
+ <p>
+ Expanding:
+ </p>
+<pre class="programlisting">Some squigles...[*[alpha][beta]]</pre>
+ <p>
+ We have:
+ </p>
+ <p>
+ Some squiggles...<span class="bold"><strong>&#945;&#946;</strong></span>
+ </p>
+ <p>
+ The difference with macros are
+ </p>
+ <ul>
+ <li>
+ <div>
+ The explicit <a href="#quickbook.syntax.block.templates.template_expansion">template
+ expansion syntax</a>. 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.
+ </div>
+ </li>
+ <li>
+ <div>
+ 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.
+ </div>
+ </li>
+ </ul>
+ <p>
+ The empty brackets after the template identifier (<tt>alpha[]</tt>)
+ indicates no arguments. If the template body does not look like a template
+ argument list, we can elide the empty brackets. Example:
+ </p>
+<pre class="programlisting">[template aristotle_quote Aristotle: [*['Education is the best provision
+for the journey to old age.]]]
+</pre>
+ <p>
+ Expanding:
+ </p>
+<pre class="programlisting">Here's a quote from [aristotle_quote].
+</pre>
+ <p>
+ We have:
+ </p>
+ <p>
+ Here's a quote from Aristotle: <span class="bold"><strong><span class="emphasis"><em>Education
+ is the best provision for the journey to old age.</em></span></strong></span>.
+ </p>
+ <p>
+ The disadvantage is that you can't avoid the space between the template
+ identifier, <code><span class="identifier">aristotle_quote</span></code>,
+ and the template body &quot;Aristotle...&quot;. This space will be
+ part of the template body. If that space is unwanted, use empty brackets
+ or use the space escape: &quot;<code><span class="special">\</span>
+ </code>&quot;. Example:
+ </p>
+<pre class="programlisting">[template tag\ _tag]
+</pre>
+ <p>
+ Then expanding:
+ </p>
+<pre class="programlisting">`struct` x[tag];
+</pre>
+ <p>
+ We have:
+ </p>
+ <p>
+ <code><span class="keyword">struct</span></code> x_tag;
+ </p>
+ <p>
+ You have a couple of ways to do it. I personally prefer the explicit
+ empty brackets, though.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.simple_arguments">
+ Simple Arguments
+ </h5>
+ <p>
+ As mentioned, arguments are separated by the double dot <tt>&quot;..&quot;</tt>.
+ If there are less arguments passed than expected, QuickBook attempts
+ to break the last argument into two or more arguments following this
+ logic:
+ </p>
+ <ul>
+ <li>
+ <div>
+ Break the last argument into two, at the first space found (<tt>'',
+ '\n', \t' or '\r'</tt>).
+ </div>
+ </li>
+ <li>
+ <div>
+ Repeat until there are enough arguments or if there are no more
+ spaces found (in which case, an error is reported).
+ </div>
+ </li>
+ </ul>
+ <p>
+ For example:
+ </p>
+<pre class="programlisting">[template simple[a b c d] [a][b][c][d]]
+[simple w x y z]
+</pre>
+ <p>
+ will produce:
+ </p>
+ <p>
+ wxyz
+ </p>
+ <p>
+ &quot;w x y z&quot; is initially treated as a single argument because
+ we didn't supply any <tt>&quot;..&quot;</tt> separators. However, since
+ <tt>simple</tt> expects 4 arguments, &quot;w x y z&quot; is broken
+ down iteratively (applying the logic above) until we have &quot;w&quot;,
+ &quot;x&quot;, &quot;y&quot; and &quot;z&quot;.
+ </p>
+ <p>
+ QuickBook only tries to get the arguments it needs. For example:
+ </p>
+<pre class="programlisting">[simple w x y z trail]
+</pre>
+ <p>
+ will produce:
+ </p>
+ <p>
+ wxyz trail
+ </p>
+ <p>
+ The arguments being: &quot;w&quot;, &quot;x&quot;, &quot;y&quot; and
+ &quot;z trail&quot;.
+ </p>
+ <p>
+ It should be obvious now that for simple arguments with no spaces,
+ we can get by without separating the arguments with <tt>&quot;..&quot;</tt>
+ separators. It is possible to combine <tt>&quot;..&quot;</tt> separators
+ with the argument passing simplification presented above. Example:
+ </p>
+<pre class="programlisting">[simple what do you think ..m a n?]
+</pre>
+ <p>
+ will produce:
+ </p>
+ <p>
+ what do you think man?
+ </p>
+ <h5 id="quickbook.syntax.block.templates.punctuation_templates">
+ Punctuation Templates
+ </h5>
+ <p>
+ 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 <a href="#quickbook.syntax.block.templates.template_identifier">template
+ identifiers</a>. Example:
+ </p>
+<pre class="programlisting">[template ![bar] &lt;hey&gt;[bar]&lt;/hey&gt;]
+</pre>
+ <p>
+ Now, expanding this:
+ </p>
+<pre class="programlisting">[!baz]
+</pre>
+ <p>
+ We will have:
+ </p>
+<pre class="programlisting">&lt;hey&gt;baz&lt;/hey&gt;
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.blurbs">
+ <h3>
+ Blurbs
+ </h3>
+ <div id="quickbook.syntax.block.blurbs">
+<pre class="programlisting">[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++.
+]
+</pre>
+ <p>
+ will generate this:
+ </p>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/smiley.png" alt="[]"/></span>
+ <span class="bold"><strong>An eye catching advertisement or note...</strong></span>
+ </p>
+ <p>
+ <a href="http://spirit.sourceforge.net">Spirit</a> 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++.
+ </p>
+ </div>
+ <div class="note">
+ <p>
+ Prefer <a href="#quickbook.syntax.block.admonitions">admonitions</a>
+ wherever appropriate.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.tables">
+ <h3>
+ Tables
+ </h3>
+ <div id="quickbook.syntax.block.tables">
+<pre class="programlisting">[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]]
+]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <div id="quickbook.syntax.block.tables.t0" class="table">
+ <table>
+ <caption>A Simple Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Heading 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Heading 3
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ R0-C0
+ </p>
+ </td>
+ <td>
+ <p>
+ R0-C1
+ </p>
+ </td>
+ <td>
+ <p>
+ R0-C2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ R2-C0
+ </p>
+ </td>
+ <td>
+ <p>
+ R2-C1
+ </p>
+ </td>
+ <td>
+ <p>
+ R2-C2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ R3-C0
+ </p>
+ </td>
+ <td>
+ <p>
+ R3-C1
+ </p>
+ </td>
+ <td>
+ <p>
+ R3-C2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ The table title is optional. The first row of the table is automatically
+ treated as the table header; that is, it is wrapped in <tt>&lt;thead&gt;...&lt;/thead&gt;</tt>
+ 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:
+ </p>
+<pre class="programlisting">[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]
+ ]
+]
+</pre>
+ <p>
+ and thus:
+ </p>
+ <div id="quickbook.syntax.block.tables.t1" class="table">
+ <table>
+ <caption>Table with fat cells</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Heading 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 0, Col 0: a small cell
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 0, Col 1: a big fat cell with paragraphs
+ </p>
+ <p>
+ Boost provides free peer-reviewed portable C++ source libraries.
+ </p>
+ <p>
+ 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.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Row 1, Col 0: a small cell
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1, Col 1: a small cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Here's how to have preformatted blocks of code in a table cell:
+ </p>
+<pre class="programlisting">[table Table with code
+ [[Comment] [Code]]
+ [
+ [My first program]
+ [``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+ ``]
+ ]
+]
+</pre>
+ <div id="quickbook.syntax.block.tables.t2" class="table">
+ <table>
+ <caption>Table with code</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Comment
+ </p>
+ </th>
+ <th>
+ <p>
+ Code
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ My first program
+ </p>
+ </td>
+ <td>
+ <p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.variable_lists">
+ <h3>
+ Variable Lists
+ </h3>
+ <div id="quickbook.syntax.block.variable_lists">
+<pre class="programlisting">[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]]
+]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <dl>
+ <dt>
+ term 1
+ </dt>
+ <dd>
+ <p>
+ The definition of term 1
+ </p>
+ </dd>
+ <dt>
+ term 2
+ </dt>
+ <dd>
+ <p>
+ The definition of term 2
+ </p>
+ </dd>
+ <dt>
+ term 3
+ </dt>
+ <dd>
+ <p>
+ The definition of term 3
+ </p>
+ </dd>
+ </dl>
+ <p>
+ The rules for variable lists are the same as for tables, except that
+ only 2 &quot;columns&quot; are allowed. The first column contains the
+ terms, and the second column contains the definitions. Those familiar
+ with HTML will recognize this as a &quot;definition list&quot;.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.include">
+ <h3>
+ Include
+ </h3>
+ <div id="quickbook.syntax.block.include">
+ <p>
+ You can include one QuickBook file from another. The syntax is simply:
+ </p>
+<pre class="programlisting">[include someother.qbk]
+</pre>
+ <p>
+ The included file will be processed as if it had been cut and pasted
+ into the current document, with the following exceptions:
+ </p>
+ <ul>
+ <li>
+ <div>
+ The __FILENAME__ predefined macro will reflect the name of the
+ file currently being processed.
+ </div>
+ </li>
+ <li>
+ <div>
+ Any macros defined in the included file are scoped to that file.
+ </div>
+ </li>
+ </ul>
+ <p>
+ The <tt>[include]</tt> 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 (&quot;someother&quot;, in the example
+ above). You can specify the id like this:
+ </p>
+<pre class="programlisting">[include:someid someother.qbk]
+</pre>
+ <p>
+ 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 &quot;Intro&quot;,
+ the named anchor for that section will be &quot;someid.intro&quot;,
+ and you can link to it with <tt>[link someid.intro The Intro]</tt>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.import">
+ <h3>
+ Import
+ </h3>
+ <div id="quickbook.syntax.block.import">
+ <p>
+ 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.
+ </p>
+ <p>
+ QuickBook's import facility provides a nice solution.
+ </p>
+ <h5 id="quickbook.syntax.block.import.example">
+ Example
+ </h5>
+ <p>
+ You can effortlessly import code snippets from source code into your
+ QuickBook. The following illustrates how this is done:
+ </p>
+<pre class="programlisting">[import ../test/stub.cpp]
+[foo]
+[bar]
+</pre>
+ <p>
+ The first line:
+ </p>
+<pre class="programlisting">[import ../test/stub.cpp]
+</pre>
+ <p>
+ collects specially marked-up code snippets from <a href="../../test/stub.cpp">stub.cpp</a>
+ and places them in your QuickBook file as virtual templates. Each of
+ the specially marked-up code snippets has a name (e.g. <code><span
+ class="identifier">foo</span></code> and <code><span class="identifier">bar</span></code>
+ 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:
+ </p>
+<pre class="programlisting">[foo]
+[bar]
+</pre>
+ <p>
+ And the result is:
+ </p>
+ <p>
+ This is the <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+ This is the <span class="bold"><strong><span class="emphasis"><em>bar</em></span></strong></span>
+ function
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">bar</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, bar man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;bar&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+ Some trailing text here
+ </p>
+ <h5 id="quickbook.syntax.block.import.code_snippet_markup">
+ Code Snippet Markup
+ </h5>
+ <p>
+ Note how the code snippets in <a href="../../test/stub.cpp">stub.cpp</a>
+ get marked up. We use distinguishable comments following the form:
+ </p>
+<pre class="programlisting"><span class="comment">//[id</span>
+<span class="identifier">some</span> <span class="identifier">code</span> <span class="identifier">here</span>
+<span class="comment">//]</span>
+</pre>
+ <p>
+ The first comment line above initiates a named code-snippet. This prefix
+ will not be visible in quickbook. The entire code-snippet in between
+ <code><span class="comment">//[id</span></code> and <code><span class="comment">//]</span></code>
+ will be inserted as a template in quickbook with name <span class="emphasis"><em><span
+ class="emphasis"><em>id</em></span></em></span>. The comment <code><span
+ class="comment">//]</span></code> ends a code-snippet This too will
+ not be visible in quickbook.
+ </p>
+ <h5 id="quickbook.syntax.block.import.special_comments">
+ Special Comments
+ </h5>
+ <p>
+ Special comments of the form:
+ </p>
+<pre class="programlisting"><span class="comment">//` some [*quickbook] markup here</span>
+</pre>
+ <p>
+ and:
+ </p>
+<pre class="programlisting"><span class="comment">/*` some [*quickbook] markup here */</span>
+</pre>
+ <p>
+ will be parsed by QuickBook. This can contain quickbook <span class="emphasis"><em>blocks</em></span>
+ (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.
+ </p>
+ <h5 id="quickbook.syntax.block.import.callouts">
+ Callouts
+ </h5>
+ <p>
+ Special comments of the form:
+ </p>
+<pre class="programlisting"><span class="comment">/*&lt; some [*quickbook] markup here &gt;*/</span>
+</pre>
+ <p>
+ will be regarded as callouts. These will be collected, numbered and
+ rendered as a &quot;callout bug&quot; (a small icon with a number).
+ After the whole snippet is parsed, the callout list is generated. See
+ <a href="http://www.docbook.org/tdg/en/html/callout.html">Callouts</a>
+ for details. Example:
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">foo_bar</span><span class="special">()</span> <a href="#quickbook.syntax.block.import.c1">(1)</a>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo-bar&quot;</span><span class="special">;</span> <a href="#quickbook.syntax.block.import.c3">(2)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="quickbook.syntax.block.import.c1">
+ <a href="#quickbook.syntax.block.import.c0">(1)</a>
+ <p>
+ The <span class="emphasis"><em>Mythical</em></span> FooBar. See
+ <a href="http://en.wikipedia.org/wiki/Foobar">Foobar for details</a>
+ </p>
+ </div>
+ <div id="quickbook.syntax.block.import.c3">
+ <a href="#quickbook.syntax.block.import.c2">(2)</a>
+ <p>
+ return 'em, foo-bar man!
+ </p>
+ </div>
+ </div>
+ <p>
+ Checkout <a href="../../test/stub.cpp">stub.cpp</a> to see the actual
+ code.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.install">
+ <h3>
+ Installation and configuration
+ </h3>
+ <div id="quickbook.install">
+ <p>
+ This section provides some guidelines on how to install and configure BoostBook
+ and Quickbook under several operating systems.
+ </p>
+ <p>
+ 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 <code><span class="identifier">bin</span></code>
+ and <code><span class="identifier">bin</span><span class="special">.</span><span
+ class="identifier">v2</span></code> directories generated by the build
+ before trying again. Otherwise your configuration fixes will not take any
+ effect.
+ </p>
+ </div>
+ <div id="quickbook.install.windows">
+ <h3>
+ Windows 2000, XP, 2003, Vista
+ </h3>
+ <div id="quickbook.install.windows">
+ <blockquote>
+ <p>
+ <span class="emphasis"><em>Section contributed by Julio M. Merino Vidal</em></span>
+ </p>
+ </blockquote>
+ <p>
+ 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.
+ </p>
+ <ol>
+ <li>
+ <div>
+ First of all you need to have a copy of <code><span class="identifier">xsltproc</span></code>
+ for Windows. There are many ways to get this tool, but to keep things
+ simple, use the <a href="http://www.zlatkovic.com/pub/libxml/">binary
+ packages</a> made by Igor Zlatkovic. At the very least, you need
+ to download the following packages: <code><span class="identifier">iconv</span></code>,
+ <code><span class="identifier">zlib</span></code>, <code><span class="identifier">libxml2</span></code>
+ and <code><span class="identifier">libxslt</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Unpack all these packages in the same directory so that you get unique
+ <code><span class="identifier">bin</span></code>, <code><span class="identifier">include</span></code>
+ and <code><span class="identifier">lib</span></code> directories
+ within the hierarchy. These instructions use <code><span class="identifier">C</span><span
+ class="special">:\</span><span class="identifier">Users</span><span
+ class="special">\</span><span class="identifier">example</span><span
+ class="special">\</span><span class="identifier">Documents</span><span
+ class="special">\</span><span class="identifier">boost</span><span
+ class="special">\</span><span class="identifier">xml</span></code>
+ as the root for all files.
+ </div>
+ </li>
+ <li>
+ <div>
+ From the command line, go to the <code><span class="identifier">bin</span></code>
+ directory and launch <code><span class="identifier">xsltproc</span><span
+ class="special">.</span><span class="identifier">exe</span></code>
+ to ensure it works. You should get usage information on screen.
+ </div>
+ </li>
+ <li>
+ <div>
+ Download <a href="http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip">Docbook
+ XML 4.2</a> and unpack it in the same directory used above. That
+ is: <code><span class="identifier">C</span><span class="special">:\</span><span
+ class="identifier">Users</span><span class="special">\</span><span
+ class="identifier">example</span><span class="special">\</span><span
+ class="identifier">Documents</span><span class="special">\</span><span
+ class="identifier">boost</span><span class="special">\</span><span
+ class="identifier">xml</span><span class="special">\</span><span
+ class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xml</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Download the latest <a href="http://sourceforge.net/project/showfiles.php?group_id=21935&amp;package_id=16608">Docbook
+ XSL</a> version and unpack it, again in the same directory used before.
+ To make things easier, rename the directory created during the extraction
+ to <code><span class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xsl</span></code> (bypassing the version name):
+ <code><span class="identifier">C</span><span class="special">:\</span><span
+ class="identifier">Users</span><span class="special">\</span><span
+ class="identifier">example</span><span class="special">\</span><span
+ class="identifier">Documents</span><span class="special">\</span><span
+ class="identifier">boost</span><span class="special">\</span><span
+ class="identifier">xml</span><span class="special">\</span><span
+ class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xsl</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Add the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span
+ class="special">.</span><span class="identifier">jam</span></code>
+ file, which should live in your home directory (<code><span class="special">%</span><span
+ class="identifier">HOMEDRIVE</span><span class="special">%%</span><span
+ class="identifier">HOMEPATH</span><span class="special">%</span></code>).
+ You must already have it somewhere or otherwise you could not be
+ building Boost (i.e. missing tools configuration).
+ </div>
+ </li>
+ </ol>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">xsltproc</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/bin/xsltproc.exe&quot;</span>
+ <span class="special">;</span>
+
+<span class="identifier">using</span> <span class="identifier">boostbook</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xsl&quot;</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xml&quot;</span>
+ <span class="special">;</span>
+</pre>
+ <p>
+ 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:
+ </p>
+ <ol>
+ <li>
+ <div>
+ Go to Quickbook's source directory (<code><span class="identifier">BOOST_ROOT</span><span
+ class="special">\</span><span class="identifier">tools</span><span
+ class="special">\</span><span class="identifier">quickbook</span></code>).
+ </div>
+ </li>
+ <li>
+ <div>
+ Build the utility by issuing <code><span class="identifier">bjam</span>
+ <span class="special">--</span><span class="identifier">v2</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Copy the resulting <code><span class="identifier">quickbook</span><span
+ class="special">.</span><span class="identifier">exe</span></code>
+ binary (located under the <code><span class="identifier">BOOST_ROOT</span><span
+ class="special">\</span><span class="identifier">bin</span><span
+ class="special">.</span><span class="identifier">v2</span></code>
+ hierarchy) to a safe place. Following our previous example, you can
+ install it into: <code><span class="identifier">C</span><span class="special">:\</span><span
+ class="identifier">Users</span><span class="special">\</span><span
+ class="identifier">example</span><span class="special">\</span><span
+ class="identifier">Documents</span><span class="special">\</span><span
+ class="identifier">boost</span><span class="special">\</span><span
+ class="identifier">xml</span><span class="special">\</span><span
+ class="identifier">bin</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Add the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span
+ class="special">.</span><span class="identifier">jam</span></code>
+ file:
+ </div>
+ </li>
+ </ol>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">quickbook</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/bin/quickbook.exe&quot;</span>
+ <span class="special">;</span>
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.install.linux">
+ <h3>
+ Debian, Ubuntu
+ </h3>
+ <div id="quickbook.install.linux">
+ <p>
+ 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.
+ </p>
+ <p>
+ First install the <code><span class="identifier">bjam</span></code>,
+ <code><span class="identifier">xsltproc</span></code>, <code><span class="identifier">docbook</span><span
+ class="special">-</span><span class="identifier">xsl</span></code> and
+ <code><span class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xml</span></code> packages. For example, using <code><span
+ class="identifier">apt</span><span class="special">-</span><span class="identifier">get</span></code>:
+ </p>
+<pre class="programlisting"><span class="identifier">sudo</span> <span class="identifier">apt</span><span class="special">-</span><span class="identifier">get</span> <span class="identifier">install</span> <span class="identifier">xsltprc</span> <span class="identifier">docbook</span><span class="special">-</span><span class="identifier">xsl</span> <span class="identifier">docbook</span><span class="special">-</span><span class="identifier">xml</span>
+</pre>
+ <p>
+ If you're planning on building boost's documentation, you'll also need
+ to install the <code><span class="identifier">doxygen</span></code> package
+ as well.
+ </p>
+ <p>
+ Next, we need to configure Boost Build to compile BoostBook files. Add
+ the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span class="special">.</span><span
+ class="identifier">jam</span></code> 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 <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span class="special">.</span><span
+ class="identifier">jam</span></code>, see the <a href="http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html">Boost
+ Build documentation</a>.
+ </p>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">xsltproc</span> <span class="special">;</span>
+
+<span class="identifier">using</span> <span class="identifier">boostbook</span>
+ <span class="special">:</span> <span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">share</span><span class="special">/</span><span class="identifier">xml</span><span class="special">/</span><span class="identifier">docbook</span><span class="special">/</span><span class="identifier">stylesheet</span><span class="special">/</span><span class="identifier">nwalsh</span>
+ <span class="special">:</span> <span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">share</span><span class="special">/</span><span class="identifier">xml</span><span class="special">/</span><span class="identifier">docbook</span><span class="special">/</span><span class="identifier">schema</span><span class="special">/</span><span class="identifier">dtd</span><span class="special">/</span><span class="number">4.2</span>
+ <span class="special">;</span>
+
+<span class="comment"># Remove this line if you're not using doxygen</span>
+<span class="identifier">using</span> <span class="identifier">doxygen</span> <span class="special">;</span>
+</pre>
+ <p>
+ 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:
+ </p>
+ <ol>
+ <li>
+ <div>
+ Go to Quickbook's source directory (<code><span class="identifier">BOOST_ROOT</span><span
+ class="special">/</span><span class="identifier">tools</span><span
+ class="special">/</span><span class="identifier">quickbook</span></code>).
+ </div>
+ </li>
+ <li>
+ <div>
+ Build the utility by issuing <code><span class="identifier">bjam</span>
+ <span class="special">--</span><span class="identifier">v2</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Copy the resulting <code><span class="identifier">quickbook</span></code>
+ binary (located under the <code><span class="identifier">BOOST_ROOT</span><span
+ class="special">/</span><span class="identifier">bin</span><span
+ class="special">.</span><span class="identifier">v2</span></code>
+ hierarchy) to a safe place. The traditional location is <code><span
+ class="special">/</span><span class="identifier">usr</span><span
+ class="special">/</span><span class="identifier">local</span><span
+ class="special">/</span><span class="identifier">bin</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Add the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span
+ class="special">.</span><span class="identifier">jam</span></code>
+ file, using the full path of the quickbook executable:
+ </div>
+ </li>
+ </ol>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">quickbook</span>
+ <span class="special">:</span> <span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">bin</span><span class="special">/</span><span class="identifier">quickbook</span>
+ <span class="special">;</span>
+</pre>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.editors">
+ <h3>
+ Editor Support
+ </h3>
+ <div id="quickbook.editors">
+ <p>
+ 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.
+ </p>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/note.png" alt="[]"/></span>
+ You may submit your settings, tips, and suggestions to the authors, or
+ through the <a href="https://lists.sourceforge.net/lists/listinfo/boost-">docs
+ Boost Docs mailing list</a>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.editors.scite">
+ <h3>
+ Scintilla Text Editor
+ </h3>
+ <div id="quickbook.editors.scite">
+ <blockquote>
+ <p>
+ <span class="emphasis"><em>Section contributed by Dean Michael Berris</em></span>
+ </p>
+ </blockquote>
+ <p>
+ The Scintilla Text Editor (SciTE) is a free source code editor for Win32
+ and X. It uses the SCIntilla source code editing component.
+ </p>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/tip.png" alt="[]"/></span>
+ SciTE can be downloaded from <a href="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html</a>
+ </p>
+ </div>
+ <p>
+ You can use the following settings to highlight quickbook tags when editing
+ quickbook files.
+ </p>
+<pre class="programlisting">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=]
+</pre>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/note.png" alt="[]"/></span>
+ Thanks to Rene Rivera for the above SciTE settings.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.faq">
+ <h3>
+ Frequently Asked Questions
+ </h3>
+ <div id="quickbook.faq">
+ <h3 id="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_">
+ Can I use QuickBook for non-Boost documentation?
+ </h3>
+ <p>
+ QuickBook can be used for non-Boost documentation with a little extra work.
+ </p>
+ <blockquote>
+ <p>
+ <span class="emphasis"><em>Faq contributed by Michael Marcin</em></span>
+ </p>
+ </blockquote>
+ <p>
+ 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.
+ </p>
+ <p>
+ For example:
+ </p>
+<pre class="programlisting">using quickbook ;
+
+xml my_doc : my_doc.qbk ;
+
+boostbook standalone
+ :
+ my_doc
+ :
+ &lt;xsl:param&gt;boost.image.src=images/my_project_logo.png
+ &lt;xsl:param&gt;boost.image.alt=&quot;\&quot;My Project\&quot;&quot;
+ &lt;xsl:param&gt;boost.image.w=100
+ &lt;xsl:param&gt;boost.image.h=50
+ &lt;xsl:param&gt;nav.layout=none
+ ;
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.ref">
+ <h3>
+ Quick Reference
+ </h3>
+ <div id="quickbook.ref">
+ <p>
+ [cpp]
+ </p>
+ <div id="quickbook.ref.t0" class="table">
+ <table>
+ <caption>Syntax Compendium</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ To do this...
+ </p>
+ </th>
+ <th>
+ <p>
+ Use this...
+ </p>
+ </th>
+ <th>
+ <p>
+ See this...
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ comment
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[/ some comment]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.comments">Comments</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="emphasis"><em>italics</em></span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>['italics] or /italics/</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="bold"><strong>bold</strong></span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[*bold] or *bold*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="underline">underline</span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[_underline] or _underline_</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>teletype</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[^teletype] or =teletype=</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="strikethrough">strikethrough</span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[-strikethrough]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <em class="replaceable">replaceable</em>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[~replaceable]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.replaceable">Replaceble</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ source mode
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[c++]</tt> or <tt>[python]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.source_mode">Source Mode</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ inline code
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>`int main();`</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.inline_code">Inline code</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ code block
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>``int main();``</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.code">Code</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ code escape
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>``from c++ to QuickBook``</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.escape_back">Escaping Back To
+ QuickBook</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ line break
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[br] or \n</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.line_break">line-break</a>
+ <span class="bold"><strong>DEPRECATED</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ anchor
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[#anchor]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.anchors">Anchors</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[@http://www.boost.org Boost]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.links">Links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ anchor link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[link section.anchor Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.anchor_links">Anchor links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ refentry link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[link xml.refentry Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.refentry_links">refentry links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ function link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[funcref fully::qualified::function_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ class link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[classref fully::qualified::class_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ member link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[memberref fully::qualified::member_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ enum link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[enumref fully::qualified::enum_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ macro link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[macroref MACRO_NAME Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ concept link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[conceptref ConceptName Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ header link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[headerref path/to/header.hpp Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ escape
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>'''escaped text (no processing/formatting)'''</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.escape">Escape</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ single char escape
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>\c</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.single_char_escape">Single
+ char escape</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ images
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[$image.jpg]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.images">Images</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ begin section
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[section The Section Title]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.section">Section</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ end section
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[endsect]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.section">Section</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ paragraph
+ </p>
+ </td>
+ <td>
+ <p>
+ No markup. Paragraphs start left-flushed and are terminated by
+ two or more newlines.
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.paragraphs">Paragraphs</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ ordered list
+ </p>
+ </td>
+ <td>
+<pre class="programlisting"># one
+# two
+# three
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ unordered list
+ </p>
+ </td>
+ <td>
+<pre class="programlisting">* one
+* two
+* three
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ code
+ </p>
+ </td>
+ <td>
+ <p>
+ No markup. Preformatted code starts with a space or a tab.
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.code">Code</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ preformatted
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[pre preformatted]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.preformatted">Preformatted</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ block quote
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[:sometext...]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.blockquote">Blockquote</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 1
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h1 Heading 1]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 2
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h2 Heading 2]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 3
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h3 Heading 3]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 4
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h4 Heading 4]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 5
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h5 Heading 5]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 6
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h6 Heading 6]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ macro
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[def macro_identifier some text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.macros">Macros</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ template
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[template[a b] [a] body [b]]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.templates">Templates</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ blurb
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[blurb advertisement or note...]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.blurbs">Blurbs</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ admonition
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[warning Warning text...]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.admonitions">Admonitions</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ table
+ </p>
+ </td>
+ <td>
+<pre class="programlisting">[table Title
+[[a][b][c]]
+[[a][b][c]]
+]
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.tables">Tables</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ variablelist
+ </p>
+ </td>
+ <td>
+<pre class="programlisting">[variablelist Title
+[[a][b]]
+[[a][b]]
+]
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.variable_lists">Variable Lists</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ include
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[include someother.qbk]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.include">Include</a>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#quickbook.syntax.phrase.simple_formatting.f0"><sup>[1]</sup></a>
+ Thanks to David Barrett, author of <a href="http://quinthar.com/qwikiwiki/index.php?page=Home">Qwiki</a>,
+ for sharing these samples and teaching me these obscure formatting rules.
+ I wasn't sure at all if <a href="http://spirit.sourceforge.net">Spirit</a>,
+ being more or less a formal EBNF parser, can handle the context sensitivity
+ and ambiguity.
+ </p>
+ </div>
+ <div id="footnote-2" class="footnote">
+ <p>
+ <a href="#quickbook.syntax.phrase.footnotes.f0"><sup>[2]</sup></a> A sample
+ footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 &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.
+
+[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. <quote>quoted</quote>).
+
+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 <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;
+ }
+``
+
+[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 [^<link linkend="xml.refentry">The link text</link>].
+
+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 [^<link linkend="xml.refentry">xml.refentry</link>].
+
+[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
+\'\'\'
+<emphasis role="bold">This is direct XML markup</emphasis>
+\'\'\'
+]
+
+'''
+<emphasis role="bold">This is direct XML markup</emphasis>
+'''
+
+[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 <iostream>
+
+ 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&amp;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[]&apos;&apos;&apos;&amp;#945;&apos;&apos;&apos;]
+[template beta[]&apos;&apos;&apos;&amp;#946;&apos;&apos;&apos;]
+''']
+
+[template alpha[]'''&#945;''']
+[template beta[]'''&#946;''']
+
+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] '''<hey>'''[bar]'''</hey>''']
+''']
+
+Now, expanding this:
+
+[pre'''
+[!baz]
+''']
+
+We will have:
+
+[pre
+<hey>baz</hey>
+]
+
+[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
+[^<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:
+
+[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 <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+ \`\`''']
+ ]
+]
+''']
+
+[table Table with code
+ [[Comment] [Code]]
+ [
+ [My first program]
+ [``
+ #include <iostream>
+
+ 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
+ :
+ <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
+ ;
+]
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook_role_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Quickbook Role Test</title>
+ <para>
+ <phrase role="keyword">Keyword</phrase> <phrase role="keyword"></phrase> [role]
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Quickbook Role Test
+ </h3>
+ <p>
+ <span class="keyword">Keyword</span> <span class="keyword"></span> [role]
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook_role_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Quickbook Role Test</title>
+ <para>
+ <phrase role="keyword">Keyword</phrase> <phrase role="keyword"></phrase>
+ </para>
+ <para>
+ road <phrase role="red">Red</phrase> <phrase role="red"></phrase> <phrase role="three-colours-red">Three
+ Colours Red</phrase> <phrase role="red-road">Red Road</phrase>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Quickbook Role Test
+ </h3>
+ <p>
+ <span class="keyword">Keyword</span> <span class="keyword"></span>
+ </p>
+ <p>
+ road <span class="red">Red</span> <span class="red"></span> <span class="three-colours-red">Three
+ Colours Red</span> <span class="red-road">Red Road</span>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_id_1_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section Id 1.4</title>
+ <section id="section_id_1_4.id_test1">
+ <title><link linkend="section_id_1_4.id_test1">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_4.id_test2">
+ <title><link linkend="section_id_1_4.id_test2">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_4.quickbook_section_no_id_test_1">
+ <title><link linkend="section_id_1_4.quickbook_section_no_id_test_1">Quickbook
+ section no id test 1</link></title>
+ </section>
+ <section id="section_id_1_4.___quickbook_section_no_id_test_2">
+ <title><link linkend="section_id_1_4.___quickbook_section_no_id_test_2">++ Quickbook
+ section no id test 2</link></title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section Id 1.4
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_id_1_4.id_test1">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_4.id_test2">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_4.quickbook_section_no_id_test_1">Quickbook section
+ no id test 1</a>
+ </li>
+ <li>
+ <a href="#section_id_1_4.___quickbook_section_no_id_test_2">++ Quickbook
+ section no id test 2</a>
+ </li>
+ </ul>
+ </div>
+ <div id="section_id_1_4.id_test1">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_4.id_test1">
+ </div>
+ </div>
+ <div id="section_id_1_4.id_test2">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_4.id_test2">
+ </div>
+ </div>
+ <div id="section_id_1_4.quickbook_section_no_id_test_1">
+ <h3>
+ Quickbook section no id test 1
+ </h3>
+ <div id="section_id_1_4.quickbook_section_no_id_test_1">
+ </div>
+ </div>
+ <div id="section_id_1_4.___quickbook_section_no_id_test_2">
+ <h3>
+ ++ Quickbook section no id test 2
+ </h3>
+ <div id="section_id_1_4.___quickbook_section_no_id_test_2">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unclosed_section" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unclosed section</title>
+ <section id="unclosed_section.unclosed">
+ <title><link linkend="unclosed_section.unclosed">Unclosed Section should be closed
+ with a warning</link></title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unclosed section
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#unclosed_section.unclosed">Unclosed Section should be closed
+ with a warning</a>
+ </li>
+ </ul>
+ </div>
+ <div id="unclosed_section.unclosed">
+ <h3>
+ Unclosed Section should be closed with a warning
+ </h3>
+ <div id="unclosed_section.unclosed">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_id_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section Id 1.5</title>
+ <section id="section_id_1_5.id_test1">
+ <title><link linkend="section_id_1_5.id_test1">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_5.id_test2">
+ <title><link linkend="section_id_1_5.id_test2">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_5.id_test3">
+ <title><link linkend="section_id_1_5.id_test3">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_5.___quickbook_section_no_id_test">
+ <title><link linkend="section_id_1_5.___quickbook_section_no_id_test">++ Quickbook
+ section no id test</link></title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section Id 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_id_1_5.id_test1">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_5.id_test2">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_5.id_test3">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_5.___quickbook_section_no_id_test">++ Quickbook
+ section no id test</a>
+ </li>
+ </ul>
+ </div>
+ <div id="section_id_1_5.id_test1">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_5.id_test1">
+ </div>
+ </div>
+ <div id="section_id_1_5.id_test2">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_5.id_test2">
+ </div>
+ </div>
+ <div id="section_id_1_5.id_test3">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_5.id_test3">
+ </div>
+ </div>
+ <div id="section_id_1_5.___quickbook_section_no_id_test">
+ <h3>
+ ++ Quickbook section no id test
+ </h3>
+ <div id="section_id_1_5.___quickbook_section_no_id_test">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_id_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section Id 1.7</title>
+ <section id="section_id_1_7.quickbook_section_no_id_test">
+ <title><link linkend="section_id_1_7.quickbook_section_no_id_test">Quickbook
+ section no id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test1">
+ <title><link linkend="section_id_1_7.id_test1">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test2">
+ <title><link linkend="section_id_1_7.id_test2">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test3_quickbook_section_id_te">
+ <title><link linkend="section_id_1_7.id_test3_quickbook_section_id_te">id_test3
+ Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.--">
+ <title><link linkend="section_id_1_7.--">Quickbook section odd id test</link></title>
+ </section>
+ <section id="section_id_1_7.sect-abc">
+ <title><link linkend="section_id_1_7.sect-abc">Section with template in id</link></title>
+ </section>
+ <section id="section_id_1_7.link_section_id_1_7_id_test1_lin">
+ <title><link linkend="section_id_1_7.id_test1">Link in title</link></title>
+ </section>
+ <section id="section_id_1_7.link_section_id_1_7_id_test1_li0">
+ <title><link linkend="section_id_1_7.id_test1">Link</link> in title</title>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section Id 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_id_1_7.quickbook_section_no_id_test">Quickbook section
+ no id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.id_test1">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.id_test2">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.id_test3_quickbook_section_id_te">id_test3 Quickbook
+ section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.--">Quickbook section odd id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.sect-abc">Section with template in id</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.link_section_id_1_7_id_test1_lin"><a href="#section_id_1_7.id_test1">Link
+ in title</a></a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.link_section_id_1_7_id_test1_li0"><a href="#section_id_1_7.id_test1">Link</a>
+ in title</a>
+ </li>
+ </ul>
+ </div>
+ <div id="section_id_1_7.quickbook_section_no_id_test">
+ <h3>
+ Quickbook section no id test
+ </h3>
+ <div id="section_id_1_7.quickbook_section_no_id_test">
+ </div>
+ </div>
+ <div id="section_id_1_7.id_test1">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_7.id_test1">
+ </div>
+ </div>
+ <div id="section_id_1_7.id_test2">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_7.id_test2">
+ </div>
+ </div>
+ <div id="section_id_1_7.id_test3_quickbook_section_id_te">
+ <h3>
+ id_test3 Quickbook section id test
+ </h3>
+ <div id="section_id_1_7.id_test3_quickbook_section_id_te">
+ </div>
+ </div>
+ <div id="section_id_1_7.--">
+ <h3>
+ Quickbook section odd id test
+ </h3>
+ <div id="section_id_1_7.--">
+ </div>
+ </div>
+ <div id="section_id_1_7.sect-abc">
+ <h3>
+ Section with template in id
+ </h3>
+ <div id="section_id_1_7.sect-abc">
+ </div>
+ </div>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_lin">
+ <h3>
+ <a href="#section_id_1_7.id_test1">Link in title</a>
+ </h3>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_lin">
+ </div>
+ </div>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_li0">
+ <h3>
+ <a href="#section_id_1_7.id_test1">Link</a> in title
+ </h3>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_li0">
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_markup_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Markup Test</title>
+ <section id="simple_markup_test.simple_markup">
+ <title><link linkend="simple_markup_test.simple_markup">Simple Markup</link></title>
+ <para>
+ <emphasis>italic</emphasis> <emphasis role="bold">bold</emphasis> <emphasis
+ role="underline">underline</emphasis> <literal>teletype</literal>
+ </para>
+ <para>
+ //not italic// **not bold** __not underline__ ==not teletype==
+ </para>
+ <para>
+ <emphasis role="underline">odd__ edge case</emphasis>
+ </para>
+ <para>
+ not__underlined__hopefully
+ </para>
+ <para>
+ (<emphasis role="bold">bold</emphasis>) <emphasis role="underline">und/er/lined</emphasis>
+ </para>
+ <para>
+ <emphasis>all/italic</emphasis> * not bold*
+ </para>
+ <para>
+ /not italic <ulink url="http://www.boost.org/"><emphasis role="bold">bold</emphasis></ulink>
+ </para>
+ <para>
+ not_underlined_
+ </para>
+ <para>
+ _Should not underline escaped markup_. _or this escaped_ markup form.
+ </para>
+ <para>
+ <literal>Matti Meik\u00E4l\u00E4inen</literal>
+ </para>
+ <para>
+ <literal>replaced</literal>
+ </para>
+ <para>
+ <emphasis role="underline">replaced</emphasis>
+ </para>
+ <para>
+ <literal>_mac\ ro_</literal>
+ </para>
+ <para>
+ <emphasis>italic\</emphasis>
+ </para>
+ <para>
+ These shouldn't be interepted as markup: == // **
+ </para>
+ <para>
+ <literal>&lt;</literal> <literal>\&lt;</literal> <literal>\\&lt;</literal>
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Simple Markup Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#simple_markup_test.simple_markup">Simple Markup</a>
+ </li>
+ </ul>
+ </div>
+ <div id="simple_markup_test.simple_markup">
+ <h3>
+ Simple Markup
+ </h3>
+ <div id="simple_markup_test.simple_markup">
+ <p>
+ <span class="emphasis"><em>italic</em></span> <span class="bold"><strong>bold</strong></span>
+ <span class="underline">underline</span> <tt>teletype</tt>
+ </p>
+ <p>
+ //not italic// **not bold** __not underline__ ==not teletype==
+ </p>
+ <p>
+ <span class="underline">odd__ edge case</span>
+ </p>
+ <p>
+ not__underlined__hopefully
+ </p>
+ <p>
+ (<span class="bold"><strong>bold</strong></span>) <span class="underline">und/er/lined</span>
+ </p>
+ <p>
+ <span class="emphasis"><em>all/italic</em></span> * not bold*
+ </p>
+ <p>
+ /not italic <a href="http://www.boost.org/"><span class="bold"><strong>bold</strong></span></a>
+ </p>
+ <p>
+ not_underlined_
+ </p>
+ <p>
+ _Should not underline escaped markup_. _or this escaped_ markup form.
+ </p>
+ <p>
+ <tt>Matti Meik\u00E4l\u00E4inen</tt>
+ </p>
+ <p>
+ <tt>replaced</tt>
+ </p>
+ <p>
+ <span class="underline">replaced</span>
+ </p>
+ <p>
+ <tt>_mac\ ro_</tt>
+ </p>
+ <p>
+ <span class="emphasis"><em>italic\</em></span>
+ </p>
+ <p>
+ These shouldn't be interepted as markup: == // **
+ </p>
+ <p>
+ <tt>&lt;</tt> <tt>\&lt;</tt> <tt>\\&lt;</tt>
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="pass_thru_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Pass thru test</title>
+ <para>
+<programlisting><phrase role="comment">/*=============================================================================
+ 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)
+=============================================================================*/</phrase>
+</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">struct</phrase> <phrase role="identifier">Foo</phrase><phrase role="special">{</phrase>
+
+ <phrase role="identifier">Foo</phrase><phrase role="special">();</phrase>
+
+<phrase role="special">};</phrase>
+
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">Foo</phrase> <phrase role="identifier">x</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">:</phrase>
+ <phrase role="keyword">print</phrase><phrase role="special">(</phrase><phrase role="string">'foo'</phrase><phrase role="special">)</phrase>
+</programlisting>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Pass thru test
+ </h3>
+ <p>
+<pre class="programlisting"><span class="comment">/*=============================================================================
+ 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)
+=============================================================================*/</span>
+</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">Foo</span><span class="special">{</span>
+
+ <span class="identifier">Foo</span><span class="special">();</span>
+
+<span class="special">};</span>
+
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">Foo</span> <span class="identifier">x</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">:</span>
+ <span class="keyword">print</span><span class="special">(</span><span class="string">'foo'</span><span class="special">)</span>
+</pre>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unbalanced_snippet_fail_test_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unbalanced snippet fail test 1</title>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unbalanced snippet fail test 1
+ </h3>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="source_mode_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Source Mode Test</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </entry>
+ <entry>
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<programlisting>Plain text...</programlisting>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code> but <code>plain
+ text</code>.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <code>int main() {}</code>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code> and <code><phrase
+ role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+ <phrase role="special">{}</phrase></code> should both be C++ highlighted. <code>int
+ main() {}</code> shouldn't be, but <code><phrase role="keyword">int</phrase>
+ <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase
+ role="special">{}</phrase></code> should.
+ </para>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>. Not highlighted:
+ <code>int main() {}</code>.
+ </para>
+ <section id="source_mode_test.cpp">
+ <title><link linkend="source_mode_test.cpp">C++ section</link></title>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Source Mode Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#source_mode_test.cpp">C++ section</a>
+ </li>
+ </ul>
+ </div>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ <tr>
+ <td>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </td>
+ <td>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">foo</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+<pre class="programlisting">Plain text...</pre>
+ <p>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code> but <code>plain
+ text</code>.
+ </p>
+ <ul>
+ <li>
+ <div>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code>
+ </div>
+ </li>
+ <li>
+ <div>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code>
+ </div>
+ </li>
+ <li>
+ <div>
+ <code>int main() {}</code>
+ </div>
+ </li>
+ </ul>
+ <p>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code> and <code><span
+ class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+ <span class="special">{}</span></code> should both be C++ highlighted. <code>int
+ main() {}</code> shouldn't be, but <code><span class="keyword">int</span>
+ <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></code>
+ should.
+ </p>
+ <p>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code>. Not highlighted:
+ <code>int main() {}</code>.
+ </p>
+ <div id="source_mode_test.cpp">
+ <h3>
+ C++ section
+ </h3>
+ <div id="source_mode_test.cpp">
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </div>
+ </div>
+ </body>
+</html>
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 <cstring>
+#include <fstream>
+#include <iostream>
+#include <iterator>
+#include <vector>
+
+#include <boost/spirit/include/classic_primitives.hpp>
+#include <boost/spirit/include/classic_scanner.hpp>
+
+namespace spirit = boost::spirit::classic;
+
+typedef std::istream_iterator<char, char> iterator;
+typedef spirit::scanner<iterator> scanner;
+
+int main(int argc, char* argv[])
+{
+ std::vector<char*> 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="stray_close_bracket_1_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Stray close bracket 1.1</title>
+ <para>
+ X]Y
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Stray close bracket 1.1
+ </h3>
+ <p>
+ X]Y
+ </p>
+ </body>
+</html>
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 <string>
+
+//[ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="svg_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>SVG test</title>
+ <para>
+ <inlinemediaobject><imageobject><imagedata contentdepth="513.25690" contentwidth="745.60706"
+ fileref="images/open_clipart_library_logo.svg" format="SVG"></imagedata></imageobject>
+ <textobject>
+ <phrase>open_clipart_library_logo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="images/missing_image.svg"
+ format="SVG"></imagedata></imageobject>
+ <textobject>
+ <phrase>missing_image</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ SVG test
+ </h3>
+ <p>
+ <span class="inlinemediaobject"><img src="images/open_clipart_library_logo.svg"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="images/missing_image.svg"
+ alt="[]"/></span>
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.3</title>
+ <table frame="all" id="table_tests.t0">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.t1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t2">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t3">
+ <title>Title [/ ] containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t4">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t5">
+ <title>[[Title]]</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.t0">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t1">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t2">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t3">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t4">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.t5">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.t6">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.3
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.t0" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t2" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t3" class="table">
+ <table>
+ <caption>Title [/ ] containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t4" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t5" class="table">
+ <table>
+ <caption>[[Title]]</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.t0" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t1" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t2" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t3" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t4" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.t5" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.t6" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.5</title>
+ <table frame="all" id="table_tests.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.table_2">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.table4">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests._table5_">
+ <title>-table5-</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title_______containing_a_comment">
+ <title>Title [/ ] containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.__title__">
+ <title>[[Title]]</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.a___b">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.empty_table">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.table_with_an_empty_cell">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.indentation">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.nested_tables">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.inner_table">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table_2" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table4" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests._table5_" class="table">
+ <table>
+ <caption>-table5-</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title0" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_______containing_a_comment" class="table">
+ <table>
+ <caption>Title [/ ] containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.__title__" class="table">
+ <table>
+ <caption>[[Title]]</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.a___b" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.empty_table" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.table_with_an_empty_cell" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.indentation" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.nested_tables" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.inner_table" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.6</title>
+ <table frame="all" id="table_tests.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.table_2">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.table4">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.table5">
+ <title>-table5-</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title_containing_a_comment">
+ <title>Title containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title_on_multiple_lines_with_bol">
+ <title>Title on multiple lines with <emphasis role="bold">bold</emphasis> text?</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.a_b">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.empty_table">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.table_with_an_empty_cell">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.indentation">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.nested_tables">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.inner_table">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table_2" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table4" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table5" class="table">
+ <table>
+ <caption>-table5-</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title0" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_containing_a_comment" class="table">
+ <table>
+ <caption>Title containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_on_multiple_lines_with_bol" class="table">
+ <table>
+ <caption>Title on multiple lines with <span class="bold"><strong>bold</strong></span>
+ text?</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.a_b" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.empty_table" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.table_with_an_empty_cell" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.indentation" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.nested_tables" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.inner_table" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.7</title>
+ <table frame="all" id="table_tests.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.table_2">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.table4">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.-table5-">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title_containing_a_comment">
+ <title>Title containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title_on_multiple_lines_with_bol">
+ <title>Title on multiple lines with <emphasis role="bold">bold</emphasis> text?</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.a_b">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.empty_table">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.table_with_an_empty_cell">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.indentation">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Row 2. Cell 1.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Row 2. Cell 1. List item 1.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Row 2. Cell 1. List item 2.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ <entry>
+ <para>
+ Row 2. Cell 2.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Row 2. Cell 2. List item 1.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Row 2. Cell 2. List item 2.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.nested_tables">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.inner_table">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.id123">
+ <title>Table with template id</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table_2" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table4" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.-table5-" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title0" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_containing_a_comment" class="table">
+ <table>
+ <caption>Title containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_on_multiple_lines_with_bol" class="table">
+ <table>
+ <caption>Title on multiple lines with <span class="bold"><strong>bold</strong></span>
+ text?</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.a_b" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.empty_table" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.table_with_an_empty_cell" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.indentation" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Row 2. Cell 1.
+ </p>
+ <ul>
+ <li>
+ <div>
+ Row 2. Cell 1. List item 1.
+ </div>
+ </li>
+ <li>
+ <div>
+ Row 2. Cell 1. List item 2.
+ </div>
+ </li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Row 2. Cell 2.
+ </p>
+ <ul>
+ <li>
+ <div>
+ Row 2. Cell 2. List item 1.
+ </div>
+ </li>
+ <li>
+ <div>
+ Row 2. Cell 2. List item 2.
+ </div>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.nested_tables" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.inner_table" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.id123" class="table">
+ <table>
+ <caption>Table with template id</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_in_a_template" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section in a template</title>
+ <para>
+ Some text before the section.
+ </para>
+ <section id="section_in_a_template.test">
+ <title><link linkend="section_in_a_template.test">Test</link></title>
+ <para>
+ Hello.
+ </para>
+ <bridgehead renderas="sect3" id="section_in_a_template.test.h0">
+ <phrase id="section_in_a_template.test.just_to_test_id_generation"/><link linkend="section_in_a_template.test.just_to_test_id_generation">Just
+ to test id generation</link>
+ </bridgehead>
+ <para>
+ Goodbye.
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section in a template
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_in_a_template.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Some text before the section.
+ </p>
+ <div id="section_in_a_template.test">
+ <h3>
+ Test
+ </h3>
+ <div id="section_in_a_template.test">
+ <p>
+ Hello.
+ </p>
+ <h3 id="section_in_a_template.test.just_to_test_id_generation">
+ Just to test id generation
+ </h3>
+ <p>
+ Goodbye.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Templates</title>
+ <section id="templates.templates">
+ <title><link linkend="templates.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="templates.empty_templates">
+ <title><link linkend="templates.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="templates.nested_templates">
+ <title><link linkend="templates.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="templates.block_markup">
+ <title><link linkend="templates.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="templates.escaped_templates">
+ <title><link linkend="templates.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#templates.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#templates.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#templates.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#templates.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#templates.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="templates.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="templates.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="templates.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="templates.empty_templates">
+ </div>
+ </div>
+ <div id="templates.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="templates.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="templates.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="templates.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="templates.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="templates.escaped_templates">
+ <p>
+ Not real boostbook Also not real boostbook More fake boostbook Final fake
+ boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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] '''<hey>'''[bar]'''</hey>''']
+
+[!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 '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[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 <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.4</title>
+ <para>
+ dynamic scoping
+ </para>
+ <para>
+ old
+ </para>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ {[binary 1 2-3} 4]
+ </para>
+ <para>
+ {1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3}
+ </para>
+ <section id="template_1_4.escaped_templates">
+ <title><link linkend="template_1_4.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.4
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_4.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ dynamic scoping
+ </p>
+ <p>
+ old
+ </p>
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ {[binary 1 2-3} 4]
+ </p>
+ <p>
+ {1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3}
+ </p>
+ <div id="template_1_4.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_4.escaped_templates">
+ <p>
+ Not real boostbook Also not real boostbook More fake boostbook Final fake
+ boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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 <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.5</title>
+ <section id="template_1_5.templates">
+ <title><link linkend="template_1_5.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_5.empty_templates">
+ <title><link linkend="template_1_5.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_5.nested_templates">
+ <title><link linkend="template_1_5.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_5.block_markup">
+ <title><link linkend="template_1_5.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_5.static_scoping">
+ <title><link linkend="template_1_5.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_5.template_arguments">
+ <title><link linkend="template_1_5.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_5.block_and_phrase_templates">
+ <title><link linkend="template_1_5.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ </section>
+ <section id="template_1_5.escaped_templates">
+ <title><link linkend="template_1_5.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_5.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#template_1_5.static_scoping">Static Scoping</a>
+ </li>
+ <li>
+ <a href="#template_1_5.template_arguments">Template Arguments</a>
+ </li>
+ <li>
+ <a href="#template_1_5.block_and_phrase_templates">Block and phrase templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="template_1_5.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="template_1_5.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="template_1_5.empty_templates">
+ </div>
+ </div>
+ <div id="template_1_5.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="template_1_5.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="template_1_5.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="template_1_5.static_scoping">
+ <h3>
+ Static Scoping
+ </h3>
+ <div id="template_1_5.static_scoping">
+ <p>
+ static scoping
+ </p>
+ <p>
+ [a]
+ </p>
+ <p>
+ new
+ </p>
+ <p>
+ foo foo
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.template_arguments">
+ <h3>
+ Template Arguments
+ </h3>
+ <div id="template_1_5.template_arguments">
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </p>
+ <p>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </p>
+ <p>
+ {1-2-3} {1-2-3}
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.block_and_phrase_templates">
+ <h3>
+ Block and phrase templates
+ </h3>
+ <div id="template_1_5.block_and_phrase_templates">
+ <p>
+ Some <span class="bold"><strong>text</strong></span>
+ </p>
+ <p>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </p>
+ <p>
+ Some *text* A <span class="emphasis"><em>paragraph</em></span>.
+ </p>
+ <p>
+ <h3>
+ Things
+ </h3>
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_5.escaped_templates">
+ <p>
+ Not real boostbook Also not real boostbook More fake boostbook Final fake
+ boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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] '''<hey>'''[bar]'''</hey>''']
+
+[!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 '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[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 <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[named_index things Things]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.6</title>
+ <section id="template_1_6.templates">
+ <title><link linkend="template_1_6.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_6.empty_templates">
+ <title><link linkend="template_1_6.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_6.nested_templates">
+ <title><link linkend="template_1_6.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_6.block_markup">
+ <title><link linkend="template_1_6.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_6.static_scoping">
+ <title><link linkend="template_1_6.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_6.template_arguments">
+ <title><link linkend="template_1_6.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_6.block_and_phrase_templates">
+ <title><link linkend="template_1_6.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ </section>
+ <section id="template_1_6.template_body">
+ <title><link linkend="template_1_6.template_body">Skipping the template body
+ correctly</link></title>
+ <para>
+ <emphasis>Argument</emphasis>
+ </para>
+ <orderedlist>
+ <listitem>
+<programlisting><phrase role="identifier">code</phrase></programlisting>
+ </listitem>
+ </orderedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="identifier">code</phrase></code>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="template_1_6.escaped_templates">
+ <title><link linkend="template_1_6.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>More fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_6.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#template_1_6.static_scoping">Static Scoping</a>
+ </li>
+ <li>
+ <a href="#template_1_6.template_arguments">Template Arguments</a>
+ </li>
+ <li>
+ <a href="#template_1_6.block_and_phrase_templates">Block and phrase templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.template_body">Skipping the template body correctly</a>
+ </li>
+ <li>
+ <a href="#template_1_6.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="template_1_6.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="template_1_6.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="template_1_6.empty_templates">
+ </div>
+ </div>
+ <div id="template_1_6.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="template_1_6.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="template_1_6.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="template_1_6.static_scoping">
+ <h3>
+ Static Scoping
+ </h3>
+ <div id="template_1_6.static_scoping">
+ <p>
+ static scoping
+ </p>
+ <p>
+ [a]
+ </p>
+ <p>
+ new
+ </p>
+ <p>
+ foo foo
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.template_arguments">
+ <h3>
+ Template Arguments
+ </h3>
+ <div id="template_1_6.template_arguments">
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </p>
+ <p>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </p>
+ <p>
+ {1-2-3} {1-2-3}
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.block_and_phrase_templates">
+ <h3>
+ Block and phrase templates
+ </h3>
+ <div id="template_1_6.block_and_phrase_templates">
+ <p>
+ Some <span class="bold"><strong>text</strong></span>
+ </p>
+ <p>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </p>
+ <p>
+ Some *text* A <span class="emphasis"><em>paragraph</em></span>.
+ </p>
+ <p>
+ <h3>
+ Things
+ </h3>
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.template_body">
+ <h3>
+ Skipping the template body correctly
+ </h3>
+ <div id="template_1_6.template_body">
+ <p>
+ <span class="emphasis"><em>Argument</em></span>
+ </p>
+ <ol>
+ <li>
+<pre class="programlisting"><span class="identifier">code</span></pre>
+ </li>
+ </ol>
+ <ol>
+ <li>
+ <div>
+ <code><span class="identifier">code</span></code>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="template_1_6.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_6.escaped_templates">
+ <p>
+ Not real boostbook More fake boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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] '''<hey>'''[bar]'''</hey>''']
+
+[!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 '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[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 <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[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 <emphasis>Argument</emphasis>]
+[args2]
+[args3]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template escaped1 [x] [`x]]
+
+[`raw_markup]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.7</title>
+ <section id="template_1_7.templates">
+ <title><link linkend="template_1_7.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_7.empty_templates">
+ <title><link linkend="template_1_7.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_7.nested_templates">
+ <title><link linkend="template_1_7.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template. Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_7.block_markup">
+ <title><link linkend="template_1_7.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_7.static_scoping">
+ <title><link linkend="template_1_7.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_7.template_arguments">
+ <title><link linkend="template_1_7.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_7.block_and_phrase_templates">
+ <title><link linkend="template_1_7.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text2 afterwards. Text3 before.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text4 before.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text4 afterwards.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ * Not a list.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ * Not a list.
+ </para>
+ </section>
+ <section id="template_1_7.template_body">
+ <title><link linkend="template_1_7.template_body">Skipping the template body
+ correctly</link></title>
+ <para>
+ <emphasis>Argument</emphasis>
+ </para>
+ <orderedlist>
+ <listitem>
+<programlisting><phrase role="identifier">code</phrase></programlisting>
+ </listitem>
+ </orderedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="identifier">code</phrase></code>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="template_1_7.escaped_templates">
+ <title><link linkend="template_1_7.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>More fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_7.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#template_1_7.static_scoping">Static Scoping</a>
+ </li>
+ <li>
+ <a href="#template_1_7.template_arguments">Template Arguments</a>
+ </li>
+ <li>
+ <a href="#template_1_7.block_and_phrase_templates">Block and phrase templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.template_body">Skipping the template body correctly</a>
+ </li>
+ <li>
+ <a href="#template_1_7.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="template_1_7.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="template_1_7.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="template_1_7.empty_templates">
+ </div>
+ </div>
+ <div id="template_1_7.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="template_1_7.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template. Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="template_1_7.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="template_1_7.static_scoping">
+ <h3>
+ Static Scoping
+ </h3>
+ <div id="template_1_7.static_scoping">
+ <p>
+ static scoping
+ </p>
+ <p>
+ [a]
+ </p>
+ <p>
+ new
+ </p>
+ <p>
+ foo foo
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.template_arguments">
+ <h3>
+ Template Arguments
+ </h3>
+ <div id="template_1_7.template_arguments">
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </p>
+ <p>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </p>
+ <p>
+ {1-2-3} {1-2-3}
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.block_and_phrase_templates">
+ <h3>
+ Block and phrase templates
+ </h3>
+ <div id="template_1_7.block_and_phrase_templates">
+ <p>
+ Some <span class="bold"><strong>text</strong></span>
+ </p>
+ <p>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </p>
+ <p>
+ Some *text* A <span class="emphasis"><em>paragraph</em></span>.
+ </p>
+ <p>
+ <h3>
+ Things
+ </h3>
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Text2 afterwards. Text3 before.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Text4 before.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Text4 afterwards.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ * Not a list.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ * Not a list.
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.template_body">
+ <h3>
+ Skipping the template body correctly
+ </h3>
+ <div id="template_1_7.template_body">
+ <p>
+ <span class="emphasis"><em>Argument</em></span>
+ </p>
+ <ol>
+ <li>
+<pre class="programlisting"><span class="identifier">code</span></pre>
+ </li>
+ </ol>
+ <ol>
+ <li>
+ <div>
+ <code><span class="identifier">code</span></code>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="template_1_7.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_7.escaped_templates">
+ <p>
+ Not real boostbook More fake boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
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] '''<hey>'''[bar]'''</hey>''']
+
+[|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 '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[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 <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[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 <emphasis>Argument</emphasis>]
+[args2]
+[args3]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template escaped1 [x] [`x]]
+
+[`raw_markup]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>UTF-8 test</title>
+ <bridgehead renderas="sect2" id="utf_8_test.h0">
+ <phrase id="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n"/><link
+ linkend="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n">I&#xF1;t&#xEB;rn&#xE2;ti&#xF4;n&#xE0;liz&#xE6;ti&#xF8;n</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &#x391;&#x3B1; Alpha
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x392;&#x3B2; Beta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x393;&#x3B3; Gamma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x394;&#x3B4; Delta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x395;&#x3B5; Epsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x396;&#x3B6; Zeta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x397;&#x3B7; Eta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x398;&#x3B8; Theta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x399;&#x3B9; Iota
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39A;&#x3BA; Kappa
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39B;&#x3BB; Lambda
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39C;&#x3BC; Mu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39D;&#x3BD; Nu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39E;&#x3BE; Xi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39F;&#x3BF; Omicron
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A0;&#x3C0; Pi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A1;&#x3C1; Rho
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A3;&#x3C3;&#x3C2; Sigma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A4;&#x3C4; Tau
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A5;&#x3C5; Upsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A6;&#x3C6; Phi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A7;&#x3C7; Chi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A8;&#x3C8; Psi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A9;&#x3C9; Omega
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ In the unlikely event that you've got a Mahjong font:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &#x1F000; East Wind
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x1F001; South Wind
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x1F002; West Wind
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x1F003; North Wind
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ UTF-8 test
+ </h3>
+ <h2 id="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n">
+ I&#xF1;t&#xEB;rn&#xE2;ti&#xF4;n&#xE0;liz&#xE6;ti&#xF8;n
+ </h2>
+ <ul>
+ <li>
+ <div>
+ &#x391;&#x3B1; Alpha
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x392;&#x3B2; Beta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x393;&#x3B3; Gamma
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x394;&#x3B4; Delta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x395;&#x3B5; Epsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x396;&#x3B6; Zeta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x397;&#x3B7; Eta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x398;&#x3B8; Theta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x399;&#x3B9; Iota
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39A;&#x3BA; Kappa
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39B;&#x3BB; Lambda
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39C;&#x3BC; Mu
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39D;&#x3BD; Nu
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39E;&#x3BE; Xi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39F;&#x3BF; Omicron
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A0;&#x3C0; Pi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A1;&#x3C1; Rho
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A3;&#x3C3;&#x3C2; Sigma
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A4;&#x3C4; Tau
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A5;&#x3C5; Upsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A6;&#x3C6; Phi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A7;&#x3C7; Chi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A8;&#x3C8; Psi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A9;&#x3C9; Omega
+ </div>
+ </li>
+ </ul>
+ <p>
+ In the unlikely event that you've got a Mahjong font:
+ </p>
+ <ul>
+ <li>
+ <div>
+ &#x1F000; East Wind
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x1F001; South Wind
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x1F002; West Wind
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x1F003; North Wind
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
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
+ <include>../../src
+ <warnings>all
+ <library>/boost//filesystem
+ <toolset>gcc:<cflags>-g0
+ <toolset>darwin:<cflags>-g0
+ <toolset>msvc:<cflags>/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 <vector>
+#include <boost/core/lightweight_test.hpp>
+#include "cleanup.hpp"
+
+struct counted
+{
+ static int count;
+ static std::vector<int> 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<int> 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 <boost/detail/lightweight_test.hpp>
+#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 <boost/detail/lightweight_test.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/predef.h>
+#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 <boost/detail/lightweight_test.hpp>
+#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("</thing>"), "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 <boost/detail/lightweight_test.hpp>
+#include <boost/range/algorithm/find.hpp>
+#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 <boost/spirit/include/classic_scanner.hpp>
+#include <boost/utility/addressof.hpp>
+#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<void*, char_type> 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 <iostream>
+#include <string>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
+#include <boost/swap.hpp>
+#include "symbols.hpp"
+
+///////////////////////////////////////////////////////////////////////////////
+using namespace std;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
+
+///////////////////////////////////////////////////////////////////////////////
+
+template <typename IteratorT> bool equal(IteratorT p, IteratorT q)
+{
+ while (*p && *p == *q) {
+ ++p;
+ ++q;
+ }
+ return *p == *q;
+}
+
+template <class SymbolsT, typename CharT>
+void docheck(
+ SymbolsT const& sym,
+ CharT const* candidate,
+ bool hit,
+ CharT const* result,
+ int length)
+{
+ parse_info<CharT const*> 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 <typename T> struct store_action
+{
+ store_action(T const& v) : value(v) {}
+ void operator()(T& v) const { v = value; }
+
+ private:
+ T const value;
+};
+
+template <typename T> store_action<T> store(T const& v) { return v; }
+
+template <typename T> 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 <typename T> check_action<T> docheck(T const& v) { return v; }
+
+static void default_constructible()
+{ // this actually a compile time test
+ symbols<int, char, quickbook::tst<int, char> > ns1;
+ symbols<int, wchar_t, quickbook::tst<int, wchar_t> > ws1;
+ symbols<std::string, char, quickbook::tst<std::string, char> > ns2;
+ symbols<std::string, wchar_t, quickbook::tst<std::string, wchar_t> > ws2;
+
+ (void)ns1;
+ (void)ws1;
+ (void)ns2;
+ (void)ws2;
+}
+
+typedef symbols<int, char, quickbook::tst<int, char> > nsymbols;
+typedef symbols<int, wchar_t, quickbook::tst<int, wchar_t> > 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<char const*> 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 <boost/detail/lightweight_test.hpp>
+#include "utils.hpp"
+
+#include <iostream>
+
+void linkify_test()
+{
+ using quickbook::detail::linkify;
+
+ BOOST_TEST(linkify("abc", "link") == "<link linkend=\"link\">abc</link>");
+ BOOST_TEST(
+ linkify("<link linkend=\"something\">abc</link>", "link") ==
+ "<link linkend=\"something\">abc</link>");
+ BOOST_TEST(
+ linkify("abc <link linkend=\"something\">def</link>", "link") ==
+ "abc <link linkend=\"something\">def</link>");
+ BOOST_TEST(
+ linkify("<link linkend=\"something\">abc</link> def", "link") ==
+ "<link linkend=\"something\">abc</link> def");
+}
+
+void decode_string_test()
+{
+ using quickbook::detail::decode_string;
+ BOOST_TEST_EQ(std::string("<A&B>"), decode_string("&lt;A&amp;B&gt;"));
+ BOOST_TEST_EQ(std::string("<A&B>"), decode_string("&lt;A&B&gt;"));
+ BOOST_TEST_EQ(std::string("a"), decode_string("&#97;"));
+ BOOST_TEST_EQ(std::string("OO"), decode_string("&#x4f;&#x4F;"));
+ // 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("&#x24;&#xA2;&#x20AC;&#x10348;"));
+}
+
+void encode_string_test()
+{
+ using quickbook::detail::encode_string;
+ BOOST_TEST_EQ(std::string("&lt;A&amp;B&gt;"), encode_string("<A&B>"));
+}
+
+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 <vector>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#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<quickbook::value> 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unmatched_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unmatched elements</title>
+ <para>
+ <emphasis role="bold">[non-element</emphasis>]
+ </para>
+ <para>
+ [non-element]
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unmatched elements
+ </h3>
+ <p>
+ <span class="bold"><strong>[non-element</strong></span>]
+ </p>
+ <p>
+ [non-element]
+ </p>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unmatched_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unmatched elements</title>
+ <para>
+ <emphasis role="bold">[non-element]</emphasis>
+ </para>
+ <para>
+ [non-element]
+ </para>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unmatched elements
+ </h3>
+ <p>
+ <span class="bold"><strong>[non-element]</strong></span>
+ </p>
+ <p>
+ [non-element]
+ </p>
+ </body>
+</html>
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
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook
Binary files 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
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook
Binary files 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>UTF-8 test</title>
+ <bridgehead renderas="sect2" id="utf_8_test.h0">
+ <phrase id="utf_8_test.i__t__rn__ti__n__liz__ti__n"/><link linkend="utf_8_test.i__t__rn__ti__n__liz__ti__n">Iñtërnâtiônàlizætiøn</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Αα Alpha
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ββ Beta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Γγ Gamma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Δδ Delta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Εε Epsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ζζ Zeta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ηη Eta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Θθ Theta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ιι Iota
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Κκ Kappa
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Λλ Lambda
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Μμ Mu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Νν Nu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ξξ Xi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Οο Omicron
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ππ Pi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ρρ Rho
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Σσς Sigma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ττ Tau
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Υυ Upsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Φφ Phi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Χχ Chi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ψψ Psi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ωω Omega
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ UTF-8 test
+ </h3>
+ <h2 id="utf_8_test.i__t__rn__ti__n__liz__ti__n">
+ Iñtërnâtiônàlizætiøn
+ </h2>
+ <ul>
+ <li>
+ <div>
+ Αα Alpha
+ </div>
+ </li>
+ <li>
+ <div>
+ Ββ Beta
+ </div>
+ </li>
+ <li>
+ <div>
+ Γγ Gamma
+ </div>
+ </li>
+ <li>
+ <div>
+ Δδ Delta
+ </div>
+ </li>
+ <li>
+ <div>
+ Εε Epsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Ζζ Zeta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ηη Eta
+ </div>
+ </li>
+ <li>
+ <div>
+ Θθ Theta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ιι Iota
+ </div>
+ </li>
+ <li>
+ <div>
+ Κκ Kappa
+ </div>
+ </li>
+ <li>
+ <div>
+ Λλ Lambda
+ </div>
+ </li>
+ <li>
+ <div>
+ Μμ Mu
+ </div>
+ </li>
+ <li>
+ <div>
+ Νν Nu
+ </div>
+ </li>
+ <li>
+ <div>
+ Ξξ Xi
+ </div>
+ </li>
+ <li>
+ <div>
+ Οο Omicron
+ </div>
+ </li>
+ <li>
+ <div>
+ Ππ Pi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ρρ Rho
+ </div>
+ </li>
+ <li>
+ <div>
+ Σσς Sigma
+ </div>
+ </li>
+ <li>
+ <div>
+ Ττ Tau
+ </div>
+ </li>
+ <li>
+ <div>
+ Υυ Upsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Φφ Phi
+ </div>
+ </li>
+ <li>
+ <div>
+ Χχ Chi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ψψ Psi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ωω Omega
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>UTF-8 test</title>
+ <bridgehead renderas="sect2" id="utf_8_test.h0">
+ <phrase id="utf_8_test.i__t__rn__ti__n__liz__ti__n"/><link linkend="utf_8_test.i__t__rn__ti__n__liz__ti__n">Iñtërnâtiônàlizætiøn</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Αα Alpha
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ββ Beta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Γγ Gamma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Δδ Delta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Εε Epsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ζζ Zeta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ηη Eta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Θθ Theta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ιι Iota
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Κκ Kappa
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Λλ Lambda
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Μμ Mu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Νν Nu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ξξ Xi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Οο Omicron
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ππ Pi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ρρ Rho
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Σσς Sigma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ττ Tau
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Υυ Upsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Φφ Phi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Χχ Chi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ψψ Psi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ωω Omega
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ UTF-8 test
+ </h3>
+ <h2 id="utf_8_test.i__t__rn__ti__n__liz__ti__n">
+ Iñtërnâtiônàlizætiøn
+ </h2>
+ <ul>
+ <li>
+ <div>
+ Αα Alpha
+ </div>
+ </li>
+ <li>
+ <div>
+ Ββ Beta
+ </div>
+ </li>
+ <li>
+ <div>
+ Γγ Gamma
+ </div>
+ </li>
+ <li>
+ <div>
+ Δδ Delta
+ </div>
+ </li>
+ <li>
+ <div>
+ Εε Epsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Ζζ Zeta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ηη Eta
+ </div>
+ </li>
+ <li>
+ <div>
+ Θθ Theta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ιι Iota
+ </div>
+ </li>
+ <li>
+ <div>
+ Κκ Kappa
+ </div>
+ </li>
+ <li>
+ <div>
+ Λλ Lambda
+ </div>
+ </li>
+ <li>
+ <div>
+ Μμ Mu
+ </div>
+ </li>
+ <li>
+ <div>
+ Νν Nu
+ </div>
+ </li>
+ <li>
+ <div>
+ Ξξ Xi
+ </div>
+ </li>
+ <li>
+ <div>
+ Οο Omicron
+ </div>
+ </li>
+ <li>
+ <div>
+ Ππ Pi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ρρ Rho
+ </div>
+ </li>
+ <li>
+ <div>
+ Σσς Sigma
+ </div>
+ </li>
+ <li>
+ <div>
+ Ττ Tau
+ </div>
+ </li>
+ <li>
+ <div>
+ Υυ Upsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Φφ Phi
+ </div>
+ </li>
+ <li>
+ <div>
+ Χχ Chi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ψψ Psi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ωω Omega
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="variable_list_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Variable List Tests</title>
+ <variablelist>
+ <title>Empty</title>
+ </variablelist>
+ <variablelist>
+ <title>One entry</title>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <title>One entry, multiple items</title>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <title>Several entries</title>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ <para>
+ d
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ <para>
+ d
+ </para>
+ <para>
+ e
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="id1"/>
+ <variablelist>
+ <title>Variable List with anchors</title>
+ <varlistentry>
+ <term><anchor id="id2"/>a<anchor id="id3"/></term>
+ <listitem>
+ <para>
+ <anchor id="id4"/>b<anchor id="id5"/>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Variable List Tests
+ </h3>
+ <dl>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ </dd>
+ </dl>
+ <dl>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ </dd>
+ </dl>
+ <dl>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ <p>
+ d
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ <p>
+ d
+ </p>
+ <p>
+ e
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ </dd>
+ </dl>
+ <span id="id1"></span>
+ <dl>
+ <dt>
+ <span id="id2"></span>a<span id="id3"></span>
+ </dt>
+ <dd>
+ <p>
+ <span id="id4"></span>b<span id="id5"></span>
+ </p>
+ </dd>
+ </dl>
+ </body>
+</html>
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
+ <toolset>msvc:<debug-symbols>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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="invalid_macro_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Invalid macro test</title>
+ <para>
+ Import:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ okay
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ __invalid\macro__
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Include:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ okay
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ bad
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Invalid macro test
+ </h3>
+ <p>
+ Import:
+ </p>
+ <ul>
+ <li>
+ <div>
+ okay
+ </div>
+ </li>
+ <li>
+ <div>
+ __invalid\macro__
+ </div>
+ </li>
+ </ul>
+ <p>
+ Include:
+ </p>
+ <ul>
+ <li>
+ <div>
+ okay
+ </div>
+ </li>
+ <li>
+ <div>
+ bad
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mixed_version_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mixed version tests</title>
+ <para>
+ correct
+ </para>
+ <section id="mixed_version_tests.section_ids">
+ <title><link linkend="mixed_version_tests.section_ids">Section ids in templates</link></title>
+ <section id="mixed_version_tests.section_ids.in_a_1_1_template">
+ <title><link linkend="mixed_version_tests.section_ids.in_a_1_1_template">In
+ a 1.1 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="mixed_version_tests.section_ids.in_a_1_4_template">
+ <title><link linkend="mixed_version_tests.section_ids.in_a_1_4_template">In
+ a 1.4 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="mixed_version_tests.section_ids.in_a_1_5_template">
+ <title><link linkend="mixed_version_tests.section_ids.in_a_1_5_template">In
+ a 1.5 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ <article id="1_1_templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.1 Templates</title>
+ <section id="1_1_templates.1_1_document">
+ <title>1.1 Document</title>
+ <section id="1_1_templates.in_a_1_1_template">
+ <title>In a 1.1 template</title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_1_templates.in_a_1_4_template">
+ <title>In a 1.4 template</title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_1_templates.in_a_1_5_template">
+ <title>In a 1.5 template</title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ </article>
+ <article id="1_4_templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.4 Templates</title>
+ <section id="1_4_templates.1_4_document">
+ <title><link linkend="1_4_templates.1_4_document">1.4 Document</link></title>
+ <section id="1_4_templates.1_4_document.in_a_1_1_template">
+ <title><link linkend="1_4_templates.1_4_document.in_a_1_1_template">In a
+ 1.1 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_4_templates.1_4_document.in_a_1_4_template">
+ <title><link linkend="1_4_templates.1_4_document.in_a_1_4_template">In a
+ 1.4 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_4_templates.1_4_document.in_a_1_5_template">
+ <title><link linkend="1_4_templates.1_4_document.in_a_1_5_template">In a
+ 1.5 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ </article>
+ <article id="1_5_templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.5 Templates</title>
+ <section id="1_5_templates.1_5_document">
+ <title><link linkend="1_5_templates.1_5_document">1.5 Document</link></title>
+ <section id="1_5_templates.1_5_document.in_a_1_1_template">
+ <title><link linkend="1_5_templates.1_5_document.in_a_1_1_template">In a
+ 1.1 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_5_templates.1_5_document.in_a_1_4_template">
+ <title><link linkend="1_5_templates.1_5_document.in_a_1_4_template">In a
+ 1.4 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_5_templates.1_5_document.in_a_1_5_template">
+ <title><link linkend="1_5_templates.1_5_document.in_a_1_5_template">In a
+ 1.5 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ </article>
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mixed version tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#mixed_version_tests.section_ids">Section ids in templates</a>
+ </li>
+ <li>
+ <a href="#1_1_templates">1.1 Templates</a>
+ <ul>
+ <li>
+ <a href="#1_1_templates.1_1_document">1.1 Document</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#1_4_templates">1.4 Templates</a>
+ <ul>
+ <li>
+ <a href="#1_4_templates.1_4_document">1.4 Document</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#1_5_templates">1.5 Templates</a>
+ <ul>
+ <li>
+ <a href="#1_5_templates.1_5_document">1.5 Document</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <p>
+ correct
+ </p>
+ <div id="mixed_version_tests.section_ids">
+ <h3>
+ Section ids in templates
+ </h3>
+ <div id="mixed_version_tests.section_ids">
+ </div>
+ <div id="mixed_version_tests.section_ids.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="mixed_version_tests.section_ids.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="mixed_version_tests.section_ids.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="mixed_version_tests.section_ids.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="mixed_version_tests.section_ids.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="mixed_version_tests.section_ids.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="1_1_templates">
+ <h3>
+ 1.1 Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#1_1_templates.1_1_document">1.1 Document</a>
+ </li>
+ </ul>
+ </div>
+ <div id="1_1_templates.1_1_document">
+ <h3>
+ 1.1 Document
+ </h3>
+ <div id="1_1_templates.1_1_document">
+ </div>
+ <div id="1_1_templates.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="1_1_templates.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_1_templates.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="1_1_templates.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_1_templates.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="1_1_templates.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="1_4_templates">
+ <h3>
+ 1.4 Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#1_4_templates.1_4_document">1.4 Document</a>
+ </li>
+ </ul>
+ </div>
+ <div id="1_4_templates.1_4_document">
+ <h3>
+ 1.4 Document
+ </h3>
+ <div id="1_4_templates.1_4_document">
+ </div>
+ <div id="1_4_templates.1_4_document.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="1_4_templates.1_4_document.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_4_templates.1_4_document.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="1_4_templates.1_4_document.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_4_templates.1_4_document.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="1_4_templates.1_4_document.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="1_5_templates">
+ <h3>
+ 1.5 Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#1_5_templates.1_5_document">1.5 Document</a>
+ </li>
+ </ul>
+ </div>
+ <div id="1_5_templates.1_5_document">
+ <h3>
+ 1.5 Document
+ </h3>
+ <div id="1_5_templates.1_5_document">
+ </div>
+ <div id="1_5_templates.1_5_document.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="1_5_templates.1_5_document.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_5_templates.1_5_document.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="1_5_templates.1_5_document.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_5_templates.1_5_document.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="1_5_templates.1_5_document.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
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
+ <toolset>msvc:<debug-symbols>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 : : : <quickbook-xinclude-base>$(xinclude_base1) ]
+ [ quickbook-test xmlbase1-1_6 : : : <quickbook-xinclude-base>$(xinclude_base1) ]
+ [ quickbook-test xmlbase2-1_6 : : : <quickbook-xinclude-base>$(xinclude_base1) ]
+ [ quickbook-test xinclude-1_1-alt : xinclude-1_1.quickbook : xinclude-1_1-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
+ [ quickbook-test xmlbase1-1_6-alt : xmlbase1-1_6.quickbook : xmlbase1-1_6-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
+ [ quickbook-test xmlbase2-1_6-alt : xmlbase2-1_6.quickbook : xmlbase2-1_6-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
+ [ quickbook-test xinclude-1_1-alt2 : xinclude-1_1.quickbook : xinclude-1_1-alt2.gold : <quickbook-xinclude-base>$(xinclude_base3) ]
+ [ quickbook-test xmlbase1-1_6-alt2 : xmlbase1-1_6.quickbook : xmlbase1-1_6-alt2.gold : <quickbook-xinclude-base>$(xinclude_base3) ]
+ [ quickbook-test xmlbase2-1_6-alt2 : xmlbase2-1_6.quickbook : xmlbase2-1_6-alt2.gold : <quickbook-xinclude-base>$(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
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/sub/stub.xml
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <xi:include href="../../stub.xml" />
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="../../xinclude" />
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include
+ </h3>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <xi:include href="test/stub.xml" />
+ <xi:include href="test/xinclude/stub.xml" />
+ <xi:include href="test/xinclude/sub/stub.xml" />
+ <xi:include href="test/xinclude" />
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include
+ </h3>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="../" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="./" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="test/xinclude/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="../../include/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="../xinclude/stub.xml" />
+ <xi:include href="../xinclude/sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="../include/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="../xinclude/stub.xml" />
+ <xi:include href="../xinclude/sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="test/include/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="../xinclude/stub.xml" />
+ <xi:include href="../xinclude/sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="test_that__amp____lt__are_being_escaped_" name="Test that &amp;, &lt; are being escaped."
+dirname="test_that__amp____lt__are_being_escaped_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <legalnotice id="test_that__amp____lt__are_being_escaped_.legal">
+ <para>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </para>
+ </legalnotice>
+ <librarypurpose>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </librarypurpose>
+ </libraryinfo>
+ <title>Test that &amp;, &lt; are being escaped.</title>
+ <section id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <title>Escapes &amp; explicitly written markup</title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &amp; -&gt; &amp;amp;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &lt; -&gt; &amp;lt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &gt; -&gt; &amp;gt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &quot; -&gt; &amp;quot;
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</library>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test that &amp;, &lt; are being escaped.
+ </h3>
+ <div class="legalnotice">
+ <p>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes
+ &amp; explicitly written markup</a>
+ </li>
+ </ul>
+ </div>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <h3>
+ Escapes &amp; explicitly written markup
+ </h3>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <ul>
+ <li>
+ <div>
+ &amp; -&gt; &amp;amp;
+ </div>
+ </li>
+ <li>
+ <div>
+ &lt; -&gt; &amp;lt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &gt; -&gt; &amp;gt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &quot; -&gt; &amp;quot;
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
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 &amp;, &lt; are being escaped.
+ [quickbook 1.2]
+ [purpose &amp; should be &amp;amp;, &lt; should &amp;lt;]
+ [license &amp; should be &amp;amp;, &lt; should &amp;lt;]
+]
+
+[section Escapes & explicitly written markup]
+
+* & -> &amp;
+* < -> &lt;
+* > -> &gt;
+* " -> &quot;
+
+[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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="test_that__amp____lt__are_being_escaped_" name="Test that &amp;, &lt; are being escaped."
+dirname="test_that__amp____lt__are_being_escaped_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <legalnotice id="test_that__amp____lt__are_being_escaped_.legal">
+ <para>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </para>
+ </legalnotice>
+ <librarypurpose>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </librarypurpose>
+ </libraryinfo>
+ <title>Test that &amp;, &lt; are being escaped.</title>
+ <section id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <title><link linkend="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes
+ &amp; explicitly written markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &amp; -&gt; &amp;amp;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &lt; -&gt; &amp;lt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &gt; -&gt; &amp;gt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &quot; -&gt; &amp;quot;
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</library>
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 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test that &amp;, &lt; are being escaped.
+ </h3>
+ <div class="legalnotice">
+ <p>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes
+ &amp; explicitly written markup</a>
+ </li>
+ </ul>
+ </div>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <h3>
+ Escapes &amp; explicitly written markup
+ </h3>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <ul>
+ <li>
+ <div>
+ &amp; -&gt; &amp;amp;
+ </div>
+ </li>
+ <li>
+ <div>
+ &lt; -&gt; &amp;lt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &gt; -&gt; &amp;gt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &quot; -&gt; &amp;quot;
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
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 &amp;, &lt; are being escaped.
+ [quickbook 1.5]
+ [purpose & should be &amp;, < should &lt;]
+ [license & should be &amp;, < should &lt;]
+]
+
+[section Escapes & explicitly written markup]
+
+* & -> &amp;
+* < -> &lt;
+* > -> &gt;
+* " -> &quot;
+
+[endsect] \ No newline at end of file